Skip to content

Commit 81c4126

Browse files
committed
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
2 parents fc99dd0 + 87141db commit 81c4126

File tree

11 files changed

+59
-34
lines changed

11 files changed

+59
-34
lines changed

drivers/net/wireless/ath/ath9k/main.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1000,9 +1000,8 @@ void ath9k_calculate_iter_data(struct ath_softc *sc,
10001000
struct ath_vif *avp;
10011001

10021002
/*
1003-
* Pick the MAC address of the first interface as the new hardware
1004-
* MAC address. The hardware will use it together with the BSSID mask
1005-
* when matching addresses.
1003+
* The hardware will use primary station addr together with the
1004+
* BSSID mask when matching addresses.
10061005
*/
10071006
memset(iter_data, 0, sizeof(*iter_data));
10081007
memset(&iter_data->mask, 0xff, ETH_ALEN);
@@ -1232,6 +1231,8 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
12321231
list_add_tail(&avp->list, &avp->chanctx->vifs);
12331232
}
12341233

1234+
ath9k_calculate_summary_state(sc, avp->chanctx);
1235+
12351236
ath9k_assign_hw_queues(hw, vif);
12361237

12371238
an->sc = sc;
@@ -1301,6 +1302,8 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
13011302

13021303
ath_tx_node_cleanup(sc, &avp->mcast_node);
13031304

1305+
ath9k_calculate_summary_state(sc, avp->chanctx);
1306+
13041307
mutex_unlock(&sc->mutex);
13051308
}
13061309

drivers/net/wireless/brcm80211/brcmfmac/of.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ void brcmf_of_probe(struct brcmf_sdio_dev *sdiodev)
4040
return;
4141

4242
irq = irq_of_parse_and_map(np, 0);
43-
if (irq < 0) {
44-
brcmf_err("interrupt could not be mapped: err=%d\n", irq);
43+
if (!irq) {
44+
brcmf_err("interrupt could not be mapped\n");
4545
devm_kfree(dev, sdiodev->pdata);
4646
return;
4747
}

drivers/net/wireless/brcm80211/brcmfmac/pcie.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
#include <linux/pci.h>
2020
#include <linux/vmalloc.h>
2121
#include <linux/delay.h>
22-
#include <linux/unaligned/access_ok.h>
2322
#include <linux/interrupt.h>
2423
#include <linux/bcma/bcma.h>
2524
#include <linux/sched.h>
25+
#include <asm/unaligned.h>
2626

2727
#include <soc.h>
2828
#include <chipcommon.h>

drivers/net/wireless/brcm80211/brcmfmac/usb.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -738,10 +738,12 @@ static int brcmf_usb_dl_cmd(struct brcmf_usbdev_info *devinfo, u8 cmd,
738738
goto finalize;
739739
}
740740

741-
if (!brcmf_usb_ioctl_resp_wait(devinfo))
741+
if (!brcmf_usb_ioctl_resp_wait(devinfo)) {
742+
usb_kill_urb(devinfo->ctl_urb);
742743
ret = -ETIMEDOUT;
743-
else
744+
} else {
744745
memcpy(buffer, tmpbuf, buflen);
746+
}
745747

746748
finalize:
747749
kfree(tmpbuf);

drivers/net/wireless/rtlwifi/pci.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2249,6 +2249,16 @@ int rtl_pci_probe(struct pci_dev *pdev,
22492249
/*like read eeprom and so on */
22502250
rtlpriv->cfg->ops->read_eeprom_info(hw);
22512251

2252+
if (rtlpriv->cfg->ops->init_sw_vars(hw)) {
2253+
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n");
2254+
err = -ENODEV;
2255+
goto fail3;
2256+
}
2257+
rtlpriv->cfg->ops->init_sw_leds(hw);
2258+
2259+
/*aspm */
2260+
rtl_pci_init_aspm(hw);
2261+
22522262
/* Init mac80211 sw */
22532263
err = rtl_init_core(hw);
22542264
if (err) {
@@ -2264,16 +2274,6 @@ int rtl_pci_probe(struct pci_dev *pdev,
22642274
goto fail3;
22652275
}
22662276

2267-
if (rtlpriv->cfg->ops->init_sw_vars(hw)) {
2268-
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG, "Can't init_sw_vars\n");
2269-
err = -ENODEV;
2270-
goto fail3;
2271-
}
2272-
rtlpriv->cfg->ops->init_sw_leds(hw);
2273-
2274-
/*aspm */
2275-
rtl_pci_init_aspm(hw);
2276-
22772277
err = ieee80211_register_hw(hw);
22782278
if (err) {
22792279
RT_TRACE(rtlpriv, COMP_ERR, DBG_EMERG,

drivers/net/wireless/rtlwifi/rtl8192ce/hw.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1287,6 +1287,7 @@ void rtl92ce_enable_interrupt(struct ieee80211_hw *hw)
12871287

12881288
rtl_write_dword(rtlpriv, REG_HIMR, rtlpci->irq_mask[0] & 0xFFFFFFFF);
12891289
rtl_write_dword(rtlpriv, REG_HIMRE, rtlpci->irq_mask[1] & 0xFFFFFFFF);
1290+
rtlpci->irq_enabled = true;
12901291
}
12911292

12921293
void rtl92ce_disable_interrupt(struct ieee80211_hw *hw)
@@ -1296,7 +1297,7 @@ void rtl92ce_disable_interrupt(struct ieee80211_hw *hw)
12961297

12971298
rtl_write_dword(rtlpriv, REG_HIMR, IMR8190_DISABLED);
12981299
rtl_write_dword(rtlpriv, REG_HIMRE, IMR8190_DISABLED);
1299-
synchronize_irq(rtlpci->pdev->irq);
1300+
rtlpci->irq_enabled = false;
13001301
}
13011302

13021303
static void _rtl92ce_poweroff_adapter(struct ieee80211_hw *hw)

drivers/net/wireless/rtlwifi/rtl8192ce/sw.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,7 @@ static struct rtl_hal_ops rtl8192ce_hal_ops = {
228228
.led_control = rtl92ce_led_control,
229229
.set_desc = rtl92ce_set_desc,
230230
.get_desc = rtl92ce_get_desc,
231+
.is_tx_desc_closed = rtl92ce_is_tx_desc_closed,
231232
.tx_polling = rtl92ce_tx_polling,
232233
.enable_hw_sec = rtl92ce_enable_hw_security_config,
233234
.set_key = rtl92ce_set_key,
@@ -271,6 +272,8 @@ static struct rtl_hal_cfg rtl92ce_hal_cfg = {
271272
.maps[MAC_RCR_ACRC32] = ACRC32,
272273
.maps[MAC_RCR_ACF] = ACF,
273274
.maps[MAC_RCR_AAP] = AAP,
275+
.maps[MAC_HIMR] = REG_HIMR,
276+
.maps[MAC_HIMRE] = REG_HIMRE,
274277

275278
.maps[EFUSE_TEST] = REG_EFUSE_TEST,
276279
.maps[EFUSE_CTRL] = REG_EFUSE_CTRL,

drivers/net/wireless/rtlwifi/rtl8192ce/trx.c

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -720,16 +720,15 @@ u32 rtl92ce_get_desc(u8 *p_desc, bool istx, u8 desc_name)
720720
break;
721721
}
722722
} else {
723-
struct rx_desc_92c *pdesc = (struct rx_desc_92c *)p_desc;
724723
switch (desc_name) {
725724
case HW_DESC_OWN:
726-
ret = GET_RX_DESC_OWN(pdesc);
725+
ret = GET_RX_DESC_OWN(p_desc);
727726
break;
728727
case HW_DESC_RXPKT_LEN:
729-
ret = GET_RX_DESC_PKT_LEN(pdesc);
728+
ret = GET_RX_DESC_PKT_LEN(p_desc);
730729
break;
731730
case HW_DESC_RXBUFF_ADDR:
732-
ret = GET_RX_STATUS_DESC_BUFF_ADDR(pdesc);
731+
ret = GET_RX_DESC_BUFF_ADDR(p_desc);
733732
break;
734733
default:
735734
RT_ASSERT(false, "ERR rxdesc :%d not process\n",
@@ -740,6 +739,23 @@ u32 rtl92ce_get_desc(u8 *p_desc, bool istx, u8 desc_name)
740739
return ret;
741740
}
742741

742+
bool rtl92ce_is_tx_desc_closed(struct ieee80211_hw *hw,
743+
u8 hw_queue, u16 index)
744+
{
745+
struct rtl_pci *rtlpci = rtl_pcidev(rtl_pcipriv(hw));
746+
struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[hw_queue];
747+
u8 *entry = (u8 *)(&ring->desc[ring->idx]);
748+
u8 own = (u8)rtl92ce_get_desc(entry, true, HW_DESC_OWN);
749+
750+
/*beacon packet will only use the first
751+
*descriptor defautly,and the own may not
752+
*be cleared by the hardware
753+
*/
754+
if (own)
755+
return false;
756+
return true;
757+
}
758+
743759
void rtl92ce_tx_polling(struct ieee80211_hw *hw, u8 hw_queue)
744760
{
745761
struct rtl_priv *rtlpriv = rtl_priv(hw);

drivers/net/wireless/rtlwifi/rtl8192ce/trx.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,8 @@ bool rtl92ce_rx_query_desc(struct ieee80211_hw *hw,
723723
void rtl92ce_set_desc(struct ieee80211_hw *hw, u8 *pdesc, bool istx,
724724
u8 desc_name, u8 *val);
725725
u32 rtl92ce_get_desc(u8 *pdesc, bool istx, u8 desc_name);
726+
bool rtl92ce_is_tx_desc_closed(struct ieee80211_hw *hw,
727+
u8 hw_queue, u16 index);
726728
void rtl92ce_tx_polling(struct ieee80211_hw *hw, u8 hw_queue);
727729
void rtl92ce_tx_fill_cmddesc(struct ieee80211_hw *hw, u8 *pdesc,
728730
bool b_firstseg, bool b_lastseg,

drivers/net/wireless/rtlwifi/rtl8821ae/hw.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3672,8 +3672,9 @@ static void rtl8821ae_update_hal_rate_mask(struct ieee80211_hw *hw,
36723672
mac->opmode == NL80211_IFTYPE_ADHOC)
36733673
macid = sta->aid + 1;
36743674
if (wirelessmode == WIRELESS_MODE_N_5G ||
3675-
wirelessmode == WIRELESS_MODE_AC_5G)
3676-
ratr_bitmap = sta->supp_rates[NL80211_BAND_5GHZ];
3675+
wirelessmode == WIRELESS_MODE_AC_5G ||
3676+
wirelessmode == WIRELESS_MODE_A)
3677+
ratr_bitmap = sta->supp_rates[NL80211_BAND_5GHZ] << 4;
36773678
else
36783679
ratr_bitmap = sta->supp_rates[NL80211_BAND_2GHZ];
36793680

net/mac80211/rc80211_minstrel_ht.c

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -394,19 +394,16 @@ minstrel_ht_sort_best_tp_rates(struct minstrel_ht_sta *mi, u16 index,
394394
cur_thr = mi->groups[cur_group].rates[cur_idx].cur_tp;
395395
cur_prob = mi->groups[cur_group].rates[cur_idx].probability;
396396

397-
tmp_group = tp_list[j - 1] / MCS_GROUP_RATES;
398-
tmp_idx = tp_list[j - 1] % MCS_GROUP_RATES;
399-
tmp_thr = mi->groups[tmp_group].rates[tmp_idx].cur_tp;
400-
tmp_prob = mi->groups[tmp_group].rates[tmp_idx].probability;
401-
402-
while (j > 0 && (cur_thr > tmp_thr ||
403-
(cur_thr == tmp_thr && cur_prob > tmp_prob))) {
404-
j--;
397+
do {
405398
tmp_group = tp_list[j - 1] / MCS_GROUP_RATES;
406399
tmp_idx = tp_list[j - 1] % MCS_GROUP_RATES;
407400
tmp_thr = mi->groups[tmp_group].rates[tmp_idx].cur_tp;
408401
tmp_prob = mi->groups[tmp_group].rates[tmp_idx].probability;
409-
}
402+
if (cur_thr < tmp_thr ||
403+
(cur_thr == tmp_thr && cur_prob <= tmp_prob))
404+
break;
405+
j--;
406+
} while (j > 0);
410407

411408
if (j < MAX_THR_RATES - 1) {
412409
memmove(&tp_list[j + 1], &tp_list[j], (sizeof(*tp_list) *

0 commit comments

Comments
 (0)