diff options
author | Johannes Berg <johannes@sipsolutions.net> | 2009-11-25 11:46:18 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-21 18:38:51 -0500 |
commit | abe60632f311d515b082b450504ee24006023951 (patch) | |
tree | a51fc3b135fa8a31cc0d7953be43502ecc6433c6 /net/mac80211/status.c | |
parent | 15920d8afc87861672e16fa95ae2764b065d6dd3 (diff) |
mac80211: make station management completely depend on vif
The station management currently uses the virtual
interface, but you cannot add the same station to
multiple virtual interfaces if you're communicating
with it in multiple ways.
This restriction should be lifted so that in the
future we can, for instance, support bluetooth 3
with an access point that mac80211 is already
associated to.
We can do that by requiring all sta_info_get users
to provide the virtual interface and making the RX
code aware that an address may match more than one
station struct. Thanks to the previous patches this
one isn't all that large and except for the RX and
TX status paths changes has low complexity.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/status.c')
-rw-r--r-- | net/mac80211/status.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/net/mac80211/status.c b/net/mac80211/status.c index d78f36c64c7b..32fe327acf4e 100644 --- a/net/mac80211/status.c +++ b/net/mac80211/status.c | |||
@@ -146,7 +146,7 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
146 | struct ieee80211_tx_status_rtap_hdr *rthdr; | 146 | struct ieee80211_tx_status_rtap_hdr *rthdr; |
147 | struct ieee80211_sub_if_data *sdata; | 147 | struct ieee80211_sub_if_data *sdata; |
148 | struct net_device *prev_dev = NULL; | 148 | struct net_device *prev_dev = NULL; |
149 | struct sta_info *sta; | 149 | struct sta_info *sta, *tmp; |
150 | int retry_count = -1, i; | 150 | int retry_count = -1, i; |
151 | bool injected; | 151 | bool injected; |
152 | 152 | ||
@@ -166,9 +166,11 @@ void ieee80211_tx_status(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
166 | 166 | ||
167 | sband = local->hw.wiphy->bands[info->band]; | 167 | sband = local->hw.wiphy->bands[info->band]; |
168 | 168 | ||
169 | sta = sta_info_get(local, hdr->addr1); | 169 | for_each_sta_info(local, hdr->addr1, sta, tmp) { |
170 | /* skip wrong virtual interface */ | ||
171 | if (memcmp(hdr->addr2, sta->sdata->dev->dev_addr, ETH_ALEN)) | ||
172 | continue; | ||
170 | 173 | ||
171 | if (sta) { | ||
172 | if (!(info->flags & IEEE80211_TX_STAT_ACK) && | 174 | if (!(info->flags & IEEE80211_TX_STAT_ACK) && |
173 | test_sta_flags(sta, WLAN_STA_PS_STA)) { | 175 | test_sta_flags(sta, WLAN_STA_PS_STA)) { |
174 | /* | 176 | /* |