* [bug report] mac80211: add 802.11 encapsulation offloading support
@ 2020-01-07 10:11 Dan Carpenter
0 siblings, 0 replies; only message in thread
From: Dan Carpenter @ 2020-01-07 10:11 UTC (permalink / raw)
To: john; +Cc: linux-wireless
Hello John Crispin,
The patch 50ff477a8639: "mac80211: add 802.11 encapsulation
offloading support" from Nov 25, 2019, leads to the following static
checker warning:
net/mac80211/status.c:1227 ieee80211_tx_status_8023()
warn: 'sta' can also be NULL
net/mac80211/status.c
1201 void ieee80211_tx_status_8023(struct ieee80211_hw *hw,
1202 struct ieee80211_vif *vif,
1203 struct sk_buff *skb)
1204 {
1205 struct ieee80211_local *local = hw_to_local(hw);
1206 struct ieee80211_sub_if_data *sdata;
1207 struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
1208 struct sta_info *sta;
1209 int retry_count;
1210 int rates_idx;
1211 bool acked;
1212
1213 sdata = vif_to_sdata(vif);
1214
1215 acked = info->flags & IEEE80211_TX_STAT_ACK;
1216 rates_idx = ieee80211_tx_get_rates(hw, info, &retry_count);
1217
1218 rcu_read_lock();
1219
1220 if (ieee80211_lookup_ra_sta(sdata, skb, &sta))
^^^^
This can be NULL for NL80211_IFTYPE_MESH_POINT (possibly that doesn't
matter here, I don't know the code).
1221 goto counters_update;
1222
1223 if (IS_ERR(sta))
1224 goto counters_update;
1225
1226 if (!acked)
1227 sta->status_stats.retry_failed++;
1228
1229 if (rates_idx != -1)
1230 sta->tx_stats.last_rate = info->status.rates[rates_idx];
^^^^^^^^^^^^^^^^^^^^^^^
Smatch warning.
1231
1232 sta->status_stats.retry_count += retry_count;
1233
regards,
dan carpenter
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-01-07 10:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-07 10:11 [bug report] mac80211: add 802.11 encapsulation offloading support Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox