Commit c73993b8 authored by Johannes Berg's avatar Johannes Berg

wifi: mac80211: maintain link_id in link_sta

To helper drivers if they e.g. have a lookup of the link_sta
pointer, add the link ID to the link_sta structure.
Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
parent ea5cba26
...@@ -2135,6 +2135,7 @@ struct ieee80211_sta_txpwr { ...@@ -2135,6 +2135,7 @@ struct ieee80211_sta_txpwr {
* @addr: MAC address of the Link STA. For non-MLO STA this is same as the addr * @addr: MAC address of the Link STA. For non-MLO STA this is same as the addr
* in ieee80211_sta. For MLO Link STA this addr can be same or different * in ieee80211_sta. For MLO Link STA this addr can be same or different
* from addr in ieee80211_sta (representing MLD STA addr) * from addr in ieee80211_sta (representing MLD STA addr)
* @link_id: the link ID for this link STA (0 for deflink)
* @supp_rates: Bitmap of supported rates * @supp_rates: Bitmap of supported rates
* @ht_cap: HT capabilities of this STA; restricted to our own capabilities * @ht_cap: HT capabilities of this STA; restricted to our own capabilities
* @vht_cap: VHT capabilities of this STA; restricted to our own capabilities * @vht_cap: VHT capabilities of this STA; restricted to our own capabilities
...@@ -2151,6 +2152,7 @@ struct ieee80211_sta_txpwr { ...@@ -2151,6 +2152,7 @@ struct ieee80211_sta_txpwr {
*/ */
struct ieee80211_link_sta { struct ieee80211_link_sta {
u8 addr[ETH_ALEN]; u8 addr[ETH_ALEN];
u8 link_id;
u32 supp_rates[NUM_NL80211_BANDS]; u32 supp_rates[NUM_NL80211_BANDS];
struct ieee80211_sta_ht_cap ht_cap; struct ieee80211_sta_ht_cap ht_cap;
......
...@@ -472,6 +472,7 @@ static void sta_info_add_link(struct sta_info *sta, ...@@ -472,6 +472,7 @@ static void sta_info_add_link(struct sta_info *sta,
link_info->sta = sta; link_info->sta = sta;
link_info->link_id = link_id; link_info->link_id = link_id;
link_info->pub = link_sta; link_info->pub = link_sta;
link_sta->link_id = link_id;
rcu_assign_pointer(sta->link[link_id], link_info); rcu_assign_pointer(sta->link[link_id], link_info);
rcu_assign_pointer(sta->sta.link[link_id], link_sta); rcu_assign_pointer(sta->sta.link[link_id], link_sta);
} }
......
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