···2525 return value;2626}27272828-static u32 bcma_chipco_alp_clock(struct bcma_drv_cc *cc)2828+static u32 bcma_chipco_get_alp_clock(struct bcma_drv_cc *cc)2929{3030 if (cc->capabilities & BCMA_CC_CAP_PMU)3131- return bcma_pmu_alp_clock(cc);3131+ return bcma_pmu_get_alp_clock(cc);32323333 return 20000000;3434}···7979 if (cc->capabilities & BCMA_CC_CAP_PMU) {8080 if (bus->chipinfo.id == BCMA_CHIP_ID_BCM4706)8181 /* 4706 CC and PMU watchdogs are clocked at 1/4 of ALP clock */8282- return bcma_chipco_alp_clock(cc) / 4000;8282+ return bcma_chipco_get_alp_clock(cc) / 4000;8383 else8484 /* based on 32KHz ILP clock */8585 return 32;8686 } else {8787- return bcma_chipco_alp_clock(cc) / 1000;8787+ return bcma_chipco_get_alp_clock(cc) / 1000;8888 }8989}9090···236236 struct bcma_serial_port *ports = cc->serial_ports;237237238238 if (ccrev >= 11 && ccrev != 15) {239239- baud_base = bcma_chipco_alp_clock(cc);239239+ baud_base = bcma_chipco_get_alp_clock(cc);240240 if (ccrev >= 21) {241241 /* Turn off UART clock before switching clocksource. */242242 bcma_cc_write32(cc, BCMA_CC_CORECTL,
+21-18
drivers/bcma/driver_chipcommon_pmu.c
···168168 bcma_pmu_workarounds(cc);169169}170170171171-u32 bcma_pmu_alp_clock(struct bcma_drv_cc *cc)171171+u32 bcma_pmu_get_alp_clock(struct bcma_drv_cc *cc)172172{173173 struct bcma_bus *bus = cc->core->bus;174174···196196/* Find the output of the "m" pll divider given pll controls that start with197197 * pllreg "pll0" i.e. 12 for main 6 for phy, 0 for misc.198198 */199199-static u32 bcma_pmu_clock(struct bcma_drv_cc *cc, u32 pll0, u32 m)199199+static u32 bcma_pmu_pll_clock(struct bcma_drv_cc *cc, u32 pll0, u32 m)200200{201201 u32 tmp, div, ndiv, p1, p2, fc;202202 struct bcma_bus *bus = cc->core->bus;···225225 ndiv = (tmp & BCMA_CC_PPL_NDIV_MASK) >> BCMA_CC_PPL_NDIV_SHIFT;226226227227 /* Do calculation in Mhz */228228- fc = bcma_pmu_alp_clock(cc) / 1000000;228228+ fc = bcma_pmu_get_alp_clock(cc) / 1000000;229229 fc = (p1 * ndiv * fc) / p2;230230231231 /* Return clock in Hertz */232232 return (fc / div) * 1000000;233233}234234235235-static u32 bcma_pmu_clock_bcm4706(struct bcma_drv_cc *cc, u32 pll0, u32 m)235235+static u32 bcma_pmu_pll_clock_bcm4706(struct bcma_drv_cc *cc, u32 pll0, u32 m)236236{237237 u32 tmp, ndiv, p1div, p2div;238238 u32 clock;···263263}264264265265/* query bus clock frequency for PMU-enabled chipcommon */266266-static u32 bcma_pmu_get_clockcontrol(struct bcma_drv_cc *cc)266266+static u32 bcma_pmu_get_bus_clock(struct bcma_drv_cc *cc)267267{268268 struct bcma_bus *bus = cc->core->bus;269269···271271 case BCMA_CHIP_ID_BCM4716:272272 case BCMA_CHIP_ID_BCM4748:273273 case BCMA_CHIP_ID_BCM47162:274274- return bcma_pmu_clock(cc, BCMA_CC_PMU4716_MAINPLL_PLL0,275275- BCMA_CC_PMU5_MAINPLL_SSB);274274+ return bcma_pmu_pll_clock(cc, BCMA_CC_PMU4716_MAINPLL_PLL0,275275+ BCMA_CC_PMU5_MAINPLL_SSB);276276 case BCMA_CHIP_ID_BCM5356:277277- return bcma_pmu_clock(cc, BCMA_CC_PMU5356_MAINPLL_PLL0,278278- BCMA_CC_PMU5_MAINPLL_SSB);277277+ return bcma_pmu_pll_clock(cc, BCMA_CC_PMU5356_MAINPLL_PLL0,278278+ BCMA_CC_PMU5_MAINPLL_SSB);279279 case BCMA_CHIP_ID_BCM5357:280280 case BCMA_CHIP_ID_BCM4749:281281- return bcma_pmu_clock(cc, BCMA_CC_PMU5357_MAINPLL_PLL0,282282- BCMA_CC_PMU5_MAINPLL_SSB);281281+ return bcma_pmu_pll_clock(cc, BCMA_CC_PMU5357_MAINPLL_PLL0,282282+ BCMA_CC_PMU5_MAINPLL_SSB);283283 case BCMA_CHIP_ID_BCM4706:284284- return bcma_pmu_clock_bcm4706(cc, BCMA_CC_PMU4706_MAINPLL_PLL0,285285- BCMA_CC_PMU5_MAINPLL_SSB);284284+ return bcma_pmu_pll_clock_bcm4706(cc,285285+ BCMA_CC_PMU4706_MAINPLL_PLL0,286286+ BCMA_CC_PMU5_MAINPLL_SSB);286287 case BCMA_CHIP_ID_BCM53572:287288 return 75000000;288289 default:289289- bcma_warn(bus, "No backplane clock specified for %04X device, pmu rev. %d, using default %d Hz\n",290290+ bcma_warn(bus, "No bus clock specified for %04X device, pmu rev. %d, using default %d Hz\n",290291 bus->chipinfo.id, cc->pmu.rev, BCMA_CC_PMU_HT_CLOCK);291292 }292293 return BCMA_CC_PMU_HT_CLOCK;293294}294295295296/* query cpu clock frequency for PMU-enabled chipcommon */296296-u32 bcma_pmu_get_clockcpu(struct bcma_drv_cc *cc)297297+u32 bcma_pmu_get_cpu_clock(struct bcma_drv_cc *cc)297298{298299 struct bcma_bus *bus = cc->core->bus;299300300301 if (bus->chipinfo.id == BCMA_CHIP_ID_BCM53572)301302 return 300000000;302303304304+ /* New PMUs can have different clock for bus and CPU */303305 if (cc->pmu.rev >= 5) {304306 u32 pll;305307 switch (bus->chipinfo.id) {306308 case BCMA_CHIP_ID_BCM4706:307307- return bcma_pmu_clock_bcm4706(cc,309309+ return bcma_pmu_pll_clock_bcm4706(cc,308310 BCMA_CC_PMU4706_MAINPLL_PLL0,309311 BCMA_CC_PMU5_MAINPLL_CPU);310312 case BCMA_CHIP_ID_BCM5356:···321319 break;322320 }323321324324- return bcma_pmu_clock(cc, pll, BCMA_CC_PMU5_MAINPLL_CPU);322322+ return bcma_pmu_pll_clock(cc, pll, BCMA_CC_PMU5_MAINPLL_CPU);325323 }326324327327- return bcma_pmu_get_clockcontrol(cc);325325+ /* On old PMUs CPU has the same clock as the bus */326326+ return bcma_pmu_get_bus_clock(cc);328327}329328330329static void bcma_pmu_spuravoid_pll_write(struct bcma_drv_cc *cc, u32 offset,
+2-2
drivers/bcma/driver_mips.c
···115115 bcma_read32(mdev, BCMA_MIPS_MIPS74K_INTMASK(0)) &116116 ~(1 << irqflag));117117 else118118- bcma_write32(mdev, BCMA_MIPS_MIPS74K_INTMASK(irq), 0);118118+ bcma_write32(mdev, BCMA_MIPS_MIPS74K_INTMASK(oldirq), 0);119119120120 /* assign the new one */121121 if (irq == 0) {···171171 struct bcma_bus *bus = mcore->core->bus;172172173173 if (bus->drv_cc.capabilities & BCMA_CC_CAP_PMU)174174- return bcma_pmu_get_clockcpu(&bus->drv_cc);174174+ return bcma_pmu_get_cpu_clock(&bus->drv_cc);175175176176 bcma_err(bus, "No PMU available, need this to get the cpu clock\n");177177 return 0;
+3-14
drivers/net/wireless/ath/ath5k/base.c
···849849 return;850850 dma_unmap_single(ah->dev, bf->skbaddr, bf->skb->len,851851 DMA_TO_DEVICE);852852- dev_kfree_skb_any(bf->skb);852852+ ieee80211_free_txskb(ah->hw, bf->skb);853853 bf->skb = NULL;854854 bf->skbaddr = 0;855855 bf->desc->ds_data = 0;···13361336 * 15bit only. that means TSF extension has to be done within13371337 * 32768usec (about 32ms). it might be necessary to move this to13381338 * the interrupt handler, like it is done in madwifi.13391339- *13401340- * Unfortunately we don't know when the hardware takes the rx13411341- * timestamp (beginning of phy frame, data frame, end of rx?).13421342- * The only thing we know is that it is hardware specific...13431343- * On AR5213 it seems the rx timestamp is at the end of the13441344- * frame, but I'm not sure.13451345- *13461346- * NOTE: mac80211 defines mactime at the beginning of the first13471347- * data symbol. Since we don't have any time references it's13481348- * impossible to comply to that. This affects IBSS merge only13491349- * right now, so it's not too bad...13501339 */13511340 rxs->mactime = ath5k_extend_tsf(ah, rs->rs_tstamp);13521352- rxs->flag |= RX_FLAG_MACTIME_START;13411341+ rxs->flag |= RX_FLAG_MACTIME_END;1353134213541343 rxs->freq = ah->curchan->center_freq;13551344 rxs->band = ah->curchan->band;···15651576 return;1566157715671578drop_packet:15681568- dev_kfree_skb_any(skb);15791579+ ieee80211_free_txskb(hw, skb);15691580}1570158115711582static void
···21212222#define AR_PHY_CCA_FILTERWINDOW_LENGTH 523232424+/* Internal noise floor can vary by about 6db depending on the frequency */2525+#define ATH9K_NF_CAL_NOISE_THRESH 62626+2427#define NUM_NF_READINGS 62528#define ATH9K_NF_CAL_HIST_MAX 52629
···409409 struct b43_dmadesc_meta *meta)410410{411411 if (meta->skb) {412412- dev_kfree_skb_any(meta->skb);412412+ if (ring->tx)413413+ ieee80211_free_txskb(ring->dev->wl->hw, meta->skb);414414+ else415415+ dev_kfree_skb_any(meta->skb);413416 meta->skb = NULL;414417 }415418}···14571454 if (unlikely(err == -ENOKEY)) {14581455 /* Drop this packet, as we don't have the encryption key14591456 * anymore and must not transmit it unencrypted. */14601460- dev_kfree_skb_any(skb);14571457+ ieee80211_free_txskb(dev->wl->hw, skb);14611458 err = 0;14621459 goto out;14631460 }
+8-4
drivers/net/wireless/b43/main.c
···33973397 break;33983398 }33993399 if (unlikely(err))34003400- dev_kfree_skb(skb); /* Drop it */34003400+ ieee80211_free_txskb(wl->hw, skb);34013401 err = 0;34023402 }34033403···3419341934203420 if (unlikely(skb->len < 2 + 2 + 6)) {34213421 /* Too short, this can't be a valid frame. */34223422- dev_kfree_skb_any(skb);34223422+ ieee80211_free_txskb(hw, skb);34233423 return;34243424 }34253425 B43_WARN_ON(skb_shinfo(skb)->nr_frags);···4229422942304230 /* Drain all TX queues. */42314231 for (queue_num = 0; queue_num < B43_QOS_QUEUE_NUM; queue_num++) {42324232- while (skb_queue_len(&wl->tx_queue[queue_num]))42334233- dev_kfree_skb(skb_dequeue(&wl->tx_queue[queue_num]));42324232+ while (skb_queue_len(&wl->tx_queue[queue_num])) {42334233+ struct sk_buff *skb;42344234+42354235+ skb = skb_dequeue(&wl->tx_queue[queue_num]);42364236+ ieee80211_free_txskb(wl->hw, skb);42374237+ }42344238 }4235423942364240 b43_mac_suspend(dev);
+2-2
drivers/net/wireless/b43/pio.c
···196196 for (i = 0; i < ARRAY_SIZE(q->packets); i++) {197197 pack = &(q->packets[i]);198198 if (pack->skb) {199199- dev_kfree_skb_any(pack->skb);199199+ ieee80211_free_txskb(q->dev->wl->hw, pack->skb);200200 pack->skb = NULL;201201 }202202 }···552552 if (unlikely(err == -ENOKEY)) {553553 /* Drop this packet, as we don't have the encryption key554554 * anymore and must not transmit it unencrypted. */555555- dev_kfree_skb_any(skb);555555+ ieee80211_free_txskb(dev->wl->hw, skb);556556 err = 0;557557 goto out;558558 }
···4343 struct list_head list;4444};45454646-/* interface structure between common and bus layer */4646+/**4747+ * struct brcmf_bus_ops - bus callback operations.4848+ *4949+ * @init: prepare for communication with dongle.5050+ * @stop: clear pending frames, disable data flow.5151+ * @txdata: send a data frame to the dongle (callee disposes skb).5252+ * @txctl: transmit a control request message to dongle.5353+ * @rxctl: receive a control response message from dongle.5454+ *5555+ * This structure provides an abstract interface towards the5656+ * bus specific driver. For control messages to common driver5757+ * will assure there is only one active transaction.5858+ */5959+struct brcmf_bus_ops {6060+ int (*init)(struct device *dev);6161+ void (*stop)(struct device *dev);6262+ int (*txdata)(struct device *dev, struct sk_buff *skb);6363+ int (*txctl)(struct device *dev, unsigned char *msg, uint len);6464+ int (*rxctl)(struct device *dev, unsigned char *msg, uint len);6565+};6666+6767+/**6868+ * struct brcmf_bus - interface structure between common and bus layer6969+ *7070+ * @bus_priv: pointer to private bus device.7171+ * @dev: device pointer of bus device.7272+ * @drvr: public driver information.7373+ * @state: operational state of the bus interface.7474+ * @maxctl: maximum size for rxctl request message.7575+ * @drvr_up: indicates driver up/down status.7676+ * @tx_realloc: number of tx packets realloced for headroom.7777+ * @dstats: dongle-based statistical data.7878+ * @align: alignment requirement for the bus.7979+ * @dcmd_list: bus/device specific dongle initialization commands.8080+ */4781struct brcmf_bus {4882 union {4983 struct brcmf_sdio_dev *sdio;5084 struct brcmf_usbdev *usb;5185 } bus_priv;5252- struct brcmf_pub *drvr; /* pointer to driver pub structure brcmf_pub */8686+ struct device *dev;8787+ struct brcmf_pub *drvr;5388 enum brcmf_bus_state state;5454- uint maxctl; /* Max size rxctl request from proto to bus */5555- bool drvr_up; /* Status flag of driver up/down */5656- unsigned long tx_realloc; /* Tx packets realloced for headroom */5757- struct dngl_stats dstats; /* Stats for dongle-based data */5858- u8 align; /* bus alignment requirement */8989+ uint maxctl;9090+ bool drvr_up;9191+ unsigned long tx_realloc;9292+ struct dngl_stats dstats;9393+ u8 align;5994 struct list_head dcmd_list;60956161- /* interface functions pointers */6262- /* Stop bus module: clear pending frames, disable data flow */6363- void (*brcmf_bus_stop)(struct device *);6464- /* Initialize bus module: prepare for communication w/dongle */6565- int (*brcmf_bus_init)(struct device *);6666- /* Send a data frame to the dongle. Callee disposes of txp. */6767- int (*brcmf_bus_txdata)(struct device *, struct sk_buff *);6868- /* Send/receive a control message to/from the dongle.6969- * Expects caller to enforce a single outstanding transaction.7070- */7171- int (*brcmf_bus_txctl)(struct device *, unsigned char *, uint);7272- int (*brcmf_bus_rxctl)(struct device *, unsigned char *, uint);9696+ struct brcmf_bus_ops *ops;7397};9898+9999+/*100100+ * callback wrappers101101+ */102102+static inline int brcmf_bus_init(struct brcmf_bus *bus)103103+{104104+ return bus->ops->init(bus->dev);105105+}106106+107107+static inline void brcmf_bus_stop(struct brcmf_bus *bus)108108+{109109+ bus->ops->stop(bus->dev);110110+}111111+112112+static inline int brcmf_bus_txdata(struct brcmf_bus *bus, struct sk_buff *skb)113113+{114114+ return bus->ops->txdata(bus->dev, skb);115115+}116116+117117+static inline118118+int brcmf_bus_txctl(struct brcmf_bus *bus, unsigned char *msg, uint len)119119+{120120+ return bus->ops->txctl(bus->dev, msg, len);121121+}122122+123123+static inline124124+int brcmf_bus_rxctl(struct brcmf_bus *bus, unsigned char *msg, uint len)125125+{126126+ return bus->ops->rxctl(bus->dev, msg, len);127127+}7412875129/*76130 * interface functions from common layer
+11-14
drivers/net/wireless/brcm80211/brcmfmac/dhd_cdc.c
···117117 len = CDC_MAX_MSG_SIZE;118118119119 /* Send request */120120- return drvr->bus_if->brcmf_bus_txctl(drvr->dev,121121- (unsigned char *)&prot->msg,122122- len);120120+ return brcmf_bus_txctl(drvr->bus_if, (unsigned char *)&prot->msg, len);123121}124122125123static int brcmf_proto_cdc_cmplt(struct brcmf_pub *drvr, u32 id, u32 len)···126128 struct brcmf_proto *prot = drvr->prot;127129128130 brcmf_dbg(TRACE, "Enter\n");129129-131131+ len += sizeof(struct brcmf_proto_cdc_dcmd);130132 do {131131- ret = drvr->bus_if->brcmf_bus_rxctl(drvr->dev,132132- (unsigned char *)&prot->msg,133133- len + sizeof(struct brcmf_proto_cdc_dcmd));133133+ ret = brcmf_bus_rxctl(drvr->bus_if, (unsigned char *)&prot->msg,134134+ len);134135 if (ret < 0)135136 break;136137 } while (CDC_DCMD_ID(le32_to_cpu(prot->msg.flags)) != id);···176179177180 ret = brcmf_proto_cdc_msg(drvr);178181 if (ret < 0) {179179- brcmf_dbg(ERROR, "brcmf_proto_cdc_msg failed w/status %d\n",182182+ brcmf_err("brcmf_proto_cdc_msg failed w/status %d\n",180183 ret);181184 goto done;182185 }···193196 if ((id < prot->reqid) && (++retries < RETRIES))194197 goto retry;195198 if (id != prot->reqid) {196196- brcmf_dbg(ERROR, "%s: unexpected request id %d (expected %d)\n",199199+ brcmf_err("%s: unexpected request id %d (expected %d)\n",197200 brcmf_ifname(drvr, ifidx), id, prot->reqid);198201 ret = -EINVAL;199202 goto done;···255258 id = (flags & CDC_DCMD_ID_MASK) >> CDC_DCMD_ID_SHIFT;256259257260 if (id != prot->reqid) {258258- brcmf_dbg(ERROR, "%s: unexpected request id %d (expected %d)\n",261261+ brcmf_err("%s: unexpected request id %d (expected %d)\n",259262 brcmf_ifname(drvr, ifidx), id, prot->reqid);260263 ret = -EINVAL;261264 goto done;···317320 /* Pop BDC header used to convey priority for buses that don't */318321319322 if (pktbuf->len < BDC_HEADER_LEN) {320320- brcmf_dbg(ERROR, "rx data too short (%d < %d)\n",323323+ brcmf_err("rx data too short (%d < %d)\n",321324 pktbuf->len, BDC_HEADER_LEN);322325 return -EBADE;323326 }···326329327330 *ifidx = BDC_GET_IF_IDX(h);328331 if (*ifidx >= BRCMF_MAX_IFS) {329329- brcmf_dbg(ERROR, "rx data ifnum out of range (%d)\n", *ifidx);332332+ brcmf_err("rx data ifnum out of range (%d)\n", *ifidx);330333 return -EBADE;331334 }332335333336 if (((h->flags & BDC_FLAG_VER_MASK) >> BDC_FLAG_VER_SHIFT) !=334337 BDC_PROTO_VER) {335335- brcmf_dbg(ERROR, "%s: non-BDC packet received, flags 0x%x\n",338338+ brcmf_err("%s: non-BDC packet received, flags 0x%x\n",336339 brcmf_ifname(drvr, *ifidx), h->flags);337340 return -EBADE;338341 }···361364362365 /* ensure that the msg buf directly follows the cdc msg struct */363366 if ((unsigned long)(&cdc->msg + 1) != (unsigned long)cdc->buf) {364364- brcmf_dbg(ERROR, "struct brcmf_proto is not correctly defined\n");367367+ brcmf_err("struct brcmf_proto is not correctly defined\n");365368 goto fail;366369 }367370
···717717 brcms_c_write_mhf(wlc_hw, wlc_hw->band->mhfs);718718719719 /* do band-specific ucode IHR, SHM, and SCR inits */720720- if (D11REV_IS(wlc_hw->corerev, 23)) {720720+ if (D11REV_IS(wlc_hw->corerev, 17) || D11REV_IS(wlc_hw->corerev, 23)) {721721 if (BRCMS_ISNPHY(wlc_hw->band))722722 brcms_c_write_inits(wlc_hw, ucode->d11n0bsinitvals16);723723 else···22642264 if (wlc_hw->ucode_loaded)22652265 return;2266226622672267- if (D11REV_IS(wlc_hw->corerev, 23)) {22672267+ if (D11REV_IS(wlc_hw->corerev, 17) || D11REV_IS(wlc_hw->corerev, 23)) {22682268 if (BRCMS_ISNPHY(wlc_hw->band)) {22692269 brcms_ucode_write(wlc_hw, ucode->bcm43xx_16_mimo,22702270 ucode->bcm43xx_16_mimosz);···29202920 if (offset & 2)29212921 objoff += 2;2922292229232923- bcma_write16(core, objoff, v);29232923+ bcma_wflush16(core, objoff, v);29242924}2925292529262926/*···3216321632173217 sflags = bcma_aread32(core, BCMA_IOST);3218321832193219- if (D11REV_IS(wlc_hw->corerev, 23)) {32193219+ if (D11REV_IS(wlc_hw->corerev, 17) || D11REV_IS(wlc_hw->corerev, 23)) {32203220 if (BRCMS_ISNPHY(wlc_hw->band))32213221 brcms_c_write_inits(wlc_hw, ucode->d11n0initvals16);32223222 else···4500450045014501 /* check device id(srom, nvram etc.) to set bands */45024502 if (wlc_hw->deviceid == BCM43224_D11N_ID ||45034503- wlc_hw->deviceid == BCM43224_D11N_ID_VEN1)45034503+ wlc_hw->deviceid == BCM43224_D11N_ID_VEN1 ||45044504+ wlc_hw->deviceid == BCM43224_CHIP_ID)45044505 /* Dualband boards */45054506 wlc_hw->_nbands = 2;45064507 else···56545653 return false;56555654 }5656565556575657- if (device == BCM43224_D11N_ID_VEN1)56565656+ if (device == BCM43224_D11N_ID_VEN1 || device == BCM43224_CHIP_ID)56585657 return true;56595658 if ((device == BCM43224_D11N_ID) || (device == BCM43225_D11N2G_ID))56605659 return true;
+7-7
drivers/net/wireless/iwlwifi/dvm/calib.c
···833833 * To be safe, simply mask out any chains that we know834834 * are not on the device.835835 */836836- active_chains &= priv->eeprom_data->valid_rx_ant;836836+ active_chains &= priv->nvm_data->valid_rx_ant;837837838838 num_tx_chains = 0;839839 for (i = 0; i < NUM_RX_CHAINS; i++) {840840 /* loops on all the bits of841841 * priv->hw_setting.valid_tx_ant */842842 u8 ant_msk = (1 << i);843843- if (!(priv->eeprom_data->valid_tx_ant & ant_msk))843843+ if (!(priv->nvm_data->valid_tx_ant & ant_msk))844844 continue;845845846846 num_tx_chains++;···854854 * connect the first valid tx chain855855 */856856 first_chain =857857- find_first_chain(priv->eeprom_data->valid_tx_ant);857857+ find_first_chain(priv->nvm_data->valid_tx_ant);858858 data->disconn_array[first_chain] = 0;859859 active_chains |= BIT(first_chain);860860 IWL_DEBUG_CALIB(priv,···864864 }865865 }866866867867- if (active_chains != priv->eeprom_data->valid_rx_ant &&867867+ if (active_chains != priv->nvm_data->valid_rx_ant &&868868 active_chains != priv->chain_noise_data.active_chains)869869 IWL_DEBUG_CALIB(priv,870870 "Detected that not all antennas are connected! "871871 "Connected: %#x, valid: %#x.\n",872872 active_chains,873873- priv->eeprom_data->valid_rx_ant);873873+ priv->nvm_data->valid_rx_ant);874874875875 /* Save for use within RXON, TX, SCAN commands, etc. */876876 data->active_chains = active_chains;···10551055 priv->cfg->bt_params->advanced_bt_coexist) {10561056 /* Disable disconnected antenna algorithm for advanced10571057 bt coex, assuming valid antennas are connected */10581058- data->active_chains = priv->eeprom_data->valid_rx_ant;10581058+ data->active_chains = priv->nvm_data->valid_rx_ant;10591059 for (i = 0; i < NUM_RX_CHAINS; i++)10601060 if (!(data->active_chains & (1<<i)))10611061 data->disconn_array[i] = 1;···1086108610871087 iwlagn_gain_computation(10881088 priv, average_noise,10891089- find_first_chain(priv->eeprom_data->valid_rx_ant));10891089+ find_first_chain(priv->nvm_data->valid_rx_ant));1090109010911091 /* Some power changes may have been made during the calibration.10921092 * Update and commit the RXON
···305305{306306 u16 temperature, voltage;307307308308- temperature = le16_to_cpu(priv->eeprom_data->kelvin_temperature);309309- voltage = le16_to_cpu(priv->eeprom_data->kelvin_voltage);308308+ temperature = le16_to_cpu(priv->nvm_data->kelvin_temperature);309309+ voltage = le16_to_cpu(priv->nvm_data->kelvin_voltage);310310311311 /* offset = temp - volt / coeff */312312 return (s32)(temperature -···460460 break;461461 case IWL_DEVICE_FAMILY_6050:462462 /* Indicate calibration version to uCode. */463463- if (priv->eeprom_data->calib_version >= 6)463463+ if (priv->nvm_data->calib_version >= 6)464464 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG,465465 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);466466 break;467467 case IWL_DEVICE_FAMILY_6150:468468 /* Indicate calibration version to uCode. */469469- if (priv->eeprom_data->calib_version >= 6)469469+ if (priv->nvm_data->calib_version >= 6)470470 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG,471471 CSR_GP_DRIVER_REG_BIT_CALIB_VERSION6);472472 iwl_set_bit(priv->trans, CSR_GP_DRIVER_REG,
+4-4
drivers/net/wireless/iwlwifi/dvm/lib.c
···5959 /* half dBm need to multiply */6060 tx_power_cmd.global_lmt = (s8)(2 * priv->tx_power_user_lmt);61616262- if (tx_power_cmd.global_lmt > priv->eeprom_data->max_tx_pwr_half_dbm) {6262+ if (tx_power_cmd.global_lmt > priv->nvm_data->max_tx_pwr_half_dbm) {6363 /*6464 * For the newer devices which using enhanced/extend tx power6565 * table in EEPROM, the format is in half dBm. driver need to···7272 * half-dBm format), lower the tx power based on EEPROM7373 */7474 tx_power_cmd.global_lmt =7575- priv->eeprom_data->max_tx_pwr_half_dbm;7575+ priv->nvm_data->max_tx_pwr_half_dbm;7676 }7777 tx_power_cmd.flags = IWLAGN_TX_POWER_NO_CLOSED;7878 tx_power_cmd.srv_chan_lmt = IWLAGN_TX_POWER_AUTO;···159159 IWL_PAN_SCD_MGMT_MSK |160160 IWL_PAN_SCD_MULTICAST_MSK;161161162162- if (priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE)162162+ if (priv->nvm_data->sku_cap_11n_enable)163163 flush_cmd.queue_control |= IWL_AGG_TX_QUEUE_MSK;164164165165 IWL_DEBUG_INFO(priv, "queue control: 0x%x\n",···825825 if (priv->chain_noise_data.active_chains)826826 active_chains = priv->chain_noise_data.active_chains;827827 else828828- active_chains = priv->eeprom_data->valid_rx_ant;828828+ active_chains = priv->nvm_data->valid_rx_ant;829829830830 if (priv->cfg->bt_params &&831831 priv->cfg->bt_params->advanced_bt_coexist &&
+6-6
drivers/net/wireless/iwlwifi/dvm/mac80211.c
···164164 hw->max_tx_aggregation_subframes = LINK_QUAL_AGG_FRAME_LIMIT_DEF;165165 */166166167167- if (priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE)167167+ if (priv->nvm_data->sku_cap_11n_enable)168168 hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS |169169 IEEE80211_HW_SUPPORTS_STATIC_SMPS;170170···242242243243 hw->max_listen_interval = IWL_CONN_MAX_LISTEN_INTERVAL;244244245245- if (priv->eeprom_data->bands[IEEE80211_BAND_2GHZ].n_channels)245245+ if (priv->nvm_data->bands[IEEE80211_BAND_2GHZ].n_channels)246246 priv->hw->wiphy->bands[IEEE80211_BAND_2GHZ] =247247- &priv->eeprom_data->bands[IEEE80211_BAND_2GHZ];248248- if (priv->eeprom_data->bands[IEEE80211_BAND_5GHZ].n_channels)247247+ &priv->nvm_data->bands[IEEE80211_BAND_2GHZ];248248+ if (priv->nvm_data->bands[IEEE80211_BAND_5GHZ].n_channels)249249 priv->hw->wiphy->bands[IEEE80211_BAND_5GHZ] =250250- &priv->eeprom_data->bands[IEEE80211_BAND_5GHZ];250250+ &priv->nvm_data->bands[IEEE80211_BAND_5GHZ];251251252252 hw->wiphy->hw_version = priv->trans->hw_id;253253···654654 IWL_DEBUG_HT(priv, "A-MPDU action on addr %pM tid %d\n",655655 sta->addr, tid);656656657657- if (!(priv->eeprom_data->sku & EEPROM_SKU_CAP_11N_ENABLE))657657+ if (!(priv->nvm_data->sku_cap_11n_enable))658658 return -EACCES;659659660660 IWL_DEBUG_MAC80211(priv, "enter\n");
···660660 u16 rx_chain = 0;661661 enum ieee80211_band band;662662 u8 n_probes = 0;663663- u8 rx_ant = priv->eeprom_data->valid_rx_ant;663663+ u8 rx_ant = priv->nvm_data->valid_rx_ant;664664 u8 rate;665665 bool is_active = false;666666 int chan_mod;667667 u8 active_chains;668668- u8 scan_tx_antennas = priv->eeprom_data->valid_tx_ant;668668+ u8 scan_tx_antennas = priv->nvm_data->valid_tx_ant;669669 int ret;670670 int scan_cmd_size = sizeof(struct iwl_scan_cmd) +671671 MAX_SCAN_CHANNEL * sizeof(struct iwl_scan_channel) +···673673 const u8 *ssid = NULL;674674 u8 ssid_len = 0;675675676676- if (WARN_ON_ONCE(priv->scan_request &&677677- priv->scan_request->n_channels > MAX_SCAN_CHANNEL))676676+ if (WARN_ON(priv->scan_type == IWL_SCAN_NORMAL &&677677+ (!priv->scan_request ||678678+ priv->scan_request->n_channels > MAX_SCAN_CHANNEL)))678679 return -EINVAL;679680680681 lockdep_assert_held(&priv->mutex);···882881883882 /* MIMO is not used here, but value is required */884883 rx_chain |=885885- priv->eeprom_data->valid_rx_ant << RXON_RX_CHAIN_VALID_POS;884884+ priv->nvm_data->valid_rx_ant << RXON_RX_CHAIN_VALID_POS;886885 rx_chain |= rx_ant << RXON_RX_CHAIN_FORCE_MIMO_SEL_POS;887886 rx_chain |= rx_ant << RXON_RX_CHAIN_FORCE_SEL_POS;888887 rx_chain |= 0x1 << RXON_RX_CHAIN_DRIVER_FORCE_POS;···9999981000999void iwl_init_scan_params(struct iwl_priv *priv)10011000{10021002- u8 ant_idx = fls(priv->eeprom_data->valid_tx_ant) - 1;10011001+ u8 ant_idx = fls(priv->nvm_data->valid_tx_ant) - 1;10031002 if (!priv->scan_tx_ant[IEEE80211_BAND_5GHZ])10041003 priv->scan_tx_ant[IEEE80211_BAND_5GHZ] = ant_idx;10051004 if (!priv->scan_tx_ant[IEEE80211_BAND_2GHZ])
+6-6
drivers/net/wireless/iwlwifi/dvm/sta.c
···634634 if (r >= IWL_FIRST_CCK_RATE && r <= IWL_LAST_CCK_RATE)635635 rate_flags |= RATE_MCS_CCK_MSK;636636637637- rate_flags |= first_antenna(priv->eeprom_data->valid_tx_ant) <<637637+ rate_flags |= first_antenna(priv->nvm_data->valid_tx_ant) <<638638 RATE_MCS_ANT_POS;639639 rate_n_flags = iwl_hw_set_rate_n_flags(iwl_rates[r].plcp, rate_flags);640640 for (i = 0; i < LINK_QUAL_MAX_RETRY_NUM; i++)641641 link_cmd->rs_table[i].rate_n_flags = rate_n_flags;642642643643 link_cmd->general_params.single_stream_ant_msk =644644- first_antenna(priv->eeprom_data->valid_tx_ant);644644+ first_antenna(priv->nvm_data->valid_tx_ant);645645646646 link_cmd->general_params.dual_stream_ant_msk =647647- priv->eeprom_data->valid_tx_ant &648648- ~first_antenna(priv->eeprom_data->valid_tx_ant);647647+ priv->nvm_data->valid_tx_ant &648648+ ~first_antenna(priv->nvm_data->valid_tx_ant);649649 if (!link_cmd->general_params.dual_stream_ant_msk) {650650 link_cmd->general_params.dual_stream_ant_msk = ANT_AB;651651- } else if (num_of_ant(priv->eeprom_data->valid_tx_ant) == 2) {651651+ } else if (num_of_ant(priv->nvm_data->valid_tx_ant) == 2) {652652 link_cmd->general_params.dual_stream_ant_msk =653653- priv->eeprom_data->valid_tx_ant;653653+ priv->nvm_data->valid_tx_ant;654654 }655655656656 link_cmd->agg_params.agg_dis_start_th =
+27-40
drivers/net/wireless/iwlwifi/dvm/tx.c
···188188 if (info->control.rates[0].flags & IEEE80211_TX_RC_MCS ||189189 (rate_idx < 0) || (rate_idx > IWL_RATE_COUNT_LEGACY))190190 rate_idx = rate_lowest_index(191191- &priv->eeprom_data->bands[info->band], sta);191191+ &priv->nvm_data->bands[info->band], sta);192192 /* For 5 GHZ band, remap mac80211 rate indices into driver indices */193193 if (info->band == IEEE80211_BAND_5GHZ)194194 rate_idx += IWL_FIRST_OFDM_RATE;···207207 priv->bt_full_concurrent) {208208 /* operated as 1x1 in full concurrency mode */209209 priv->mgmt_tx_ant = iwl_toggle_tx_ant(priv, priv->mgmt_tx_ant,210210- first_antenna(priv->eeprom_data->valid_tx_ant));210210+ first_antenna(priv->nvm_data->valid_tx_ant));211211 } else212212 priv->mgmt_tx_ant = iwl_toggle_tx_ant(213213 priv, priv->mgmt_tx_ant,214214- priv->eeprom_data->valid_tx_ant);214214+ priv->nvm_data->valid_tx_ant);215215 rate_flags |= iwl_ant_idx_to_flags(priv->mgmt_tx_ant);216216217217 /* Set the rate in the TX cmd */···305305 u8 hdr_len;306306 u16 len, seq_number = 0;307307 u8 sta_id, tid = IWL_MAX_TID_COUNT;308308- bool is_agg = false;308308+ bool is_agg = false, is_data_qos = false;309309 int txq_id;310310311311 if (info->control.vif)···378378 iwl_sta_modify_sleep_tx_count(priv, sta_id, 1);379379 }380380381381- if (info->flags & IEEE80211_TX_CTL_AMPDU)382382- is_agg = true;383383-384381 dev_cmd = iwl_trans_alloc_tx_cmd(priv->trans);385382386383 if (unlikely(!dev_cmd))···439442 hdr->seq_ctrl &= cpu_to_le16(IEEE80211_SCTL_FRAG);440443 hdr->seq_ctrl |= cpu_to_le16(seq_number);441444 seq_number += 0x10;445445+446446+ if (info->flags & IEEE80211_TX_CTL_AMPDU)447447+ is_agg = true;448448+ is_data_qos = true;442449 }443450444451 /* Copy MAC header from skb into command buffer */···475474 if (iwl_trans_tx(priv->trans, skb, dev_cmd, txq_id))476475 goto drop_unlock_sta;477476478478- if (ieee80211_is_data_qos(fc) && !ieee80211_is_qos_nullfunc(fc) &&479479- !ieee80211_has_morefrags(fc))477477+ if (is_data_qos && !ieee80211_has_morefrags(fc))480478 priv->tid_data[sta_id][tid].seq_number = seq_number;481479482480 spin_unlock(&priv->sta_lock);···10971097 }10981098}1099109911001100-static int iwl_reclaim(struct iwl_priv *priv, int sta_id, int tid,11011101- int txq_id, int ssn, struct sk_buff_head *skbs)11021102-{11031103- if (unlikely(txq_id >= IWLAGN_FIRST_AMPDU_QUEUE &&11041104- tid != IWL_TID_NON_QOS &&11051105- txq_id != priv->tid_data[sta_id][tid].agg.txq_id)) {11061106- /*11071107- * FIXME: this is a uCode bug which need to be addressed,11081108- * log the information and return for now.11091109- * Since it is can possibly happen very often and in order11101110- * not to fill the syslog, don't use IWL_ERR or IWL_WARN11111111- */11121112- IWL_DEBUG_TX_QUEUES(priv,11131113- "Bad queue mapping txq_id=%d, agg_txq[sta:%d,tid:%d]=%d\n",11141114- txq_id, sta_id, tid,11151115- priv->tid_data[sta_id][tid].agg.txq_id);11161116- return 1;11171117- }11181118-11191119- iwl_trans_reclaim(priv->trans, txq_id, ssn, skbs);11201120- return 0;11211121-}11221122-11231100int iwlagn_rx_reply_tx(struct iwl_priv *priv, struct iwl_rx_cmd_buffer *rxb,11241101 struct iwl_device_cmd *cmd)11251102{···11581181 next_reclaimed);11591182 }1160118311611161- /*we can free until ssn % q.n_bd not inclusive */11621162- WARN_ON_ONCE(iwl_reclaim(priv, sta_id, tid,11631163- txq_id, ssn, &skbs));11841184+ iwl_trans_reclaim(priv->trans, txq_id, ssn, &skbs);11851185+11641186 iwlagn_check_ratid_empty(priv, sta_id, tid);11651187 freed = 0;11661188···12841308 return 0;12851309 }1286131013111311+ if (unlikely(scd_flow != agg->txq_id)) {13121312+ /*13131313+ * FIXME: this is a uCode bug which need to be addressed,13141314+ * log the information and return for now.13151315+ * Since it is can possibly happen very often and in order13161316+ * not to fill the syslog, don't use IWL_ERR or IWL_WARN13171317+ */13181318+ IWL_DEBUG_TX_QUEUES(priv,13191319+ "Bad queue mapping txq_id=%d, agg_txq[sta:%d,tid:%d]=%d\n",13201320+ scd_flow, sta_id, tid, agg->txq_id);13211321+ spin_unlock(&priv->sta_lock);13221322+ return 0;13231323+ }13241324+12871325 __skb_queue_head_init(&reclaimed_skbs);1288132612891327 /* Release all TFDs before the SSN, i.e. all TFDs in front of12901328 * block-ack window (we assume that they've been successfully12911329 * transmitted ... if not, it's too late anyway). */12921292- if (iwl_reclaim(priv, sta_id, tid, scd_flow,12931293- ba_resp_scd_ssn, &reclaimed_skbs)) {12941294- spin_unlock(&priv->sta_lock);12951295- return 0;12961296- }13301330+ iwl_trans_reclaim(priv->trans, scd_flow, ba_resp_scd_ssn,13311331+ &reclaimed_skbs);1297133212981333 IWL_DEBUG_TX_REPLY(priv, "REPLY_COMPRESSED_BA [%d] Received from %pM, "12991334 "sta_id = %d\n",
···385385 * @write8: write a u8 to a register at offset ofs from the BAR386386 * @write32: write a u32 to a register at offset ofs from the BAR387387 * @read32: read a u32 register at offset ofs from the BAR388388+ * @read_prph: read a DWORD from a periphery register389389+ * @write_prph: write a DWORD to a periphery register388390 * @configure: configure parameters required by the transport layer from389391 * the op_mode. May be called several times before start_fw, can't be390392 * called after that.···422420 void (*write8)(struct iwl_trans *trans, u32 ofs, u8 val);423421 void (*write32)(struct iwl_trans *trans, u32 ofs, u32 val);424422 u32 (*read32)(struct iwl_trans *trans, u32 ofs);423423+ u32 (*read_prph)(struct iwl_trans *trans, u32 ofs);424424+ void (*write_prph)(struct iwl_trans *trans, u32 ofs, u32 val);425425 void (*configure)(struct iwl_trans *trans,426426 const struct iwl_trans_config *trans_cfg);427427 void (*set_pmi)(struct iwl_trans *trans, bool state);···493489static inline void iwl_trans_configure(struct iwl_trans *trans,494490 const struct iwl_trans_config *trans_cfg)495491{496496- /*497497- * only set the op_mode for the moment. Later on, this function will do498498- * more499499- */500492 trans->op_mode = trans_cfg->op_mode;501493502494 trans->ops->configure(trans, trans_cfg);···511511 might_sleep();512512513513 trans->ops->stop_hw(trans, op_mode_leaving);514514+515515+ if (op_mode_leaving)516516+ trans->op_mode = NULL;514517515518 trans->state = IWL_TRANS_NO_FW;516519}···666663static inline u32 iwl_trans_read32(struct iwl_trans *trans, u32 ofs)667664{668665 return trans->ops->read32(trans, ofs);666666+}667667+668668+static inline u32 iwl_trans_read_prph(struct iwl_trans *trans, u32 ofs)669669+{670670+ return trans->ops->read_prph(trans, ofs);671671+}672672+673673+static inline void iwl_trans_write_prph(struct iwl_trans *trans, u32 ofs,674674+ u32 val)675675+{676676+ return trans->ops->write_prph(trans, ofs, val);669677}670678671679static inline void iwl_trans_set_pmi(struct iwl_trans *trans, bool state)
···267267 const struct iwl_cfg *cfg = (struct iwl_cfg *)(ent->driver_data);268268 struct iwl_trans *iwl_trans;269269 struct iwl_trans_pcie *trans_pcie;270270+ int ret;270271271272 iwl_trans = iwl_trans_pcie_alloc(pdev, ent, cfg);272273 if (iwl_trans == NULL)···277276278277 trans_pcie = IWL_TRANS_GET_PCIE_TRANS(iwl_trans);279278 trans_pcie->drv = iwl_drv_start(iwl_trans, cfg);280280- if (!trans_pcie->drv)279279+280280+ if (IS_ERR_OR_NULL(trans_pcie->drv)) {281281+ ret = PTR_ERR(trans_pcie->drv);281282 goto out_free_trans;283283+ }282284283285 /* register transport layer debugfs here */284284- if (iwl_trans_dbgfs_register(iwl_trans, iwl_trans->dbgfs_dir))286286+ ret = iwl_trans_dbgfs_register(iwl_trans, iwl_trans->dbgfs_dir);287287+ if (ret)285288 goto out_free_drv;286289287290 return 0;···295290out_free_trans:296291 iwl_trans_pcie_free(iwl_trans);297292 pci_set_drvdata(pdev, NULL);298298- return -EFAULT;293293+ return ret;299294}300295301296static void iwl_pci_remove(struct pci_dev *pdev)
+11-3
drivers/net/wireless/iwlwifi/pcie/rx.c
···717717718718 /* uCode's read index (stored in shared DRAM) indicates the last Rx719719 * buffer that the driver may process (last buffer filled by ucode). */720720- r = le16_to_cpu(rxq->rb_stts->closed_rb_num) & 0x0FFF;720720+ r = le16_to_cpu(ACCESS_ONCE(rxq->rb_stts->closed_rb_num)) & 0x0FFF;721721 i = rxq->read;722722723723 /* Rx interrupt, but nothing sent from uCode */···11221122 * back-to-back ISRs and sporadic interrupts from our NIC.11231123 * If we have something to service, the tasklet will re-enable ints.11241124 * If we *don't* have something, we'll re-enable before leaving here. */11251125- inta_mask = iwl_read32(trans, CSR_INT_MASK); /* just for debug */11251125+ inta_mask = iwl_read32(trans, CSR_INT_MASK);11261126 iwl_write32(trans, CSR_INT_MASK, 0x00000000);1127112711281128 /* Discover which interrupts are active/pending */11291129 inta = iwl_read32(trans, CSR_INT);11301130+11311131+ if (inta & (~inta_mask)) {11321132+ IWL_DEBUG_ISR(trans,11331133+ "We got a masked interrupt (0x%08x)...Ack and ignore\n",11341134+ inta & (~inta_mask));11351135+ iwl_write32(trans, CSR_INT, inta & (~inta_mask));11361136+ inta &= inta_mask;11371137+ }1130113811311139 /* Ignore interrupt if there's nothing in NIC to service.11321140 * This may be due to IRQ shared with another device,···12171209 * If we have something to service, the tasklet will re-enable ints.12181210 * If we *don't* have something, we'll re-enable before leaving here.12191211 */12201220- inta_mask = iwl_read32(trans, CSR_INT_MASK); /* just for debug */12121212+ inta_mask = iwl_read32(trans, CSR_INT_MASK);12211213 iwl_write32(trans, CSR_INT_MASK, 0x00000000);1222121412231215 /* Ignore interrupt if there's nothing in NIC to service.
···392392 tx_info->flags |= IEEE80211_TX_STAT_AMPDU;393393 tx_info->status.ampdu_len = 1;394394 tx_info->status.ampdu_ack_len = success ? 1 : 0;395395- /*396396- * TODO: Need to tear down BA session here397397- * if not successful.398398- */395395+396396+ if (!success)397397+ tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK;399398 }400399401400 if (rate_flags & IEEE80211_TX_RC_USE_RTS_CTS) {
+1-2
drivers/ssb/main.c
···11261126 case SSB_IDLOW_SSBREV_27: /* same here */11271127 return SSB_TMSLOW_REJECT; /* this is a guess */11281128 default:11291129- printk(KERN_INFO "ssb: Backplane Revision 0x%.8X\n", rev);11301130- WARN_ON(1);11291129+ WARN(1, KERN_INFO "ssb: Backplane Revision 0x%.8X\n", rev);11311130 }11321131 return (SSB_TMSLOW_REJECT | SSB_TMSLOW_REJECT_23);11331132}
···13691369 * @IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF: Use the P2P Device address for any13701370 * P2P Interface. This will be honoured even if more than one interface13711371 * is supported.13721372+ *13731373+ * @IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL: On this hardware TX BA session13741374+ * should be tear down once BAR frame will not be acked.13751375+ *13721376 */13731377enum ieee80211_hw_flags {13741378 IEEE80211_HW_HAS_RATE_CONTROL = 1<<0,···14011397 IEEE80211_HW_TX_AMPDU_SETUP_IN_HW = 1<<23,14021398 IEEE80211_HW_SCAN_WHILE_IDLE = 1<<24,14031399 IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF = 1<<25,14001400+ IEEE80211_HW_TEARDOWN_AGGR_ON_BAR_FAIL = 1<<26,14041401};1405140214061403/**
+1-1
net/mac80211/agg-tx.c
···445445446446 trace_api_start_tx_ba_session(pubsta, tid);447447448448- if (WARN_ON(!local->ops->ampdu_action))448448+ if (WARN_ON_ONCE(!local->ops->ampdu_action))449449 return -EINVAL;450450451451 if ((tid >= IEEE80211_NUM_TIDS) ||
···201201 bss_change |= BSS_CHANGED_BASIC_RATES;202202 bss_change |= BSS_CHANGED_HT;203203 bss_change |= BSS_CHANGED_IBSS;204204+205205+ /*206206+ * In 5 GHz/802.11a, we can always use short slot time.207207+ * (IEEE 802.11-2012 18.3.8.7)208208+ *209209+ * In 2.4GHz, we must always use long slots in IBSS for compatibility210210+ * reasons.211211+ * (IEEE 802.11-2012 19.4.5)212212+ *213213+ * HT follows these specifications (IEEE 802.11-2012 20.3.18)214214+ */215215+ sdata->vif.bss_conf.use_short_slot = chan->band == IEEE80211_BAND_5GHZ;216216+ bss_change |= BSS_CHANGED_ERP_SLOT;217217+204218 sdata->vif.bss_conf.ibss_joined = true;205219 sdata->vif.bss_conf.ibss_creator = creator;206220 ieee80211_bss_info_change_notify(sdata, bss_change);
+1-1
net/mac80211/iface.c
···862862 rcu_assign_pointer(local->p2p_sdata, NULL);863863 /* fall through */864864 default:865865- flush_work(&sdata->work);865865+ cancel_work_sync(&sdata->work);866866 /*867867 * When we get here, the interface is marked down.868868 * Call rcu_barrier() to wait both for the RX path
+3
net/mac80211/key.h
···81818282 /* last received RSC */8383 struct tkip_ctx rx[IEEE80211_NUM_TIDS];8484+8585+ /* number of mic failures */8686+ u32 mic_failures;8487 } tkip;8588 struct {8689 atomic64_t tx_pn;
···378378 * the SKB because it has a bad FCS/PLCP checksum.379379 */380380381381- /* room for the radiotap header based on driver features */382382- needed_headroom = ieee80211_rx_radiotap_space(local, status);383383-384381 if (local->hw.flags & IEEE80211_HW_RX_INCLUDES_FCS)385382 present_fcs_len = FCS_LEN;386383···395398396399 return remove_monitor_info(local, origskb);397400 }401401+402402+ /* room for the radiotap header based on driver features */403403+ needed_headroom = ieee80211_rx_radiotap_space(local, status);398404399405 if (should_drop_frame(origskb, present_fcs_len)) {400406 /* only need to expand headroom if necessary */···23332333 if (len < IEEE80211_MIN_ACTION_SIZE)23342334 return RX_DROP_UNUSABLE;2335233523362336- if (!rx->sta && mgmt->u.action.category != WLAN_CATEGORY_PUBLIC)23362336+ if (!rx->sta && mgmt->u.action.category != WLAN_CATEGORY_PUBLIC &&23372337+ mgmt->u.action.category != WLAN_CATEGORY_SELF_PROTECTED)23372338 return RX_DROP_UNUSABLE;2338233923392340 if (!(status->rx_flags & IEEE80211_RX_RA_MATCH))
+1-1
net/mac80211/scan.c
···118118 struct ieee80211_tim_ie *tim_ie = elems->tim;119119 bss->dtim_period = tim_ie->dtim_period;120120 if (!elems->parse_error)121121- bss->valid_data |= IEEE80211_BSS_VALID_DTIM;121121+ bss->valid_data |= IEEE80211_BSS_VALID_DTIM;122122 }123123124124 /* If the beacon had no TIM IE, or it was invalid, use 1 */
···104104 */105105 if (status->flag & (RX_FLAG_MMIC_STRIPPED | RX_FLAG_IV_STRIPPED)) {106106 if (status->flag & RX_FLAG_MMIC_ERROR)107107- goto mic_fail;107107+ goto mic_fail_no_key;108108109109 if (!(status->flag & RX_FLAG_IV_STRIPPED) && rx->key &&110110 rx->key->conf.cipher == WLAN_CIPHER_SUITE_TKIP)···161161 return RX_CONTINUE;162162163163mic_fail:164164+ rx->key->u.tkip.mic_failures++;165165+166166+mic_fail_no_key:164167 /*165168 * In some cases the key can be unset - e.g. a multicast packet, in166169 * a driver that supports HW encryption. Send up the key idx only if
+3
net/wireless/chan.c
···265265266266 /* TODO: missing regulatory check on 80/160 bandwidth */267267268268+ if (width > 20)269269+ prohibited_flags |= IEEE80211_CHAN_NO_OFDM;270270+268271 if (!cfg80211_secondary_chans_ok(wiphy, chandef->center_freq1,269272 width, prohibited_flags))270273 return false;