pull request: wireless 2014-02-27
Subsystems (7)
Dave,
Please pull this batch of fixes intended for the 3.14 stream...
Regarding the mac80211 bits, Johannes says:
"This time, I have a fix from Arik for scheduled scan recovery (something that only recently went into the tree), a memory leak fix from Eytan and a small regulatory bugfix from Inbal. The EAPOL change from Felix makes rekeying more stable while lots of traffic is flowing, and there's Emmanuel's and my fixes for a race in the code handling powersaving clients."
Regarding the NFC bits, Samuel says:
"We only have one candidate for 3.14 fixes, and this is a NCI NULL pointer dereference introduced during the 3.14 merge window."
Regarding the iwlwifi bits, Emmanuel says:
"This should fix an issue raised in iwldvm when we have lots of association failures. There is a bugzilla for this bug - it hasn't been validated by the user, but I hope it will do the trick."
Beyond that...
Amitkumar Karwar brings two mwifiex fixes, one to avoid a NULL pointer dereference and another to address an improperly timed interrupt.
Arend van Spriel gives us a brcmfmac fix to avoid a crash during scatter-gather packet transfers.
Avinash Patila offers an mwifiex to avoid an invalid memory access when a device is removed.
Bing Zhao delivers a simple fix to avoid a naming conflict between libertas and mwifiex.
Felix Fietkau provides a trio of ath9k fixes that properly account for sequence numbering in ps-poll frames, reduce the rate for false positives during baseband hang detection, and fix a regression related to rx descriptor handling.
James Cameron shows us a libertas fix to ignore zero-length IEs when processing scan results.
Kirill Tkhai brings a hostap fix to avoid prematurely freeing a timer.
Stanislaw Gruszka fixes an ath9k locking problem.
Sujith Manoharan addresses ETSI compliance for a device handled by ath9k by adjusting the minimum CCA power threshold values.
Please let me know if there are problems!
Thanks,
John
---
The following changes since commit 724b9e1d75ab3401aaa081bd4efb440c1b3509db:
sch_tbf: Fix potential memory leak in tbf_change(). (2014-02-27 12:53:50 -0500)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git for-davem
for you to fetch changes up to 8e2a89c5151d4645b9649ab9a9498f3445d48868:
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem (2014-02-27 15:05:51 -0500)
----------------------------------------------------------------
Amitkumar Karwar (3):
mwifiex: add NULL check for PCIe Rx skb
mwifiex: fix cmd and Tx data timeout issue for PCIe cards
NFC: NCI: Fix NULL pointer dereference
Arend van Spriel (1):
brcmfmac: fix txglomming scatter-gather packet transfers
Arik Nemtsov (1):
mac80211: fix sched_scan restart on recovery
Avinash Patil (1):
mwifiex: clean pcie ring only when device is present
Bing Zhao (1):
mwifiex: rename usb driver name registerring to usb core
Emmanuel Grumbach (2):
mac80211: fix AP powersave TX vs. wakeup race
iwlwifi: dvm: clear IWL_STA_UCODE_INPROGRESS when assoc fails
Eytan Lifshitz (1):
mac80211: fix memory leak
Felix Fietkau (4):
mac80211: send control port protocol frames to the VO queue
ath9k: fix ps-poll responses under a-mpdu sessions
ath9k: reduce baseband hang detection false positive rate
ath9k: fix invalid descriptor discarding
Inbal Hacohen (1):
cfg80211: bugfix in regulatory user hint process
James Cameron (1):
libertas: fix scan result loss if SSID IE len 0
Johannes Berg (2):
mac80211: insert stations before adding to driver
mac80211: fix station wakeup powersave race
John W. Linville (4):
Merge branch 'for-john' of git://git.kernel.org/.../jberg/mac80211
Merge branch 'master' of git://git.kernel.org/.../iwlwifi/iwlwifi-fixes
Merge tag 'nfc-fixes-3.14-1' of git://git.kernel.org/.../sameo/nfc-fixes
Merge branch 'master' of git://git.kernel.org/.../linville/wireless into for-davem
Kirill Tkhai (1):
hostap: Do not free priv until timer handler has actually stopped using it
Stanislaw Gruszka (1):
ath9k: protect tid->sched check
Sujith Manoharan (1):
ath9k: Fix ETSI compliance for AR9462 2.0
.../net/wireless/ath/ath9k/ar9462_2p0_initvals.h | 4 +- drivers/net/wireless/ath/ath9k/hw.c | 8 ++- drivers/net/wireless/ath/ath9k/recv.c | 70 +++++++++++----------- drivers/net/wireless/ath/ath9k/xmit.c | 13 ++-- drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c | 14 ++--- drivers/net/wireless/hostap/hostap_ap.c | 2 +- drivers/net/wireless/iwlwifi/dvm/sta.c | 1 + drivers/net/wireless/libertas/cfg.c | 2 +- drivers/net/wireless/mwifiex/pcie.c | 34 +++++------ drivers/net/wireless/mwifiex/usb.c | 4 +- drivers/net/wireless/mwifiex/wmm.c | 3 +- net/mac80211/ieee80211_i.h | 10 +--- net/mac80211/mlme.c | 1 + net/mac80211/rx.c | 7 +++ net/mac80211/sta_info.c | 66 ++++++++++++-------- net/mac80211/sta_info.h | 7 +-- net/mac80211/tx.c | 15 +++++ net/mac80211/util.c | 48 +++++++-------- net/mac80211/wme.c | 5 ++ net/nfc/nci/core.c | 2 +- net/wireless/reg.c | 2 +- 21 files changed, 178 insertions(+), 140 deletions(-)
drivers/net/wireless/ath/ath9k/ar9462_2p0_initvals.h +2 -2
@@ -57,7 +57,7 @@ static const u32 ar9462_2p0_baseband_postamble[][5] = { {0x00009e14, 0x37b95d5e, 0x37b9605e, 0x3236605e, 0x32365a5e}, {0x00009e18, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, {0x00009e1c, 0x0001cf9c, 0x0001cf9c, 0x00021f9c, 0x00021f9c}, - {0x00009e20, 0x000003b5, 0x000003b5, 0x000003ce, 0x000003ce}, + {0x00009e20, 0x000003a5, 0x000003a5, 0x000003a5, 0x000003a5}, {0x00009e2c, 0x0000001c, 0x0000001c, 0x00000021, 0x00000021}, {0x00009e3c, 0xcf946220, 0xcf946220, 0xcfd5c782, 0xcfd5c282}, {0x00009e44, 0x62321e27, 0x62321e27, 0xfe291e27, 0xfe291e27},
@@ -96,7 +96,7 @@ static const u32 ar9462_2p0_baseband_postamble[][5] = { {0x0000ae04, 0x001c0000, 0x001c0000, 0x001c0000, 0x00100000}, {0x0000ae18, 0x00000000, 0x00000000, 0x00000000, 0x00000000}, {0x0000ae1c, 0x0000019c, 0x0000019c, 0x0000019c, 0x0000019c}, - {0x0000ae20, 0x000001b5, 0x000001b5, 0x000001ce, 0x000001ce}, + {0x0000ae20, 0x000001a6, 0x000001a6, 0x000001aa, 0x000001aa}, {0x0000b284, 0x00000000, 0x00000000, 0x00000550, 0x00000550}, };
drivers/net/wireless/ath/ath9k/hw.c +7 -1
@@ -1534,7 +1534,7 @@ EXPORT_SYMBOL(ath9k_hw_check_nav);bool ath9k_hw_check_alive (struct ath_hw *ah) {int count =50 ; -u32 reg; +u32 reg, last_val;if (AR_SREV_9300 (ah))return !ath9k_hw_detect_mac_hang (ah);
@@ -1542,9 +1542,13 @@ bool ath9k_hw_check_alive(struct ath_hw *ah)if (AR_SREV_9285_12_OR_LATER (ah))return true; + last_val =REG_READ (ah,AR_OBS_BUS_1 ); do { reg = REG_READ(ah, AR_OBS_BUS_1); + if (reg != last_val) + return true; + last_val = reg; if ((reg & 0x7E7FFFEF) == 0x00702400) continue;
@@ -1556,6 +1560,8 @@ bool ath9k_hw_check_alive(struct ath_hw *ah)default :return true; } + +udelay (1 ); }while (count-- >0 );return false;
drivers/net/wireless/ath/ath9k/recv.c +35 -35
130 lines not on this page · raw message
drivers/net/wireless/ath/ath9k/xmit.c +8 -5
@@ -1444,14 +1444,16 @@ void ath_tx_aggr_sleep(struct ieee80211_sta *sta, struct ath_softc *sc,for (tidno =0 , tid = &an->tid[tidno]; tidno <IEEE80211_NUM_TIDS ; tidno++, tid++) { -if (!tid->sched) -continue ; - ac = tid->ac; txq = ac->txq;ath_txq_lock (sc, txq); +if (!tid->sched) { +ath_txq_unlock (sc, txq); +continue ; + } + buffered =ath_tid_has_buffered (tid); tid->sched = false;
@@ -2184,14 +2186,15 @@ int ath_tx_start(struct ieee80211_hw *hw, struct sk_buff *skb, txq->stopped = true; } +if (txctl->an) + tid =ath_get_skb_tid (sc, txctl->an, skb); +if (info->flags &IEEE80211_TX_CTL_PS_RESPONSE ) {ath_txq_unlock (sc, txq); txq = sc->tx.uapsdq;ath_txq_lock (sc, txq); }else if (txctl->an &&ieee80211_is_data_present (hdr->frame_control)) { - tid =ath_get_skb_tid (sc, txctl->an, skb); -WARN_ON (tid->ac->txq != txctl->txq);if (info->flags &IEEE80211_TX_CTL_CLEAR_PS_FILT )
drivers/net/wireless/brcm80211/brcmfmac/dhd_sdio.c +4 -10
@@ -457,7 +457,6 @@ struct brcmf_sdio {u8 tx_hdrlen;/* sdio bus header length for tx packet */ bool txglom;/* host tx glomming enable flag */ -struct sk_buff *txglom_sgpad;/* scatter-gather padding buffer */ u16 head_align;/* buffer pointer alignment */ u16 sgentry_align;/* scatter-gather buffer alignment */ };
@@ -1944,9 +1943,8 @@ static int brcmf_sdio_txpkt_prep_sg(struct brcmf_sdio *bus,if (lastfrm && chain_pad) tail_pad += blksize - chain_pad;if (skb_tailroom (pkt) < tail_pad && pkt->len > blksize) { - pkt_pad = bus->txglom_sgpad; -if (pkt_pad ==NULL ) -brcmu_pkt_buf_get_skb (tail_pad + tail_chop); + pkt_pad =brcmu_pkt_buf_get_skb (tail_pad + tail_chop + + bus->head_align);if (pkt_pad ==NULL )return -ENOMEM ; ret =brcmf_sdio_txpkt_hdalign (bus, pkt_pad);
@@ -1957,6 +1955,7 @@ static int brcmf_sdio_txpkt_prep_sg(struct brcmf_sdio *bus, tail_chop); *(u32 *)(pkt_pad->cb) =ALIGN_SKB_FLAG + tail_chop;skb_trim (pkt, pkt->len - tail_chop); +skb_trim (pkt_pad, tail_pad + tail_chop);__skb_queue_after (pktq, pkt, pkt_pad); }else { ntail = pkt->data_len + tail_pad -
@@ -2011,7 +2010,7 @@ brcmf_sdio_txpkt_prep(struct brcmf_sdio *bus, struct sk_buff_head *pktq,return ret; head_pad = (u16 )ret;if (head_pad) -memset (pkt_next->data,0 , head_pad + bus->tx_hdrlen); +memset (pkt_next->data + bus->tx_hdrlen,0 , head_pad); total_len += pkt_next->len;
@@ -3486,10 +3485,6 @@ static int brcmf_sdio_bus_preinit(struct device *dev) bus->txglom = false; value =1 ; pad_size = bus->sdiodev->func[2 ]->cur_blksize <<1 ; - bus->txglom_sgpad =brcmu_pkt_buf_get_skb (pad_size); -if (!bus->txglom_sgpad) -brcmf_err ("allocating txglom padding skb failed, reduced performance\n" ); - err =brcmf_iovar_data_set (bus->sdiodev->dev,"bus:rxglom" , &value,sizeof (u32));if (err <0 ) {
@@ -4053,7 +4048,6 @@ void brcmf_sdio_remove(struct brcmf_sdio *bus)brcmf_sdio_chip_detach (&bus->ci); } -brcmu_pkt_buf_free_skb (bus->txglom_sgpad);kfree (bus->rxbuf);kfree (bus->hdrbuf);kfree (bus);
drivers/net/wireless/hostap/hostap_ap.c +1 -1
@@ -147,7 +147,7 @@ static void ap_free_sta(struct ap_data *ap, struct sta_info *sta)if (!sta->ap && sta->u.sta.challenge)kfree (sta->u.sta.challenge); -del_timer (&sta->timer); +del_timer_sync (&sta->timer);#endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */ kfree (sta);
drivers/net/wireless/iwlwifi/dvm/sta.c +1 -0
@@ -590,6 +590,7 @@ void iwl_deactivate_station(struct iwl_priv *priv, const u8 sta_id, sizeof(priv->tid_data[sta_id][tid])); priv->stations[sta_id].used &= ~IWL_STA_DRIVER_ACTIVE ; + priv->stations[sta_id].used &= ~IWL_STA_UCODE_INPROGRESS ; priv->num_stations--;
drivers/net/wireless/libertas/cfg.c +1 -1
@@ -621,7 +621,7 @@ static int lbs_ret_scan(struct lbs_private *priv, unsigned long dummy, id = *pos++; elen = *pos++; left -=2 ; -if (elen > left || elen ==0 ) { +if (elen > left) {lbs_deb_scan ("scan response: invalid IE fmt\n" ); goto done; }
drivers/net/wireless/mwifiex/pcie.c +17 -17
@@ -1211,6 +1211,12 @@ static int mwifiex_pcie_process_recv_data(struct mwifiex_adapter *adapter) rd_index = card->rxbd_rdptr & reg->rx_mask; skb_data = card->rx_buf_list[rd_index]; +/* If skb allocation was failed earlier for Rx packet, +* rx_buf_list[rd_index] would have been left with a NULL. +*/ +if (!skb_data) +return -ENOMEM ; +MWIFIEX_SKB_PACB (skb_data, &buf_pa);pci_unmap_single (card->dev, buf_pa,MWIFIEX_RX_DATA_BUF_SIZE ,PCI_DMA_FROMDEVICE );
@@ -1525,6 +1531,14 @@ static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter)if (adapter->ps_state ==PS_STATE_SLEEP_CFM ) {mwifiex_process_sleep_confirm_resp (adapter, skb->data, skb->len); +mwifiex_pcie_enable_host_int (adapter); +if (mwifiex_write_reg (adapter, +PCIE_CPU_INT_EVENT , +CPU_INTR_SLEEP_CFM_DONE )) { +dev_warn (adapter->dev, +"Write register failed\n" ); +return -1 ; + }while (reg->sleep_cookie && (count++ <10 ) &&mwifiex_pcie_ok_to_access_hw (adapter))usleep_range (50 ,60 );
@@ -1993,23 +2007,9 @@ static void mwifiex_interrupt_status(struct mwifiex_adapter *adapter) adapter->int_status |= pcie_ireg;spin_unlock_irqrestore (&adapter->int_lock, flags); -if (pcie_ireg &HOST_INTR_CMD_DONE ) { -if ((adapter->ps_state ==PS_STATE_SLEEP_CFM ) || - (adapter->ps_state ==PS_STATE_SLEEP )) { -mwifiex_pcie_enable_host_int (adapter); -if (mwifiex_write_reg (adapter, -PCIE_CPU_INT_EVENT , -CPU_INTR_SLEEP_CFM_DONE ) - ) { -dev_warn (adapter->dev, -"Write register failed\n" ); -return ; - - } - } - }else if (!adapter->pps_uapsd_mode && - adapter->ps_state ==PS_STATE_SLEEP && -mwifiex_pcie_ok_to_access_hw (adapter)) { +if (!adapter->pps_uapsd_mode && + adapter->ps_state ==PS_STATE_SLEEP && +mwifiex_pcie_ok_to_access_hw (adapter)) {/* Potentially for PCIe we could get other * interrupts like shared. Don't change power * state until cookie is set */
drivers/net/wireless/mwifiex/usb.c +1 -3
@@ -22,8 +22,6 @@#define USB_VERSION "1.0" -static const char usbdriver_name[] ="usb8xxx" ; -static struct mwifiex_if_ops usb_ops;static struct semaphore add_remove_card_sem;static struct usb_card_rec *usb_card;
@@ -567,7 +565,7 @@ static void mwifiex_usb_disconnect(struct usb_interface *intf) }static struct usb_driver mwifiex_usb_driver = { - .name = usbdriver_name, + .name ="mwifiex_usb" , .probe = mwifiex_usb_probe, .disconnect = mwifiex_usb_disconnect, .id_table = mwifiex_usb_table,
drivers/net/wireless/mwifiex/wmm.c +2 -1
@@ -559,7 +559,8 @@ mwifiex_clean_txrx(struct mwifiex_private *priv)mwifiex_wmm_delete_all_ralist (priv);memcpy (tos_to_tid, ac_to_tid,sizeof (tos_to_tid)); -if (priv->adapter->if_ops.clean_pcie_ring) +if (priv->adapter->if_ops.clean_pcie_ring && + !priv->adapter->surprise_removed) priv->adapter->if_ops.clean_pcie_ring (priv->adapter);spin_unlock_irqrestore (&priv->wmm.ra_list_spinlock, flags); }
net/mac80211/ieee80211_i.h +2 -8
@@ -1692,14 +1692,8 @@ void ieee80211_stop_queue_by_reason(struct ieee80211_hw *hw, int queue,void ieee80211_propagate_queue_wake (struct ieee80211_local *local,int queue);void ieee80211_add_pending_skb (struct ieee80211_local *local,struct sk_buff *skb); -void ieee80211_add_pending_skbs_fn (struct ieee80211_local *local, -struct sk_buff_head *skbs, -void (*fn)(void *data),void *data); -static inline void ieee80211_add_pending_skbs (struct ieee80211_local *local, -struct sk_buff_head *skbs) -{ -ieee80211_add_pending_skbs_fn (local, skbs,NULL ,NULL ); -} +void ieee80211_add_pending_skbs (struct ieee80211_local *local, +struct sk_buff_head *skbs);void ieee80211_flush_queues (struct ieee80211_local *local,struct ieee80211_sub_if_data *sdata);
net/mac80211/mlme.c +1 -0
@@ -3753,6 +3753,7 @@ static int ieee80211_prep_connection(struct ieee80211_sub_if_data *sdata, chanctx_conf =rcu_dereference (sdata->vif.chanctx_conf);if (WARN_ON (!chanctx_conf)) {rcu_read_unlock (); +sta_info_free (local, new_sta);return -EINVAL ; } rate_flags =ieee80211_chandef_rate_flags (&chanctx_conf->def);
net/mac80211/rx.c +7 -0
@@ -1128,6 +1128,13 @@ static void sta_ps_end(struct sta_info *sta) sta->sta.addr, sta->sta.aid);if (test_sta_flag (sta,WLAN_STA_PS_DRIVER )) { +/* +* Clear the flag only if the other one is still set +* so that the TX path won't start TX'ing new frames +* directly ... In the case that the driver flag isn't +* set ieee80211_sta_ps_deliver_wakeup() will clear it. +*/ +clear_sta_flag (sta,WLAN_STA_PS_STA );ps_dbg (sta->sdata,"STA %pM aid %d driver-ps-blocked\n" , sta->sta.addr, sta->sta.aid);return ;
net/mac80211/sta_info.c +42 -24
145 lines not on this page · raw message
net/mac80211/sta_info.h +3 -4
@@ -267,6 +267,7 @@ struct ieee80211_tx_latency_stat {* @drv_unblock_wk: used for driver PS unblocking * @listen_interval: listen interval of this station, when we're acting as AP * @_flags: STA flags, see &enum ieee80211_sta_info_flags, do not use directly +* @ps_lock: used for powersave (when mac80211 is the AP) related locking * @ps_tx_buf: buffers (per AC) of frames to transmit to this station * when it leaves power saving state or polls * @tx_filtered: buffers (per AC) of frames we already tried to
@@ -356,10 +357,8 @@ struct sta_info {/* use the accessors defined below */ unsigned long _flags; -/* -* STA powersave frame queues, no more than the internal -* locking required. -*/ +/* STA powersave lock and frame queues */ +spinlock_t ps_lock;struct sk_buff_head ps_tx_buf[IEEE80211_NUM_ACS ];struct sk_buff_head tx_filtered[IEEE80211_NUM_ACS ];unsigned long driver_buffered_tids;
net/mac80211/tx.c +15 -0
@@ -478,6 +478,20 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) sta->sta.addr, sta->sta.aid, ac);if (tx->local->total_ps_buffered >=TOTAL_MAX_TX_BUFFER )purge_old_ps_buffers (tx->local); + +/* sync with ieee80211_sta_ps_deliver_wakeup */ +spin_lock (&sta->ps_lock); +/* +* STA woke up the meantime and all the frames on ps_tx_buf have +* been queued to pending queue. No reordering can happen, go +* ahead and Tx the packet. +*/ +if (!test_sta_flag (sta,WLAN_STA_PS_STA ) && + !test_sta_flag (sta,WLAN_STA_PS_DRIVER )) { +spin_unlock (&sta->ps_lock); +return TX_CONTINUE ; + } +if (skb_queue_len (&sta->ps_tx_buf[ac]) >=STA_MAX_TX_BUFFER ) {struct sk_buff *old =skb_dequeue (&sta->ps_tx_buf[ac]); ps_dbg(tx->sdata,
@@ -492,6 +506,7 @@ ieee80211_tx_h_unicast_ps_buf(struct ieee80211_tx_data *tx) info->flags |=IEEE80211_TX_INTFL_NEED_TXPROCESSING ; info->flags &= ~IEEE80211_TX_TEMPORARY_FLAGS ;skb_queue_tail (&sta->ps_tx_buf[ac], tx->skb); +spin_unlock (&sta->ps_lock);if (!timer_pending (&local->sta_cleanup)) mod_timer(&local->sta_cleanup,
net/mac80211/util.c +22 -26
72 lines not on this page · raw message
net/mac80211/wme.c +5 -0
@@ -154,6 +154,11 @@ u16 ieee80211_select_queue(struct ieee80211_sub_if_data *sdata,return IEEE80211_AC_BE ; } +if (skb->protocol == sdata->control_port_protocol) { + skb->priority =7 ; +return ieee80211_downgrade_queue (sdata, skb); + } +/* use the data classifier to determine what 802.1d tag the * data frame has */ rcu_read_lock ();
net/nfc/nci/core.c +1 -1
@@ -301,7 +301,7 @@ static int nci_open_device(struct nci_dev *ndev) rc =__nci_request (ndev, nci_reset_req,0 ,msecs_to_jiffies (NCI_RESET_TIMEOUT )); -if (ndev->ops->setup (ndev)) +if (ndev->ops->setup) ndev->ops->setup (ndev);if (!rc) {
net/wireless/reg.c +1 -1
@@ -1700,7 +1700,7 @@ static void reg_process_hint(struct regulatory_request *reg_request)return ;case NL80211_REGDOM_SET_BY_USER : treatment =reg_process_hint_user (reg_request); -if (treatment ==REG_REQ_OK || +if (treatment ==REG_REQ_IGNORE || treatment ==REG_REQ_ALREADY_SET )return ;schedule_delayed_work (®_timeout,msecs_to_jiffies (3142 ));
Signature · 2 lines
John W. Linville Someday the world will need a hero, and you [email protected] might be all we have. Be ready.
David Miller
maintainerFrom: "John W. Linville" <[email protected]>
Date: Thu, 27 Feb 2014 15:45:09 -0500
Quoted 1 line
Please pull this batch of fixes intended for the 3.14 stream...
Pulled, thanks a lot John.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html