diff options
Diffstat (limited to 'drivers/net/wireless/ath9k/main.c')
-rw-r--r-- | drivers/net/wireless/ath9k/main.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 8fbde897406e..605599eb6d3f 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
@@ -212,12 +212,10 @@ static int ath_key_config(struct ath_softc *sc, | |||
212 | 212 | ||
213 | static void ath_key_delete(struct ath_softc *sc, struct ieee80211_key_conf *key) | 213 | static void ath_key_delete(struct ath_softc *sc, struct ieee80211_key_conf *key) |
214 | { | 214 | { |
215 | #define ATH_MAX_NUM_KEYS 4 | ||
216 | int freeslot; | 215 | int freeslot; |
217 | 216 | ||
218 | freeslot = (key->keyidx >= ATH_MAX_NUM_KEYS) ? 1 : 0; | 217 | freeslot = (key->keyidx >= 4) ? 1 : 0; |
219 | ath_key_reset(sc, key->keyidx, freeslot); | 218 | ath_key_reset(sc, key->keyidx, freeslot); |
220 | #undef ATH_MAX_NUM_KEYS | ||
221 | } | 219 | } |
222 | 220 | ||
223 | static void setup_ht_cap(struct ieee80211_ht_info *ht_info) | 221 | static void setup_ht_cap(struct ieee80211_ht_info *ht_info) |
@@ -620,7 +618,8 @@ static int ath9k_config_interface(struct ieee80211_hw *hw, | |||
620 | } | 618 | } |
621 | 619 | ||
622 | if ((conf->changed & IEEE80211_IFCC_BEACON) && | 620 | if ((conf->changed & IEEE80211_IFCC_BEACON) && |
623 | (vif->type == IEEE80211_IF_TYPE_IBSS)) { | 621 | ((vif->type == IEEE80211_IF_TYPE_IBSS) || |
622 | (vif->type == IEEE80211_IF_TYPE_AP))) { | ||
624 | /* | 623 | /* |
625 | * Allocate and setup the beacon frame. | 624 | * Allocate and setup the beacon frame. |
626 | * | 625 | * |
@@ -638,18 +637,6 @@ static int ath9k_config_interface(struct ieee80211_hw *hw, | |||
638 | ath_beacon_sync(sc, 0); | 637 | ath_beacon_sync(sc, 0); |
639 | } | 638 | } |
640 | 639 | ||
641 | if ((conf->changed & IEEE80211_IFCC_BEACON) && | ||
642 | (vif->type == IEEE80211_IF_TYPE_AP)) { | ||
643 | ath9k_hw_stoptxdma(sc->sc_ah, sc->sc_bhalq); | ||
644 | |||
645 | error = ath_beacon_alloc(sc, 0); | ||
646 | if (error != 0) | ||
647 | return error; | ||
648 | |||
649 | ath_beacon_config(sc, 0); | ||
650 | sc->sc_flags |= SC_OP_BEACONS; | ||
651 | } | ||
652 | |||
653 | /* Check for WLAN_CAPABILITY_PRIVACY ? */ | 640 | /* Check for WLAN_CAPABILITY_PRIVACY ? */ |
654 | if ((avp->av_opmode != IEEE80211_IF_TYPE_STA)) { | 641 | if ((avp->av_opmode != IEEE80211_IF_TYPE_STA)) { |
655 | for (i = 0; i < IEEE80211_WEP_NKID; i++) | 642 | for (i = 0; i < IEEE80211_WEP_NKID; i++) |