aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ath
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2010-02-14 20:45:59 -0500
committerDavid S. Miller <davem@davemloft.net>2010-02-14 20:45:59 -0500
commitf6f223039c0d0683bdea1eabd35b309e10311a60 (patch)
tree890e07acf8c18ddc2994ebc0a0bdcdda38b0dcc6 /drivers/net/wireless/ath
parentb3b3f04fb587ecb61b5baa6c1c5f0e666fd12d73 (diff)
parent42c4568a4ace0adc27a9d6f02936e2047ba6fc7e (diff)
Merge branch 'master' of ssh://master.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6
Diffstat (limited to 'drivers/net/wireless/ath')
-rw-r--r--drivers/net/wireless/ath/ar9170/ar9170.h8
-rw-r--r--drivers/net/wireless/ath/ar9170/main.c13
-rw-r--r--drivers/net/wireless/ath/ath5k/ath5k.h1
-rw-r--r--drivers/net/wireless/ath/ath5k/base.c44
-rw-r--r--drivers/net/wireless/ath/ath5k/base.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/ath9k.h1
-rw-r--r--drivers/net/wireless/ath/ath9k/beacon.c8
-rw-r--r--drivers/net/wireless/ath/ath9k/hw.c11
-rw-r--r--drivers/net/wireless/ath/ath9k/init.c3
-rw-r--r--drivers/net/wireless/ath/ath9k/main.c25
-rw-r--r--drivers/net/wireless/ath/ath9k/xmit.c7
-rw-r--r--drivers/net/wireless/ath/regd.c5
12 files changed, 74 insertions, 53 deletions
diff --git a/drivers/net/wireless/ath/ar9170/ar9170.h b/drivers/net/wireless/ath/ar9170/ar9170.h
index b99a8c2053d..8c8ce67971e 100644
--- a/drivers/net/wireless/ath/ar9170/ar9170.h
+++ b/drivers/net/wireless/ath/ar9170/ar9170.h
@@ -144,6 +144,12 @@ struct ar9170_sta_tid {
144 bool active; 144 bool active;
145}; 145};
146 146
147struct ar9170_tx_queue_stats {
148 unsigned int len;
149 unsigned int limit;
150 unsigned int count;
151};
152
147#define AR9170_QUEUE_TIMEOUT 64 153#define AR9170_QUEUE_TIMEOUT 64
148#define AR9170_TX_TIMEOUT 8 154#define AR9170_TX_TIMEOUT 8
149#define AR9170_BA_TIMEOUT 4 155#define AR9170_BA_TIMEOUT 4
@@ -211,7 +217,7 @@ struct ar9170 {
211 217
212 /* qos queue settings */ 218 /* qos queue settings */
213 spinlock_t tx_stats_lock; 219 spinlock_t tx_stats_lock;
214 struct ieee80211_tx_queue_stats tx_stats[5]; 220 struct ar9170_tx_queue_stats tx_stats[5];
215 struct ieee80211_tx_queue_params edcf[5]; 221 struct ieee80211_tx_queue_params edcf[5];
216 222
217 spinlock_t cmdlock; 223 spinlock_t cmdlock;
diff --git a/drivers/net/wireless/ath/ar9170/main.c b/drivers/net/wireless/ath/ar9170/main.c
index 4d27f7f67c7..91797cb6e0e 100644
--- a/drivers/net/wireless/ath/ar9170/main.c
+++ b/drivers/net/wireless/ath/ar9170/main.c
@@ -2396,18 +2396,6 @@ static int ar9170_get_stats(struct ieee80211_hw *hw,
2396 return 0; 2396 return 0;
2397} 2397}
2398 2398
2399static int ar9170_get_tx_stats(struct ieee80211_hw *hw,
2400 struct ieee80211_tx_queue_stats *tx_stats)
2401{
2402 struct ar9170 *ar = hw->priv;
2403
2404 spin_lock_bh(&ar->tx_stats_lock);
2405 memcpy(tx_stats, ar->tx_stats, sizeof(tx_stats[0]) * hw->queues);
2406 spin_unlock_bh(&ar->tx_stats_lock);
2407
2408 return 0;
2409}
2410
2411static int ar9170_conf_tx(struct ieee80211_hw *hw, u16 queue, 2399static int ar9170_conf_tx(struct ieee80211_hw *hw, u16 queue,
2412 const struct ieee80211_tx_queue_params *param) 2400 const struct ieee80211_tx_queue_params *param)
2413{ 2401{
@@ -2509,7 +2497,6 @@ static const struct ieee80211_ops ar9170_ops = {
2509 .set_key = ar9170_set_key, 2497 .set_key = ar9170_set_key,
2510 .sta_notify = ar9170_sta_notify, 2498 .sta_notify = ar9170_sta_notify,
2511 .get_stats = ar9170_get_stats, 2499 .get_stats = ar9170_get_stats,
2512 .get_tx_stats = ar9170_get_tx_stats,
2513 .ampdu_action = ar9170_ampdu_action, 2500 .ampdu_action = ar9170_ampdu_action,
2514}; 2501};
2515 2502
diff --git a/drivers/net/wireless/ath/ath5k/ath5k.h b/drivers/net/wireless/ath/ath5k/ath5k.h
index ad4d446f026..ac67f02e26d 100644
--- a/drivers/net/wireless/ath/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath/ath5k/ath5k.h
@@ -541,7 +541,6 @@ struct ath5k_txq_info {
541/* 541/*
542 * Transmit packet types. 542 * Transmit packet types.
543 * used on tx control descriptor 543 * used on tx control descriptor
544 * TODO: Use them inside base.c corectly
545 */ 544 */
546enum ath5k_pkt_type { 545enum ath5k_pkt_type {
547 AR5K_PKT_TYPE_NORMAL = 0, 546 AR5K_PKT_TYPE_NORMAL = 0,
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index edb6c90e376..8dce0077b02 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -241,8 +241,6 @@ static int ath5k_set_key(struct ieee80211_hw *hw,
241 struct ieee80211_key_conf *key); 241 struct ieee80211_key_conf *key);
242static int ath5k_get_stats(struct ieee80211_hw *hw, 242static int ath5k_get_stats(struct ieee80211_hw *hw,
243 struct ieee80211_low_level_stats *stats); 243 struct ieee80211_low_level_stats *stats);
244static int ath5k_get_tx_stats(struct ieee80211_hw *hw,
245 struct ieee80211_tx_queue_stats *stats);
246static u64 ath5k_get_tsf(struct ieee80211_hw *hw); 244static u64 ath5k_get_tsf(struct ieee80211_hw *hw);
247static void ath5k_set_tsf(struct ieee80211_hw *hw, u64 tsf); 245static void ath5k_set_tsf(struct ieee80211_hw *hw, u64 tsf);
248static void ath5k_reset_tsf(struct ieee80211_hw *hw); 246static void ath5k_reset_tsf(struct ieee80211_hw *hw);
@@ -269,7 +267,6 @@ static const struct ieee80211_ops ath5k_hw_ops = {
269 .set_key = ath5k_set_key, 267 .set_key = ath5k_set_key,
270 .get_stats = ath5k_get_stats, 268 .get_stats = ath5k_get_stats,
271 .conf_tx = NULL, 269 .conf_tx = NULL,
272 .get_tx_stats = ath5k_get_tx_stats,
273 .get_tsf = ath5k_get_tsf, 270 .get_tsf = ath5k_get_tsf,
274 .set_tsf = ath5k_set_tsf, 271 .set_tsf = ath5k_set_tsf,
275 .reset_tsf = ath5k_reset_tsf, 272 .reset_tsf = ath5k_reset_tsf,
@@ -1249,6 +1246,29 @@ ath5k_rxbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
1249 return 0; 1246 return 0;
1250} 1247}
1251 1248
1249static enum ath5k_pkt_type get_hw_packet_type(struct sk_buff *skb)
1250{
1251 struct ieee80211_hdr *hdr;
1252 enum ath5k_pkt_type htype;
1253 __le16 fc;
1254
1255 hdr = (struct ieee80211_hdr *)skb->data;
1256 fc = hdr->frame_control;
1257
1258 if (ieee80211_is_beacon(fc))
1259 htype = AR5K_PKT_TYPE_BEACON;
1260 else if (ieee80211_is_probe_resp(fc))
1261 htype = AR5K_PKT_TYPE_PROBE_RESP;
1262 else if (ieee80211_is_atim(fc))
1263 htype = AR5K_PKT_TYPE_ATIM;
1264 else if (ieee80211_is_pspoll(fc))
1265 htype = AR5K_PKT_TYPE_PSPOLL;
1266 else
1267 htype = AR5K_PKT_TYPE_NORMAL;
1268
1269 return htype;
1270}
1271
1252static int 1272static int
1253ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf, 1273ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf,
1254 struct ath5k_txq *txq) 1274 struct ath5k_txq *txq)
@@ -1303,7 +1323,8 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf,
1303 sc->vif, pktlen, info)); 1323 sc->vif, pktlen, info));
1304 } 1324 }
1305 ret = ah->ah_setup_tx_desc(ah, ds, pktlen, 1325 ret = ah->ah_setup_tx_desc(ah, ds, pktlen,
1306 ieee80211_get_hdrlen_from_skb(skb), AR5K_PKT_TYPE_NORMAL, 1326 ieee80211_get_hdrlen_from_skb(skb),
1327 get_hw_packet_type(skb),
1307 (sc->power_level * 2), 1328 (sc->power_level * 2),
1308 hw_rate, 1329 hw_rate,
1309 info->control.rates[0].count, keyidx, ah->ah_tx_ant, flags, 1330 info->control.rates[0].count, keyidx, ah->ah_tx_ant, flags,
@@ -1332,7 +1353,6 @@ ath5k_txbuf_setup(struct ath5k_softc *sc, struct ath5k_buf *bf,
1332 1353
1333 spin_lock_bh(&txq->lock); 1354 spin_lock_bh(&txq->lock);
1334 list_add_tail(&bf->list, &txq->q); 1355 list_add_tail(&bf->list, &txq->q);
1335 sc->tx_stats[txq->qnum].len++;
1336 if (txq->link == NULL) /* is this first packet? */ 1356 if (txq->link == NULL) /* is this first packet? */
1337 ath5k_hw_set_txdp(ah, txq->qnum, bf->daddr); 1357 ath5k_hw_set_txdp(ah, txq->qnum, bf->daddr);
1338 else /* no, so only link it */ 1358 else /* no, so only link it */
@@ -1581,7 +1601,6 @@ ath5k_txq_drainq(struct ath5k_softc *sc, struct ath5k_txq *txq)
1581 ath5k_txbuf_free(sc, bf); 1601 ath5k_txbuf_free(sc, bf);
1582 1602
1583 spin_lock_bh(&sc->txbuflock); 1603 spin_lock_bh(&sc->txbuflock);
1584 sc->tx_stats[txq->qnum].len--;
1585 list_move_tail(&bf->list, &sc->txbuf); 1604 list_move_tail(&bf->list, &sc->txbuf);
1586 sc->txbuf_len++; 1605 sc->txbuf_len++;
1587 spin_unlock_bh(&sc->txbuflock); 1606 spin_unlock_bh(&sc->txbuflock);
@@ -2011,10 +2030,8 @@ ath5k_tx_processq(struct ath5k_softc *sc, struct ath5k_txq *txq)
2011 } 2030 }
2012 2031
2013 ieee80211_tx_status(sc->hw, skb); 2032 ieee80211_tx_status(sc->hw, skb);
2014 sc->tx_stats[txq->qnum].count++;
2015 2033
2016 spin_lock(&sc->txbuflock); 2034 spin_lock(&sc->txbuflock);
2017 sc->tx_stats[txq->qnum].len--;
2018 list_move_tail(&bf->list, &sc->txbuf); 2035 list_move_tail(&bf->list, &sc->txbuf);
2019 sc->txbuf_len++; 2036 sc->txbuf_len++;
2020 spin_unlock(&sc->txbuflock); 2037 spin_unlock(&sc->txbuflock);
@@ -3116,17 +3133,6 @@ ath5k_get_stats(struct ieee80211_hw *hw,
3116 return 0; 3133 return 0;
3117} 3134}
3118 3135
3119static int
3120ath5k_get_tx_stats(struct ieee80211_hw *hw,
3121 struct ieee80211_tx_queue_stats *stats)
3122{
3123 struct ath5k_softc *sc = hw->priv;
3124
3125 memcpy(stats, &sc->tx_stats, sizeof(sc->tx_stats));
3126
3127 return 0;
3128}
3129
3130static u64 3136static u64
3131ath5k_get_tsf(struct ieee80211_hw *hw) 3137ath5k_get_tsf(struct ieee80211_hw *hw)
3132{ 3138{
diff --git a/drivers/net/wireless/ath/ath5k/base.h b/drivers/net/wireless/ath/ath5k/base.h
index 952b3a21bbc..7e1a88a5abd 100644
--- a/drivers/net/wireless/ath/ath5k/base.h
+++ b/drivers/net/wireless/ath/ath5k/base.h
@@ -117,7 +117,6 @@ struct ath5k_softc {
117 struct pci_dev *pdev; /* for dma mapping */ 117 struct pci_dev *pdev; /* for dma mapping */
118 void __iomem *iobase; /* address of the device */ 118 void __iomem *iobase; /* address of the device */
119 struct mutex lock; /* dev-level lock */ 119 struct mutex lock; /* dev-level lock */
120 struct ieee80211_tx_queue_stats tx_stats[AR5K_NUM_TX_QUEUES];
121 struct ieee80211_low_level_stats ll_stats; 120 struct ieee80211_low_level_stats ll_stats;
122 struct ieee80211_hw *hw; /* IEEE 802.11 common */ 121 struct ieee80211_hw *hw; /* IEEE 802.11 common */
123 struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS]; 122 struct ieee80211_supported_band sbands[IEEE80211_NUM_BANDS];
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 0ea340fd071..83c7ea4c007 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -267,6 +267,7 @@ void ath_tx_aggr_start(struct ath_softc *sc, struct ieee80211_sta *sta,
267 u16 tid, u16 *ssn); 267 u16 tid, u16 *ssn);
268void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid); 268void ath_tx_aggr_stop(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
269void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid); 269void ath_tx_aggr_resume(struct ath_softc *sc, struct ieee80211_sta *sta, u16 tid);
270void ath9k_enable_ps(struct ath_softc *sc);
270 271
271/********/ 272/********/
272/* VIFs */ 273/* VIFs */
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index 422454fe4ff..d088ebfe63a 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -577,6 +577,13 @@ static void ath_beacon_config_sta(struct ath_softc *sc,
577 u64 tsf; 577 u64 tsf;
578 int num_beacons, offset, dtim_dec_count, cfp_dec_count; 578 int num_beacons, offset, dtim_dec_count, cfp_dec_count;
579 579
580 /* No need to configure beacon if we are not associated */
581 if (!common->curaid) {
582 ath_print(common, ATH_DBG_BEACON,
583 "STA is not yet associated..skipping beacon config\n");
584 return;
585 }
586
580 memset(&bs, 0, sizeof(bs)); 587 memset(&bs, 0, sizeof(bs));
581 intval = conf->beacon_interval & ATH9K_BEACON_PERIOD; 588 intval = conf->beacon_interval & ATH9K_BEACON_PERIOD;
582 589
@@ -739,7 +746,6 @@ void ath_beacon_config(struct ath_softc *sc, struct ieee80211_vif *vif)
739 enum nl80211_iftype iftype; 746 enum nl80211_iftype iftype;
740 747
741 /* Setup the beacon configuration parameters */ 748 /* Setup the beacon configuration parameters */
742
743 if (vif) { 749 if (vif) {
744 struct ieee80211_bss_conf *bss_conf = &vif->bss_conf; 750 struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
745 751
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index f15fee76a4e..f00f5c744f4 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -1217,6 +1217,17 @@ void ath9k_hw_init_global_settings(struct ath_hw *ah)
1217 /* As defined by IEEE 802.11-2007 17.3.8.6 */ 1217 /* As defined by IEEE 802.11-2007 17.3.8.6 */
1218 slottime = ah->slottime + 3 * ah->coverage_class; 1218 slottime = ah->slottime + 3 * ah->coverage_class;
1219 acktimeout = slottime + sifstime; 1219 acktimeout = slottime + sifstime;
1220
1221 /*
1222 * Workaround for early ACK timeouts, add an offset to match the
1223 * initval's 64us ack timeout value.
1224 * This was initially only meant to work around an issue with delayed
1225 * BA frames in some implementations, but it has been found to fix ACK
1226 * timeout issues in other cases as well.
1227 */
1228 if (conf->channel && conf->channel->band == IEEE80211_BAND_2GHZ)
1229 acktimeout += 64 - sifstime - ah->slottime;
1230
1220 ath9k_hw_setslottime(ah, slottime); 1231 ath9k_hw_setslottime(ah, slottime);
1221 ath9k_hw_set_ack_timeout(ah, acktimeout); 1232 ath9k_hw_set_ack_timeout(ah, acktimeout);
1222 ath9k_hw_set_cts_timeout(ah, acktimeout); 1233 ath9k_hw_set_cts_timeout(ah, acktimeout);
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 4b5e5484868..623c2f88498 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -622,7 +622,8 @@ void ath9k_set_hw_capab(struct ath_softc *sc, struct ieee80211_hw *hw)
622 IEEE80211_HW_SIGNAL_DBM | 622 IEEE80211_HW_SIGNAL_DBM |
623 IEEE80211_HW_SUPPORTS_PS | 623 IEEE80211_HW_SUPPORTS_PS |
624 IEEE80211_HW_PS_NULLFUNC_STACK | 624 IEEE80211_HW_PS_NULLFUNC_STACK |
625 IEEE80211_HW_SPECTRUM_MGMT; 625 IEEE80211_HW_SPECTRUM_MGMT |
626 IEEE80211_HW_REPORTS_TX_ACK_STATUS;
626 627
627 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT) 628 if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_HT)
628 hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION; 629 hw->flags |= IEEE80211_HW_AMPDU_AGGREGATION;
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index 6796d5cdc29..9c8f925c209 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -809,6 +809,7 @@ static void ath_key_delete(struct ath_common *common, struct ieee80211_key_conf
809 809
810 clear_bit(key->hw_key_idx + 64, common->keymap); 810 clear_bit(key->hw_key_idx + 64, common->keymap);
811 if (common->splitmic) { 811 if (common->splitmic) {
812 ath9k_hw_keyreset(ah, key->hw_key_idx + 32);
812 clear_bit(key->hw_key_idx + 32, common->keymap); 813 clear_bit(key->hw_key_idx + 32, common->keymap);
813 clear_bit(key->hw_key_idx + 64 + 32, common->keymap); 814 clear_bit(key->hw_key_idx + 64 + 32, common->keymap);
814 } 815 }
@@ -1492,6 +1493,19 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
1492 mutex_unlock(&sc->mutex); 1493 mutex_unlock(&sc->mutex);
1493} 1494}
1494 1495
1496void ath9k_enable_ps(struct ath_softc *sc)
1497{
1498 sc->ps_enabled = true;
1499 if (!(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP)) {
1500 if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) {
1501 sc->imask |= ATH9K_INT_TIM_TIMER;
1502 ath9k_hw_set_interrupts(sc->sc_ah,
1503 sc->imask);
1504 }
1505 }
1506 ath9k_hw_setrxabort(sc->sc_ah, 1);
1507}
1508
1495static int ath9k_config(struct ieee80211_hw *hw, u32 changed) 1509static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
1496{ 1510{
1497 struct ath_wiphy *aphy = hw->priv; 1511 struct ath_wiphy *aphy = hw->priv;
@@ -1546,22 +1560,13 @@ static int ath9k_config(struct ieee80211_hw *hw, u32 changed)
1546 if (changed & IEEE80211_CONF_CHANGE_PS) { 1560 if (changed & IEEE80211_CONF_CHANGE_PS) {
1547 if (conf->flags & IEEE80211_CONF_PS) { 1561 if (conf->flags & IEEE80211_CONF_PS) {
1548 sc->ps_flags |= PS_ENABLED; 1562 sc->ps_flags |= PS_ENABLED;
1549 if (!(ah->caps.hw_caps &
1550 ATH9K_HW_CAP_AUTOSLEEP)) {
1551 if ((sc->imask & ATH9K_INT_TIM_TIMER) == 0) {
1552 sc->imask |= ATH9K_INT_TIM_TIMER;
1553 ath9k_hw_set_interrupts(sc->sc_ah,
1554 sc->imask);
1555 }
1556 }
1557 /* 1563 /*
1558 * At this point we know hardware has received an ACK 1564 * At this point we know hardware has received an ACK
1559 * of a previously sent null data frame. 1565 * of a previously sent null data frame.
1560 */ 1566 */
1561 if ((sc->ps_flags & PS_NULLFUNC_COMPLETED)) { 1567 if ((sc->ps_flags & PS_NULLFUNC_COMPLETED)) {
1562 sc->ps_flags &= ~PS_NULLFUNC_COMPLETED; 1568 sc->ps_flags &= ~PS_NULLFUNC_COMPLETED;
1563 sc->ps_enabled = true; 1569 ath9k_enable_ps(sc);
1564 ath9k_hw_setrxabort(sc->sc_ah, 1);
1565 } 1570 }
1566 } else { 1571 } else {
1567 sc->ps_enabled = false; 1572 sc->ps_enabled = false;
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index 3c790a4f38f..f5cbbcb9a4a 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -2048,10 +2048,9 @@ static void ath_tx_processq(struct ath_softc *sc, struct ath_txq *txq)
2048 */ 2048 */
2049 if (bf->bf_isnullfunc && 2049 if (bf->bf_isnullfunc &&
2050 (ds->ds_txstat.ts_status & ATH9K_TX_ACKED)) { 2050 (ds->ds_txstat.ts_status & ATH9K_TX_ACKED)) {
2051 if ((sc->ps_flags & PS_ENABLED)) { 2051 if ((sc->ps_flags & PS_ENABLED))
2052 sc->ps_enabled = true; 2052 ath9k_enable_ps(sc);
2053 ath9k_hw_setrxabort(sc->sc_ah, 1); 2053 else
2054 } else
2055 sc->ps_flags |= PS_NULLFUNC_COMPLETED; 2054 sc->ps_flags |= PS_NULLFUNC_COMPLETED;
2056 } 2055 }
2057 2056
diff --git a/drivers/net/wireless/ath/regd.c b/drivers/net/wireless/ath/regd.c
index 039ac490465..04abd1f556b 100644
--- a/drivers/net/wireless/ath/regd.c
+++ b/drivers/net/wireless/ath/regd.c
@@ -110,8 +110,9 @@ static const struct ieee80211_regdomain ath_world_regdom_67_68_6A = {
110 110
111static inline bool is_wwr_sku(u16 regd) 111static inline bool is_wwr_sku(u16 regd)
112{ 112{
113 return ((regd & WORLD_SKU_MASK) == WORLD_SKU_PREFIX) || 113 return ((regd & COUNTRY_ERD_FLAG) != COUNTRY_ERD_FLAG) &&
114 (regd == WORLD); 114 (((regd & WORLD_SKU_MASK) == WORLD_SKU_PREFIX) ||
115 (regd == WORLD));
115} 116}
116 117
117static u16 ath_regd_get_eepromRD(struct ath_regulatory *reg) 118static u16 ath_regd_get_eepromRD(struct ath_regulatory *reg)