wifi: mac80211: collect station statistics earlier when disconnect
authorBaochen Qiang <baochen.qiang@oss.qualcomm.com>
Mon, 22 Dec 2025 02:29:07 +0000 (10:29 +0800)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 8 Jan 2026 12:33:11 +0000 (13:33 +0100)
commita203dbeeca15a9b924f0d51f510921f4bae96801
tree03f55039c530c47a91cec7f445e880c47ca818c1
parentd594cc6f2c588810888df70c83a9654b6bc7942d
wifi: mac80211: collect station statistics earlier when disconnect

In __sta_info_destroy_part2(), station statistics are requested after the
IEEE80211_STA_NONE -> IEEE80211_STA_NOTEXIST transition. This is
problematic because the driver may be unable to handle the request due to
the STA being in the NOTEXIST state (i.e. if the driver destroys the
underlying data when transitioning to NOTEXIST).

Move the statistics collection to before the state transition to avoid
this issue.

Signed-off-by: Baochen Qiang <baochen.qiang@oss.qualcomm.com>
Link: https://patch.msgid.link/20251222-mac80211-move-station-stats-collection-earlier-v1-1-12cd4e42c633@oss.qualcomm.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
net/mac80211/sta_info.c