Skip to content

Commit

Permalink
iwlwifi: mvm: use a cast to calculate the last seqno from the next one
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Luciano Coelho authored and Emmanuel Grumbach committed Nov 25, 2013
1 parent cfa8889 commit 3c5da7e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/wireless/iwlwifi/mvm/d3.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 3c5da7e

Please sign in to comment.