iwlwifi: move an ieee80211_get_tid() call
Introduce a local change. It seems ieee80211_get_tid() does not deal with non-dataqos packets unlike net80211's ieee80211_gettid(). Gernally all calls in Linux drivers to ieee80211_get_tid() seem to be proceeded by an ieee80211_is_data_qos() check. Moving the ieee80211_get_tid() has no difference in the result, but (a) saves us the call if we do not need it due to an earlier return, and (b) allows us to put an assert into the LinuxKPI ieee80211_get_tid() implementation to avoid accidentally returning random frame header data in case of a missing earlier ieee80211_is_data_qos() check in (future/ other) drivers. Sponsored by: The FreeBSD Foundation MFC after: 3 days
This commit is contained in:
parent
4012ef7754
commit
26a3694833
@ -963,7 +963,11 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm,
|
||||
bool amsdu = desc->mac_flags2 & IWL_RX_MPDU_MFLG2_AMSDU;
|
||||
bool last_subframe =
|
||||
desc->amsdu_info & IWL_RX_MPDU_AMSDU_LAST_SUBFRAME;
|
||||
#if defined(__linux__)
|
||||
u8 tid = ieee80211_get_tid(hdr);
|
||||
#elif defined(__FreeBSD__)
|
||||
u8 tid;
|
||||
#endif
|
||||
u8 sub_frame_idx = desc->amsdu_info &
|
||||
IWL_RX_MPDU_AMSDU_SUBFRAME_IDX_MASK;
|
||||
struct iwl_mvm_reorder_buf_entry *entries;
|
||||
@ -1008,6 +1012,9 @@ static bool iwl_mvm_reorder(struct iwl_mvm *mvm,
|
||||
return false;
|
||||
}
|
||||
|
||||
#if defined(__FreeBSD__)
|
||||
tid = ieee80211_get_tid(hdr);
|
||||
#endif
|
||||
if (WARN(tid != baid_data->tid || mvm_sta->sta_id != baid_data->sta_id,
|
||||
"baid 0x%x is mapped to sta:%d tid:%d, but was received for sta:%d tid:%d\n",
|
||||
baid, baid_data->sta_id, baid_data->tid, mvm_sta->sta_id,
|
||||
|
Loading…
Reference in New Issue
Block a user