]> git.baikalelectronics.ru Git - kernel.git/commit
wifi: mac80211: pass 'sta' to ieee80211_rx_data_set_sta()
authorJohannes Berg <johannes.berg@intel.com>
Wed, 15 Feb 2023 09:07:05 +0000 (10:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 10 Mar 2023 08:33:05 +0000 (09:33 +0100)
commit82e4c0b26587a75b9a8b1a4999abd7bbe5ee8ada
tree2428c76f796a50469a0738ce18c06a56d79c1fef
parent91a16399a44f3a7647db4ffad4ddee67bcc6c29c
wifi: mac80211: pass 'sta' to ieee80211_rx_data_set_sta()

[ Upstream commit aa45e843211e28469684afa8971bbe679ff632b3 ]

There's at least one case in ieee80211_rx_for_interface()
where we might pass &((struct sta_info *)NULL)->sta to it
only to then do container_of(), and then checking the
result for NULL, but checking the result of container_of()
for NULL looks really odd.

Fix this by just passing the struct sta_info * instead.

Fixes: d2e8f269e112 ("wifi: mac80211: fix initialization of rx->link and rx->link_sta")
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
net/mac80211/rx.c