Commit c8577819 authored by David S. Miller's avatar David S. Miller

Merge tag 'master-2014-11-20' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

John W. Linville says:

====================
pull request: wireless 2014-11-20

Please full this little batch of fixes intended for the 3.18 stream!

For the mac80211 patch, Johannes says:

"Here's another last minute fix, for minstrel HT crashing
depending on the value of some uninitialised stack."

On top of that...

Ben Greear fixes an ath9k regression in which a BSSID mask is
miscalculated.

Dmitry Torokhov corrects an error handling routing in brcmfmac which
was checking an unsigned variable for a negative value.

Johannes Berg avoids a build problem in brcmfmac for arches where
linux/unaligned/access_ok.h and asm/unaligned.h conflict.

Mathy Vanhoef addresses another brcmfmac issue so as to eliminate a
use-after-free of the URB transfer buffer if a timeout occurs.

Please let me know if there are problems!
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents 17544e2a a1d69c60
...@@ -974,9 +974,8 @@ void ath9k_calculate_iter_data(struct ath_softc *sc, ...@@ -974,9 +974,8 @@ void ath9k_calculate_iter_data(struct ath_softc *sc,
struct ath_vif *avp; struct ath_vif *avp;
/* /*
* Pick the MAC address of the first interface as the new hardware * The hardware will use primary station addr together with the
* MAC address. The hardware will use it together with the BSSID mask * BSSID mask when matching addresses.
* when matching addresses.
*/ */
memset(iter_data, 0, sizeof(*iter_data)); memset(iter_data, 0, sizeof(*iter_data));
memset(&iter_data->mask, 0xff, ETH_ALEN); memset(&iter_data->mask, 0xff, ETH_ALEN);
...@@ -1205,6 +1204,8 @@ static int ath9k_add_interface(struct ieee80211_hw *hw, ...@@ -1205,6 +1204,8 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
list_add_tail(&avp->list, &avp->chanctx->vifs); list_add_tail(&avp->list, &avp->chanctx->vifs);
} }
ath9k_calculate_summary_state(sc, avp->chanctx);
ath9k_assign_hw_queues(hw, vif); ath9k_assign_hw_queues(hw, vif);
an->sc = sc; an->sc = sc;
...@@ -1274,6 +1275,8 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw, ...@@ -1274,6 +1275,8 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
ath_tx_node_cleanup(sc, &avp->mcast_node); ath_tx_node_cleanup(sc, &avp->mcast_node);
ath9k_calculate_summary_state(sc, avp->chanctx);
mutex_unlock(&sc->mutex); mutex_unlock(&sc->mutex);
} }
......
...@@ -40,8 +40,8 @@ void brcmf_of_probe(struct brcmf_sdio_dev *sdiodev) ...@@ -40,8 +40,8 @@ void brcmf_of_probe(struct brcmf_sdio_dev *sdiodev)
return; return;
irq = irq_of_parse_and_map(np, 0); irq = irq_of_parse_and_map(np, 0);
if (irq < 0) { if (!irq) {
brcmf_err("interrupt could not be mapped: err=%d\n", irq); brcmf_err("interrupt could not be mapped\n");
devm_kfree(dev, sdiodev->pdata); devm_kfree(dev, sdiodev->pdata);
return; return;
} }
......
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
#include <linux/pci.h> #include <linux/pci.h>
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/unaligned/access_ok.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/bcma/bcma.h> #include <linux/bcma/bcma.h>
#include <linux/sched.h> #include <linux/sched.h>
#include <asm/unaligned.h>
#include <soc.h> #include <soc.h>
#include <chipcommon.h> #include <chipcommon.h>
......
...@@ -669,10 +669,12 @@ static int brcmf_usb_dl_cmd(struct brcmf_usbdev_info *devinfo, u8 cmd, ...@@ -669,10 +669,12 @@ static int brcmf_usb_dl_cmd(struct brcmf_usbdev_info *devinfo, u8 cmd,
goto finalize; goto finalize;
} }
if (!brcmf_usb_ioctl_resp_wait(devinfo)) if (!brcmf_usb_ioctl_resp_wait(devinfo)) {
usb_kill_urb(devinfo->ctl_urb);
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
else } else {
memcpy(buffer, tmpbuf, buflen); memcpy(buffer, tmpbuf, buflen);
}
finalize: finalize:
kfree(tmpbuf); kfree(tmpbuf);
......
...@@ -252,19 +252,16 @@ minstrel_ht_sort_best_tp_rates(struct minstrel_ht_sta *mi, u8 index, ...@@ -252,19 +252,16 @@ minstrel_ht_sort_best_tp_rates(struct minstrel_ht_sta *mi, u8 index,
cur_thr = mi->groups[cur_group].rates[cur_idx].cur_tp; cur_thr = mi->groups[cur_group].rates[cur_idx].cur_tp;
cur_prob = mi->groups[cur_group].rates[cur_idx].probability; cur_prob = mi->groups[cur_group].rates[cur_idx].probability;
do {
tmp_group = tp_list[j - 1] / MCS_GROUP_RATES; tmp_group = tp_list[j - 1] / MCS_GROUP_RATES;
tmp_idx = tp_list[j - 1] % MCS_GROUP_RATES; tmp_idx = tp_list[j - 1] % MCS_GROUP_RATES;
tmp_thr = mi->groups[tmp_group].rates[tmp_idx].cur_tp; tmp_thr = mi->groups[tmp_group].rates[tmp_idx].cur_tp;
tmp_prob = mi->groups[tmp_group].rates[tmp_idx].probability; tmp_prob = mi->groups[tmp_group].rates[tmp_idx].probability;
if (cur_thr < tmp_thr ||
while (j > 0 && (cur_thr > tmp_thr || (cur_thr == tmp_thr && cur_prob <= tmp_prob))
(cur_thr == tmp_thr && cur_prob > tmp_prob))) { break;
j--; j--;
tmp_group = tp_list[j - 1] / MCS_GROUP_RATES; } while (j > 0);
tmp_idx = tp_list[j - 1] % MCS_GROUP_RATES;
tmp_thr = mi->groups[tmp_group].rates[tmp_idx].cur_tp;
tmp_prob = mi->groups[tmp_group].rates[tmp_idx].probability;
}
if (j < MAX_THR_RATES - 1) { if (j < MAX_THR_RATES - 1) {
memmove(&tp_list[j + 1], &tp_list[j], (sizeof(*tp_list) * memmove(&tp_list[j + 1], &tp_list[j], (sizeof(*tp_list) *
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment