Commit 00e8cb00 authored by David S. Miller's avatar David S. Miller

Merge tag 'wireless-drivers-for-davem-2016-06-21' of...

Merge tag 'wireless-drivers-for-davem-2016-06-21' of git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/wireless-drivers

Kalle Valo says:

====================
wireless-drivers fixes for 4.7

iwlwifi

* fix the scan timeout for long scans
* fix an RCU splat caused when updating the TKIP key
* fix a potential NULL-derefence introduced recently
* fix a IGTK key bug that has existed since the MVM driver was introduced
* fix some fw capabilities checks that got accidentally inverted

rtl8xxxu

* fix typo on variable name

ath10k

* fix deadlock when peer cannot be created
* fix crash related to printing features
* fix deadlock while processing rx_in_ord_ind

ath9k

* fix GPIO mask regression for AR9462 and AR9565
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents efeb2267 034fdd4a
...@@ -1083,7 +1083,7 @@ int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name, ...@@ -1083,7 +1083,7 @@ int ath10k_core_fetch_firmware_api_n(struct ath10k *ar, const char *name,
} }
ath10k_dbg_dump(ar, ATH10K_DBG_BOOT, "features", "", ath10k_dbg_dump(ar, ATH10K_DBG_BOOT, "features", "",
ar->running_fw->fw_file.fw_features, fw_file->fw_features,
sizeof(fw_file->fw_features)); sizeof(fw_file->fw_features));
break; break;
case ATH10K_FW_IE_FW_IMAGE: case ATH10K_FW_IE_FW_IMAGE:
......
...@@ -1904,7 +1904,6 @@ static void ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb) ...@@ -1904,7 +1904,6 @@ static void ath10k_htt_rx_in_ord_ind(struct ath10k *ar, struct sk_buff *skb)
return; return;
} }
} }
ath10k_htt_rx_msdu_buff_replenish(htt);
} }
static void ath10k_htt_rx_tx_fetch_resp_id_confirm(struct ath10k *ar, static void ath10k_htt_rx_tx_fetch_resp_id_confirm(struct ath10k *ar,
......
...@@ -679,10 +679,10 @@ static int ath10k_peer_create(struct ath10k *ar, ...@@ -679,10 +679,10 @@ static int ath10k_peer_create(struct ath10k *ar,
peer = ath10k_peer_find(ar, vdev_id, addr); peer = ath10k_peer_find(ar, vdev_id, addr);
if (!peer) { if (!peer) {
spin_unlock_bh(&ar->data_lock);
ath10k_warn(ar, "failed to find peer %pM on vdev %i after creation\n", ath10k_warn(ar, "failed to find peer %pM on vdev %i after creation\n",
addr, vdev_id); addr, vdev_id);
ath10k_wmi_peer_delete(ar, vdev_id, addr); ath10k_wmi_peer_delete(ar, vdev_id, addr);
spin_unlock_bh(&ar->data_lock);
return -ENOENT; return -ENOENT;
} }
......
...@@ -1122,12 +1122,12 @@ enum { ...@@ -1122,12 +1122,12 @@ enum {
#define AR9300_NUM_GPIO 16 #define AR9300_NUM_GPIO 16
#define AR9330_NUM_GPIO 16 #define AR9330_NUM_GPIO 16
#define AR9340_NUM_GPIO 23 #define AR9340_NUM_GPIO 23
#define AR9462_NUM_GPIO 10 #define AR9462_NUM_GPIO 14
#define AR9485_NUM_GPIO 12 #define AR9485_NUM_GPIO 12
#define AR9531_NUM_GPIO 18 #define AR9531_NUM_GPIO 18
#define AR9550_NUM_GPIO 24 #define AR9550_NUM_GPIO 24
#define AR9561_NUM_GPIO 23 #define AR9561_NUM_GPIO 23
#define AR9565_NUM_GPIO 12 #define AR9565_NUM_GPIO 14
#define AR9580_NUM_GPIO 16 #define AR9580_NUM_GPIO 16
#define AR7010_NUM_GPIO 16 #define AR7010_NUM_GPIO 16
...@@ -1139,12 +1139,12 @@ enum { ...@@ -1139,12 +1139,12 @@ enum {
#define AR9300_GPIO_MASK 0x0000F4FF #define AR9300_GPIO_MASK 0x0000F4FF
#define AR9330_GPIO_MASK 0x0000F4FF #define AR9330_GPIO_MASK 0x0000F4FF
#define AR9340_GPIO_MASK 0x0000000F #define AR9340_GPIO_MASK 0x0000000F
#define AR9462_GPIO_MASK 0x000003FF #define AR9462_GPIO_MASK 0x00003FFF
#define AR9485_GPIO_MASK 0x00000FFF #define AR9485_GPIO_MASK 0x00000FFF
#define AR9531_GPIO_MASK 0x0000000F #define AR9531_GPIO_MASK 0x0000000F
#define AR9550_GPIO_MASK 0x0000000F #define AR9550_GPIO_MASK 0x0000000F
#define AR9561_GPIO_MASK 0x0000000F #define AR9561_GPIO_MASK 0x0000000F
#define AR9565_GPIO_MASK 0x00000FFF #define AR9565_GPIO_MASK 0x00003FFF
#define AR9580_GPIO_MASK 0x0000F4FF #define AR9580_GPIO_MASK 0x0000F4FF
#define AR7010_GPIO_MASK 0x0000FFFF #define AR7010_GPIO_MASK 0x0000FFFF
......
...@@ -3851,8 +3851,8 @@ static int iwl_mvm_mac_get_survey(struct ieee80211_hw *hw, int idx, ...@@ -3851,8 +3851,8 @@ static int iwl_mvm_mac_get_survey(struct ieee80211_hw *hw, int idx,
if (idx != 0) if (idx != 0)
return -ENOENT; return -ENOENT;
if (fw_has_capa(&mvm->fw->ucode_capa, if (!fw_has_capa(&mvm->fw->ucode_capa,
IWL_UCODE_TLV_CAPA_RADIO_BEACON_STATS)) IWL_UCODE_TLV_CAPA_RADIO_BEACON_STATS))
return -ENOENT; return -ENOENT;
mutex_lock(&mvm->mutex); mutex_lock(&mvm->mutex);
...@@ -3898,8 +3898,8 @@ static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw, ...@@ -3898,8 +3898,8 @@ static void iwl_mvm_mac_sta_statistics(struct ieee80211_hw *hw,
struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif); struct iwl_mvm_vif *mvmvif = iwl_mvm_vif_from_mac80211(vif);
struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta); struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
if (fw_has_capa(&mvm->fw->ucode_capa, if (!fw_has_capa(&mvm->fw->ucode_capa,
IWL_UCODE_TLV_CAPA_RADIO_BEACON_STATS)) IWL_UCODE_TLV_CAPA_RADIO_BEACON_STATS))
return; return;
/* if beacon filtering isn't on mac80211 does it anyway */ /* if beacon filtering isn't on mac80211 does it anyway */
......
...@@ -581,7 +581,7 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm, ...@@ -581,7 +581,7 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm,
struct iwl_rx_mpdu_desc *desc) struct iwl_rx_mpdu_desc *desc)
{ {
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data; struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
struct iwl_mvm_sta *mvm_sta = iwl_mvm_sta_from_mac80211(sta); struct iwl_mvm_sta *mvm_sta;
struct iwl_mvm_baid_data *baid_data; struct iwl_mvm_baid_data *baid_data;
struct iwl_mvm_reorder_buffer *buffer; struct iwl_mvm_reorder_buffer *buffer;
struct sk_buff *tail; struct sk_buff *tail;
...@@ -604,6 +604,8 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm, ...@@ -604,6 +604,8 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm,
if (WARN_ON(IS_ERR_OR_NULL(sta))) if (WARN_ON(IS_ERR_OR_NULL(sta)))
return false; return false;
mvm_sta = iwl_mvm_sta_from_mac80211(sta);
/* not a data packet */ /* not a data packet */
if (!ieee80211_is_data_qos(hdr->frame_control) || if (!ieee80211_is_data_qos(hdr->frame_control) ||
is_multicast_ether_addr(hdr->addr1)) is_multicast_ether_addr(hdr->addr1))
......
...@@ -1222,7 +1222,7 @@ static int iwl_mvm_check_running_scans(struct iwl_mvm *mvm, int type) ...@@ -1222,7 +1222,7 @@ static int iwl_mvm_check_running_scans(struct iwl_mvm *mvm, int type)
return -EIO; return -EIO;
} }
#define SCAN_TIMEOUT (16 * HZ) #define SCAN_TIMEOUT (20 * HZ)
void iwl_mvm_scan_timeout(unsigned long data) void iwl_mvm_scan_timeout(unsigned long data)
{ {
......
...@@ -1852,12 +1852,18 @@ static struct iwl_mvm_sta *iwl_mvm_get_key_sta(struct iwl_mvm *mvm, ...@@ -1852,12 +1852,18 @@ static struct iwl_mvm_sta *iwl_mvm_get_key_sta(struct iwl_mvm *mvm,
mvmvif->ap_sta_id != IWL_MVM_STATION_COUNT) { mvmvif->ap_sta_id != IWL_MVM_STATION_COUNT) {
u8 sta_id = mvmvif->ap_sta_id; u8 sta_id = mvmvif->ap_sta_id;
sta = rcu_dereference_check(mvm->fw_id_to_mac_id[sta_id],
lockdep_is_held(&mvm->mutex));
/* /*
* It is possible that the 'sta' parameter is NULL, * It is possible that the 'sta' parameter is NULL,
* for example when a GTK is removed - the sta_id will then * for example when a GTK is removed - the sta_id will then
* be the AP ID, and no station was passed by mac80211. * be the AP ID, and no station was passed by mac80211.
*/ */
return iwl_mvm_sta_from_staid_protected(mvm, sta_id); if (IS_ERR_OR_NULL(sta))
return NULL;
return iwl_mvm_sta_from_mac80211(sta);
} }
return NULL; return NULL;
...@@ -1955,6 +1961,14 @@ static int iwl_mvm_send_sta_igtk(struct iwl_mvm *mvm, ...@@ -1955,6 +1961,14 @@ static int iwl_mvm_send_sta_igtk(struct iwl_mvm *mvm,
struct ieee80211_key_seq seq; struct ieee80211_key_seq seq;
const u8 *pn; const u8 *pn;
switch (keyconf->cipher) {
case WLAN_CIPHER_SUITE_AES_CMAC:
igtk_cmd.ctrl_flags |= cpu_to_le32(STA_KEY_FLG_CCM);
break;
default:
return -EINVAL;
}
memcpy(igtk_cmd.IGTK, keyconf->key, keyconf->keylen); memcpy(igtk_cmd.IGTK, keyconf->key, keyconf->keylen);
ieee80211_get_key_rx_seq(keyconf, 0, &seq); ieee80211_get_key_rx_seq(keyconf, 0, &seq);
pn = seq.aes_cmac.pn; pn = seq.aes_cmac.pn;
......
...@@ -1149,7 +1149,7 @@ static void rtl8192eu_phy_iqcalibrate(struct rtl8xxxu_priv *priv, ...@@ -1149,7 +1149,7 @@ static void rtl8192eu_phy_iqcalibrate(struct rtl8xxxu_priv *priv,
for (i = 0; i < retry; i++) { for (i = 0; i < retry; i++) {
path_b_ok = rtl8192eu_rx_iqk_path_b(priv); path_b_ok = rtl8192eu_rx_iqk_path_b(priv);
if (path_a_ok == 0x03) { if (path_b_ok == 0x03) {
val32 = rtl8xxxu_read32(priv, val32 = rtl8xxxu_read32(priv,
REG_RX_POWER_BEFORE_IQK_B_2); REG_RX_POWER_BEFORE_IQK_B_2);
result[t][6] = (val32 >> 16) & 0x3ff; result[t][6] = (val32 >> 16) & 0x3ff;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment