aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Kazior <michal.kazior@tieto.com>2014-01-23 05:38:26 -0500
committerKalle Valo <kvalo@qca.qualcomm.com>2014-01-24 03:23:06 -0500
commitc2df44b39b31a730a89b13f7be90860d93d1f9d8 (patch)
treedfaead5c0b766dd055f02246591ad66442c516d7
parentc930f744bdb0774ccf7c00e23637f54b8e71f0b6 (diff)
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>
-rw-r--r--drivers/net/wireless/ath/ath10k/mac.c10
-rw-r--r--drivers/net/wireless/ath/ath10k/wmi.c11
2 files changed, 21 insertions, 0 deletions
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 8fe451796fde..4bf5f19602e4 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3818,6 +3818,14 @@ static int ath10k_set_bitrate_mask(struct ieee80211_hw *hw,
3818 return ath10k_set_fixed_rate_param(arvif, fixed_rate, fixed_nss); 3818 return ath10k_set_fixed_rate_param(arvif, fixed_rate, fixed_nss);
3819} 3819}
3820 3820
3821static void ath10k_channel_switch_beacon(struct ieee80211_hw *hw,
3822 struct ieee80211_vif *vif,
3823 struct cfg80211_chan_def *chandef)
3824{
3825 /* there's no need to do anything here. vif->csa_active is enough */
3826 return;
3827}
3828
3821static const struct ieee80211_ops ath10k_ops = { 3829static const struct ieee80211_ops ath10k_ops = {
3822 .tx = ath10k_tx, 3830 .tx = ath10k_tx,
3823 .start = ath10k_start, 3831 .start = ath10k_start,
@@ -3841,6 +3849,7 @@ static const struct ieee80211_ops ath10k_ops = {
3841 .restart_complete = ath10k_restart_complete, 3849 .restart_complete = ath10k_restart_complete,
3842 .get_survey = ath10k_get_survey, 3850 .get_survey = ath10k_get_survey,
3843 .set_bitrate_mask = ath10k_set_bitrate_mask, 3851 .set_bitrate_mask = ath10k_set_bitrate_mask,
3852 .channel_switch_beacon = ath10k_channel_switch_beacon,
3844#ifdef CONFIG_PM 3853#ifdef CONFIG_PM
3845 .suspend = ath10k_suspend, 3854 .suspend = ath10k_suspend,
3846 .resume = ath10k_resume, 3855 .resume = ath10k_resume,
@@ -4220,6 +4229,7 @@ int ath10k_mac_register(struct ath10k *ar)
4220 ar->hw->max_listen_interval = ATH10K_MAX_HW_LISTEN_INTERVAL; 4229 ar->hw->max_listen_interval = ATH10K_MAX_HW_LISTEN_INTERVAL;
4221 4230
4222 ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; 4231 ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL;
4232 ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_CHANNEL_SWITCH;
4223 ar->hw->wiphy->max_remain_on_channel_duration = 5000; 4233 ar->hw->wiphy->max_remain_on_channel_duration = 5000;
4224 4234
4225 ar->hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD; 4235 ar->hw->wiphy->flags |= WIPHY_FLAG_AP_UAPSD;
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index f0969cd8350f..a1ec5d0fb0ef 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -1405,6 +1405,17 @@ static void ath10k_wmi_event_host_swba(struct ath10k *ar, struct sk_buff *skb)
1405 continue; 1405 continue;
1406 } 1406 }
1407 1407
1408 /* There are no completions for beacons so wait for next SWBA
1409 * before telling mac80211 to decrement CSA counter
1410 *
1411 * Once CSA counter is completed stop sending beacons until
1412 * actual channel switch is done */
1413 if (arvif->vif->csa_active &&
1414 ieee80211_csa_is_complete(arvif->vif)) {
1415 ieee80211_csa_finish(arvif->vif);
1416 continue;
1417 }
1418
1408 bcn = ieee80211_beacon_get(ar->hw, arvif->vif); 1419 bcn = ieee80211_beacon_get(ar->hw, arvif->vif);
1409 if (!bcn) { 1420 if (!bcn) {
1410 ath10k_warn("could not get mac80211 beacon\n"); 1421 ath10k_warn("could not get mac80211 beacon\n");