summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorLuciano Coelho <luciano.coelho@intel.com>2013-11-19 18:05:56 +0400
committerEmmanuel Grumbach <emmanuel.grumbach@intel.com>2013-11-26 01:00:21 +0400
commit3c5da7eefce5835acfc73ebd0a4f961cdae4ae67 (patch)
tree1a878a602824f3b58cdda3ea4ddaa13d5875b3a4 /drivers/net
parentcfa88893709fbf27b62c6b0cf99c72265b9a21ca (diff)
downloadlinux-3c5da7eefce5835acfc73ebd0a4f961cdae4ae67.tar.xz
iwlwifi: mvm: use a cast to calculate the last seqno from the next one
If the next seqno returned by the firmware is 0, we return an error (-16) in the iwl_mvm_get_last_nonqos_seq() function. This is because we return an integer and don't use any casting when calculating the last seqno from the one we received. Fix this by using a cast to u16 when doing the calculation, so we return 0xfff0, as we should. Signed-off-by: Luciano Coelho <luciano.coelho@intel.com> Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/wireless/iwlwifi/mvm/d3.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c
index 352fc0bea157..b9b81e881dd0 100644
--- a/drivers/net/wireless/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/iwlwifi/mvm/d3.c
@@ -895,7 +895,7 @@ static int iwl_mvm_get_last_nonqos_seq(struct iwl_mvm *mvm,
/* new API returns next, not last-used seqno */
if (mvm->fw->ucode_capa.flags &
IWL_UCODE_TLV_FLAGS_D3_CONTINUITY_API)
- err -= 0x10;
+ err = (u16) (err - 0x10);
}
iwl_free_resp(&cmd);