aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/brcm80211/brcmsmac
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmsmac')
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/ampdu.c7
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/channel.c13
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c14
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/main.c9
-rw-r--r--drivers/net/wireless/brcm80211/brcmsmac/scb.h1
5 files changed, 21 insertions, 23 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
index 1de94f30564f..1585cc5bf866 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/ampdu.c
@@ -961,7 +961,6 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
961 /* if acked then clear bit and free packet */ 961 /* if acked then clear bit and free packet */
962 if ((bindex < AMPDU_TX_BA_MAX_WSIZE) 962 if ((bindex < AMPDU_TX_BA_MAX_WSIZE)
963 && isset(bitmap, bindex)) { 963 && isset(bitmap, bindex)) {
964 ini->tx_in_transit--;
965 ini->txretry[index] = 0; 964 ini->txretry[index] = 0;
966 965
967 /* 966 /*
@@ -990,7 +989,6 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
990 if (retry && (ini->txretry[index] < (int)retry_limit)) { 989 if (retry && (ini->txretry[index] < (int)retry_limit)) {
991 int ret; 990 int ret;
992 ini->txretry[index]++; 991 ini->txretry[index]++;
993 ini->tx_in_transit--;
994 ret = brcms_c_txfifo(wlc, queue, p); 992 ret = brcms_c_txfifo(wlc, queue, p);
995 /* 993 /*
996 * We shouldn't be out of space in the DMA 994 * We shouldn't be out of space in the DMA
@@ -1000,7 +998,6 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
1000 WARN_ONCE(ret, "queue %d out of txds\n", queue); 998 WARN_ONCE(ret, "queue %d out of txds\n", queue);
1001 } else { 999 } else {
1002 /* Retry timeout */ 1000 /* Retry timeout */
1003 ini->tx_in_transit--;
1004 ieee80211_tx_info_clear_status(tx_info); 1001 ieee80211_tx_info_clear_status(tx_info);
1005 tx_info->status.ampdu_ack_len = 0; 1002 tx_info->status.ampdu_ack_len = 0;
1006 tx_info->status.ampdu_len = 1; 1003 tx_info->status.ampdu_len = 1;
@@ -1009,8 +1006,8 @@ brcms_c_ampdu_dotxstatus_complete(struct ampdu_info *ampdu, struct scb *scb,
1009 skb_pull(p, D11_PHY_HDR_LEN); 1006 skb_pull(p, D11_PHY_HDR_LEN);
1010 skb_pull(p, D11_TXH_LEN); 1007 skb_pull(p, D11_TXH_LEN);
1011 brcms_dbg_ht(wlc->hw->d11core, 1008 brcms_dbg_ht(wlc->hw->d11core,
1012 "BA Timeout, seq %d, in_transit %d\n", 1009 "BA Timeout, seq %d\n",
1013 seq, ini->tx_in_transit); 1010 seq);
1014 ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw, 1011 ieee80211_tx_status_irqsafe(wlc->pub->ieee_hw,
1015 p); 1012 p);
1016 } 1013 }
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/channel.c b/drivers/net/wireless/brcm80211/brcmsmac/channel.c
index a90b72202ec5..cdb62b8ccc79 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/channel.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/channel.c
@@ -670,7 +670,7 @@ brcms_reg_apply_beaconing_flags(struct wiphy *wiphy,
670 struct ieee80211_supported_band *sband; 670 struct ieee80211_supported_band *sband;
671 struct ieee80211_channel *ch; 671 struct ieee80211_channel *ch;
672 const struct ieee80211_reg_rule *rule; 672 const struct ieee80211_reg_rule *rule;
673 int band, i, ret; 673 int band, i;
674 674
675 for (band = 0; band < IEEE80211_NUM_BANDS; band++) { 675 for (band = 0; band < IEEE80211_NUM_BANDS; band++) {
676 sband = wiphy->bands[band]; 676 sband = wiphy->bands[band];
@@ -685,9 +685,8 @@ brcms_reg_apply_beaconing_flags(struct wiphy *wiphy,
685 continue; 685 continue;
686 686
687 if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE) { 687 if (initiator == NL80211_REGDOM_SET_BY_COUNTRY_IE) {
688 ret = freq_reg_info(wiphy, ch->center_freq, 688 rule = freq_reg_info(wiphy, ch->center_freq);
689 0, &rule); 689 if (IS_ERR(rule))
690 if (ret)
691 continue; 690 continue;
692 691
693 if (!(rule->flags & NL80211_RRF_NO_IBSS)) 692 if (!(rule->flags & NL80211_RRF_NO_IBSS))
@@ -703,8 +702,8 @@ brcms_reg_apply_beaconing_flags(struct wiphy *wiphy,
703 } 702 }
704} 703}
705 704
706static int brcms_reg_notifier(struct wiphy *wiphy, 705static void brcms_reg_notifier(struct wiphy *wiphy,
707 struct regulatory_request *request) 706 struct regulatory_request *request)
708{ 707{
709 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy); 708 struct ieee80211_hw *hw = wiphy_to_ieee80211_hw(wiphy);
710 struct brcms_info *wl = hw->priv; 709 struct brcms_info *wl = hw->priv;
@@ -745,8 +744,6 @@ static int brcms_reg_notifier(struct wiphy *wiphy,
745 if (wlc->pub->_nbands > 1 || wlc->band->bandtype == BRCM_BAND_2G) 744 if (wlc->pub->_nbands > 1 || wlc->band->bandtype == BRCM_BAND_2G)
746 wlc_phy_chanspec_ch14_widefilter_set(wlc->band->pi, 745 wlc_phy_chanspec_ch14_widefilter_set(wlc->band->pi,
747 brcms_c_japan_ccode(request->alpha2)); 746 brcms_c_japan_ccode(request->alpha2));
748
749 return 0;
750} 747}
751 748
752void brcms_c_regd_init(struct brcms_c_info *wlc) 749void brcms_c_regd_init(struct brcms_c_info *wlc)
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
index 1fbd8ecbe2ea..7fc49ca3f597 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/mac80211_if.c
@@ -362,8 +362,11 @@ brcms_ops_add_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif)
362 return -EOPNOTSUPP; 362 return -EOPNOTSUPP;
363 } 363 }
364 364
365 spin_lock_bh(&wl->lock);
366 memcpy(wl->pub->cur_etheraddr, vif->addr, sizeof(vif->addr));
365 wl->mute_tx = false; 367 wl->mute_tx = false;
366 brcms_c_mute(wl->wlc, false); 368 brcms_c_mute(wl->wlc, false);
369 spin_unlock_bh(&wl->lock);
367 370
368 return 0; 371 return 0;
369} 372}
@@ -668,7 +671,9 @@ brcms_ops_ampdu_action(struct ieee80211_hw *hw,
668 ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid); 671 ieee80211_start_tx_ba_cb_irqsafe(vif, sta->addr, tid);
669 break; 672 break;
670 673
671 case IEEE80211_AMPDU_TX_STOP: 674 case IEEE80211_AMPDU_TX_STOP_CONT:
675 case IEEE80211_AMPDU_TX_STOP_FLUSH:
676 case IEEE80211_AMPDU_TX_STOP_FLUSH_CONT:
672 spin_lock_bh(&wl->lock); 677 spin_lock_bh(&wl->lock);
673 brcms_c_ampdu_flush(wl->wlc, sta, tid); 678 brcms_c_ampdu_flush(wl->wlc, sta, tid);
674 spin_unlock_bh(&wl->lock); 679 spin_unlock_bh(&wl->lock);
@@ -1407,9 +1412,10 @@ void brcms_add_timer(struct brcms_timer *t, uint ms, int periodic)
1407#endif 1412#endif
1408 t->ms = ms; 1413 t->ms = ms;
1409 t->periodic = (bool) periodic; 1414 t->periodic = (bool) periodic;
1410 t->set = true; 1415 if (!t->set) {
1411 1416 t->set = true;
1412 atomic_inc(&t->wl->callbacks); 1417 atomic_inc(&t->wl->callbacks);
1418 }
1413 1419
1414 ieee80211_queue_delayed_work(hw, &t->dly_wrk, msecs_to_jiffies(ms)); 1420 ieee80211_queue_delayed_work(hw, &t->dly_wrk, msecs_to_jiffies(ms));
1415} 1421}
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/main.c b/drivers/net/wireless/brcm80211/brcmsmac/main.c
index 17594de4199e..c26992a60e6c 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/main.c
+++ b/drivers/net/wireless/brcm80211/brcmsmac/main.c
@@ -2473,6 +2473,7 @@ static void brcms_b_tx_fifo_resume(struct brcms_hardware *wlc_hw,
2473static void brcms_b_mute(struct brcms_hardware *wlc_hw, bool mute_tx) 2473static void brcms_b_mute(struct brcms_hardware *wlc_hw, bool mute_tx)
2474{ 2474{
2475 static const u8 null_ether_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0}; 2475 static const u8 null_ether_addr[ETH_ALEN] = {0, 0, 0, 0, 0, 0};
2476 u8 *ethaddr = wlc_hw->wlc->pub->cur_etheraddr;
2476 2477
2477 if (mute_tx) { 2478 if (mute_tx) {
2478 /* suspend tx fifos */ 2479 /* suspend tx fifos */
@@ -2482,8 +2483,7 @@ static void brcms_b_mute(struct brcms_hardware *wlc_hw, bool mute_tx)
2482 brcms_b_tx_fifo_suspend(wlc_hw, TX_AC_VI_FIFO); 2483 brcms_b_tx_fifo_suspend(wlc_hw, TX_AC_VI_FIFO);
2483 2484
2484 /* zero the address match register so we do not send ACKs */ 2485 /* zero the address match register so we do not send ACKs */
2485 brcms_b_set_addrmatch(wlc_hw, RCM_MAC_OFFSET, 2486 brcms_b_set_addrmatch(wlc_hw, RCM_MAC_OFFSET, null_ether_addr);
2486 null_ether_addr);
2487 } else { 2487 } else {
2488 /* resume tx fifos */ 2488 /* resume tx fifos */
2489 brcms_b_tx_fifo_resume(wlc_hw, TX_DATA_FIFO); 2489 brcms_b_tx_fifo_resume(wlc_hw, TX_DATA_FIFO);
@@ -2492,8 +2492,7 @@ static void brcms_b_mute(struct brcms_hardware *wlc_hw, bool mute_tx)
2492 brcms_b_tx_fifo_resume(wlc_hw, TX_AC_VI_FIFO); 2492 brcms_b_tx_fifo_resume(wlc_hw, TX_AC_VI_FIFO);
2493 2493
2494 /* Restore address */ 2494 /* Restore address */
2495 brcms_b_set_addrmatch(wlc_hw, RCM_MAC_OFFSET, 2495 brcms_b_set_addrmatch(wlc_hw, RCM_MAC_OFFSET, ethaddr);
2496 wlc_hw->etheraddr);
2497 } 2496 }
2498 2497
2499 wlc_phy_mute_upd(wlc_hw->band->pi, mute_tx, 0); 2498 wlc_phy_mute_upd(wlc_hw->band->pi, mute_tx, 0);
@@ -7633,7 +7632,7 @@ brcms_b_recv(struct brcms_hardware *wlc_hw, uint fifo, bool bound)
7633 7632
7634 uint n = 0; 7633 uint n = 0;
7635 uint bound_limit = bound ? RXBND : -1; 7634 uint bound_limit = bound ? RXBND : -1;
7636 bool morepending; 7635 bool morepending = false;
7637 7636
7638 skb_queue_head_init(&recv_frames); 7637 skb_queue_head_init(&recv_frames);
7639 7638
diff --git a/drivers/net/wireless/brcm80211/brcmsmac/scb.h b/drivers/net/wireless/brcm80211/brcmsmac/scb.h
index 51c79c7239b7..3a3d73699f83 100644
--- a/drivers/net/wireless/brcm80211/brcmsmac/scb.h
+++ b/drivers/net/wireless/brcm80211/brcmsmac/scb.h
@@ -36,7 +36,6 @@
36 36
37/* structure to store per-tid state for the ampdu initiator */ 37/* structure to store per-tid state for the ampdu initiator */
38struct scb_ampdu_tid_ini { 38struct scb_ampdu_tid_ini {
39 u8 tx_in_transit; /* number of pending mpdus in transit in driver */
40 u8 tid; /* initiator tid for easy lookup */ 39 u8 tid; /* initiator tid for easy lookup */
41 /* tx retry count; indexed by seq modulo */ 40 /* tx retry count; indexed by seq modulo */
42 u8 txretry[AMPDU_TX_BA_MAX_WSIZE]; 41 u8 txretry[AMPDU_TX_BA_MAX_WSIZE];