aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath/ath9k/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ath/ath9k/main.c')
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 6963862a1872..a18414b5948b 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -227,13 +227,13 @@ static bool ath_complete_reset(struct ath_softc *sc, bool start)
227 if (!test_bit(SC_OP_BEACONS, &sc->sc_flags)) 227 if (!test_bit(SC_OP_BEACONS, &sc->sc_flags))
228 goto work; 228 goto work;
229 229
230 ath9k_set_beacon(sc);
231
232 if (ah->opmode == NL80211_IFTYPE_STATION && 230 if (ah->opmode == NL80211_IFTYPE_STATION &&
233 test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags)) { 231 test_bit(SC_OP_PRIM_STA_VIF, &sc->sc_flags)) {
234 spin_lock_irqsave(&sc->sc_pm_lock, flags); 232 spin_lock_irqsave(&sc->sc_pm_lock, flags);
235 sc->ps_flags |= PS_BEACON_SYNC | PS_WAIT_FOR_BEACON; 233 sc->ps_flags |= PS_BEACON_SYNC | PS_WAIT_FOR_BEACON;
236 spin_unlock_irqrestore(&sc->sc_pm_lock, flags); 234 spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
235 } else {
236 ath9k_set_beacon(sc);
237 } 237 }
238 work: 238 work:
239 ath_restart_work(sc); 239 ath_restart_work(sc);
@@ -1332,6 +1332,7 @@ static int ath9k_sta_add(struct ieee80211_hw *hw,
1332 struct ath_common *common = ath9k_hw_common(sc->sc_ah); 1332 struct ath_common *common = ath9k_hw_common(sc->sc_ah);
1333 struct ath_node *an = (struct ath_node *) sta->drv_priv; 1333 struct ath_node *an = (struct ath_node *) sta->drv_priv;
1334 struct ieee80211_key_conf ps_key = { }; 1334 struct ieee80211_key_conf ps_key = { };
1335 int key;
1335 1336
1336 ath_node_attach(sc, sta, vif); 1337 ath_node_attach(sc, sta, vif);
1337 1338
@@ -1339,7 +1340,9 @@ static int ath9k_sta_add(struct ieee80211_hw *hw,
1339 vif->type != NL80211_IFTYPE_AP_VLAN) 1340 vif->type != NL80211_IFTYPE_AP_VLAN)
1340 return 0; 1341 return 0;
1341 1342
1342 an->ps_key = ath_key_config(common, vif, sta, &ps_key); 1343 key = ath_key_config(common, vif, sta, &ps_key);
1344 if (key > 0)
1345 an->ps_key = key;
1343 1346
1344 return 0; 1347 return 0;
1345} 1348}
@@ -1356,6 +1359,7 @@ static void ath9k_del_ps_key(struct ath_softc *sc,
1356 return; 1359 return;
1357 1360
1358 ath_key_delete(common, &ps_key); 1361 ath_key_delete(common, &ps_key);
1362 an->ps_key = 0;
1359} 1363}
1360 1364
1361static int ath9k_sta_remove(struct ieee80211_hw *hw, 1365static int ath9k_sta_remove(struct ieee80211_hw *hw,