diff options
author | Thomas Pedersen <c_tpeder@qca.qualcomm.com> | 2012-04-19 18:31:57 -0400 |
---|---|---|
committer | Kalle Valo <kvalo@qca.qualcomm.com> | 2012-04-23 07:28:02 -0400 |
commit | 37a2f950acc08cce6532138625de0b7caed21476 (patch) | |
tree | 97154c03da66fcc1934fd7eb08c60e6250e18b37 /drivers | |
parent | d92917e4db2a9d6af9e362bda5151cadec9e1eeb (diff) |
ath6kl: only restore supported HT caps
Now that we know the supported PHY capabilities, only restore supported
bands / HT capabilities in firmware when stopping AP.
Signed-off-by: Thomas Pedersen <c_tpeder@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/ath/ath6kl/cfg80211.c | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/net/wireless/ath/ath6kl/cfg80211.c b/drivers/net/wireless/ath/ath6kl/cfg80211.c index b8489772c373..c8147b953be8 100644 --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c | |||
@@ -2477,6 +2477,24 @@ static int ath6kl_set_htcap(struct ath6kl_vif *vif, enum ieee80211_band band, | |||
2477 | band, htcap); | 2477 | band, htcap); |
2478 | } | 2478 | } |
2479 | 2479 | ||
2480 | static int ath6kl_restore_htcap(struct ath6kl_vif *vif) | ||
2481 | { | ||
2482 | struct wiphy *wiphy = vif->ar->wiphy; | ||
2483 | int band, ret = 0; | ||
2484 | |||
2485 | for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | ||
2486 | if (!wiphy->bands[band]) | ||
2487 | continue; | ||
2488 | |||
2489 | ret = ath6kl_set_htcap(vif, band, | ||
2490 | wiphy->bands[band]->ht_cap.ht_supported); | ||
2491 | if (ret) | ||
2492 | return ret; | ||
2493 | } | ||
2494 | |||
2495 | return ret; | ||
2496 | } | ||
2497 | |||
2480 | static bool ath6kl_is_p2p_ie(const u8 *pos) | 2498 | static bool ath6kl_is_p2p_ie(const u8 *pos) |
2481 | { | 2499 | { |
2482 | return pos[0] == WLAN_EID_VENDOR_SPECIFIC && pos[1] >= 4 && | 2500 | return pos[0] == WLAN_EID_VENDOR_SPECIFIC && pos[1] >= 4 && |
@@ -2838,13 +2856,7 @@ static int ath6kl_stop_ap(struct wiphy *wiphy, struct net_device *dev) | |||
2838 | clear_bit(CONNECTED, &vif->flags); | 2856 | clear_bit(CONNECTED, &vif->flags); |
2839 | 2857 | ||
2840 | /* Restore ht setting in firmware */ | 2858 | /* Restore ht setting in firmware */ |
2841 | if (ath6kl_set_htcap(vif, IEEE80211_BAND_2GHZ, true)) | 2859 | return ath6kl_restore_htcap(vif); |
2842 | return -EIO; | ||
2843 | |||
2844 | if (ath6kl_set_htcap(vif, IEEE80211_BAND_5GHZ, true)) | ||
2845 | return -EIO; | ||
2846 | |||
2847 | return 0; | ||
2848 | } | 2860 | } |
2849 | 2861 | ||
2850 | static const u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; | 2862 | static const u8 bcast_addr[ETH_ALEN] = { 0xff, 0xff, 0xff, 0xff, 0xff, 0xff }; |