Commit ab5f171e authored by Johannes Berg's avatar Johannes Berg

wifi: mac80211: always initialize link_sta with sta

When we have multiple interfaces receiving the same frame,
such as a multicast frame, one interface might have a sta
and the other not. In this case, link_sta would be set but
not cleared again.

Always set link_sta, so we keep an invariant that link_sta
and sta are either both set or both not set.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent 0d846bdc
...@@ -4125,6 +4125,8 @@ static bool ieee80211_rx_data_set_sta(struct ieee80211_rx_data *rx, ...@@ -4125,6 +4125,8 @@ static bool ieee80211_rx_data_set_sta(struct ieee80211_rx_data *rx,
if (!rx->sdata) if (!rx->sdata)
rx->sdata = sta->sdata; rx->sdata = sta->sdata;
rx->link_sta = &sta->deflink; rx->link_sta = &sta->deflink;
} else {
rx->link_sta = NULL;
} }
if (link_id < 0) if (link_id < 0)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment