diff options
Diffstat (limited to 'drivers/net/wireless/ath/carl9170/fw.c')
-rw-r--r-- | drivers/net/wireless/ath/carl9170/fw.c | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/drivers/net/wireless/ath/carl9170/fw.c b/drivers/net/wireless/ath/carl9170/fw.c index 63fd9af3fd39..47d5c2e910ad 100644 --- a/drivers/net/wireless/ath/carl9170/fw.c +++ b/drivers/net/wireless/ath/carl9170/fw.c | |||
@@ -215,6 +215,24 @@ static int carl9170_fw_tx_sequence(struct ar9170 *ar) | |||
215 | return 0; | 215 | return 0; |
216 | } | 216 | } |
217 | 217 | ||
218 | static void carl9170_fw_set_if_combinations(struct ar9170 *ar, | ||
219 | u16 if_comb_types) | ||
220 | { | ||
221 | if (ar->fw.vif_num < 2) | ||
222 | return; | ||
223 | |||
224 | ar->if_comb_limits[0].max = ar->fw.vif_num; | ||
225 | ar->if_comb_limits[0].types = if_comb_types; | ||
226 | |||
227 | ar->if_combs[0].num_different_channels = 1; | ||
228 | ar->if_combs[0].max_interfaces = ar->fw.vif_num; | ||
229 | ar->if_combs[0].limits = ar->if_comb_limits; | ||
230 | ar->if_combs[0].n_limits = ARRAY_SIZE(ar->if_comb_limits); | ||
231 | |||
232 | ar->hw->wiphy->iface_combinations = ar->if_combs; | ||
233 | ar->hw->wiphy->n_iface_combinations = ARRAY_SIZE(ar->if_combs); | ||
234 | } | ||
235 | |||
218 | static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len) | 236 | static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len) |
219 | { | 237 | { |
220 | const struct carl9170fw_otus_desc *otus_desc; | 238 | const struct carl9170fw_otus_desc *otus_desc; |
@@ -264,7 +282,7 @@ static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len) | |||
264 | if (!SUPP(CARL9170FW_COMMAND_CAM)) { | 282 | if (!SUPP(CARL9170FW_COMMAND_CAM)) { |
265 | dev_info(&ar->udev->dev, "crypto offloading is disabled " | 283 | dev_info(&ar->udev->dev, "crypto offloading is disabled " |
266 | "by firmware.\n"); | 284 | "by firmware.\n"); |
267 | ar->disable_offload = true; | 285 | ar->fw.disable_offload_fw = true; |
268 | } | 286 | } |
269 | 287 | ||
270 | if (SUPP(CARL9170FW_PSM) && SUPP(CARL9170FW_FIXED_5GHZ_PSM)) | 288 | if (SUPP(CARL9170FW_PSM) && SUPP(CARL9170FW_FIXED_5GHZ_PSM)) |
@@ -345,20 +363,15 @@ static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len) | |||
345 | } | 363 | } |
346 | } | 364 | } |
347 | 365 | ||
348 | ar->if_comb_limits[0].max = ar->fw.vif_num; | 366 | carl9170_fw_set_if_combinations(ar, if_comb_types); |
349 | ar->if_comb_limits[0].types = if_comb_types; | ||
350 | |||
351 | ar->if_combs[0].num_different_channels = 1; | ||
352 | ar->if_combs[0].max_interfaces = ar->fw.vif_num; | ||
353 | ar->if_combs[0].limits = ar->if_comb_limits; | ||
354 | ar->if_combs[0].n_limits = ARRAY_SIZE(ar->if_comb_limits); | ||
355 | |||
356 | ar->hw->wiphy->iface_combinations = ar->if_combs; | ||
357 | ar->hw->wiphy->n_iface_combinations = ARRAY_SIZE(ar->if_combs); | ||
358 | 367 | ||
359 | ar->hw->wiphy->interface_modes |= if_comb_types; | 368 | ar->hw->wiphy->interface_modes |= if_comb_types; |
360 | 369 | ||
361 | ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL; | 370 | ar->hw->wiphy->flags &= ~WIPHY_FLAG_PS_ON_BY_DEFAULT; |
371 | |||
372 | /* As IBSS Encryption is software-based, IBSS RSN is supported. */ | ||
373 | ar->hw->wiphy->flags |= WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL | | ||
374 | WIPHY_FLAG_IBSS_RSN | WIPHY_FLAG_SUPPORTS_TDLS; | ||
362 | 375 | ||
363 | #undef SUPPORTED | 376 | #undef SUPPORTED |
364 | return carl9170_fw_tx_sequence(ar); | 377 | return carl9170_fw_tx_sequence(ar); |