iwlwifi: mvm: fix a range check in debugfs code
authorDan Carpenter <dan.carpenter@oracle.com>
Mon, 10 Aug 2015 21:45:03 +0000 (00:45 +0300)
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>
Sun, 16 Aug 2015 07:28:08 +0000 (10:28 +0300)
commit5b9d47cdde1aacaac9b9dcefe44ee3493dc5fd87
treef70b63615fa47c92343bf48804508796f09b7fee
parent3cd6e2f768851a760c072f0f84b9688b1755d24d
iwlwifi: mvm: fix a range check in debugfs code

The &mvm->tof_data.range_req.ap[] array has IWL_MVM_TOF_MAX_APS elements
so the check should be >= instead of >.  Also the test can underflow so
I have changed "i" to unsigned.

Fixes: ce7929186a39 ('wlwifi: mvm: add basic Time of Flight (802.11mc FTM) support')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
drivers/net/wireless/iwlwifi/mvm/debugfs-vif.c