pull request: wireless 2014-11-13
Subsystems (5)
Dave,
Please pull this set of a few more wireless fixes intended for the 3.18 stream...
For the mac80211 bits, Johannes says:
"This has just one fix, for an issue with the CCMP decryption that can cause a kernel crash. I'm not sure it's remotely exploitable, but it's an important fix nonetheless."
For the iwlwifi bits, Emmanuel says:
"Two fixes here - we weren't updating mac80211 if a scan was cut short by RFKILL which confused cfg80211. As a result, the latter wouldn't allow to run another scan. Liad fixes a small bug in the firmware dump."
On top of that...
Arend van Spriel corrects a channel width conversion that caused a WARNING in brcmfmac.
Hauke Mehrtens avoids a NULL pointer dereference in b43.
Larry Finger hits a trio of rtlwifi bugs left over from recent backporting from the Realtek vendor driver.
Miaoqing Pan fixes a clocking problem in ath9k that could affect packet timestamps and such.
Stanislaw Gruszka addresses an payload alignment issue that has been plaguing rt2x00.
Please let me know if there are problems!
John
---
The following changes since commit 0c9a67c8f1d2b71a89f66349362412e9bf6becab:
Merge tag 'mac80211-for-john-2014-11-04' of git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211 (2014-11-04 15:56:33 -0500)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless.git tags/master-2014-11-11
for you to fetch changes up to 4e6ce4dc7ce71d0886908d55129d5d6482a27ff9:
ath9k: Fix RTC_DERIVED_CLK usage (2014-11-11 16:24:18 -0500)
----------------------------------------------------------------
Arend van Spriel (1):
brcmfmac: fix conversion of channel width 20MHZ_NOHT
Emmanuel Grumbach (1):
iwlwifi: mvm: abort scan upon RFKILL
Hauke Mehrtens (1):
b43: fix NULL pointer dereference in b43_phy_copy()
John W. Linville (2):
Merge tag 'mac80211-for-john-2014-11-10' of git://git.kernel.org/.../jberg/mac80211
Merge tag 'iwlwifi-for-john-2014-11-10' of git://git.kernel.org/.../iwlwifi/iwlwifi-fixesLarry Finger (3):
rtlwifi: Fix setting of tx descriptor for new trx flow
rtlwifi: Fix errors in descriptor manipulation
rtlwifi: rtl8192se: Fix connection problems
Liad Kaufman (1):
iwlwifi: pcie: fix prph dump length
Miaoqing Pan (1):
ath9k: Fix RTC_DERIVED_CLK usage
Ronald Wahl (1):
mac80211: Fix regression that triggers a kernel BUG with CCMP
Stanislaw Gruszka (1):
rt2x00: do not align payload on modern H/W
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 13 ++++++ drivers/net/wireless/ath/ath9k/hw.c | 13 ------ drivers/net/wireless/b43/phy_common.c | 4 +- .../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 6 +++ drivers/net/wireless/iwlwifi/mvm/scan.c | 20 ++++----- drivers/net/wireless/iwlwifi/pcie/trans.c | 3 +- drivers/net/wireless/rt2x00/rt2x00queue.c | 50 ++++++---------------- drivers/net/wireless/rtlwifi/pci.c | 19 +++++--- drivers/net/wireless/rtlwifi/rtl8192se/hw.c | 7 ++- drivers/net/wireless/rtlwifi/rtl8192se/phy.c | 2 + drivers/net/wireless/rtlwifi/rtl8192se/sw.c | 16 +++++++ net/mac80211/aes_ccm.c | 3 ++ 12 files changed, 81 insertions(+), 75 deletions(-)
drivers/net/wireless/ath/ath9k/ar9003_phy.c +13 -0
@@ -664,6 +664,19 @@ static void ar9003_hw_override_ini(struct ath_hw *ah) ah->enabled_cals |=TX_CL_CAL ; else ah->enabled_cals &= ~TX_CL_CAL; + +if (AR_SREV_9340 (ah) ||AR_SREV_9531 (ah) ||AR_SREV_9550 (ah)) { +if (ah->is_clk_25mhz) { +REG_WRITE (ah,AR_RTC_DERIVED_CLK ,0x17c <<1 ); +REG_WRITE (ah,AR_SLP32_MODE ,0x0010f3d7 ); +REG_WRITE (ah,AR_SLP32_INC ,0x0001e7ae ); + }else { +REG_WRITE (ah,AR_RTC_DERIVED_CLK ,0x261 <<1 ); +REG_WRITE (ah,AR_SLP32_MODE ,0x0010f400 ); +REG_WRITE (ah,AR_SLP32_INC ,0x0001e800 ); + } +udelay (100 ); + } } static void ar9003_hw_prog_ini(struct ath_hw *ah,
drivers/net/wireless/ath/ath9k/hw.c +0 -13
@@ -861,19 +861,6 @@ static void ath9k_hw_init_pll(struct ath_hw *ah,udelay (RTC_PLL_SETTLE_DELAY );REG_WRITE (ah,AR_RTC_SLEEP_CLK ,AR_RTC_FORCE_DERIVED_CLK ); - -if (AR_SREV_9340 (ah) ||AR_SREV_9550 (ah)) { -if (ah->is_clk_25mhz) { -REG_WRITE (ah,AR_RTC_DERIVED_CLK ,0x17c <<1 ); -REG_WRITE (ah,AR_SLP32_MODE ,0x0010f3d7 ); -REG_WRITE (ah,AR_SLP32_INC ,0x0001e7ae ); - }else { -REG_WRITE (ah,AR_RTC_DERIVED_CLK ,0x261 <<1 ); -REG_WRITE (ah,AR_SLP32_MODE ,0x0010f400 ); -REG_WRITE (ah,AR_SLP32_INC ,0x0001e800 ); - } -udelay (100 ); - } } static void ath9k_hw_init_interrupt_masks(struct ath_hw *ah,
drivers/net/wireless/b43/phy_common.c +1 -3
@@ -300,9 +300,7 @@ void b43_phy_write(struct b43_wldev *dev, u16 reg, u16 value)void b43_phy_copy (struct b43_wldev *dev,u16 destreg,u16 srcreg) { -assert_mac_suspended (dev); - dev->phy.ops->phy_write (dev, destreg, - dev->phy.ops->phy_read (dev, srcreg)); +b43_phy_write (dev, destreg,b43_phy_read (dev, srcreg)); }void b43_phy_mask (struct b43_wldev *dev,u16 offset,u16 mask)
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c +6 -0
@@ -299,6 +299,7 @@ static u16 chandef_to_chanspec(struct brcmu_d11inf *d11inf, primary_offset = ch->center_freq1 - ch->chan->center_freq;switch (ch->width) {case NL80211_CHAN_WIDTH_20 : +case NL80211_CHAN_WIDTH_20_NOHT : ch_inf.bw =BRCMU_CHAN_BW_20 ;WARN_ON (primary_offset !=0 );break ;
@@ -323,6 +324,10 @@ static u16 chandef_to_chanspec(struct brcmu_d11inf *d11inf, ch_inf.sb =BRCMU_CHAN_SB_LU ; }break ; +case NL80211_CHAN_WIDTH_80P80 : +case NL80211_CHAN_WIDTH_160 : +case NL80211_CHAN_WIDTH_5 : +case NL80211_CHAN_WIDTH_10 :default :WARN_ON_ONCE (1 ); }
@@ -333,6 +338,7 @@ static u16 chandef_to_chanspec(struct brcmu_d11inf *d11inf,case IEEE80211_BAND_5GHZ : ch_inf.band =BRCMU_CHAN_BAND_5G ;break ; +case IEEE80211_BAND_60GHZ :default :WARN_ON_ONCE (1 ); }
drivers/net/wireless/iwlwifi/mvm/scan.c +10 -10
@@ -602,16 +602,6 @@ static int iwl_mvm_cancel_regular_scan(struct iwl_mvm *mvm) SCAN_COMPLETE_NOTIFICATION };int ret; -if (mvm->scan_status ==IWL_MVM_SCAN_NONE ) -return 0 ; - -if (iwl_mvm_is_radio_killed (mvm)) { -ieee80211_scan_completed (mvm->hw, true); -iwl_mvm_unref (mvm,IWL_MVM_REF_SCAN ); - mvm->scan_status =IWL_MVM_SCAN_NONE ; -return 0 ; - } - iwl_init_notification_wait(&mvm->notif_wait, &wait_scan_abort, scan_abort_notif, ARRAY_SIZE(scan_abort_notif),
@@ -1400,6 +1390,16 @@ int iwl_mvm_unified_sched_scan_lmac(struct iwl_mvm *mvm,int iwl_mvm_cancel_scan (struct iwl_mvm *mvm) { +if (mvm->scan_status ==IWL_MVM_SCAN_NONE ) +return 0 ; + +if (iwl_mvm_is_radio_killed (mvm)) { +ieee80211_scan_completed (mvm->hw, true); +iwl_mvm_unref (mvm,IWL_MVM_REF_SCAN ); + mvm->scan_status =IWL_MVM_SCAN_NONE ; +return 0 ; + } +if (mvm->fw->ucode_capa.api[0 ] &IWL_UCODE_TLV_API_LMAC_SCAN )return iwl_mvm_scan_offload_stop (mvm, true);return iwl_mvm_cancel_regular_scan (mvm);
drivers/net/wireless/iwlwifi/pcie/trans.c +1 -2
@@ -1894,8 +1894,7 @@ static u32 iwl_trans_pcie_dump_prph(struct iwl_trans *trans,int reg;__le32 *val; - prph_len +=sizeof (*data) +sizeof (*prph) + - num_bytes_in_chunk; + prph_len +=sizeof (**data) +sizeof (*prph) + num_bytes_in_chunk; (*data)->type =cpu_to_le32 (IWL_FW_ERROR_DUMP_PRPH ); (*data)->len = cpu_to_le32(sizeof(*prph) +
drivers/net/wireless/rt2x00/rt2x00queue.c +12 -38
67 lines not on this page · raw message
drivers/net/wireless/rtlwifi/pci.c +12 -7
@@ -842,7 +842,8 @@ static void _rtl_pci_rx_interrupt(struct ieee80211_hw *hw)break ; }/* handle command packet here */ -if (rtlpriv->cfg->ops->rx_command_packet (hw, stats, skb)) { +if (rtlpriv->cfg->ops->rx_command_packet && + rtlpriv->cfg->ops->rx_command_packet (hw, stats, skb)) {dev_kfree_skb_any (skb); goto end; }
@@ -1127,9 +1128,14 @@ static void _rtl_pci_prepare_bcn_tasklet(struct ieee80211_hw *hw)__skb_queue_tail (&ring->queue, pskb); - rtlpriv->cfg->ops->set_desc (hw, (u8 *)pdesc, true,HW_DESC_OWN , - &temp_one); - +if (rtlpriv->use_new_trx_flow) { + temp_one =4 ; + rtlpriv->cfg->ops->set_desc (hw, (u8 *)pbuffer_desc, true, +HW_DESC_OWN , (u8 *)&temp_one); + }else { + rtlpriv->cfg->ops->set_desc (hw, (u8 *)pdesc, true,HW_DESC_OWN , + &temp_one); + }return ; }
@@ -1370,9 +1376,9 @@ static void _rtl_pci_free_tx_ring(struct ieee80211_hw *hw, ring->desc =NULL ;if (rtlpriv->use_new_trx_flow) {pci_free_consistent (rtlpci->pdev, -sizeof (*ring->desc) * ring->entries, +sizeof (*ring->buffer_desc) * ring->entries, ring->buffer_desc, ring->buffer_desc_dma); - ring->desc =NULL ; + ring->buffer_desc =NULL ; } }
@@ -1543,7 +1549,6 @@ int rtl_pci_reset_trx_ring(struct ieee80211_hw *hw) true, HW_DESC_TXBUFF_ADDR), skb->len, PCI_DMA_TODEVICE); - ring->idx = (ring->idx +1 ) % ring->entries;kfree_skb (skb); ring->idx = (ring->idx +1 ) % ring->entries; }
drivers/net/wireless/rtlwifi/rtl8192se/hw.c +5 -2
@@ -1201,6 +1201,9 @@ static int _rtl92se_set_media_status(struct ieee80211_hw *hw, } +if (type !=NL80211_IFTYPE_AP && + rtlpriv->mac80211.link_state <MAC80211_LINKED ) + bt_msr =rtl_read_byte (rtlpriv,MSR ) & ~MSR_LINK_MASK ;rtl_write_byte (rtlpriv, (MSR ), bt_msr); temp =rtl_read_dword (rtlpriv,TCR );
@@ -1262,6 +1265,7 @@ void rtl92se_enable_interrupt(struct ieee80211_hw *hw)rtl_write_dword (rtlpriv,INTA_MASK , rtlpci->irq_mask[0 ]);/* Support Bit 32-37(Assign as Bit 0-5) interrupt setting now */ rtl_write_dword (rtlpriv,INTA_MASK +4 , rtlpci->irq_mask[1 ] &0x3F ); + rtlpci->irq_enabled = true; }void rtl92se_disable_interrupt (struct ieee80211_hw *hw)
@@ -1276,8 +1280,7 @@ void rtl92se_disable_interrupt(struct ieee80211_hw *hw) rtlpci =rtl_pcidev (rtl_pcipriv (hw));rtl_write_dword (rtlpriv,INTA_MASK ,0 );rtl_write_dword (rtlpriv,INTA_MASK +4 ,0 ); - -synchronize_irq (rtlpci->pdev->irq); + rtlpci->irq_enabled = false; }static u8 _rtl92s_set_sysclk (struct ieee80211_hw *hw,u8 data)
drivers/net/wireless/rtlwifi/rtl8192se/phy.c +2 -0
@@ -399,6 +399,8 @@ static bool _rtl92s_phy_sw_chnl_step_by_step(struct ieee80211_hw *hw,case 2 : currentcmd = &postcommoncmd[*step];break ; +default : +return true; }if (currentcmd->cmdid ==CMDID_END ) {
drivers/net/wireless/rtlwifi/rtl8192se/sw.c +16 -0
@@ -236,6 +236,19 @@ static void rtl92s_deinit_sw_vars(struct ieee80211_hw *hw) } } +static bool rtl92se_is_tx_desc_closed (struct ieee80211_hw *hw,u8 hw_queue, +u16 index) +{ +struct rtl_pci *rtlpci =rtl_pcidev (rtl_pcipriv (hw)); +struct rtl8192_tx_ring *ring = &rtlpci->tx_ring[hw_queue]; +u8 *entry = (u8 *)(&ring->desc[ring->idx]); +u8 own = (u8 )rtl92se_get_desc (entry, true,HW_DESC_OWN ); + +if (own) +return false; +return true; +} +static struct rtl_hal_ops rtl8192se_hal_ops = { .init_sw_vars = rtl92s_init_sw_vars, .deinit_sw_vars = rtl92s_deinit_sw_vars,
@@ -269,6 +282,7 @@ static struct rtl_hal_ops rtl8192se_hal_ops = { .led_control = rtl92se_led_control, .set_desc = rtl92se_set_desc, .get_desc = rtl92se_get_desc, + .is_tx_desc_closed = rtl92se_is_tx_desc_closed, .tx_polling = rtl92se_tx_polling, .enable_hw_sec = rtl92se_enable_hw_security_config, .set_key = rtl92se_set_key,
@@ -306,6 +320,8 @@ static struct rtl_hal_cfg rtl92se_hal_cfg = { .maps[MAC_RCR_ACRC32] = RCR_ACRC32, .maps[MAC_RCR_ACF] = RCR_ACF, .maps[MAC_RCR_AAP] = RCR_AAP, + .maps[MAC_HIMR] = INTA_MASK, + .maps[MAC_HIMRE] = INTA_MASK + 4, .maps[EFUSE_TEST] = REG_EFUSE_TEST, .maps[EFUSE_CTRL] = REG_EFUSE_CTRL,
net/mac80211/aes_ccm.c +3 -0
@@ -53,6 +53,9 @@ int ieee80211_aes_ccm_decrypt(struct crypto_aead *tfm, u8 *b_0, u8 *aad,__aligned(__alignof__(struct aead_request)) ;struct aead_request *aead_req = (void *) aead_req_data; +if (data_len ==0 ) +return -EINVAL ; +memset (aead_req,0 ,sizeof (aead_req_data));sg_init_one (&pt, data, data_len);
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, 13 Nov 2014 16:28:16 -0500
Quoted 2 lines
Please pull this set of a few more wireless fixes intended for the 3.18 stream...
Pulled, thanks John.