Skip to content

Commit 543a2df

Browse files
committed
Merge tag 'master-2014-09-23' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless
John W. Linville says: ==================== pull request: wireless 2014-09-23 Please consider pulling this one last batch of fixes intended for the 3.17 stream! For the NFC bits, Samuel says: "Hopefully not too late for a handful of NFC fixes: - 2 potential build failures for ST21NFCA and ST21NFCB, triggered by a depmod dependenyc cycle. - One potential buffer overflow in the microread driver." On top of that... Emil Goode provides a fix for a brcmfmac off-by-one regression which was introduced in the 3.17 cycle. Loic Poulain fixes a polarity mismatch for a variable assignment inside of rfkill-gpio. Wojciech Dubowik prevents a NULL pointer dereference in ath9k. ==================== Signed-off-by: David S. Miller <[email protected]>
2 parents c899c3f + f8adaf0 commit 543a2df

File tree

6 files changed

+21
-11
lines changed

6 files changed

+21
-11
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ irqreturn_t ath_isr(int irq, void *dev)
513513
* touch anything. Note this can happen early
514514
* on if the IRQ is shared.
515515
*/
516-
if (test_bit(ATH_OP_INVALID, &common->op_flags))
516+
if (!ah || test_bit(ATH_OP_INVALID, &common->op_flags))
517517
return IRQ_NONE;
518518

519519
/* shared irq, not for us */

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4921,7 +4921,7 @@ static void brcmf_count_20mhz_channels(struct brcmf_cfg80211_info *cfg,
49214921
struct brcmu_chan ch;
49224922
int i;
49234923

4924-
for (i = 0; i <= total; i++) {
4924+
for (i = 0; i < total; i++) {
49254925
ch.chspec = (u16)le32_to_cpu(chlist->element[i]);
49264926
cfg->d11inf.decchspec(&ch);
49274927

drivers/nfc/microread/microread.c

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -501,19 +501,27 @@ static void microread_target_discovered(struct nfc_hci_dev *hdev, u8 gate,
501501
targets->sens_res =
502502
be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A_ATQA]);
503503
targets->sel_res = skb->data[MICROREAD_EMCF_A_SAK];
504-
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID],
505-
skb->data[MICROREAD_EMCF_A_LEN]);
506504
targets->nfcid1_len = skb->data[MICROREAD_EMCF_A_LEN];
505+
if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
506+
r = -EINVAL;
507+
goto exit_free;
508+
}
509+
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID],
510+
targets->nfcid1_len);
507511
break;
508512
case MICROREAD_GATE_ID_MREAD_ISO_A_3:
509513
targets->supported_protocols =
510514
nfc_hci_sak_to_protocol(skb->data[MICROREAD_EMCF_A3_SAK]);
511515
targets->sens_res =
512516
be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A3_ATQA]);
513517
targets->sel_res = skb->data[MICROREAD_EMCF_A3_SAK];
514-
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID],
515-
skb->data[MICROREAD_EMCF_A3_LEN]);
516518
targets->nfcid1_len = skb->data[MICROREAD_EMCF_A3_LEN];
519+
if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
520+
r = -EINVAL;
521+
goto exit_free;
522+
}
523+
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID],
524+
targets->nfcid1_len);
517525
break;
518526
case MICROREAD_GATE_ID_MREAD_ISO_B:
519527
targets->supported_protocols = NFC_PROTO_ISO14443_B_MASK;

drivers/nfc/st21nfca/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# Makefile for ST21NFCA HCI based NFC driver
33
#
44

5-
st21nfca_i2c-objs = i2c.o
5+
st21nfca_hci-objs = st21nfca.o st21nfca_dep.o
6+
obj-$(CONFIG_NFC_ST21NFCA) += st21nfca_hci.o
67

7-
obj-$(CONFIG_NFC_ST21NFCA) += st21nfca.o st21nfca_dep.o
8+
st21nfca_i2c-objs = i2c.o
89
obj-$(CONFIG_NFC_ST21NFCA_I2C) += st21nfca_i2c.o

drivers/nfc/st21nfcb/Makefile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
# Makefile for ST21NFCB NCI based NFC driver
33
#
44

5-
st21nfcb_i2c-objs = i2c.o
5+
st21nfcb_nci-objs = ndlc.o st21nfcb.o
6+
obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb_nci.o
67

7-
obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb.o ndlc.o
8+
st21nfcb_i2c-objs = i2c.o
89
obj-$(CONFIG_NFC_ST21NFCB_I2C) += st21nfcb_i2c.o

net/rfkill/rfkill-gpio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ static int rfkill_gpio_set_power(void *data, bool blocked)
5454
if (blocked && !IS_ERR(rfkill->clk) && rfkill->clk_enabled)
5555
clk_disable(rfkill->clk);
5656

57-
rfkill->clk_enabled = blocked;
57+
rfkill->clk_enabled = !blocked;
5858

5959
return 0;
6060
}

0 commit comments

Comments
 (0)