diff options
author | Johannes Berg <johannes.berg@intel.com> | 2014-01-08 16:16:33 +0400 |
---|---|---|
committer | Emmanuel Grumbach <emmanuel.grumbach@intel.com> | 2014-01-14 00:17:20 +0400 |
commit | 65b30348dbf9b529901b5c2b62dca6cad9017a2a (patch) | |
tree | e5a8c4704d58a8ff74150e099e57a46f10860c09 /drivers/net/wireless/iwlwifi/dvm/mac80211.c | |
parent | e36b766d0c674c9dc73a2ace7aa37aea78afa233 (diff) | |
download | linux-65b30348dbf9b529901b5c2b62dca6cad9017a2a.tar.xz |
iwlwifi: add inline helper for packet lengths
Add an inline helper function for getting an RX packet's
length or payload length and use it throughout the code
(most of which I did using an spatch.)
While at it, adjust some code, and remove a bogus comment
from the dvm calibration code.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Reviewed-by: Eran Harary <eran.harary@intel.com>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Diffstat (limited to 'drivers/net/wireless/iwlwifi/dvm/mac80211.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/dvm/mac80211.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c index 8a3286a2bb31..e2ba4a725b34 100644 --- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c +++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c @@ -407,9 +407,8 @@ static bool iwl_resume_status_fn(struct iwl_notif_wait_data *notif_wait, { struct iwl_resume_data *resume_data = data; struct iwl_priv *priv = resume_data->priv; - u32 len = le32_to_cpu(pkt->len_n_flags) & FH_RSCSR_FRAME_SIZE_MSK; - if (len - 4 != sizeof(*resume_data->cmd)) { + if (iwl_rx_packet_payload_len(pkt) != sizeof(*resume_data->cmd)) { IWL_ERR(priv, "rx wrong size data\n"); return true; } |