aboutsummaryrefslogtreecommitdiffstats
path: root/net/mac80211/iface.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2009-11-10 14:10:05 -0500
committerJohn W. Linville <linville@tuxdriver.com>2009-11-11 17:02:10 -0500
commitf14543ee4d0681df1377b976cba704557ba220d3 (patch)
treef148485869f6638030207c069742c1918647be6a /net/mac80211/iface.c
parent8b787643ca0a5130c647109d77fe512f89cfa611 (diff)
mac80211: implement support for 4-address frames for AP and client mode
In some situations it might be useful to run a network with an Access Point and multiple clients, but with each client bridged to a network behind it. For this to work, both the client and the AP need to transmit 4-address frames, containing both source and destination MAC addresses. With this patch, you can configure a client to communicate using only 4-address frames for data traffic. On the AP side you can enable 4-address frames for individual clients by isolating them in separate AP VLANs which are configured in 4-address mode. Such an AP VLAN will be limited to one client only, and this client will be used as the destination for all traffic on its interface, regardless of the destination MAC address in the packet headers. The advantage of this mode compared to regular WDS mode is that it's easier to configure and does not require a static list of peer MAC addresses on any side. Signed-off-by: Felix Fietkau <nbd@openwrt.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'net/mac80211/iface.c')
-rw-r--r--net/mac80211/iface.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 8495161b99b8..1f02b0610e82 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -752,6 +752,7 @@ int ieee80211_if_change_type(struct ieee80211_sub_if_data *sdata,
752 ieee80211_mandatory_rates(sdata->local, 752 ieee80211_mandatory_rates(sdata->local,
753 sdata->local->hw.conf.channel->band); 753 sdata->local->hw.conf.channel->band);
754 sdata->drop_unencrypted = 0; 754 sdata->drop_unencrypted = 0;
755 sdata->use_4addr = 0;
755 756
756 return 0; 757 return 0;
757} 758}
@@ -819,6 +820,9 @@ int ieee80211_if_add(struct ieee80211_local *local, const char *name,
819 params->mesh_id_len, 820 params->mesh_id_len,
820 params->mesh_id); 821 params->mesh_id);
821 822
823 if (params && params->use_4addr >= 0)
824 sdata->use_4addr = !!params->use_4addr;
825
822 mutex_lock(&local->iflist_mtx); 826 mutex_lock(&local->iflist_mtx);
823 list_add_tail_rcu(&sdata->list, &local->interfaces); 827 list_add_tail_rcu(&sdata->list, &local->interfaces);
824 mutex_unlock(&local->iflist_mtx); 828 mutex_unlock(&local->iflist_mtx);