diff options
author | Felix Fietkau <nbd@openwrt.org> | 2008-12-29 18:51:20 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2008-12-29 18:51:20 +0000 |
commit | a04275e3df6408b2ff2c48d058aee613ec7167df (patch) | |
tree | d81395577220c4c9e78c8235bdc1ff40ce275f70 /package/madwifi/patches | |
parent | f325f9116503d9ed40dfc8cb0116ffef7d18989f (diff) | |
download | master-187ad058-a04275e3df6408b2ff2c48d058aee613ec7167df.tar.gz master-187ad058-a04275e3df6408b2ff2c48d058aee613ec7167df.tar.bz2 master-187ad058-a04275e3df6408b2ff2c48d058aee613ec7167df.zip |
madwifi: add patch to allow ignoring probe requests (useful for ad-hoc mesh)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@13760 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/madwifi/patches')
-rw-r--r-- | package/madwifi/patches/394-probereq.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/package/madwifi/patches/394-probereq.patch b/package/madwifi/patches/394-probereq.patch new file mode 100644 index 0000000000..fc8cda0d54 --- /dev/null +++ b/package/madwifi/patches/394-probereq.patch @@ -0,0 +1,64 @@ +--- a/net80211/ieee80211_input.c ++++ b/net80211/ieee80211_input.c +@@ -3604,6 +3604,8 @@ ieee80211_recv_mgmt(struct ieee80211vap + vap->iv_stats.is_rx_mgtdiscard++; + return; + } ++ if (vap->iv_no_probereq) ++ return; + if (IEEE80211_IS_MULTICAST(wh->i_addr2)) { + /* frame must be directed */ + vap->iv_stats.is_rx_mgtdiscard++; /* XXX: stat */ +--- a/net80211/ieee80211_ioctl.h ++++ b/net80211/ieee80211_ioctl.h +@@ -651,6 +651,7 @@ enum { + IEEE80211_PARAM_RSSI_DIS_COUNT = 81, /* counter for rssi threshold */ + IEEE80211_PARAM_WDS_SEP = 82, /* move wds stations into separate interfaces */ + IEEE80211_PARAM_MAXASSOC = 83, /* maximum associated stations */ ++ IEEE80211_PARAM_PROBEREQ = 84, /* enable handling of probe requests */ + }; + + #define SIOCG80211STATS (SIOCDEVPRIVATE+2) +--- a/net80211/ieee80211_var.h ++++ b/net80211/ieee80211_var.h +@@ -198,6 +198,7 @@ struct ieee80211vap { + u_int32_t iv_debug; /* debug msg flags */ + struct ieee80211_stats iv_stats; /* statistics */ + ++ int iv_no_probereq; + int iv_max_nodes; + int iv_monitor_nods_only; /* in monitor mode only nods traffic */ + int iv_monitor_txf_len; /* in monitor mode, truncate tx packets */ +--- a/net80211/ieee80211_wireless.c ++++ b/net80211/ieee80211_wireless.c +@@ -2881,6 +2881,9 @@ ieee80211_ioctl_setparam(struct net_devi + else + vap->iv_max_nodes = value; + break; ++ case IEEE80211_PARAM_PROBEREQ: ++ vap->iv_no_probereq = !value; ++ break; + #ifdef ATH_REVERSE_ENGINEERING + case IEEE80211_PARAM_DUMPREGS: + ieee80211_dump_registers(dev, info, w, extra); +@@ -3243,6 +3246,9 @@ ieee80211_ioctl_getparam(struct net_devi + case IEEE80211_PARAM_MAXASSOC: + param[0] = vap->iv_max_nodes; + break; ++ case IEEE80211_PARAM_PROBEREQ: ++ param[0] = !vap->iv_no_probereq; ++ break; + default: + return -EOPNOTSUPP; + } +@@ -5802,6 +5808,10 @@ static const struct iw_priv_args ieee802 + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "maxassoc"}, + { IEEE80211_PARAM_MAXASSOC, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_maxassoc"}, ++ { IEEE80211_PARAM_PROBEREQ, ++ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "probereq"}, ++ { IEEE80211_PARAM_PROBEREQ, ++ 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_probereq"}, + + #ifdef ATH_REVERSE_ENGINEERING + /* |