mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 13:22:23 +00:00
ath10k: implement AP CSA
Most channel switching logic has been implemented already so this patch is pretty small. The patch makes use of mac80211's vif->csa_active for AP CSA handling. Signed-off-by: Michal Kazior <michal.kazior@tieto.com> Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
This commit is contained in:
parent
c930f744bd
commit
c2df44b39b
@ -3818,6 +3818,14 @@ static int ath10k_set_bitrate_mask(struct ieee80211_hw *hw,
|
|||||||
return ath10k_set_fixed_rate_param(arvif, fixed_rate, fixed_nss);
|
return ath10k_set_fixed_rate_param(arvif, fixed_rate, fixed_nss);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void ath10k_channel_switch_beacon(struct ieee80211_hw *hw,
|
||||||
|
struct ieee80211_vif *vif,
|
||||||
|
struct cfg80211_chan_def *chandef)
|
||||||
|
{
|
||||||
|
/* there's no need to do anything here. vif->csa_active is enough */
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
static const struct ieee80211_ops ath10k_ops = {
|
static const struct ieee80211_ops ath10k_ops = {
|
||||||
.tx = ath10k_tx,
|
.tx = ath10k_tx,
|
||||||
.start = ath10k_start,
|
.start = ath10k_start,
|
||||||
@ -3841,6 +3849,7 @@ static const struct ieee80211_ops ath10k_ops = {
|
|||||||
.restart_complete = ath10k_restart_complete,
|
.restart_complete = ath10k_restart_complete,
|
||||||
.get_survey = ath10k_get_survey,
|
.get_survey = ath10k_get_survey,
|
||||||
.set_bitrate_mask = ath10k_set_bitrate_mask,
|
.set_bitrate_mask = ath10k_set_bitrate_mask,
|
||||||
|
.channel_switch_beacon = ath10k_channel_switch_beacon,
|
||||||
#ifdef CONFIG_PM
|
#ifdef CONFIG_PM
|
||||||
.suspend = ath10k_suspend,
|
.suspend = ath10k_suspend,
|
||||||
.resume = ath10k_resume,
|
.resume = ath10k_resume,
|
||||||
@ -4220,6 +4229,7 @@ int ath10k_mac_register(struct ath10k *ar)
|
|||||||
ar->hw->max_listen_interval = ATH10K_MAX_HW_LISTEN_INTERVAL;
|
ar->hw->max_listen_interval = ATH10K_MAX_HW_LISTEN_INTERVAL;
|
||||||
|
|
||||||
ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
|
ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
|
||||||
|
ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
|
||||||
ar->hw->wiphy->max_remain_on_channel_duration = 5000;
|
ar->hw->wiphy->max_remain_on_channel_duration = 5000;
|
||||||
|
|
||||||
ar->hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD;
|
ar->hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD;
|
||||||
|
@ -1405,6 +1405,17 @@ static void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* There are no completions for beacons so wait for next SWBA
|
||||||
|
* before telling mac80211 to decrement CSA counter
|
||||||
|
*
|
||||||
|
* Once CSA counter is completed stop sending beacons until
|
||||||
|
* actual channel switch is done */
|
||||||
|
if (arvif->vif->csa_active &&
|
||||||
|
ieee80211_csa_is_complete(arvif->vif)) {
|
||||||
|
ieee80211_csa_finish(arvif->vif);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
bcn = ieee80211_beacon_get(ar->hw, arvif->vif);
|
bcn = ieee80211_beacon_get(ar->hw, arvif->vif);
|
||||||
if (!bcn) {
|
if (!bcn) {
|
||||||
ath10k_warn("could not get mac80211 beacon\n");
|
ath10k_warn("could not get mac80211 beacon\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user