madwifi: add wprobe rxframe/probereq counters
[openwrt.git] / package / madwifi / patches / 394-probereq.patch
1 --- a/net80211/ieee80211_input.c
2 +++ b/net80211/ieee80211_input.c
3 @@ -3611,6 +3611,8 @@ ieee80211_recv_mgmt(struct ieee80211vap
4 vap->iv_stats.is_rx_mgtdiscard++;
5 return;
6 }
7 + if (vap->iv_no_probereq)
8 + return;
9 if (IEEE80211_IS_MULTICAST(wh->i_addr2)) {
10 /* frame must be directed */
11 vap->iv_stats.is_rx_mgtdiscard++; /* XXX: stat */
12 --- a/net80211/ieee80211_ioctl.h
13 +++ b/net80211/ieee80211_ioctl.h
14 @@ -651,6 +651,7 @@ enum {
15 IEEE80211_PARAM_RSSI_DIS_COUNT = 81, /* counter for rssi threshold */
16 IEEE80211_PARAM_WDS_SEP = 82, /* move wds stations into separate interfaces */
17 IEEE80211_PARAM_MAXASSOC = 83, /* maximum associated stations */
18 + IEEE80211_PARAM_PROBEREQ = 84, /* enable handling of probe requests */
19 };
20
21 #define SIOCG80211STATS (SIOCDEVPRIVATE+2)
22 --- a/net80211/ieee80211_var.h
23 +++ b/net80211/ieee80211_var.h
24 @@ -198,6 +198,7 @@ struct ieee80211vap {
25 u_int32_t iv_debug; /* debug msg flags */
26 struct ieee80211_stats iv_stats; /* statistics */
27
28 + int iv_no_probereq;
29 int iv_max_nodes;
30 int iv_monitor_nods_only; /* in monitor mode only nods traffic */
31 int iv_monitor_txf_len; /* in monitor mode, truncate tx packets */
32 --- a/net80211/ieee80211_wireless.c
33 +++ b/net80211/ieee80211_wireless.c
34 @@ -2881,6 +2881,9 @@ ieee80211_ioctl_setparam(struct net_devi
35 else
36 vap->iv_max_nodes = value;
37 break;
38 + case IEEE80211_PARAM_PROBEREQ:
39 + vap->iv_no_probereq = !value;
40 + break;
41 #ifdef ATH_REVERSE_ENGINEERING
42 case IEEE80211_PARAM_DUMPREGS:
43 ieee80211_dump_registers(dev, info, w, extra);
44 @@ -3243,6 +3246,9 @@ ieee80211_ioctl_getparam(struct net_devi
45 case IEEE80211_PARAM_MAXASSOC:
46 param[0] = vap->iv_max_nodes;
47 break;
48 + case IEEE80211_PARAM_PROBEREQ:
49 + param[0] = !vap->iv_no_probereq;
50 + break;
51 default:
52 return -EOPNOTSUPP;
53 }
54 @@ -5802,6 +5808,10 @@ static const struct iw_priv_args ieee802
55 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "maxassoc"},
56 { IEEE80211_PARAM_MAXASSOC,
57 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_maxassoc"},
58 + { IEEE80211_PARAM_PROBEREQ,
59 + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "probereq"},
60 + { IEEE80211_PARAM_PROBEREQ,
61 + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_probereq"},
62
63 #ifdef ATH_REVERSE_ENGINEERING
64 /*
This page took 0.039911 seconds and 5 git commands to generate.