hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/net/mac80211/sta_info.c
....@@ -1040,7 +1040,8 @@
10401040 list_del_rcu(&sta->list);
10411041 sta->removed = true;
10421042
1043
- drv_sta_pre_rcu_remove(local, sta->sdata, sta);
1043
+ if (sta->uploaded)
1044
+ drv_sta_pre_rcu_remove(local, sta->sdata, sta);
10441045
10451046 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN &&
10461047 rcu_access_pointer(sdata->u.vlan.sta) == sta)
....@@ -2159,7 +2160,7 @@
21592160
21602161 static int sta_set_rate_info_rx(struct sta_info *sta, struct rate_info *rinfo)
21612162 {
2162
- u16 rate = READ_ONCE(sta_get_last_rx_stats(sta)->last_rate);
2163
+ u32 rate = READ_ONCE(sta_get_last_rx_stats(sta)->last_rate);
21632164
21642165 if (rate == STA_STATS_RATE_INVALID)
21652166 return -EINVAL;