Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless

This commit is contained in:
John W. Linville 2014-10-07 14:48:29 -04:00
commit d7ffd588f0
16 changed files with 80 additions and 29 deletions

View File

@ -57,7 +57,7 @@ int ath9k_cmn_beacon_config_sta(struct ath_hw *ah,
struct ath9k_beacon_state *bs) struct ath9k_beacon_state *bs)
{ {
struct ath_common *common = ath9k_hw_common(ah); struct ath_common *common = ath9k_hw_common(ah);
int dtim_intval, sleepduration; int dtim_intval;
u64 tsf; u64 tsf;
/* No need to configure beacon if we are not associated */ /* No need to configure beacon if we are not associated */
@ -75,7 +75,6 @@ int ath9k_cmn_beacon_config_sta(struct ath_hw *ah,
* last beacon we received (which may be none). * last beacon we received (which may be none).
*/ */
dtim_intval = conf->intval * conf->dtim_period; dtim_intval = conf->intval * conf->dtim_period;
sleepduration = ah->hw->conf.listen_interval * conf->intval;
/* /*
* Pull nexttbtt forward to reflect the current * Pull nexttbtt forward to reflect the current
@ -113,7 +112,7 @@ int ath9k_cmn_beacon_config_sta(struct ath_hw *ah,
*/ */
bs->bs_sleepduration = TU_TO_USEC(roundup(IEEE80211_MS_TO_TU(100), bs->bs_sleepduration = TU_TO_USEC(roundup(IEEE80211_MS_TO_TU(100),
sleepduration)); conf->intval));
if (bs->bs_sleepduration > bs->bs_dtimperiod) if (bs->bs_sleepduration > bs->bs_dtimperiod)
bs->bs_sleepduration = bs->bs_dtimperiod; bs->bs_sleepduration = bs->bs_dtimperiod;

View File

@ -978,7 +978,7 @@ static bool ath9k_rx_prepare(struct ath9k_htc_priv *priv,
struct ath_hw *ah = common->ah; struct ath_hw *ah = common->ah;
struct ath_htc_rx_status *rxstatus; struct ath_htc_rx_status *rxstatus;
struct ath_rx_status rx_stats; struct ath_rx_status rx_stats;
bool decrypt_error; bool decrypt_error = false;
if (skb->len < HTC_RX_FRAME_HEADER_SIZE) { if (skb->len < HTC_RX_FRAME_HEADER_SIZE) {
ath_err(common, "Corrupted RX frame, dropping (len: %d)\n", ath_err(common, "Corrupted RX frame, dropping (len: %d)\n",

View File

@ -502,7 +502,7 @@ irqreturn_t ath_isr(int irq, void *dev)
* touch anything. Note this can happen early * touch anything. Note this can happen early
* on if the IRQ is shared. * on if the IRQ is shared.
*/ */
if (test_bit(ATH_OP_INVALID, &common->op_flags)) if (!ah || test_bit(ATH_OP_INVALID, &common->op_flags))
return IRQ_NONE; return IRQ_NONE;
/* shared irq, not for us */ /* shared irq, not for us */

View File

@ -27,10 +27,17 @@ config BRCMFMAC
one of the bus interface support. If you choose to build a module, one of the bus interface support. If you choose to build a module,
it'll be called brcmfmac.ko. it'll be called brcmfmac.ko.
config BRCMFMAC_PROTO_BCDC
bool
config BRCMFMAC_PROTO_MSGBUF
bool
config BRCMFMAC_SDIO config BRCMFMAC_SDIO
bool "SDIO bus interface support for FullMAC driver" bool "SDIO bus interface support for FullMAC driver"
depends on (MMC = y || MMC = BRCMFMAC) depends on (MMC = y || MMC = BRCMFMAC)
depends on BRCMFMAC depends on BRCMFMAC
select BRCMFMAC_PROTO_BCDC
select FW_LOADER select FW_LOADER
default y default y
---help--- ---help---
@ -42,6 +49,7 @@ config BRCMFMAC_USB
bool "USB bus interface support for FullMAC driver" bool "USB bus interface support for FullMAC driver"
depends on (USB = y || USB = BRCMFMAC) depends on (USB = y || USB = BRCMFMAC)
depends on BRCMFMAC depends on BRCMFMAC
select BRCMFMAC_PROTO_BCDC
select FW_LOADER select FW_LOADER
---help--- ---help---
This option enables the USB bus interface support for Broadcom This option enables the USB bus interface support for Broadcom
@ -52,6 +60,8 @@ config BRCMFMAC_PCIE
bool "PCIE bus interface support for FullMAC driver" bool "PCIE bus interface support for FullMAC driver"
depends on BRCMFMAC depends on BRCMFMAC
depends on PCI depends on PCI
depends on HAS_DMA
select BRCMFMAC_PROTO_MSGBUF
select FW_LOADER select FW_LOADER
---help--- ---help---
This option enables the PCIE bus interface support for Broadcom This option enables the PCIE bus interface support for Broadcom

View File

@ -30,16 +30,18 @@ brcmfmac-objs += \
fwsignal.o \ fwsignal.o \
p2p.o \ p2p.o \
proto.o \ proto.o \
bcdc.o \
commonring.o \
flowring.o \
msgbuf.o \
dhd_common.o \ dhd_common.o \
dhd_linux.o \ dhd_linux.o \
firmware.o \ firmware.o \
feature.o \ feature.o \
btcoex.o \ btcoex.o \
vendor.o vendor.o
brcmfmac-$(CONFIG_BRCMFMAC_PROTO_BCDC) += \
bcdc.o
brcmfmac-$(CONFIG_BRCMFMAC_PROTO_MSGBUF) += \
commonring.o \
flowring.o \
msgbuf.o
brcmfmac-$(CONFIG_BRCMFMAC_SDIO) += \ brcmfmac-$(CONFIG_BRCMFMAC_SDIO) += \
dhd_sdio.o \ dhd_sdio.o \
bcmsdh.o bcmsdh.o

View File

@ -16,9 +16,12 @@
#ifndef BRCMFMAC_BCDC_H #ifndef BRCMFMAC_BCDC_H
#define BRCMFMAC_BCDC_H #define BRCMFMAC_BCDC_H
#ifdef CONFIG_BRCMFMAC_PROTO_BCDC
int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr); int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr);
void brcmf_proto_bcdc_detach(struct brcmf_pub *drvr); void brcmf_proto_bcdc_detach(struct brcmf_pub *drvr);
#else
static inline int brcmf_proto_bcdc_attach(struct brcmf_pub *drvr) { return 0; }
static inline void brcmf_proto_bcdc_detach(struct brcmf_pub *drvr) {}
#endif
#endif /* BRCMFMAC_BCDC_H */ #endif /* BRCMFMAC_BCDC_H */

View File

@ -185,7 +185,13 @@ static void brcmf_fweh_handle_if_event(struct brcmf_pub *drvr,
ifevent->action, ifevent->ifidx, ifevent->bssidx, ifevent->action, ifevent->ifidx, ifevent->bssidx,
ifevent->flags, ifevent->role); ifevent->flags, ifevent->role);
if (ifevent->flags & BRCMF_E_IF_FLAG_NOIF) { /* The P2P Device interface event must not be ignored
* contrary to what firmware tells us. The only way to
* distinguish the P2P Device is by looking at the ifidx
* and bssidx received.
*/
if (!(ifevent->ifidx == 0 && ifevent->bssidx == 1) &&
(ifevent->flags & BRCMF_E_IF_FLAG_NOIF)) {
brcmf_dbg(EVENT, "event can be ignored\n"); brcmf_dbg(EVENT, "event can be ignored\n");
return; return;
} }
@ -210,12 +216,12 @@ static void brcmf_fweh_handle_if_event(struct brcmf_pub *drvr,
return; return;
} }
if (ifevent->action == BRCMF_E_IF_CHANGE) if (ifp && ifevent->action == BRCMF_E_IF_CHANGE)
brcmf_fws_reset_interface(ifp); brcmf_fws_reset_interface(ifp);
err = brcmf_fweh_call_event_handler(ifp, emsg->event_code, emsg, data); err = brcmf_fweh_call_event_handler(ifp, emsg->event_code, emsg, data);
if (ifevent->action == BRCMF_E_IF_DEL) { if (ifp && ifevent->action == BRCMF_E_IF_DEL) {
brcmf_fws_del_interface(ifp); brcmf_fws_del_interface(ifp);
brcmf_del_if(drvr, ifevent->bssidx); brcmf_del_if(drvr, ifevent->bssidx);
} }

View File

@ -172,6 +172,8 @@ enum brcmf_fweh_event_code {
#define BRCMF_E_IF_ROLE_STA 0 #define BRCMF_E_IF_ROLE_STA 0
#define BRCMF_E_IF_ROLE_AP 1 #define BRCMF_E_IF_ROLE_AP 1
#define BRCMF_E_IF_ROLE_WDS 2 #define BRCMF_E_IF_ROLE_WDS 2
#define BRCMF_E_IF_ROLE_P2P_GO 3
#define BRCMF_E_IF_ROLE_P2P_CLIENT 4
/** /**
* definitions for event packet validation. * definitions for event packet validation.

View File

@ -15,6 +15,7 @@
#ifndef BRCMFMAC_MSGBUF_H #ifndef BRCMFMAC_MSGBUF_H
#define BRCMFMAC_MSGBUF_H #define BRCMFMAC_MSGBUF_H
#ifdef CONFIG_BRCMFMAC_PROTO_MSGBUF
#define BRCMF_H2D_MSGRING_CONTROL_SUBMIT_MAX_ITEM 20 #define BRCMF_H2D_MSGRING_CONTROL_SUBMIT_MAX_ITEM 20
#define BRCMF_H2D_MSGRING_RXPOST_SUBMIT_MAX_ITEM 256 #define BRCMF_H2D_MSGRING_RXPOST_SUBMIT_MAX_ITEM 256
@ -32,9 +33,15 @@
int brcmf_proto_msgbuf_rx_trigger(struct device *dev); int brcmf_proto_msgbuf_rx_trigger(struct device *dev);
void brcmf_msgbuf_delete_flowring(struct brcmf_pub *drvr, u8 flowid);
int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr); int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr);
void brcmf_proto_msgbuf_detach(struct brcmf_pub *drvr); void brcmf_proto_msgbuf_detach(struct brcmf_pub *drvr);
void brcmf_msgbuf_delete_flowring(struct brcmf_pub *drvr, u8 flowid); #else
static inline int brcmf_proto_msgbuf_attach(struct brcmf_pub *drvr)
{
return 0;
}
static inline void brcmf_proto_msgbuf_detach(struct brcmf_pub *drvr) {}
#endif
#endif /* BRCMFMAC_MSGBUF_H */ #endif /* BRCMFMAC_MSGBUF_H */

View File

@ -498,8 +498,11 @@ brcmf_configure_arp_offload(struct brcmf_if *ifp, bool enable)
static void static void
brcmf_cfg80211_update_proto_addr_mode(struct wireless_dev *wdev) brcmf_cfg80211_update_proto_addr_mode(struct wireless_dev *wdev)
{ {
struct net_device *ndev = wdev->netdev; struct brcmf_cfg80211_vif *vif;
struct brcmf_if *ifp = netdev_priv(ndev); struct brcmf_if *ifp;
vif = container_of(wdev, struct brcmf_cfg80211_vif, wdev);
ifp = vif->ifp;
if ((wdev->iftype == NL80211_IFTYPE_ADHOC) || if ((wdev->iftype == NL80211_IFTYPE_ADHOC) ||
(wdev->iftype == NL80211_IFTYPE_AP) || (wdev->iftype == NL80211_IFTYPE_AP) ||
@ -4964,7 +4967,7 @@ static void brcmf_count_20mhz_channels(struct brcmf_cfg80211_info *cfg,
struct brcmu_chan ch; struct brcmu_chan ch;
int i; int i;
for (i = 0; i <= total; i++) { for (i = 0; i < total; i++) {
ch.chspec = (u16)le32_to_cpu(chlist->element[i]); ch.chspec = (u16)le32_to_cpu(chlist->element[i]);
cfg->d11inf.decchspec(&ch); cfg->d11inf.decchspec(&ch);
@ -5189,6 +5192,7 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
ch.band = BRCMU_CHAN_BAND_2G; ch.band = BRCMU_CHAN_BAND_2G;
ch.bw = BRCMU_CHAN_BW_40; ch.bw = BRCMU_CHAN_BW_40;
ch.sb = BRCMU_CHAN_SB_NONE;
ch.chnum = 0; ch.chnum = 0;
cfg->d11inf.encchspec(&ch); cfg->d11inf.encchspec(&ch);
@ -5222,6 +5226,7 @@ static int brcmf_enable_bw40_2g(struct brcmf_cfg80211_info *cfg)
brcmf_update_bw40_channel_flag(&band->channels[j], &ch); brcmf_update_bw40_channel_flag(&band->channels[j], &ch);
} }
kfree(pbuf);
} }
return err; return err;
} }

View File

@ -501,9 +501,13 @@ static void microread_target_discovered(struct nfc_hci_dev *hdev, u8 gate,
targets->sens_res = targets->sens_res =
be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A_ATQA]); be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A_ATQA]);
targets->sel_res = skb->data[MICROREAD_EMCF_A_SAK]; targets->sel_res = skb->data[MICROREAD_EMCF_A_SAK];
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID],
skb->data[MICROREAD_EMCF_A_LEN]);
targets->nfcid1_len = skb->data[MICROREAD_EMCF_A_LEN]; targets->nfcid1_len = skb->data[MICROREAD_EMCF_A_LEN];
if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
r = -EINVAL;
goto exit_free;
}
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A_UID],
targets->nfcid1_len);
break; break;
case MICROREAD_GATE_ID_MREAD_ISO_A_3: case MICROREAD_GATE_ID_MREAD_ISO_A_3:
targets->supported_protocols = targets->supported_protocols =
@ -511,9 +515,13 @@ static void microread_target_discovered(struct nfc_hci_dev *hdev, u8 gate,
targets->sens_res = targets->sens_res =
be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A3_ATQA]); be16_to_cpu(*(u16 *)&skb->data[MICROREAD_EMCF_A3_ATQA]);
targets->sel_res = skb->data[MICROREAD_EMCF_A3_SAK]; targets->sel_res = skb->data[MICROREAD_EMCF_A3_SAK];
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID],
skb->data[MICROREAD_EMCF_A3_LEN]);
targets->nfcid1_len = skb->data[MICROREAD_EMCF_A3_LEN]; targets->nfcid1_len = skb->data[MICROREAD_EMCF_A3_LEN];
if (targets->nfcid1_len > sizeof(targets->nfcid1)) {
r = -EINVAL;
goto exit_free;
}
memcpy(targets->nfcid1, &skb->data[MICROREAD_EMCF_A3_UID],
targets->nfcid1_len);
break; break;
case MICROREAD_GATE_ID_MREAD_ISO_B: case MICROREAD_GATE_ID_MREAD_ISO_B:
targets->supported_protocols = NFC_PROTO_ISO14443_B_MASK; targets->supported_protocols = NFC_PROTO_ISO14443_B_MASK;

View File

@ -2,7 +2,8 @@
# Makefile for ST21NFCA HCI based NFC driver # Makefile for ST21NFCA HCI based NFC driver
# #
st21nfca_i2c-objs = i2c.o st21nfca_hci-objs = st21nfca.o st21nfca_dep.o
obj-$(CONFIG_NFC_ST21NFCA) += st21nfca_hci.o
obj-$(CONFIG_NFC_ST21NFCA) += st21nfca.o st21nfca_dep.o st21nfca_i2c-objs = i2c.o
obj-$(CONFIG_NFC_ST21NFCA_I2C) += st21nfca_i2c.o obj-$(CONFIG_NFC_ST21NFCA_I2C) += st21nfca_i2c.o

View File

@ -2,7 +2,8 @@
# Makefile for ST21NFCB NCI based NFC driver # Makefile for ST21NFCB NCI based NFC driver
# #
st21nfcb_i2c-objs = i2c.o st21nfcb_nci-objs = ndlc.o st21nfcb.o
obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb_nci.o
obj-$(CONFIG_NFC_ST21NFCB) += st21nfcb.o ndlc.o st21nfcb_i2c-objs = i2c.o
obj-$(CONFIG_NFC_ST21NFCB_I2C) += st21nfcb_i2c.o obj-$(CONFIG_NFC_ST21NFCB_I2C) += st21nfcb_i2c.o

View File

@ -1823,7 +1823,7 @@ void sta_set_sinfo(struct sta_info *sta, struct station_info *sinfo)
sinfo->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_PREAMBLE; sinfo->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_PREAMBLE;
if (sdata->vif.bss_conf.use_short_slot) if (sdata->vif.bss_conf.use_short_slot)
sinfo->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_SLOT_TIME; sinfo->bss_param.flags |= BSS_PARAM_FLAGS_SHORT_SLOT_TIME;
sinfo->bss_param.dtim_period = sdata->local->hw.conf.ps_dtim_period; sinfo->bss_param.dtim_period = sdata->vif.bss_conf.dtim_period;
sinfo->bss_param.beacon_interval = sdata->vif.bss_conf.beacon_int; sinfo->bss_param.beacon_interval = sdata->vif.bss_conf.beacon_int;
sinfo->sta_flags.set = 0; sinfo->sta_flags.set = 0;

View File

@ -54,7 +54,7 @@ static int rfkill_gpio_set_power(void *data, bool blocked)
if (blocked && !IS_ERR(rfkill->clk) && rfkill->clk_enabled) if (blocked && !IS_ERR(rfkill->clk) && rfkill->clk_enabled)
clk_disable(rfkill->clk); clk_disable(rfkill->clk);
rfkill->clk_enabled = blocked; rfkill->clk_enabled = !blocked;
return 0; return 0;
} }
@ -163,6 +163,7 @@ static const struct acpi_device_id rfkill_acpi_match[] = {
{ "LNV4752", RFKILL_TYPE_GPS }, { "LNV4752", RFKILL_TYPE_GPS },
{ }, { },
}; };
MODULE_DEVICE_TABLE(acpi, rfkill_acpi_match);
#endif #endif
static struct platform_driver rfkill_gpio_driver = { static struct platform_driver rfkill_gpio_driver = {

View File

@ -7028,6 +7028,9 @@ void __cfg80211_send_event_skb(struct sk_buff *skb, gfp_t gfp)
struct nlattr *data = ((void **)skb->cb)[2]; struct nlattr *data = ((void **)skb->cb)[2];
enum nl80211_multicast_groups mcgrp = NL80211_MCGRP_TESTMODE; enum nl80211_multicast_groups mcgrp = NL80211_MCGRP_TESTMODE;
/* clear CB data for netlink core to own from now on */
memset(skb->cb, 0, sizeof(skb->cb));
nla_nest_end(skb, data); nla_nest_end(skb, data);
genlmsg_end(skb, hdr); genlmsg_end(skb, hdr);
@ -9357,6 +9360,9 @@ int cfg80211_vendor_cmd_reply(struct sk_buff *skb)
void *hdr = ((void **)skb->cb)[1]; void *hdr = ((void **)skb->cb)[1];
struct nlattr *data = ((void **)skb->cb)[2]; struct nlattr *data = ((void **)skb->cb)[2];
/* clear CB data for netlink core to own from now on */
memset(skb->cb, 0, sizeof(skb->cb));
if (WARN_ON(!rdev->cur_cmd_info)) { if (WARN_ON(!rdev->cur_cmd_info)) {
kfree_skb(skb); kfree_skb(skb);
return -EINVAL; return -EINVAL;