diff options
author | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-01-14 01:45:26 -0500 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-02-03 15:23:33 -0500 |
commit | c4d83271f47f71c9d46793cd224a2223fc36f526 (patch) | |
tree | ee2288514667438b7b8c5e39165e6a2d61c842fe /drivers/net/wireless/iwlwifi/mvm | |
parent | f327b04c4240cc6dbce698bea8f8e14db7fc3a8a (diff) |
iwlwifi: mvm: check ARRAY_SIZE(mvm->fw_id_to_mac_id) = IWL_MVM_STATION_COUNT
Since we use IWL_MVM_STATION_COUNT all over the driver, we
need to make sure that it is the right constant to look at.
Reviewed-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/mvm')
-rw-r--r-- | drivers/net/wireless/iwlwifi/mvm/ops.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/ops.c b/drivers/net/wireless/iwlwifi/mvm/ops.c index f38ed9fb356a..5e4d56ed88a4 100644 --- a/drivers/net/wireless/iwlwifi/mvm/ops.c +++ b/drivers/net/wireless/iwlwifi/mvm/ops.c | |||
@@ -338,6 +338,13 @@ iwl_op_mode_mvm_start(struct iwl_trans *trans, const struct iwl_cfg *cfg, | |||
338 | }; | 338 | }; |
339 | int err, scan_size; | 339 | int err, scan_size; |
340 | 340 | ||
341 | /* | ||
342 | * We use IWL_MVM_STATION_COUNT to check the validity of the station | ||
343 | * index all over the driver - check that its value corresponds to the | ||
344 | * array size. | ||
345 | */ | ||
346 | BUILD_BUG_ON(ARRAY_SIZE(mvm->fw_id_to_mac_id) != IWL_MVM_STATION_COUNT); | ||
347 | |||
341 | /******************************** | 348 | /******************************** |
342 | * 1. Allocating and configuring HW data | 349 | * 1. Allocating and configuring HW data |
343 | ********************************/ | 350 | ********************************/ |