aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/tx.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2009-11-25 11:46:18 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-12-21 18:38:51 -0500
commitabe60632f311d515b082b450504ee24006023951 (patch)
treea51fc3b135fa8a31cc0d7953be43502ecc6433c6 /net/mac80211/tx.c
parent15920d8afc87861672e16fa95ae2764b065d6dd3 (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/tx.c')
-rw-r--r--net/mac80211/tx.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 8834cc93c716..b913bfc34a9f 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1055,7 +1055,7 @@ ieee80211_tx_prepare(struct ieee80211_sub_if_data *sdata,
1055 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN) 1055 if (sdata->vif.type == NL80211_IFTYPE_AP_VLAN)
1056 tx->sta = rcu_dereference(sdata->u.vlan.sta); 1056 tx->sta = rcu_dereference(sdata->u.vlan.sta);
1057 if (!tx->sta) 1057 if (!tx->sta)
1058 tx->sta = sta_info_get(local, hdr->addr1); 1058 tx->sta = sta_info_get(sdata, hdr->addr1);
1059 1059
1060 if (tx->sta && ieee80211_is_data_qos(hdr->frame_control) && 1060 if (tx->sta && ieee80211_is_data_qos(hdr->frame_control) &&
1061 (local->hw.flags & IEEE80211_HW_AMPDU_AGGREGATION)) { 1061 (local->hw.flags & IEEE80211_HW_AMPDU_AGGREGATION)) {
@@ -1761,9 +1761,8 @@ netdev_tx_t ieee80211_subif_start_xmit(struct sk_buff *skb,
1761 */ 1761 */
1762 if (!is_multicast_ether_addr(hdr.addr1)) { 1762 if (!is_multicast_ether_addr(hdr.addr1)) {
1763 rcu_read_lock(); 1763 rcu_read_lock();
1764 sta = sta_info_get(local, hdr.addr1); 1764 sta = sta_info_get(sdata, hdr.addr1);
1765 /* XXX: in the future, use sdata to look up the sta */ 1765 if (sta)
1766 if (sta && sta->sdata == sdata)
1767 sta_flags = get_sta_flags(sta); 1766 sta_flags = get_sta_flags(sta);
1768 rcu_read_unlock(); 1767 rcu_read_unlock();
1769 } 1768 }
@@ -1922,7 +1921,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
1922 ieee80211_tx(sdata, skb, true); 1921 ieee80211_tx(sdata, skb, true);
1923 } else { 1922 } else {
1924 hdr = (struct ieee80211_hdr *)skb->data; 1923 hdr = (struct ieee80211_hdr *)skb->data;
1925 sta = sta_info_get(local, hdr->addr1); 1924 sta = sta_info_get(sdata, hdr->addr1);
1926 1925
1927 ret = __ieee80211_tx(local, &skb, sta, true); 1926 ret = __ieee80211_tx(local, &skb, sta, true);
1928 if (ret != IEEE80211_TX_OK) 1927 if (ret != IEEE80211_TX_OK)