File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
drivers/net/wireless/intel/iwlwifi/mvm Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -269,17 +269,18 @@ static u32 iwl_mvm_get_tx_rate(struct iwl_mvm *mvm,
269
269
u8 rate_plcp ;
270
270
u32 rate_flags = 0 ;
271
271
bool is_cck ;
272
- struct iwl_mvm_sta * mvmsta = iwl_mvm_sta_from_mac80211 (sta );
273
272
274
273
/* info->control is only relevant for non HW rate control */
275
274
if (!ieee80211_hw_check (mvm -> hw , HAS_RATE_CONTROL )) {
275
+ struct iwl_mvm_sta * mvmsta = iwl_mvm_sta_from_mac80211 (sta );
276
+
276
277
/* HT rate doesn't make sense for a non data frame */
277
278
WARN_ONCE (info -> control .rates [0 ].flags & IEEE80211_TX_RC_MCS &&
278
279
!ieee80211_is_data (fc ),
279
280
"Got a HT rate (flags:0x%x/mcs:%d/fc:0x%x/state:%d) for a non data frame\n" ,
280
281
info -> control .rates [0 ].flags ,
281
282
info -> control .rates [0 ].idx ,
282
- le16_to_cpu (fc ), mvmsta -> sta_state );
283
+ le16_to_cpu (fc ), sta ? mvmsta -> sta_state : -1 );
283
284
284
285
rate_idx = info -> control .rates [0 ].idx ;
285
286
}
You can’t perform that action at this time.
0 commit comments