iwlwifi: check that we have enough bits to track the TX queues
authorEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Wed, 13 Jun 2012 16:37:06 +0000 (19:37 +0300)
committerJohannes Berg <johannes.berg@intel.com>
Mon, 18 Jun 2012 08:45:49 +0000 (10:45 +0200)
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
drivers/net/wireless/iwlwifi/dvm/main.c

index e620af3..bba3edf 100644 (file)
@@ -1352,6 +1352,9 @@ static struct iwl_op_mode *iwl_op_mode_dvm_start(struct iwl_trans *trans,
                trans_cfg.queue_watchdog_timeout = IWL_WATCHDOG_DISABLED;
        trans_cfg.command_names = iwl_dvm_cmd_strings;
 
+       WARN_ON(sizeof(priv->transport_queue_stop) * BITS_PER_BYTE <
+               priv->cfg->base_params->num_of_queues);
+
        ucode_flags = fw->ucode_capa.flags;
 
 #ifndef CONFIG_IWLWIFI_P2P