diff options
34 files changed, 233 insertions, 103 deletions
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c index 1ec52356b5a1..130657db5c43 100644 --- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c +++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | |||
@@ -3984,18 +3984,20 @@ static void ar9003_hw_quick_drop_apply(struct ath_hw *ah, u16 freq) | |||
3984 | int quick_drop; | 3984 | int quick_drop; |
3985 | s32 t[3], f[3] = {5180, 5500, 5785}; | 3985 | s32 t[3], f[3] = {5180, 5500, 5785}; |
3986 | 3986 | ||
3987 | if (!(pBase->miscConfiguration & BIT(1))) | 3987 | if (!(pBase->miscConfiguration & BIT(4))) |
3988 | return; | 3988 | return; |
3989 | 3989 | ||
3990 | if (freq < 4000) | 3990 | if (AR_SREV_9300(ah) || AR_SREV_9580(ah) || AR_SREV_9340(ah)) { |
3991 | quick_drop = eep->modalHeader2G.quick_drop; | 3991 | if (freq < 4000) { |
3992 | else { | 3992 | quick_drop = eep->modalHeader2G.quick_drop; |
3993 | t[0] = eep->base_ext1.quick_drop_low; | 3993 | } else { |
3994 | t[1] = eep->modalHeader5G.quick_drop; | 3994 | t[0] = eep->base_ext1.quick_drop_low; |
3995 | t[2] = eep->base_ext1.quick_drop_high; | 3995 | t[1] = eep->modalHeader5G.quick_drop; |
3996 | quick_drop = ar9003_hw_power_interpolate(freq, f, t, 3); | 3996 | t[2] = eep->base_ext1.quick_drop_high; |
3997 | quick_drop = ar9003_hw_power_interpolate(freq, f, t, 3); | ||
3998 | } | ||
3999 | REG_RMW_FIELD(ah, AR_PHY_AGC, AR_PHY_AGC_QUICK_DROP, quick_drop); | ||
3997 | } | 4000 | } |
3998 | REG_RMW_FIELD(ah, AR_PHY_AGC, AR_PHY_AGC_QUICK_DROP, quick_drop); | ||
3999 | } | 4001 | } |
4000 | 4002 | ||
4001 | static void ar9003_hw_txend_to_xpa_off_apply(struct ath_hw *ah, bool is2ghz) | 4003 | static void ar9003_hw_txend_to_xpa_off_apply(struct ath_hw *ah, bool is2ghz) |
@@ -4035,7 +4037,7 @@ static void ar9003_hw_xlna_bias_strength_apply(struct ath_hw *ah, bool is2ghz) | |||
4035 | struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep; | 4037 | struct ar9300_eeprom *eep = &ah->eeprom.ar9300_eep; |
4036 | u8 bias; | 4038 | u8 bias; |
4037 | 4039 | ||
4038 | if (!(eep->baseEepHeader.featureEnable & 0x40)) | 4040 | if (!(eep->baseEepHeader.miscConfiguration & 0x40)) |
4039 | return; | 4041 | return; |
4040 | 4042 | ||
4041 | if (!AR_SREV_9300(ah)) | 4043 | if (!AR_SREV_9300(ah)) |
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c index fe3537f6ec58..779d38a98a0e 100644 --- a/drivers/net/wireless/ath/ath9k/hw.c +++ b/drivers/net/wireless/ath/ath9k/hw.c | |||
@@ -147,10 +147,9 @@ static void ath9k_hw_set_clockrate(struct ath_hw *ah) | |||
147 | else | 147 | else |
148 | clockrate = ATH9K_CLOCK_RATE_5GHZ_OFDM; | 148 | clockrate = ATH9K_CLOCK_RATE_5GHZ_OFDM; |
149 | 149 | ||
150 | if (IS_CHAN_HT40(chan)) | 150 | if (chan) { |
151 | clockrate *= 2; | 151 | if (IS_CHAN_HT40(chan)) |
152 | 152 | clockrate *= 2; | |
153 | if (ah->curchan) { | ||
154 | if (IS_CHAN_HALF_RATE(chan)) | 153 | if (IS_CHAN_HALF_RATE(chan)) |
155 | clockrate /= 2; | 154 | clockrate /= 2; |
156 | if (IS_CHAN_QUARTER_RATE(chan)) | 155 | if (IS_CHAN_QUARTER_RATE(chan)) |
diff --git a/drivers/net/wireless/ath/wcn36xx/smd.c b/drivers/net/wireless/ath/wcn36xx/smd.c index ddb5b2f7a4b0..823631cdb872 100644 --- a/drivers/net/wireless/ath/wcn36xx/smd.c +++ b/drivers/net/wireless/ath/wcn36xx/smd.c | |||
@@ -2058,13 +2058,20 @@ static void wcn36xx_smd_rsp_process(struct wcn36xx *wcn, void *buf, size_t len) | |||
2058 | case WCN36XX_HAL_DELETE_STA_CONTEXT_IND: | 2058 | case WCN36XX_HAL_DELETE_STA_CONTEXT_IND: |
2059 | mutex_lock(&wcn->hal_ind_mutex); | 2059 | mutex_lock(&wcn->hal_ind_mutex); |
2060 | msg_ind = kmalloc(sizeof(*msg_ind), GFP_KERNEL); | 2060 | msg_ind = kmalloc(sizeof(*msg_ind), GFP_KERNEL); |
2061 | msg_ind->msg_len = len; | 2061 | if (msg_ind) { |
2062 | msg_ind->msg = kmalloc(len, GFP_KERNEL); | 2062 | msg_ind->msg_len = len; |
2063 | memcpy(msg_ind->msg, buf, len); | 2063 | msg_ind->msg = kmalloc(len, GFP_KERNEL); |
2064 | list_add_tail(&msg_ind->list, &wcn->hal_ind_queue); | 2064 | memcpy(msg_ind->msg, buf, len); |
2065 | queue_work(wcn->hal_ind_wq, &wcn->hal_ind_work); | 2065 | list_add_tail(&msg_ind->list, &wcn->hal_ind_queue); |
2066 | wcn36xx_dbg(WCN36XX_DBG_HAL, "indication arrived\n"); | 2066 | queue_work(wcn->hal_ind_wq, &wcn->hal_ind_work); |
2067 | wcn36xx_dbg(WCN36XX_DBG_HAL, "indication arrived\n"); | ||
2068 | } | ||
2067 | mutex_unlock(&wcn->hal_ind_mutex); | 2069 | mutex_unlock(&wcn->hal_ind_mutex); |
2070 | if (msg_ind) | ||
2071 | break; | ||
2072 | /* FIXME: Do something smarter then just printing an error. */ | ||
2073 | wcn36xx_err("Run out of memory while handling SMD_EVENT (%d)\n", | ||
2074 | msg_header->msg_type); | ||
2068 | break; | 2075 | break; |
2069 | default: | 2076 | default: |
2070 | wcn36xx_err("SMD_EVENT (%d) not supported\n", | 2077 | wcn36xx_err("SMD_EVENT (%d) not supported\n", |
diff --git a/drivers/net/wireless/brcm80211/Kconfig b/drivers/net/wireless/brcm80211/Kconfig index 57918579d55d..fcfed6b99a62 100644 --- a/drivers/net/wireless/brcm80211/Kconfig +++ b/drivers/net/wireless/brcm80211/Kconfig | |||
@@ -6,6 +6,8 @@ config BRCMSMAC | |||
6 | depends on MAC80211 | 6 | depends on MAC80211 |
7 | depends on BCMA_POSSIBLE | 7 | depends on BCMA_POSSIBLE |
8 | select BCMA | 8 | select BCMA |
9 | select NEW_LEDS if BCMA_DRIVER_GPIO | ||
10 | select LEDS_CLASS if BCMA_DRIVER_GPIO | ||
9 | select BRCMUTIL | 11 | select BRCMUTIL |
10 | select FW_LOADER | 12 | select FW_LOADER |
11 | select CORDIC | 13 | select CORDIC |
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c index 225493aec72d..a511c27122b8 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | |||
@@ -109,6 +109,8 @@ static inline int brcmf_sdioh_f0_write_byte(struct brcmf_sdio_dev *sdiodev, | |||
109 | brcmf_err("Disable F2 failed:%d\n", | 109 | brcmf_err("Disable F2 failed:%d\n", |
110 | err_ret); | 110 | err_ret); |
111 | } | 111 | } |
112 | } else { | ||
113 | err_ret = -ENOENT; | ||
112 | } | 114 | } |
113 | } else if ((regaddr == SDIO_CCCR_ABORT) || | 115 | } else if ((regaddr == SDIO_CCCR_ABORT) || |
114 | (regaddr == SDIO_CCCR_IENx)) { | 116 | (regaddr == SDIO_CCCR_IENx)) { |
diff --git a/drivers/net/wireless/iwlwifi/iwl-7000.c b/drivers/net/wireless/iwlwifi/iwl-7000.c index 85879dbaa402..3c34a72a5d64 100644 --- a/drivers/net/wireless/iwlwifi/iwl-7000.c +++ b/drivers/net/wireless/iwlwifi/iwl-7000.c | |||
@@ -67,8 +67,8 @@ | |||
67 | #include "iwl-agn-hw.h" | 67 | #include "iwl-agn-hw.h" |
68 | 68 | ||
69 | /* Highest firmware API version supported */ | 69 | /* Highest firmware API version supported */ |
70 | #define IWL7260_UCODE_API_MAX 7 | 70 | #define IWL7260_UCODE_API_MAX 8 |
71 | #define IWL3160_UCODE_API_MAX 7 | 71 | #define IWL3160_UCODE_API_MAX 8 |
72 | 72 | ||
73 | /* Oldest version we won't warn about */ | 73 | /* Oldest version we won't warn about */ |
74 | #define IWL7260_UCODE_API_OK 7 | 74 | #define IWL7260_UCODE_API_OK 7 |
@@ -130,6 +130,7 @@ const struct iwl_cfg iwl7260_2ac_cfg = { | |||
130 | .ht_params = &iwl7000_ht_params, | 130 | .ht_params = &iwl7000_ht_params, |
131 | .nvm_ver = IWL7260_NVM_VERSION, | 131 | .nvm_ver = IWL7260_NVM_VERSION, |
132 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, | 132 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, |
133 | .host_interrupt_operation_mode = true, | ||
133 | }; | 134 | }; |
134 | 135 | ||
135 | const struct iwl_cfg iwl7260_2ac_cfg_high_temp = { | 136 | const struct iwl_cfg iwl7260_2ac_cfg_high_temp = { |
@@ -140,6 +141,7 @@ const struct iwl_cfg iwl7260_2ac_cfg_high_temp = { | |||
140 | .nvm_ver = IWL7260_NVM_VERSION, | 141 | .nvm_ver = IWL7260_NVM_VERSION, |
141 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, | 142 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, |
142 | .high_temp = true, | 143 | .high_temp = true, |
144 | .host_interrupt_operation_mode = true, | ||
143 | }; | 145 | }; |
144 | 146 | ||
145 | const struct iwl_cfg iwl7260_2n_cfg = { | 147 | const struct iwl_cfg iwl7260_2n_cfg = { |
@@ -149,6 +151,7 @@ const struct iwl_cfg iwl7260_2n_cfg = { | |||
149 | .ht_params = &iwl7000_ht_params, | 151 | .ht_params = &iwl7000_ht_params, |
150 | .nvm_ver = IWL7260_NVM_VERSION, | 152 | .nvm_ver = IWL7260_NVM_VERSION, |
151 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, | 153 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, |
154 | .host_interrupt_operation_mode = true, | ||
152 | }; | 155 | }; |
153 | 156 | ||
154 | const struct iwl_cfg iwl7260_n_cfg = { | 157 | const struct iwl_cfg iwl7260_n_cfg = { |
@@ -158,6 +161,7 @@ const struct iwl_cfg iwl7260_n_cfg = { | |||
158 | .ht_params = &iwl7000_ht_params, | 161 | .ht_params = &iwl7000_ht_params, |
159 | .nvm_ver = IWL7260_NVM_VERSION, | 162 | .nvm_ver = IWL7260_NVM_VERSION, |
160 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, | 163 | .nvm_calib_ver = IWL7260_TX_POWER_VERSION, |
164 | .host_interrupt_operation_mode = true, | ||
161 | }; | 165 | }; |
162 | 166 | ||
163 | const struct iwl_cfg iwl3160_2ac_cfg = { | 167 | const struct iwl_cfg iwl3160_2ac_cfg = { |
@@ -167,6 +171,7 @@ const struct iwl_cfg iwl3160_2ac_cfg = { | |||
167 | .ht_params = &iwl7000_ht_params, | 171 | .ht_params = &iwl7000_ht_params, |
168 | .nvm_ver = IWL3160_NVM_VERSION, | 172 | .nvm_ver = IWL3160_NVM_VERSION, |
169 | .nvm_calib_ver = IWL3160_TX_POWER_VERSION, | 173 | .nvm_calib_ver = IWL3160_TX_POWER_VERSION, |
174 | .host_interrupt_operation_mode = true, | ||
170 | }; | 175 | }; |
171 | 176 | ||
172 | const struct iwl_cfg iwl3160_2n_cfg = { | 177 | const struct iwl_cfg iwl3160_2n_cfg = { |
@@ -176,6 +181,7 @@ const struct iwl_cfg iwl3160_2n_cfg = { | |||
176 | .ht_params = &iwl7000_ht_params, | 181 | .ht_params = &iwl7000_ht_params, |
177 | .nvm_ver = IWL3160_NVM_VERSION, | 182 | .nvm_ver = IWL3160_NVM_VERSION, |
178 | .nvm_calib_ver = IWL3160_TX_POWER_VERSION, | 183 | .nvm_calib_ver = IWL3160_TX_POWER_VERSION, |
184 | .host_interrupt_operation_mode = true, | ||
179 | }; | 185 | }; |
180 | 186 | ||
181 | const struct iwl_cfg iwl3160_n_cfg = { | 187 | const struct iwl_cfg iwl3160_n_cfg = { |
@@ -185,6 +191,7 @@ const struct iwl_cfg iwl3160_n_cfg = { | |||
185 | .ht_params = &iwl7000_ht_params, | 191 | .ht_params = &iwl7000_ht_params, |
186 | .nvm_ver = IWL3160_NVM_VERSION, | 192 | .nvm_ver = IWL3160_NVM_VERSION, |
187 | .nvm_calib_ver = IWL3160_TX_POWER_VERSION, | 193 | .nvm_calib_ver = IWL3160_TX_POWER_VERSION, |
194 | .host_interrupt_operation_mode = true, | ||
188 | }; | 195 | }; |
189 | 196 | ||
190 | const struct iwl_cfg iwl7265_2ac_cfg = { | 197 | const struct iwl_cfg iwl7265_2ac_cfg = { |
@@ -196,5 +203,23 @@ const struct iwl_cfg iwl7265_2ac_cfg = { | |||
196 | .nvm_calib_ver = IWL7265_TX_POWER_VERSION, | 203 | .nvm_calib_ver = IWL7265_TX_POWER_VERSION, |
197 | }; | 204 | }; |
198 | 205 | ||
206 | const struct iwl_cfg iwl7265_2n_cfg = { | ||
207 | .name = "Intel(R) Dual Band Wireless N 7265", | ||
208 | .fw_name_pre = IWL7265_FW_PRE, | ||
209 | IWL_DEVICE_7000, | ||
210 | .ht_params = &iwl7000_ht_params, | ||
211 | .nvm_ver = IWL7265_NVM_VERSION, | ||
212 | .nvm_calib_ver = IWL7265_TX_POWER_VERSION, | ||
213 | }; | ||
214 | |||
215 | const struct iwl_cfg iwl7265_n_cfg = { | ||
216 | .name = "Intel(R) Wireless N 7265", | ||
217 | .fw_name_pre = IWL7265_FW_PRE, | ||
218 | IWL_DEVICE_7000, | ||
219 | .ht_params = &iwl7000_ht_params, | ||
220 | .nvm_ver = IWL7265_NVM_VERSION, | ||
221 | .nvm_calib_ver = IWL7265_TX_POWER_VERSION, | ||
222 | }; | ||
223 | |||
199 | MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK)); | 224 | MODULE_FIRMWARE(IWL7260_MODULE_FIRMWARE(IWL7260_UCODE_API_OK)); |
200 | MODULE_FIRMWARE(IWL3160_MODULE_FIRMWARE(IWL3160_UCODE_API_OK)); | 225 | MODULE_FIRMWARE(IWL3160_MODULE_FIRMWARE(IWL3160_UCODE_API_OK)); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-config.h b/drivers/net/wireless/iwlwifi/iwl-config.h index 18f232e8e812..03fd9aa8bfda 100644 --- a/drivers/net/wireless/iwlwifi/iwl-config.h +++ b/drivers/net/wireless/iwlwifi/iwl-config.h | |||
@@ -207,6 +207,8 @@ struct iwl_eeprom_params { | |||
207 | * @rx_with_siso_diversity: 1x1 device with rx antenna diversity | 207 | * @rx_with_siso_diversity: 1x1 device with rx antenna diversity |
208 | * @internal_wimax_coex: internal wifi/wimax combo device | 208 | * @internal_wimax_coex: internal wifi/wimax combo device |
209 | * @high_temp: Is this NIC is designated to be in high temperature. | 209 | * @high_temp: Is this NIC is designated to be in high temperature. |
210 | * @host_interrupt_operation_mode: device needs host interrupt operation | ||
211 | * mode set | ||
210 | * | 212 | * |
211 | * We enable the driver to be backward compatible wrt. hardware features. | 213 | * We enable the driver to be backward compatible wrt. hardware features. |
212 | * API differences in uCode shouldn't be handled here but through TLVs | 214 | * API differences in uCode shouldn't be handled here but through TLVs |
@@ -235,6 +237,7 @@ struct iwl_cfg { | |||
235 | enum iwl_led_mode led_mode; | 237 | enum iwl_led_mode led_mode; |
236 | const bool rx_with_siso_diversity; | 238 | const bool rx_with_siso_diversity; |
237 | const bool internal_wimax_coex; | 239 | const bool internal_wimax_coex; |
240 | const bool host_interrupt_operation_mode; | ||
238 | bool high_temp; | 241 | bool high_temp; |
239 | }; | 242 | }; |
240 | 243 | ||
@@ -294,6 +297,8 @@ extern const struct iwl_cfg iwl3160_2ac_cfg; | |||
294 | extern const struct iwl_cfg iwl3160_2n_cfg; | 297 | extern const struct iwl_cfg iwl3160_2n_cfg; |
295 | extern const struct iwl_cfg iwl3160_n_cfg; | 298 | extern const struct iwl_cfg iwl3160_n_cfg; |
296 | extern const struct iwl_cfg iwl7265_2ac_cfg; | 299 | extern const struct iwl_cfg iwl7265_2ac_cfg; |
300 | extern const struct iwl_cfg iwl7265_2n_cfg; | ||
301 | extern const struct iwl_cfg iwl7265_n_cfg; | ||
297 | #endif /* CONFIG_IWLMVM */ | 302 | #endif /* CONFIG_IWLMVM */ |
298 | 303 | ||
299 | #endif /* __IWL_CONFIG_H__ */ | 304 | #endif /* __IWL_CONFIG_H__ */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-csr.h b/drivers/net/wireless/iwlwifi/iwl-csr.h index 54a4fdc631b7..da4eca8b3007 100644 --- a/drivers/net/wireless/iwlwifi/iwl-csr.h +++ b/drivers/net/wireless/iwlwifi/iwl-csr.h | |||
@@ -495,14 +495,11 @@ enum secure_load_status_reg { | |||
495 | * the CSR_INT_COALESCING is an 8 bit register in 32-usec unit | 495 | * the CSR_INT_COALESCING is an 8 bit register in 32-usec unit |
496 | * | 496 | * |
497 | * default interrupt coalescing timer is 64 x 32 = 2048 usecs | 497 | * default interrupt coalescing timer is 64 x 32 = 2048 usecs |
498 | * default interrupt coalescing calibration timer is 16 x 32 = 512 usecs | ||
499 | */ | 498 | */ |
500 | #define IWL_HOST_INT_TIMEOUT_MAX (0xFF) | 499 | #define IWL_HOST_INT_TIMEOUT_MAX (0xFF) |
501 | #define IWL_HOST_INT_TIMEOUT_DEF (0x40) | 500 | #define IWL_HOST_INT_TIMEOUT_DEF (0x40) |
502 | #define IWL_HOST_INT_TIMEOUT_MIN (0x0) | 501 | #define IWL_HOST_INT_TIMEOUT_MIN (0x0) |
503 | #define IWL_HOST_INT_CALIB_TIMEOUT_MAX (0xFF) | 502 | #define IWL_HOST_INT_OPER_MODE BIT(31) |
504 | #define IWL_HOST_INT_CALIB_TIMEOUT_DEF (0x10) | ||
505 | #define IWL_HOST_INT_CALIB_TIMEOUT_MIN (0x0) | ||
506 | 503 | ||
507 | /***************************************************************************** | 504 | /***************************************************************************** |
508 | * 7000/3000 series SHR DTS addresses * | 505 | * 7000/3000 series SHR DTS addresses * |
diff --git a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c index 5d066cbc5ac7..75b72a956552 100644 --- a/drivers/net/wireless/iwlwifi/mvm/bt-coex.c +++ b/drivers/net/wireless/iwlwifi/mvm/bt-coex.c | |||
@@ -391,7 +391,6 @@ int iwl_send_bt_init_conf(struct iwl_mvm *mvm) | |||
391 | BT_VALID_LUT | | 391 | BT_VALID_LUT | |
392 | BT_VALID_WIFI_RX_SW_PRIO_BOOST | | 392 | BT_VALID_WIFI_RX_SW_PRIO_BOOST | |
393 | BT_VALID_WIFI_TX_SW_PRIO_BOOST | | 393 | BT_VALID_WIFI_TX_SW_PRIO_BOOST | |
394 | BT_VALID_MULTI_PRIO_LUT | | ||
395 | BT_VALID_CORUN_LUT_20 | | 394 | BT_VALID_CORUN_LUT_20 | |
396 | BT_VALID_CORUN_LUT_40 | | 395 | BT_VALID_CORUN_LUT_40 | |
397 | BT_VALID_ANT_ISOLATION | | 396 | BT_VALID_ANT_ISOLATION | |
@@ -842,6 +841,11 @@ static void iwl_mvm_bt_rssi_iterator(void *_data, u8 *mac, | |||
842 | 841 | ||
843 | sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[mvmvif->ap_sta_id], | 842 | sta = rcu_dereference_protected(mvm->fw_id_to_mac_id[mvmvif->ap_sta_id], |
844 | lockdep_is_held(&mvm->mutex)); | 843 | lockdep_is_held(&mvm->mutex)); |
844 | |||
845 | /* This can happen if the station has been removed right now */ | ||
846 | if (IS_ERR_OR_NULL(sta)) | ||
847 | return; | ||
848 | |||
845 | mvmsta = (void *)sta->drv_priv; | 849 | mvmsta = (void *)sta->drv_priv; |
846 | 850 | ||
847 | data->num_bss_ifaces++; | 851 | data->num_bss_ifaces++; |
diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c index 6f45966817bb..b9b81e881dd0 100644 --- a/drivers/net/wireless/iwlwifi/mvm/d3.c +++ b/drivers/net/wireless/iwlwifi/mvm/d3.c | |||
@@ -895,7 +895,7 @@ static int iwl_mvm_get_last_nonqos_seq(struct iwl_mvm *mvm, | |||
895 | /* new API returns next, not last-used seqno */ | 895 | /* new API returns next, not last-used seqno */ |
896 | if (mvm->fw->ucode_capa.flags & | 896 | if (mvm->fw->ucode_capa.flags & |
897 | IWL_UCODE_TLV_FLAGS_D3_CONTINUITY_API) | 897 | IWL_UCODE_TLV_FLAGS_D3_CONTINUITY_API) |
898 | err -= 0x10; | 898 | err = (u16) (err - 0x10); |
899 | } | 899 | } |
900 | 900 | ||
901 | iwl_free_resp(&cmd); | 901 | iwl_free_resp(&cmd); |
@@ -1549,7 +1549,7 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm, | |||
1549 | if (gtkdata.unhandled_cipher) | 1549 | if (gtkdata.unhandled_cipher) |
1550 | return false; | 1550 | return false; |
1551 | if (!gtkdata.num_keys) | 1551 | if (!gtkdata.num_keys) |
1552 | return true; | 1552 | goto out; |
1553 | if (!gtkdata.last_gtk) | 1553 | if (!gtkdata.last_gtk) |
1554 | return false; | 1554 | return false; |
1555 | 1555 | ||
@@ -1600,6 +1600,7 @@ static bool iwl_mvm_setup_connection_keep(struct iwl_mvm *mvm, | |||
1600 | (void *)&replay_ctr, GFP_KERNEL); | 1600 | (void *)&replay_ctr, GFP_KERNEL); |
1601 | } | 1601 | } |
1602 | 1602 | ||
1603 | out: | ||
1603 | mvmvif->seqno_valid = true; | 1604 | mvmvif->seqno_valid = true; |
1604 | /* +0x10 because the set API expects next-to-use, not last-used */ | 1605 | /* +0x10 because the set API expects next-to-use, not last-used */ |
1605 | mvmvif->seqno = le16_to_cpu(status->non_qos_seq_ctr) + 0x10; | 1606 | mvmvif->seqno = le16_to_cpu(status->non_qos_seq_ctr) + 0x10; |
diff --git a/drivers/net/wireless/iwlwifi/mvm/debugfs.c b/drivers/net/wireless/iwlwifi/mvm/debugfs.c index 9864d713eb2c..a8fe6b41f9a3 100644 --- a/drivers/net/wireless/iwlwifi/mvm/debugfs.c +++ b/drivers/net/wireless/iwlwifi/mvm/debugfs.c | |||
@@ -119,6 +119,10 @@ static ssize_t iwl_dbgfs_sta_drain_write(struct file *file, | |||
119 | 119 | ||
120 | if (sscanf(buf, "%d %d", &sta_id, &drain) != 2) | 120 | if (sscanf(buf, "%d %d", &sta_id, &drain) != 2) |
121 | return -EINVAL; | 121 | return -EINVAL; |
122 | if (sta_id < 0 || sta_id >= IWL_MVM_STATION_COUNT) | ||
123 | return -EINVAL; | ||
124 | if (drain < 0 || drain > 1) | ||
125 | return -EINVAL; | ||
122 | 126 | ||
123 | mutex_lock(&mvm->mutex); | 127 | mutex_lock(&mvm->mutex); |
124 | 128 | ||
diff --git a/drivers/net/wireless/iwlwifi/mvm/time-event.c b/drivers/net/wireless/iwlwifi/mvm/time-event.c index 33cf56fdfc41..95ce4b601fef 100644 --- a/drivers/net/wireless/iwlwifi/mvm/time-event.c +++ b/drivers/net/wireless/iwlwifi/mvm/time-event.c | |||
@@ -176,8 +176,11 @@ static void iwl_mvm_te_handle_notif(struct iwl_mvm *mvm, | |||
176 | * P2P Device discoveribility, while there are other higher priority | 176 | * P2P Device discoveribility, while there are other higher priority |
177 | * events in the system). | 177 | * events in the system). |
178 | */ | 178 | */ |
179 | if (WARN_ONCE(!le32_to_cpu(notif->status), | 179 | if (!le32_to_cpu(notif->status)) { |
180 | "Failed to schedule time event\n")) { | 180 | bool start = le32_to_cpu(notif->action) & |
181 | TE_V2_NOTIF_HOST_EVENT_START; | ||
182 | IWL_WARN(mvm, "Time Event %s notification failure\n", | ||
183 | start ? "start" : "end"); | ||
181 | if (iwl_mvm_te_check_disconnect(mvm, te_data->vif, NULL)) { | 184 | if (iwl_mvm_te_check_disconnect(mvm, te_data->vif, NULL)) { |
182 | iwl_mvm_te_clear_data(mvm, te_data); | 185 | iwl_mvm_te_clear_data(mvm, te_data); |
183 | return; | 186 | return; |
diff --git a/drivers/net/wireless/iwlwifi/pcie/drv.c b/drivers/net/wireless/iwlwifi/pcie/drv.c index 941c0c88f982..86605027c41d 100644 --- a/drivers/net/wireless/iwlwifi/pcie/drv.c +++ b/drivers/net/wireless/iwlwifi/pcie/drv.c | |||
@@ -353,6 +353,27 @@ static DEFINE_PCI_DEVICE_TABLE(iwl_hw_card_ids) = { | |||
353 | 353 | ||
354 | /* 7265 Series */ | 354 | /* 7265 Series */ |
355 | {IWL_PCI_DEVICE(0x095A, 0x5010, iwl7265_2ac_cfg)}, | 355 | {IWL_PCI_DEVICE(0x095A, 0x5010, iwl7265_2ac_cfg)}, |
356 | {IWL_PCI_DEVICE(0x095A, 0x5110, iwl7265_2ac_cfg)}, | ||
357 | {IWL_PCI_DEVICE(0x095B, 0x5310, iwl7265_2ac_cfg)}, | ||
358 | {IWL_PCI_DEVICE(0x095B, 0x5302, iwl7265_2ac_cfg)}, | ||
359 | {IWL_PCI_DEVICE(0x095B, 0x5210, iwl7265_2ac_cfg)}, | ||
360 | {IWL_PCI_DEVICE(0x095B, 0x5012, iwl7265_2ac_cfg)}, | ||
361 | {IWL_PCI_DEVICE(0x095B, 0x500A, iwl7265_2ac_cfg)}, | ||
362 | {IWL_PCI_DEVICE(0x095A, 0x5410, iwl7265_2ac_cfg)}, | ||
363 | {IWL_PCI_DEVICE(0x095A, 0x1010, iwl7265_2ac_cfg)}, | ||
364 | {IWL_PCI_DEVICE(0x095A, 0x5000, iwl7265_2n_cfg)}, | ||
365 | {IWL_PCI_DEVICE(0x095B, 0x5200, iwl7265_2n_cfg)}, | ||
366 | {IWL_PCI_DEVICE(0x095A, 0x5002, iwl7265_n_cfg)}, | ||
367 | {IWL_PCI_DEVICE(0x095B, 0x5202, iwl7265_n_cfg)}, | ||
368 | {IWL_PCI_DEVICE(0x095A, 0x9010, iwl7265_2ac_cfg)}, | ||
369 | {IWL_PCI_DEVICE(0x095A, 0x9210, iwl7265_2ac_cfg)}, | ||
370 | {IWL_PCI_DEVICE(0x095A, 0x9410, iwl7265_2ac_cfg)}, | ||
371 | {IWL_PCI_DEVICE(0x095A, 0x5020, iwl7265_2n_cfg)}, | ||
372 | {IWL_PCI_DEVICE(0x095A, 0x502A, iwl7265_2n_cfg)}, | ||
373 | {IWL_PCI_DEVICE(0x095A, 0x5420, iwl7265_2n_cfg)}, | ||
374 | {IWL_PCI_DEVICE(0x095A, 0x5090, iwl7265_2ac_cfg)}, | ||
375 | {IWL_PCI_DEVICE(0x095B, 0x5290, iwl7265_2ac_cfg)}, | ||
376 | {IWL_PCI_DEVICE(0x095A, 0x5490, iwl7265_2ac_cfg)}, | ||
356 | #endif /* CONFIG_IWLMVM */ | 377 | #endif /* CONFIG_IWLMVM */ |
357 | 378 | ||
358 | {0} | 379 | {0} |
diff --git a/drivers/net/wireless/iwlwifi/pcie/internal.h b/drivers/net/wireless/iwlwifi/pcie/internal.h index fa22639b63c9..051268c037b1 100644 --- a/drivers/net/wireless/iwlwifi/pcie/internal.h +++ b/drivers/net/wireless/iwlwifi/pcie/internal.h | |||
@@ -477,4 +477,12 @@ static inline bool iwl_is_rfkill_set(struct iwl_trans *trans) | |||
477 | CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW); | 477 | CSR_GP_CNTRL_REG_FLAG_HW_RF_KILL_SW); |
478 | } | 478 | } |
479 | 479 | ||
480 | static inline void iwl_nic_error(struct iwl_trans *trans) | ||
481 | { | ||
482 | struct iwl_trans_pcie *trans_pcie = IWL_TRANS_GET_PCIE_TRANS(trans); | ||
483 | |||
484 | set_bit(STATUS_FW_ERROR, &trans_pcie->status); | ||
485 | iwl_op_mode_nic_error(trans->op_mode); | ||
486 | } | ||
487 | |||
480 | #endif /* __iwl_trans_int_pcie_h__ */ | 488 | #endif /* __iwl_trans_int_pcie_h__ */ |
diff --git a/drivers/net/wireless/iwlwifi/pcie/rx.c b/drivers/net/wireless/iwlwifi/pcie/rx.c index 3f237b42eb36..be3995afa9d0 100644 --- a/drivers/net/wireless/iwlwifi/pcie/rx.c +++ b/drivers/net/wireless/iwlwifi/pcie/rx.c | |||
@@ -489,6 +489,10 @@ static void iwl_pcie_rx_hw_init(struct iwl_trans *trans, struct iwl_rxq *rxq) | |||
489 | 489 | ||
490 | /* Set interrupt coalescing timer to default (2048 usecs) */ | 490 | /* Set interrupt coalescing timer to default (2048 usecs) */ |
491 | iwl_write8(trans, CSR_INT_COALESCING, IWL_HOST_INT_TIMEOUT_DEF); | 491 | iwl_write8(trans, CSR_INT_COALESCING, IWL_HOST_INT_TIMEOUT_DEF); |
492 | |||
493 | /* W/A for interrupt coalescing bug in 7260 and 3160 */ | ||
494 | if (trans->cfg->host_interrupt_operation_mode) | ||
495 | iwl_set_bit(trans, CSR_INT_COALESCING, IWL_HOST_INT_OPER_MODE); | ||
492 | } | 496 | } |
493 | 497 | ||
494 | static void iwl_pcie_rx_init_rxb_lists(struct iwl_rxq *rxq) | 498 | static void iwl_pcie_rx_init_rxb_lists(struct iwl_rxq *rxq) |
@@ -796,12 +800,13 @@ static void iwl_pcie_irq_handle_error(struct iwl_trans *trans) | |||
796 | iwl_pcie_dump_csr(trans); | 800 | iwl_pcie_dump_csr(trans); |
797 | iwl_dump_fh(trans, NULL); | 801 | iwl_dump_fh(trans, NULL); |
798 | 802 | ||
803 | /* set the ERROR bit before we wake up the caller */ | ||
799 | set_bit(STATUS_FW_ERROR, &trans_pcie->status); | 804 | set_bit(STATUS_FW_ERROR, &trans_pcie->status); |
800 | clear_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status); | 805 | clear_bit(STATUS_HCMD_ACTIVE, &trans_pcie->status); |
801 | wake_up(&trans_pcie->wait_command_queue); | 806 | wake_up(&trans_pcie->wait_command_queue); |
802 | 807 | ||
803 | local_bh_disable(); | 808 | local_bh_disable(); |
804 | iwl_op_mode_nic_error(trans->op_mode); | 809 | iwl_nic_error(trans); |
805 | local_bh_enable(); | 810 | local_bh_enable(); |
806 | } | 811 | } |
807 | 812 | ||
diff --git a/drivers/net/wireless/iwlwifi/pcie/trans.c b/drivers/net/wireless/iwlwifi/pcie/trans.c index 5d9337bec67a..cde9c16f6e4f 100644 --- a/drivers/net/wireless/iwlwifi/pcie/trans.c +++ b/drivers/net/wireless/iwlwifi/pcie/trans.c | |||
@@ -279,9 +279,6 @@ static int iwl_pcie_nic_init(struct iwl_trans *trans) | |||
279 | spin_lock_irqsave(&trans_pcie->irq_lock, flags); | 279 | spin_lock_irqsave(&trans_pcie->irq_lock, flags); |
280 | iwl_pcie_apm_init(trans); | 280 | iwl_pcie_apm_init(trans); |
281 | 281 | ||
282 | /* Set interrupt coalescing calibration timer to default (512 usecs) */ | ||
283 | iwl_write8(trans, CSR_INT_COALESCING, IWL_HOST_INT_CALIB_TIMEOUT_DEF); | ||
284 | |||
285 | spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); | 282 | spin_unlock_irqrestore(&trans_pcie->irq_lock, flags); |
286 | 283 | ||
287 | iwl_pcie_set_pwr(trans, false); | 284 | iwl_pcie_set_pwr(trans, false); |
diff --git a/drivers/net/wireless/iwlwifi/pcie/tx.c b/drivers/net/wireless/iwlwifi/pcie/tx.c index 059c5acad3a0..0adde919a258 100644 --- a/drivers/net/wireless/iwlwifi/pcie/tx.c +++ b/drivers/net/wireless/iwlwifi/pcie/tx.c | |||
@@ -207,7 +207,7 @@ static void iwl_pcie_txq_stuck_timer(unsigned long data) | |||
207 | IWL_ERR(trans, "scratch %d = 0x%08x\n", i, | 207 | IWL_ERR(trans, "scratch %d = 0x%08x\n", i, |
208 | le32_to_cpu(txq->scratchbufs[i].scratch)); | 208 | le32_to_cpu(txq->scratchbufs[i].scratch)); |
209 | 209 | ||
210 | iwl_op_mode_nic_error(trans->op_mode); | 210 | iwl_nic_error(trans); |
211 | } | 211 | } |
212 | 212 | ||
213 | /* | 213 | /* |
@@ -1023,7 +1023,7 @@ static void iwl_pcie_cmdq_reclaim(struct iwl_trans *trans, int txq_id, int idx) | |||
1023 | if (nfreed++ > 0) { | 1023 | if (nfreed++ > 0) { |
1024 | IWL_ERR(trans, "HCMD skipped: index (%d) %d %d\n", | 1024 | IWL_ERR(trans, "HCMD skipped: index (%d) %d %d\n", |
1025 | idx, q->write_ptr, q->read_ptr); | 1025 | idx, q->write_ptr, q->read_ptr); |
1026 | iwl_op_mode_nic_error(trans->op_mode); | 1026 | iwl_nic_error(trans); |
1027 | } | 1027 | } |
1028 | } | 1028 | } |
1029 | 1029 | ||
@@ -1562,7 +1562,7 @@ static int iwl_pcie_send_hcmd_sync(struct iwl_trans *trans, | |||
1562 | get_cmd_string(trans_pcie, cmd->id)); | 1562 | get_cmd_string(trans_pcie, cmd->id)); |
1563 | ret = -ETIMEDOUT; | 1563 | ret = -ETIMEDOUT; |
1564 | 1564 | ||
1565 | iwl_op_mode_nic_error(trans->op_mode); | 1565 | iwl_nic_error(trans); |
1566 | 1566 | ||
1567 | goto cancel; | 1567 | goto cancel; |
1568 | } | 1568 | } |
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c index 3f9a4c9ad77a..9c0cc8ded021 100644 --- a/drivers/net/wireless/mac80211_hwsim.c +++ b/drivers/net/wireless/mac80211_hwsim.c | |||
@@ -381,6 +381,14 @@ struct hwsim_radiotap_hdr { | |||
381 | __le16 rt_chbitmask; | 381 | __le16 rt_chbitmask; |
382 | } __packed; | 382 | } __packed; |
383 | 383 | ||
384 | struct hwsim_radiotap_ack_hdr { | ||
385 | struct ieee80211_radiotap_header hdr; | ||
386 | u8 rt_flags; | ||
387 | u8 pad; | ||
388 | __le16 rt_channel; | ||
389 | __le16 rt_chbitmask; | ||
390 | } __packed; | ||
391 | |||
384 | /* MAC80211_HWSIM netlinf family */ | 392 | /* MAC80211_HWSIM netlinf family */ |
385 | static struct genl_family hwsim_genl_family = { | 393 | static struct genl_family hwsim_genl_family = { |
386 | .id = GENL_ID_GENERATE, | 394 | .id = GENL_ID_GENERATE, |
@@ -498,7 +506,7 @@ static void mac80211_hwsim_monitor_ack(struct ieee80211_channel *chan, | |||
498 | const u8 *addr) | 506 | const u8 *addr) |
499 | { | 507 | { |
500 | struct sk_buff *skb; | 508 | struct sk_buff *skb; |
501 | struct hwsim_radiotap_hdr *hdr; | 509 | struct hwsim_radiotap_ack_hdr *hdr; |
502 | u16 flags; | 510 | u16 flags; |
503 | struct ieee80211_hdr *hdr11; | 511 | struct ieee80211_hdr *hdr11; |
504 | 512 | ||
@@ -509,14 +517,14 @@ static void mac80211_hwsim_monitor_ack(struct ieee80211_channel *chan, | |||
509 | if (skb == NULL) | 517 | if (skb == NULL) |
510 | return; | 518 | return; |
511 | 519 | ||
512 | hdr = (struct hwsim_radiotap_hdr *) skb_put(skb, sizeof(*hdr)); | 520 | hdr = (struct hwsim_radiotap_ack_hdr *) skb_put(skb, sizeof(*hdr)); |
513 | hdr->hdr.it_version = PKTHDR_RADIOTAP_VERSION; | 521 | hdr->hdr.it_version = PKTHDR_RADIOTAP_VERSION; |
514 | hdr->hdr.it_pad = 0; | 522 | hdr->hdr.it_pad = 0; |
515 | hdr->hdr.it_len = cpu_to_le16(sizeof(*hdr)); | 523 | hdr->hdr.it_len = cpu_to_le16(sizeof(*hdr)); |
516 | hdr->hdr.it_present = cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) | | 524 | hdr->hdr.it_present = cpu_to_le32((1 << IEEE80211_RADIOTAP_FLAGS) | |
517 | (1 << IEEE80211_RADIOTAP_CHANNEL)); | 525 | (1 << IEEE80211_RADIOTAP_CHANNEL)); |
518 | hdr->rt_flags = 0; | 526 | hdr->rt_flags = 0; |
519 | hdr->rt_rate = 0; | 527 | hdr->pad = 0; |
520 | hdr->rt_channel = cpu_to_le16(chan->center_freq); | 528 | hdr->rt_channel = cpu_to_le16(chan->center_freq); |
521 | flags = IEEE80211_CHAN_2GHZ; | 529 | flags = IEEE80211_CHAN_2GHZ; |
522 | hdr->rt_chbitmask = cpu_to_le16(flags); | 530 | hdr->rt_chbitmask = cpu_to_le16(flags); |
@@ -1228,7 +1236,7 @@ static void mac80211_hwsim_bss_info_changed(struct ieee80211_hw *hw, | |||
1228 | HRTIMER_MODE_REL); | 1236 | HRTIMER_MODE_REL); |
1229 | } else if (!info->enable_beacon) { | 1237 | } else if (!info->enable_beacon) { |
1230 | unsigned int count = 0; | 1238 | unsigned int count = 0; |
1231 | ieee80211_iterate_active_interfaces( | 1239 | ieee80211_iterate_active_interfaces_atomic( |
1232 | data->hw, IEEE80211_IFACE_ITER_NORMAL, | 1240 | data->hw, IEEE80211_IFACE_ITER_NORMAL, |
1233 | mac80211_hwsim_bcn_en_iter, &count); | 1241 | mac80211_hwsim_bcn_en_iter, &count); |
1234 | wiphy_debug(hw->wiphy, " beaconing vifs remaining: %u", | 1242 | wiphy_debug(hw->wiphy, " beaconing vifs remaining: %u", |
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c index c8e029df770e..a09398fe9e2a 100644 --- a/drivers/net/wireless/mwifiex/sta_ioctl.c +++ b/drivers/net/wireless/mwifiex/sta_ioctl.c | |||
@@ -319,8 +319,8 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss, | |||
319 | if (bss_desc && bss_desc->ssid.ssid_len && | 319 | if (bss_desc && bss_desc->ssid.ssid_len && |
320 | (!mwifiex_ssid_cmp(&priv->curr_bss_params.bss_descriptor. | 320 | (!mwifiex_ssid_cmp(&priv->curr_bss_params.bss_descriptor. |
321 | ssid, &bss_desc->ssid))) { | 321 | ssid, &bss_desc->ssid))) { |
322 | kfree(bss_desc); | 322 | ret = 0; |
323 | return 0; | 323 | goto done; |
324 | } | 324 | } |
325 | 325 | ||
326 | /* Exit Adhoc mode first */ | 326 | /* Exit Adhoc mode first */ |
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c index 754069cbb756..f80e8c4c6bcd 100644 --- a/net/mac80211/cfg.c +++ b/net/mac80211/cfg.c | |||
@@ -1394,7 +1394,7 @@ static int sta_apply_parameters(struct ieee80211_local *local, | |||
1394 | changed |= | 1394 | changed |= |
1395 | ieee80211_mps_set_sta_local_pm(sta, | 1395 | ieee80211_mps_set_sta_local_pm(sta, |
1396 | params->local_pm); | 1396 | params->local_pm); |
1397 | ieee80211_bss_info_change_notify(sdata, changed); | 1397 | ieee80211_mbss_info_change_notify(sdata, changed); |
1398 | #endif | 1398 | #endif |
1399 | } | 1399 | } |
1400 | 1400 | ||
@@ -2514,8 +2514,7 @@ static int ieee80211_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev, | |||
2514 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); | 2514 | struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev); |
2515 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); | 2515 | struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr); |
2516 | 2516 | ||
2517 | if (sdata->vif.type != NL80211_IFTYPE_STATION && | 2517 | if (sdata->vif.type != NL80211_IFTYPE_STATION) |
2518 | sdata->vif.type != NL80211_IFTYPE_MESH_POINT) | ||
2519 | return -EOPNOTSUPP; | 2518 | return -EOPNOTSUPP; |
2520 | 2519 | ||
2521 | if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS)) | 2520 | if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_PS)) |
@@ -3156,9 +3155,17 @@ static int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev, | |||
3156 | params->chandef.chan->band) | 3155 | params->chandef.chan->band) |
3157 | return -EINVAL; | 3156 | return -EINVAL; |
3158 | 3157 | ||
3158 | ifmsh->chsw_init = true; | ||
3159 | if (!ifmsh->pre_value) | ||
3160 | ifmsh->pre_value = 1; | ||
3161 | else | ||
3162 | ifmsh->pre_value++; | ||
3163 | |||
3159 | err = ieee80211_mesh_csa_beacon(sdata, params, true); | 3164 | err = ieee80211_mesh_csa_beacon(sdata, params, true); |
3160 | if (err < 0) | 3165 | if (err < 0) { |
3166 | ifmsh->chsw_init = false; | ||
3161 | return err; | 3167 | return err; |
3168 | } | ||
3162 | break; | 3169 | break; |
3163 | #endif | 3170 | #endif |
3164 | default: | 3171 | default: |
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c index 0f1fb5db4bdb..2eda7b13124a 100644 --- a/net/mac80211/ibss.c +++ b/net/mac80211/ibss.c | |||
@@ -823,6 +823,10 @@ ieee80211_ibss_process_chanswitch(struct ieee80211_sub_if_data *sdata, | |||
823 | if (err) | 823 | if (err) |
824 | return false; | 824 | return false; |
825 | 825 | ||
826 | /* channel switch is not supported, disconnect */ | ||
827 | if (!(sdata->local->hw.wiphy->flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH)) | ||
828 | goto disconnect; | ||
829 | |||
826 | params.count = csa_ie.count; | 830 | params.count = csa_ie.count; |
827 | params.chandef = csa_ie.chandef; | 831 | params.chandef = csa_ie.chandef; |
828 | 832 | ||
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h index 32bae218d6e5..ed5bf8b4b5c2 100644 --- a/net/mac80211/ieee80211_i.h +++ b/net/mac80211/ieee80211_i.h | |||
@@ -1256,6 +1256,7 @@ struct ieee80211_csa_ie { | |||
1256 | u8 mode; | 1256 | u8 mode; |
1257 | u8 count; | 1257 | u8 count; |
1258 | u8 ttl; | 1258 | u8 ttl; |
1259 | u16 pre_value; | ||
1259 | }; | 1260 | }; |
1260 | 1261 | ||
1261 | /* Parsed Information Elements */ | 1262 | /* Parsed Information Elements */ |
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c index d226751ba63a..7aa9f9dea9df 100644 --- a/net/mac80211/iface.c +++ b/net/mac80211/iface.c | |||
@@ -1327,7 +1327,6 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata, | |||
1327 | sdata->vif.bss_conf.bssid = NULL; | 1327 | sdata->vif.bss_conf.bssid = NULL; |
1328 | break; | 1328 | break; |
1329 | case NL80211_IFTYPE_AP_VLAN: | 1329 | case NL80211_IFTYPE_AP_VLAN: |
1330 | break; | ||
1331 | case NL80211_IFTYPE_P2P_DEVICE: | 1330 | case NL80211_IFTYPE_P2P_DEVICE: |
1332 | sdata->vif.bss_conf.bssid = sdata->vif.addr; | 1331 | sdata->vif.bss_conf.bssid = sdata->vif.addr; |
1333 | break; | 1332 | break; |
diff --git a/net/mac80211/main.c b/net/mac80211/main.c index 8af75f0eed6d..fa34cd2344b9 100644 --- a/net/mac80211/main.c +++ b/net/mac80211/main.c | |||
@@ -995,6 +995,8 @@ int ieee80211_register_hw(struct ieee80211_hw *hw) | |||
995 | wiphy_debug(local->hw.wiphy, "Failed to initialize wep: %d\n", | 995 | wiphy_debug(local->hw.wiphy, "Failed to initialize wep: %d\n", |
996 | result); | 996 | result); |
997 | 997 | ||
998 | local->hw.conf.flags = IEEE80211_CONF_IDLE; | ||
999 | |||
998 | ieee80211_led_init(local); | 1000 | ieee80211_led_init(local); |
999 | 1001 | ||
1000 | rtnl_lock(); | 1002 | rtnl_lock(); |
@@ -1102,6 +1104,7 @@ void ieee80211_unregister_hw(struct ieee80211_hw *hw) | |||
1102 | 1104 | ||
1103 | cancel_work_sync(&local->restart_work); | 1105 | cancel_work_sync(&local->restart_work); |
1104 | cancel_work_sync(&local->reconfig_filter); | 1106 | cancel_work_sync(&local->reconfig_filter); |
1107 | flush_work(&local->sched_scan_stopped_work); | ||
1105 | 1108 | ||
1106 | ieee80211_clear_tx_pending(local); | 1109 | ieee80211_clear_tx_pending(local); |
1107 | rate_control_deinitialize(local); | 1110 | rate_control_deinitialize(local); |
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c index 330d1f71c0c9..89df62b2b689 100644 --- a/net/mac80211/mesh.c +++ b/net/mac80211/mesh.c | |||
@@ -940,14 +940,19 @@ ieee80211_mesh_process_chnswitch(struct ieee80211_sub_if_data *sdata, | |||
940 | params.chandef.chan->center_freq); | 940 | params.chandef.chan->center_freq); |
941 | 941 | ||
942 | params.block_tx = csa_ie.mode & WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT; | 942 | params.block_tx = csa_ie.mode & WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT; |
943 | if (beacon) | 943 | if (beacon) { |
944 | ifmsh->chsw_ttl = csa_ie.ttl - 1; | 944 | ifmsh->chsw_ttl = csa_ie.ttl - 1; |
945 | else | 945 | if (ifmsh->pre_value >= csa_ie.pre_value) |
946 | ifmsh->chsw_ttl = 0; | 946 | return false; |
947 | ifmsh->pre_value = csa_ie.pre_value; | ||
948 | } | ||
947 | 949 | ||
948 | if (ifmsh->chsw_ttl > 0) | 950 | if (ifmsh->chsw_ttl < ifmsh->mshcfg.dot11MeshTTL) { |
949 | if (ieee80211_mesh_csa_beacon(sdata, ¶ms, false) < 0) | 951 | if (ieee80211_mesh_csa_beacon(sdata, ¶ms, false) < 0) |
950 | return false; | 952 | return false; |
953 | } else { | ||
954 | return false; | ||
955 | } | ||
951 | 956 | ||
952 | sdata->csa_radar_required = params.radar_required; | 957 | sdata->csa_radar_required = params.radar_required; |
953 | 958 | ||
@@ -1160,7 +1165,6 @@ static int mesh_fwd_csa_frame(struct ieee80211_sub_if_data *sdata, | |||
1160 | offset_ttl = (len < 42) ? 7 : 10; | 1165 | offset_ttl = (len < 42) ? 7 : 10; |
1161 | *(pos + offset_ttl) -= 1; | 1166 | *(pos + offset_ttl) -= 1; |
1162 | *(pos + offset_ttl + 1) &= ~WLAN_EID_CHAN_SWITCH_PARAM_INITIATOR; | 1167 | *(pos + offset_ttl + 1) &= ~WLAN_EID_CHAN_SWITCH_PARAM_INITIATOR; |
1163 | sdata->u.mesh.chsw_ttl = *(pos + offset_ttl); | ||
1164 | 1168 | ||
1165 | memcpy(mgmt_fwd, mgmt, len); | 1169 | memcpy(mgmt_fwd, mgmt, len); |
1166 | eth_broadcast_addr(mgmt_fwd->da); | 1170 | eth_broadcast_addr(mgmt_fwd->da); |
@@ -1179,7 +1183,7 @@ static void mesh_rx_csa_frame(struct ieee80211_sub_if_data *sdata, | |||
1179 | u16 pre_value; | 1183 | u16 pre_value; |
1180 | bool fwd_csa = true; | 1184 | bool fwd_csa = true; |
1181 | size_t baselen; | 1185 | size_t baselen; |
1182 | u8 *pos, ttl; | 1186 | u8 *pos; |
1183 | 1187 | ||
1184 | if (mgmt->u.action.u.measurement.action_code != | 1188 | if (mgmt->u.action.u.measurement.action_code != |
1185 | WLAN_ACTION_SPCT_CHL_SWITCH) | 1189 | WLAN_ACTION_SPCT_CHL_SWITCH) |
@@ -1190,8 +1194,8 @@ static void mesh_rx_csa_frame(struct ieee80211_sub_if_data *sdata, | |||
1190 | u.action.u.chan_switch.variable); | 1194 | u.action.u.chan_switch.variable); |
1191 | ieee802_11_parse_elems(pos, len - baselen, false, &elems); | 1195 | ieee802_11_parse_elems(pos, len - baselen, false, &elems); |
1192 | 1196 | ||
1193 | ttl = elems.mesh_chansw_params_ie->mesh_ttl; | 1197 | ifmsh->chsw_ttl = elems.mesh_chansw_params_ie->mesh_ttl; |
1194 | if (!--ttl) | 1198 | if (!--ifmsh->chsw_ttl) |
1195 | fwd_csa = false; | 1199 | fwd_csa = false; |
1196 | 1200 | ||
1197 | pre_value = le16_to_cpu(elems.mesh_chansw_params_ie->mesh_pre_value); | 1201 | pre_value = le16_to_cpu(elems.mesh_chansw_params_ie->mesh_pre_value); |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index 33bcf8018d8e..900ead344f5b 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -1915,6 +1915,8 @@ static void ieee80211_mgd_probe_ap(struct ieee80211_sub_if_data *sdata, | |||
1915 | if (ifmgd->flags & IEEE80211_STA_CONNECTION_POLL) | 1915 | if (ifmgd->flags & IEEE80211_STA_CONNECTION_POLL) |
1916 | already = true; | 1916 | already = true; |
1917 | 1917 | ||
1918 | ifmgd->flags |= IEEE80211_STA_CONNECTION_POLL; | ||
1919 | |||
1918 | mutex_unlock(&sdata->local->mtx); | 1920 | mutex_unlock(&sdata->local->mtx); |
1919 | 1921 | ||
1920 | if (already) | 1922 | if (already) |
diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c index b91655a0d8f0..d2ed18d82fe1 100644 --- a/net/mac80211/rc80211_minstrel_ht.c +++ b/net/mac80211/rc80211_minstrel_ht.c | |||
@@ -226,7 +226,7 @@ minstrel_ht_calc_tp(struct minstrel_ht_sta *mi, int group, int rate) | |||
226 | nsecs = 1000 * mi->overhead / MINSTREL_TRUNC(mi->avg_ampdu_len); | 226 | nsecs = 1000 * mi->overhead / MINSTREL_TRUNC(mi->avg_ampdu_len); |
227 | 227 | ||
228 | nsecs += minstrel_mcs_groups[group].duration[rate]; | 228 | nsecs += minstrel_mcs_groups[group].duration[rate]; |
229 | tp = 1000000 * ((mr->probability * 1000) / nsecs); | 229 | tp = 1000000 * ((prob * 1000) / nsecs); |
230 | 230 | ||
231 | mr->cur_tp = MINSTREL_TRUNC(tp); | 231 | mr->cur_tp = MINSTREL_TRUNC(tp); |
232 | } | 232 | } |
@@ -277,13 +277,15 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi) | |||
277 | if (!(mg->supported & BIT(i))) | 277 | if (!(mg->supported & BIT(i))) |
278 | continue; | 278 | continue; |
279 | 279 | ||
280 | index = MCS_GROUP_RATES * group + i; | ||
281 | |||
280 | /* initialize rates selections starting indexes */ | 282 | /* initialize rates selections starting indexes */ |
281 | if (!mg_rates_valid) { | 283 | if (!mg_rates_valid) { |
282 | mg->max_tp_rate = mg->max_tp_rate2 = | 284 | mg->max_tp_rate = mg->max_tp_rate2 = |
283 | mg->max_prob_rate = i; | 285 | mg->max_prob_rate = i; |
284 | if (!mi_rates_valid) { | 286 | if (!mi_rates_valid) { |
285 | mi->max_tp_rate = mi->max_tp_rate2 = | 287 | mi->max_tp_rate = mi->max_tp_rate2 = |
286 | mi->max_prob_rate = i; | 288 | mi->max_prob_rate = index; |
287 | mi_rates_valid = true; | 289 | mi_rates_valid = true; |
288 | } | 290 | } |
289 | mg_rates_valid = true; | 291 | mg_rates_valid = true; |
@@ -291,7 +293,6 @@ minstrel_ht_update_stats(struct minstrel_priv *mp, struct minstrel_ht_sta *mi) | |||
291 | 293 | ||
292 | mr = &mg->rates[i]; | 294 | mr = &mg->rates[i]; |
293 | mr->retry_updated = false; | 295 | mr->retry_updated = false; |
294 | index = MCS_GROUP_RATES * group + i; | ||
295 | minstrel_calc_rate_ewma(mr); | 296 | minstrel_calc_rate_ewma(mr); |
296 | minstrel_ht_calc_tp(mi, group, i); | 297 | minstrel_ht_calc_tp(mi, group, i); |
297 | 298 | ||
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c index 30ac6099da06..2dfa75522733 100644 --- a/net/mac80211/rx.c +++ b/net/mac80211/rx.c | |||
@@ -924,7 +924,8 @@ static void ieee80211_rx_reorder_ampdu(struct ieee80211_rx_data *rx, | |||
924 | u16 sc; | 924 | u16 sc; |
925 | u8 tid, ack_policy; | 925 | u8 tid, ack_policy; |
926 | 926 | ||
927 | if (!ieee80211_is_data_qos(hdr->frame_control)) | 927 | if (!ieee80211_is_data_qos(hdr->frame_control) || |
928 | is_multicast_ether_addr(hdr->addr1)) | ||
928 | goto dont_reorder; | 929 | goto dont_reorder; |
929 | 930 | ||
930 | /* | 931 | /* |
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c index c22cbb57b49d..4d73c46df862 100644 --- a/net/mac80211/scan.c +++ b/net/mac80211/scan.c | |||
@@ -1088,6 +1088,6 @@ void ieee80211_sched_scan_stopped(struct ieee80211_hw *hw) | |||
1088 | 1088 | ||
1089 | trace_api_sched_scan_stopped(local); | 1089 | trace_api_sched_scan_stopped(local); |
1090 | 1090 | ||
1091 | ieee80211_queue_work(&local->hw, &local->sched_scan_stopped_work); | 1091 | schedule_work(&local->sched_scan_stopped_work); |
1092 | } | 1092 | } |
1093 | EXPORT_SYMBOL(ieee80211_sched_scan_stopped); | 1093 | EXPORT_SYMBOL(ieee80211_sched_scan_stopped); |
diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c index a40da20b32e0..6ab009070084 100644 --- a/net/mac80211/spectmgmt.c +++ b/net/mac80211/spectmgmt.c | |||
@@ -78,6 +78,8 @@ int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata, | |||
78 | if (elems->mesh_chansw_params_ie) { | 78 | if (elems->mesh_chansw_params_ie) { |
79 | csa_ie->ttl = elems->mesh_chansw_params_ie->mesh_ttl; | 79 | csa_ie->ttl = elems->mesh_chansw_params_ie->mesh_ttl; |
80 | csa_ie->mode = elems->mesh_chansw_params_ie->mesh_flags; | 80 | csa_ie->mode = elems->mesh_chansw_params_ie->mesh_flags; |
81 | csa_ie->pre_value = le16_to_cpu( | ||
82 | elems->mesh_chansw_params_ie->mesh_pre_value); | ||
81 | } | 83 | } |
82 | 84 | ||
83 | new_freq = ieee80211_channel_to_frequency(new_chan_no, new_band); | 85 | new_freq = ieee80211_channel_to_frequency(new_chan_no, new_band); |
diff --git a/net/mac80211/util.c b/net/mac80211/util.c index 06265d7f8cc3..875e172c001c 100644 --- a/net/mac80211/util.c +++ b/net/mac80211/util.c | |||
@@ -2301,17 +2301,15 @@ void ieee80211_dfs_radar_detected_work(struct work_struct *work) | |||
2301 | { | 2301 | { |
2302 | struct ieee80211_local *local = | 2302 | struct ieee80211_local *local = |
2303 | container_of(work, struct ieee80211_local, radar_detected_work); | 2303 | container_of(work, struct ieee80211_local, radar_detected_work); |
2304 | struct cfg80211_chan_def chandef; | 2304 | struct cfg80211_chan_def chandef = local->hw.conf.chandef; |
2305 | 2305 | ||
2306 | ieee80211_dfs_cac_cancel(local); | 2306 | ieee80211_dfs_cac_cancel(local); |
2307 | 2307 | ||
2308 | if (local->use_chanctx) | 2308 | if (local->use_chanctx) |
2309 | /* currently not handled */ | 2309 | /* currently not handled */ |
2310 | WARN_ON(1); | 2310 | WARN_ON(1); |
2311 | else { | 2311 | else |
2312 | chandef = local->hw.conf.chandef; | ||
2313 | cfg80211_radar_event(local->hw.wiphy, &chandef, GFP_KERNEL); | 2312 | cfg80211_radar_event(local->hw.wiphy, &chandef, GFP_KERNEL); |
2314 | } | ||
2315 | } | 2313 | } |
2316 | 2314 | ||
2317 | void ieee80211_radar_detected(struct ieee80211_hw *hw) | 2315 | void ieee80211_radar_detected(struct ieee80211_hw *hw) |
@@ -2481,13 +2479,8 @@ int ieee80211_send_action_csa(struct ieee80211_sub_if_data *sdata, | |||
2481 | WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT : 0x00; | 2479 | WLAN_EID_CHAN_SWITCH_PARAM_TX_RESTRICT : 0x00; |
2482 | put_unaligned_le16(WLAN_REASON_MESH_CHAN, pos); /* Reason Cd */ | 2480 | put_unaligned_le16(WLAN_REASON_MESH_CHAN, pos); /* Reason Cd */ |
2483 | pos += 2; | 2481 | pos += 2; |
2484 | if (!ifmsh->pre_value) | ||
2485 | ifmsh->pre_value = 1; | ||
2486 | else | ||
2487 | ifmsh->pre_value++; | ||
2488 | put_unaligned_le16(ifmsh->pre_value, pos);/* Precedence Value */ | 2482 | put_unaligned_le16(ifmsh->pre_value, pos);/* Precedence Value */ |
2489 | pos += 2; | 2483 | pos += 2; |
2490 | ifmsh->chsw_init = true; | ||
2491 | } | 2484 | } |
2492 | 2485 | ||
2493 | ieee80211_tx_skb(sdata, skb); | 2486 | ieee80211_tx_skb(sdata, skb); |
diff --git a/net/wireless/core.c b/net/wireless/core.c index fc968c861ee4..06db6eb5258a 100644 --- a/net/wireless/core.c +++ b/net/wireless/core.c | |||
@@ -449,6 +449,15 @@ int wiphy_register(struct wiphy *wiphy) | |||
449 | int i; | 449 | int i; |
450 | u16 ifmodes = wiphy->interface_modes; | 450 | u16 ifmodes = wiphy->interface_modes; |
451 | 451 | ||
452 | /* support for 5/10 MHz is broken due to nl80211 API mess - disable */ | ||
453 | wiphy->flags &= ~WIPHY_FLAG_SUPPORTS_5_10_MHZ; | ||
454 | |||
455 | /* | ||
456 | * There are major locking problems in nl80211/mac80211 for CSA, | ||
457 | * disable for all drivers until this has been reworked. | ||
458 | */ | ||
459 | wiphy->flags &= ~WIPHY_FLAG_HAS_CHANNEL_SWITCH; | ||
460 | |||
452 | #ifdef CONFIG_PM | 461 | #ifdef CONFIG_PM |
453 | if (WARN_ON(wiphy->wowlan && | 462 | if (WARN_ON(wiphy->wowlan && |
454 | (wiphy->wowlan->flags & WIPHY_WOWLAN_GTK_REKEY_FAILURE) && | 463 | (wiphy->wowlan->flags & WIPHY_WOWLAN_GTK_REKEY_FAILURE) && |
diff --git a/net/wireless/ibss.c b/net/wireless/ibss.c index f79105712949..730147ed8e65 100644 --- a/net/wireless/ibss.c +++ b/net/wireless/ibss.c | |||
@@ -262,7 +262,7 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev, | |||
262 | 262 | ||
263 | /* try to find an IBSS channel if none requested ... */ | 263 | /* try to find an IBSS channel if none requested ... */ |
264 | if (!wdev->wext.ibss.chandef.chan) { | 264 | if (!wdev->wext.ibss.chandef.chan) { |
265 | wdev->wext.ibss.chandef.width = NL80211_CHAN_WIDTH_20_NOHT; | 265 | struct ieee80211_channel *new_chan = NULL; |
266 | 266 | ||
267 | for (band = 0; band < IEEE80211_NUM_BANDS; band++) { | 267 | for (band = 0; band < IEEE80211_NUM_BANDS; band++) { |
268 | struct ieee80211_supported_band *sband; | 268 | struct ieee80211_supported_band *sband; |
@@ -278,18 +278,19 @@ int cfg80211_ibss_wext_join(struct cfg80211_registered_device *rdev, | |||
278 | continue; | 278 | continue; |
279 | if (chan->flags & IEEE80211_CHAN_DISABLED) | 279 | if (chan->flags & IEEE80211_CHAN_DISABLED) |
280 | continue; | 280 | continue; |
281 | wdev->wext.ibss.chandef.chan = chan; | 281 | new_chan = chan; |
282 | wdev->wext.ibss.chandef.center_freq1 = | ||
283 | chan->center_freq; | ||
284 | break; | 282 | break; |
285 | } | 283 | } |
286 | 284 | ||
287 | if (wdev->wext.ibss.chandef.chan) | 285 | if (new_chan) |
288 | break; | 286 | break; |
289 | } | 287 | } |
290 | 288 | ||
291 | if (!wdev->wext.ibss.chandef.chan) | 289 | if (!new_chan) |
292 | return -EINVAL; | 290 | return -EINVAL; |
291 | |||
292 | cfg80211_chandef_create(&wdev->wext.ibss.chandef, new_chan, | ||
293 | NL80211_CHAN_NO_HT); | ||
293 | } | 294 | } |
294 | 295 | ||
295 | /* don't join -- SSID is not there */ | 296 | /* don't join -- SSID is not there */ |
@@ -363,9 +364,8 @@ int cfg80211_ibss_wext_siwfreq(struct net_device *dev, | |||
363 | return err; | 364 | return err; |
364 | 365 | ||
365 | if (chan) { | 366 | if (chan) { |
366 | wdev->wext.ibss.chandef.chan = chan; | 367 | cfg80211_chandef_create(&wdev->wext.ibss.chandef, chan, |
367 | wdev->wext.ibss.chandef.width = NL80211_CHAN_WIDTH_20_NOHT; | 368 | NL80211_CHAN_NO_HT); |
368 | wdev->wext.ibss.chandef.center_freq1 = freq; | ||
369 | wdev->wext.ibss.channel_fixed = true; | 369 | wdev->wext.ibss.channel_fixed = true; |
370 | } else { | 370 | } else { |
371 | /* cfg80211_ibss_wext_join will pick one if needed */ | 371 | /* cfg80211_ibss_wext_join will pick one if needed */ |
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c index efaa23e562b4..a693f86e5970 100644 --- a/net/wireless/nl80211.c +++ b/net/wireless/nl80211.c | |||
@@ -2688,7 +2688,7 @@ static int nl80211_get_key(struct sk_buff *skb, struct genl_info *info) | |||
2688 | hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0, | 2688 | hdr = nl80211hdr_put(msg, info->snd_portid, info->snd_seq, 0, |
2689 | NL80211_CMD_NEW_KEY); | 2689 | NL80211_CMD_NEW_KEY); |
2690 | if (!hdr) | 2690 | if (!hdr) |
2691 | return -ENOBUFS; | 2691 | goto nla_put_failure; |
2692 | 2692 | ||
2693 | cookie.msg = msg; | 2693 | cookie.msg = msg; |
2694 | cookie.idx = key_idx; | 2694 | cookie.idx = key_idx; |
@@ -5365,6 +5365,10 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info) | |||
5365 | err = -EINVAL; | 5365 | err = -EINVAL; |
5366 | goto out_free; | 5366 | goto out_free; |
5367 | } | 5367 | } |
5368 | |||
5369 | if (!wiphy->bands[band]) | ||
5370 | continue; | ||
5371 | |||
5368 | err = ieee80211_get_ratemask(wiphy->bands[band], | 5372 | err = ieee80211_get_ratemask(wiphy->bands[band], |
5369 | nla_data(attr), | 5373 | nla_data(attr), |
5370 | nla_len(attr), | 5374 | nla_len(attr), |
@@ -9649,8 +9653,9 @@ static int nl80211_add_scan_req(struct sk_buff *msg, | |||
9649 | nla_put(msg, NL80211_ATTR_IE, req->ie_len, req->ie)) | 9653 | nla_put(msg, NL80211_ATTR_IE, req->ie_len, req->ie)) |
9650 | goto nla_put_failure; | 9654 | goto nla_put_failure; |
9651 | 9655 | ||
9652 | if (req->flags) | 9656 | if (req->flags && |
9653 | nla_put_u32(msg, NL80211_ATTR_SCAN_FLAGS, req->flags); | 9657 | nla_put_u32(msg, NL80211_ATTR_SCAN_FLAGS, req->flags)) |
9658 | goto nla_put_failure; | ||
9654 | 9659 | ||
9655 | return 0; | 9660 | return 0; |
9656 | nla_put_failure: | 9661 | nla_put_failure: |
@@ -11106,6 +11111,8 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev, | |||
11106 | struct nlattr *reasons; | 11111 | struct nlattr *reasons; |
11107 | 11112 | ||
11108 | reasons = nla_nest_start(msg, NL80211_ATTR_WOWLAN_TRIGGERS); | 11113 | reasons = nla_nest_start(msg, NL80211_ATTR_WOWLAN_TRIGGERS); |
11114 | if (!reasons) | ||
11115 | goto free_msg; | ||
11109 | 11116 | ||
11110 | if (wakeup->disconnect && | 11117 | if (wakeup->disconnect && |
11111 | nla_put_flag(msg, NL80211_WOWLAN_TRIG_DISCONNECT)) | 11118 | nla_put_flag(msg, NL80211_WOWLAN_TRIG_DISCONNECT)) |
@@ -11131,16 +11138,18 @@ void cfg80211_report_wowlan_wakeup(struct wireless_dev *wdev, | |||
11131 | wakeup->pattern_idx)) | 11138 | wakeup->pattern_idx)) |
11132 | goto free_msg; | 11139 | goto free_msg; |
11133 | 11140 | ||
11134 | if (wakeup->tcp_match) | 11141 | if (wakeup->tcp_match && |
11135 | nla_put_flag(msg, NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH); | 11142 | nla_put_flag(msg, NL80211_WOWLAN_TRIG_WAKEUP_TCP_MATCH)) |
11143 | goto free_msg; | ||
11136 | 11144 | ||
11137 | if (wakeup->tcp_connlost) | 11145 | if (wakeup->tcp_connlost && |
11138 | nla_put_flag(msg, | 11146 | nla_put_flag(msg, NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST)) |
11139 | NL80211_WOWLAN_TRIG_WAKEUP_TCP_CONNLOST); | 11147 | goto free_msg; |
11140 | 11148 | ||
11141 | if (wakeup->tcp_nomoretokens) | 11149 | if (wakeup->tcp_nomoretokens && |
11142 | nla_put_flag(msg, | 11150 | nla_put_flag(msg, |
11143 | NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS); | 11151 | NL80211_WOWLAN_TRIG_WAKEUP_TCP_NOMORETOKENS)) |
11152 | goto free_msg; | ||
11144 | 11153 | ||
11145 | if (wakeup->packet) { | 11154 | if (wakeup->packet) { |
11146 | u32 pkt_attr = NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211; | 11155 | u32 pkt_attr = NL80211_WOWLAN_TRIG_WAKEUP_PKT_80211; |
@@ -11276,24 +11285,29 @@ void cfg80211_ft_event(struct net_device *netdev, | |||
11276 | return; | 11285 | return; |
11277 | 11286 | ||
11278 | hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_FT_EVENT); | 11287 | hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_FT_EVENT); |
11279 | if (!hdr) { | 11288 | if (!hdr) |
11280 | nlmsg_free(msg); | 11289 | goto out; |
11281 | return; | ||
11282 | } | ||
11283 | 11290 | ||
11284 | nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx); | 11291 | if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) || |
11285 | nla_put_u32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex); | 11292 | nla_put_u32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex) || |
11286 | nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, ft_event->target_ap); | 11293 | nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, ft_event->target_ap)) |
11287 | if (ft_event->ies) | 11294 | goto out; |
11288 | nla_put(msg, NL80211_ATTR_IE, ft_event->ies_len, ft_event->ies); | 11295 | |
11289 | if (ft_event->ric_ies) | 11296 | if (ft_event->ies && |
11290 | nla_put(msg, NL80211_ATTR_IE_RIC, ft_event->ric_ies_len, | 11297 | nla_put(msg, NL80211_ATTR_IE, ft_event->ies_len, ft_event->ies)) |
11291 | ft_event->ric_ies); | 11298 | goto out; |
11299 | if (ft_event->ric_ies && | ||
11300 | nla_put(msg, NL80211_ATTR_IE_RIC, ft_event->ric_ies_len, | ||
11301 | ft_event->ric_ies)) | ||
11302 | goto out; | ||
11292 | 11303 | ||
11293 | genlmsg_end(msg, hdr); | 11304 | genlmsg_end(msg, hdr); |
11294 | 11305 | ||
11295 | genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, | 11306 | genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0, |
11296 | NL80211_MCGRP_MLME, GFP_KERNEL); | 11307 | NL80211_MCGRP_MLME, GFP_KERNEL); |
11308 | return; | ||
11309 | out: | ||
11310 | nlmsg_free(msg); | ||
11297 | } | 11311 | } |
11298 | EXPORT_SYMBOL(cfg80211_ft_event); | 11312 | EXPORT_SYMBOL(cfg80211_ft_event); |
11299 | 11313 | ||