@@ -293,7 +293,6 @@ static int ieee80211_tx_radiotap_len(struct ieee80211_tx_info *info,
293
293
294
294
static void
295
295
ieee80211_add_tx_radiotap_header (struct ieee80211_local * local ,
296
- struct ieee80211_supported_band * sband ,
297
296
struct sk_buff * skb , int retry_count ,
298
297
int rtap_len , int shift ,
299
298
struct ieee80211_tx_status * status )
@@ -336,9 +335,13 @@ ieee80211_add_tx_radiotap_header(struct ieee80211_local *local,
336
335
legacy_rate = status_rate -> rate_idx .legacy ;
337
336
} else if (info -> status .rates [0 ].idx >= 0 &&
338
337
!(info -> status .rates [0 ].flags & (IEEE80211_TX_RC_MCS |
339
- IEEE80211_TX_RC_VHT_MCS )))
338
+ IEEE80211_TX_RC_VHT_MCS ))) {
339
+ struct ieee80211_supported_band * sband ;
340
+
341
+ sband = local -> hw .wiphy -> bands [info -> band ];
340
342
legacy_rate =
341
343
sband -> bitrates [info -> status .rates [0 ].idx ].bitrate ;
344
+ }
342
345
343
346
if (legacy_rate ) {
344
347
rthdr -> it_present |= cpu_to_le32 (BIT (IEEE80211_RADIOTAP_RATE ));
@@ -845,7 +848,6 @@ static int ieee80211_tx_get_rates(struct ieee80211_hw *hw,
845
848
}
846
849
847
850
void ieee80211_tx_monitor (struct ieee80211_local * local , struct sk_buff * skb ,
848
- struct ieee80211_supported_band * sband ,
849
851
int retry_count , int shift , bool send_to_cooked ,
850
852
struct ieee80211_tx_status * status )
851
853
{
@@ -862,7 +864,7 @@ void ieee80211_tx_monitor(struct ieee80211_local *local, struct sk_buff *skb,
862
864
dev_kfree_skb (skb );
863
865
return ;
864
866
}
865
- ieee80211_add_tx_radiotap_header (local , sband , skb , retry_count ,
867
+ ieee80211_add_tx_radiotap_header (local , skb , retry_count ,
866
868
rtap_len , shift , status );
867
869
868
870
/* XXX: is this sufficient for BPF? */
@@ -912,15 +914,13 @@ static void __ieee80211_tx_status(struct ieee80211_hw *hw,
912
914
struct ieee80211_tx_info * info = status -> info ;
913
915
struct sta_info * sta ;
914
916
__le16 fc ;
915
- struct ieee80211_supported_band * sband ;
916
917
bool send_to_cooked ;
917
918
bool acked ;
918
919
bool noack_success ;
919
920
struct ieee80211_bar * bar ;
920
921
int shift = 0 ;
921
922
int tid = IEEE80211_NUM_TIDS ;
922
923
923
- sband = local -> hw .wiphy -> bands [info -> band ];
924
924
fc = hdr -> frame_control ;
925
925
926
926
if (status -> sta ) {
@@ -1082,7 +1082,7 @@ static void __ieee80211_tx_status(struct ieee80211_hw *hw,
1082
1082
}
1083
1083
1084
1084
/* send to monitor interfaces */
1085
- ieee80211_tx_monitor (local , skb , sband , retry_count , shift ,
1085
+ ieee80211_tx_monitor (local , skb , retry_count , shift ,
1086
1086
send_to_cooked , status );
1087
1087
}
1088
1088
@@ -1114,7 +1114,6 @@ void ieee80211_tx_status_ext(struct ieee80211_hw *hw,
1114
1114
struct ieee80211_tx_info * info = status -> info ;
1115
1115
struct ieee80211_sta * pubsta = status -> sta ;
1116
1116
struct sk_buff * skb = status -> skb ;
1117
- struct ieee80211_supported_band * sband ;
1118
1117
struct sta_info * sta = NULL ;
1119
1118
int rates_idx , retry_count ;
1120
1119
bool acked , noack_success , ack_signal_valid ;
@@ -1145,8 +1144,6 @@ void ieee80211_tx_status_ext(struct ieee80211_hw *hw,
1145
1144
1146
1145
rates_idx = ieee80211_tx_get_rates (hw , info , & retry_count );
1147
1146
1148
- sband = hw -> wiphy -> bands [info -> band ];
1149
-
1150
1147
acked = !!(info -> flags & IEEE80211_TX_STAT_ACK );
1151
1148
noack_success = !!(info -> flags & IEEE80211_TX_STAT_NOACK_TRANSMITTED );
1152
1149
ack_signal_valid =
@@ -1201,7 +1198,7 @@ void ieee80211_tx_status_ext(struct ieee80211_hw *hw,
1201
1198
}
1202
1199
}
1203
1200
1204
- rate_control_tx_status (local , sband , status );
1201
+ rate_control_tx_status (local , status );
1205
1202
if (ieee80211_vif_is_mesh (& sta -> sdata -> vif ))
1206
1203
ieee80211s_update_metric (local , sta , status );
1207
1204
}
@@ -1239,14 +1236,13 @@ void ieee80211_tx_rate_update(struct ieee80211_hw *hw,
1239
1236
struct ieee80211_tx_info * info )
1240
1237
{
1241
1238
struct ieee80211_local * local = hw_to_local (hw );
1242
- struct ieee80211_supported_band * sband = hw -> wiphy -> bands [info -> band ];
1243
1239
struct sta_info * sta = container_of (pubsta , struct sta_info , sta );
1244
1240
struct ieee80211_tx_status status = {
1245
1241
.info = info ,
1246
1242
.sta = pubsta ,
1247
1243
};
1248
1244
1249
- rate_control_tx_status (local , sband , & status );
1245
+ rate_control_tx_status (local , & status );
1250
1246
1251
1247
if (ieee80211_hw_check (& local -> hw , HAS_RATE_CONTROL ))
1252
1248
sta -> deflink .tx_stats .last_rate = info -> status .rates [0 ];
0 commit comments