aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
Diffstat (limited to 'net')
-rw-r--r--net/mac80211/debugfs.c4
-rw-r--r--net/mac80211/ieee80211_i.h29
-rw-r--r--net/mac80211/main.c2
-rw-r--r--net/mac80211/rx.c5
4 files changed, 22 insertions, 18 deletions
diff --git a/net/mac80211/debugfs.c b/net/mac80211/debugfs.c
index ee509f1109e2..24ce54463310 100644
--- a/net/mac80211/debugfs.c
+++ b/net/mac80211/debugfs.c
@@ -51,8 +51,6 @@ DEBUGFS_READONLY_FILE(antenna_sel_tx, 20, "%d",
51 local->hw.conf.antenna_sel_tx); 51 local->hw.conf.antenna_sel_tx);
52DEBUGFS_READONLY_FILE(antenna_sel_rx, 20, "%d", 52DEBUGFS_READONLY_FILE(antenna_sel_rx, 20, "%d",
53 local->hw.conf.antenna_sel_rx); 53 local->hw.conf.antenna_sel_rx);
54DEBUGFS_READONLY_FILE(bridge_packets, 20, "%d",
55 local->bridge_packets);
56DEBUGFS_READONLY_FILE(rts_threshold, 20, "%d", 54DEBUGFS_READONLY_FILE(rts_threshold, 20, "%d",
57 local->rts_threshold); 55 local->rts_threshold);
58DEBUGFS_READONLY_FILE(fragmentation_threshold, 20, "%d", 56DEBUGFS_READONLY_FILE(fragmentation_threshold, 20, "%d",
@@ -206,7 +204,6 @@ void debugfs_hw_add(struct ieee80211_local *local)
206 DEBUGFS_ADD(frequency); 204 DEBUGFS_ADD(frequency);
207 DEBUGFS_ADD(antenna_sel_tx); 205 DEBUGFS_ADD(antenna_sel_tx);
208 DEBUGFS_ADD(antenna_sel_rx); 206 DEBUGFS_ADD(antenna_sel_rx);
209 DEBUGFS_ADD(bridge_packets);
210 DEBUGFS_ADD(rts_threshold); 207 DEBUGFS_ADD(rts_threshold);
211 DEBUGFS_ADD(fragmentation_threshold); 208 DEBUGFS_ADD(fragmentation_threshold);
212 DEBUGFS_ADD(short_retry_limit); 209 DEBUGFS_ADD(short_retry_limit);
@@ -263,7 +260,6 @@ void debugfs_hw_del(struct ieee80211_local *local)
263 DEBUGFS_DEL(frequency); 260 DEBUGFS_DEL(frequency);
264 DEBUGFS_DEL(antenna_sel_tx); 261 DEBUGFS_DEL(antenna_sel_tx);
265 DEBUGFS_DEL(antenna_sel_rx); 262 DEBUGFS_DEL(antenna_sel_rx);
266 DEBUGFS_DEL(bridge_packets);
267 DEBUGFS_DEL(rts_threshold); 263 DEBUGFS_DEL(rts_threshold);
268 DEBUGFS_DEL(fragmentation_threshold); 264 DEBUGFS_DEL(fragmentation_threshold);
269 DEBUGFS_DEL(short_retry_limit); 265 DEBUGFS_DEL(short_retry_limit);
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 199d64143b41..52f36ab1ee57 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -402,11 +402,25 @@ struct ieee80211_if_mesh {
402 do { } while (0) 402 do { } while (0)
403#endif 403#endif
404 404
405/* flags used in struct ieee80211_sub_if_data.flags */ 405/**
406#define IEEE80211_SDATA_ALLMULTI BIT(0) 406 * enum ieee80211_sub_if_data_flags - virtual interface flags
407#define IEEE80211_SDATA_PROMISC BIT(1) 407 *
408#define IEEE80211_SDATA_USERSPACE_MLME BIT(2) 408 * @IEEE80211_SDATA_ALLMULTI: interface wants all multicast packets
409#define IEEE80211_SDATA_OPERATING_GMODE BIT(3) 409 * @IEEE80211_SDATA_PROMISC: interface is promisc
410 * @IEEE80211_SDATA_USERSPACE_MLME: userspace MLME is active
411 * @IEEE80211_SDATA_OPERATING_GMODE: operating in G-only mode
412 * @IEEE80211_SDATA_DONT_BRIDGE_PACKETS: bridge packets between
413 * associated stations and deliver multicast frames both
414 * back to wireless media and to the local net stack.
415 */
416enum ieee80211_sub_if_data_flags {
417 IEEE80211_SDATA_ALLMULTI = BIT(0),
418 IEEE80211_SDATA_PROMISC = BIT(1),
419 IEEE80211_SDATA_USERSPACE_MLME = BIT(2),
420 IEEE80211_SDATA_OPERATING_GMODE = BIT(3),
421 IEEE80211_SDATA_DONT_BRIDGE_PACKETS = BIT(4),
422};
423
410struct ieee80211_sub_if_data { 424struct ieee80211_sub_if_data {
411 struct list_head list; 425 struct list_head list;
412 426
@@ -635,10 +649,6 @@ struct ieee80211_local {
635 struct crypto_blkcipher *wep_rx_tfm; 649 struct crypto_blkcipher *wep_rx_tfm;
636 u32 wep_iv; 650 u32 wep_iv;
637 651
638 int bridge_packets; /* bridge packets between associated stations and
639 * deliver multicast frames both back to wireless
640 * media and to the local net stack */
641
642 struct list_head interfaces; 652 struct list_head interfaces;
643 653
644 /* 654 /*
@@ -726,7 +736,6 @@ struct ieee80211_local {
726 struct dentry *frequency; 736 struct dentry *frequency;
727 struct dentry *antenna_sel_tx; 737 struct dentry *antenna_sel_tx;
728 struct dentry *antenna_sel_rx; 738 struct dentry *antenna_sel_rx;
729 struct dentry *bridge_packets;
730 struct dentry *rts_threshold; 739 struct dentry *rts_threshold;
731 struct dentry *fragmentation_threshold; 740 struct dentry *fragmentation_threshold;
732 struct dentry *short_retry_limit; 741 struct dentry *short_retry_limit;
diff --git a/net/mac80211/main.c b/net/mac80211/main.c
index 4bfac4b41c51..72e3f5574e9f 100644
--- a/net/mac80211/main.c
+++ b/net/mac80211/main.c
@@ -1280,8 +1280,6 @@ struct ieee80211_hw *ieee80211_alloc_hw(size_t priv_data_len,
1280 1280
1281 local->hw.queues = 1; /* default */ 1281 local->hw.queues = 1; /* default */
1282 1282
1283 local->bridge_packets = 1;
1284
1285 local->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD; 1283 local->rts_threshold = IEEE80211_MAX_RTS_THRESHOLD;
1286 local->fragmentation_threshold = IEEE80211_MAX_FRAG_THRESHOLD; 1284 local->fragmentation_threshold = IEEE80211_MAX_FRAG_THRESHOLD;
1287 local->short_retry_limit = 7; 1285 local->short_retry_limit = 7;
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 208563a27bc4..93f2cda9926e 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -1221,8 +1221,9 @@ ieee80211_deliver_skb(struct ieee80211_rx_data *rx)
1221 skb = rx->skb; 1221 skb = rx->skb;
1222 xmit_skb = NULL; 1222 xmit_skb = NULL;
1223 1223
1224 if (local->bridge_packets && (sdata->vif.type == IEEE80211_IF_TYPE_AP || 1224 if ((sdata->vif.type == IEEE80211_IF_TYPE_AP ||
1225 sdata->vif.type == IEEE80211_IF_TYPE_VLAN) && 1225 sdata->vif.type == IEEE80211_IF_TYPE_VLAN) &&
1226 !(sdata->flags & IEEE80211_SDATA_DONT_BRIDGE_PACKETS) &&
1226 (rx->flags & IEEE80211_RX_RA_MATCH)) { 1227 (rx->flags & IEEE80211_RX_RA_MATCH)) {
1227 if (is_multicast_ether_addr(ehdr->h_dest)) { 1228 if (is_multicast_ether_addr(ehdr->h_dest)) {
1228 /* 1229 /*