iwlwifi: mvm: change sta_id to u8
authorSharon Dvir <sharon.dvir@intel.com>
Sun, 21 May 2017 09:09:49 +0000 (12:09 +0300)
committerLuca Coelho <luciano.coelho@intel.com>
Thu, 29 Jun 2017 10:26:24 +0000 (13:26 +0300)
The sta_id variable is used as an index in an array, should be unsigned.
Found by Klocwork.

Fixes: 9f9af3d7d303 ("iwlwifi: mvm: re-aggregate shared queue after unsharing")
Signed-off-by: Sharon Dvir <sharon.dvir@intel.com>
Signed-off-by: Luca Coelho <luciano.coelho@intel.com>
drivers/net/wireless/intel/iwlwifi/mvm/sta.c

index 02f35a929606138d16817e79804ea2ecb317e678..9ec4279665330d86ec900e3df12c4de53e813570 100644 (file)
@@ -398,7 +398,7 @@ static int iwl_mvm_get_queue_agg_tids(struct iwl_mvm *mvm, int queue)
        struct iwl_mvm_sta *mvmsta;
        unsigned long tid_bitmap;
        unsigned long agg_tids = 0;
-       s8 sta_id;
+       u8 sta_id;
        int tid;
 
        lockdep_assert_held(&mvm->mutex);
@@ -989,7 +989,7 @@ static void iwl_mvm_unshare_queue(struct iwl_mvm *mvm, int queue)
 {
        struct ieee80211_sta *sta;
        struct iwl_mvm_sta *mvmsta;
-       s8 sta_id;
+       u8 sta_id;
        int tid = -1;
        unsigned long tid_bitmap;
        unsigned int wdg_timeout;