4 vap->iv_key_update_begin = ath_key_update_begin;
5 vap->iv_key_update_end = ath_key_update_end;
6 vap->iv_maxrateindex = 0;
7 + vap->iv_minrateindex = 0;
8 if (sc->sc_default_ieee80211_debug) {
9 /* User specified defaults for new VAPs were provided, so
10 * use those (only). */
11 --- a/ath_rate/minstrel/minstrel.c
12 +++ b/ath_rate/minstrel/minstrel.c
14 sn->rs_succ_hist [x] = 0;
15 sn->rs_att_hist [x] = 0;
16 sn->rs_this_tp [x] = 0;
18 + if (vap->iv_minrateindex && vap->iv_minrateindex<ni->ni_rates.rs_nrates)
20 + int idx = vap->iv_minrateindex;
21 + sn->rates[x].rate = ni->ni_rates.rs_rates[idx] & IEEE80211_RATE_VAL;
22 + sn->rates[x].rix = sc->sc_rixmap[sn->rates[idx].rate];
24 sn->rates[x].rate = ni->ni_rates.rs_rates[x] & IEEE80211_RATE_VAL;
25 sn->rates[x].rix = sc->sc_rixmap[sn->rates[x].rate];
27 if (sn->rates[x].rix == 0xff) {
28 DPRINTF(sc, "%s: %s ignore bogus rix at %d\n",
29 dev_info, __func__, x);
31 sn->rates[x].rateCode = rt->info[sn->rates[x].rix].rateCode;
32 sn->rates[x].shortPreambleRateCode =
33 rt->info[sn->rates[x].rix].rateCode |
34 - rt->info[sn->rates[x].rix].shortPreamble;
35 + rt->info[sn->rates[x].rix].shortPreamble;
38 ath_fill_sample_table(sn);
39 --- a/ath_rate/sample/sample.c
40 +++ b/ath_rate/sample/sample.c
42 sn->num_rates = vap->iv_maxrateindex;
44 for (x = 0; x < ni->ni_rates.rs_nrates; x++) {
45 - sn->rates[x].rate = ni->ni_rates.rs_rates[x] & IEEE80211_RATE_VAL;
46 - sn->rates[x].rix = sc->sc_rixmap[sn->rates[x].rate];
47 + if (vap->iv_minrateindex && vap->iv_minrateindex<ni->ni_rates.rs_nrates)
49 + int idx = vap->iv_minrateindex;
50 + sn->rates[x].rate = ni->ni_rates.rs_rates[idx] & IEEE80211_RATE_VAL;
51 + sn->rates[x].rix = sc->sc_rixmap[sn->rates[idx].rate];
53 + sn->rates[x].rate = ni->ni_rates.rs_rates[x] & IEEE80211_RATE_VAL;
54 + sn->rates[x].rix = sc->sc_rixmap[sn->rates[x].rate];
56 if (sn->rates[x].rix == 0xff) {
57 DPRINTF(sc, ATH_DEBUG_RATE, "%s: %s ignore bogus rix at %u\n",
58 dev_info, __func__, x);
59 --- a/net80211/ieee80211_ioctl.h
60 +++ b/net80211/ieee80211_ioctl.h
62 IEEE80211_PARAM_BEACON_MISS_THRESH = 73, /* Beacon miss threshold (in beacons) */
63 IEEE80211_PARAM_BEACON_MISS_THRESH_MS = 74, /* Beacon miss threshold (in ms) */
64 IEEE80211_PARAM_MAXRATE = 75, /* Maximum rate (by table index) */
65 + IEEE80211_PARAM_MINRATE = 76, /* Maximum rate (by table index) */
68 #define SIOCG80211STATS (SIOCDEVPRIVATE+2)
69 --- a/net80211/ieee80211_var.h
70 +++ b/net80211/ieee80211_var.h
72 struct ieee80211_app_ie app_ie[IEEE80211_APPIE_NUM_OF_FRAME]; /* app-specified IEs by frame type */
73 u_int32_t app_filter; /* filters which management frames are forwarded to app */
75 + int iv_minrateindex;
78 /* Debug functions need the defintion of struct ieee80211vap because iv_debug
79 --- a/net80211/ieee80211_wireless.c
80 +++ b/net80211/ieee80211_wireless.c
81 @@ -2845,6 +2845,12 @@
83 vap->iv_maxrateindex = 0;
85 + case IEEE80211_PARAM_MINRATE:
87 + vap->iv_minrateindex = value;
89 + vap->iv_minrateindex = 0;
91 #ifdef ATH_REVERSE_ENGINEERING
92 case IEEE80211_PARAM_DUMPREGS:
93 ieee80211_dump_registers(dev, info, w, extra);
95 case IEEE80211_PARAM_MAXRATE:
96 param[0] = vap->iv_maxrateindex;
98 + case IEEE80211_PARAM_MINRATE:
99 + param[0] = vap->iv_minrateindex;
104 @@ -5623,6 +5632,10 @@
105 IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "maxrate"},
106 {IEEE80211_PARAM_MAXRATE,
107 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_maxrate"},
108 + {IEEE80211_PARAM_MINRATE,
109 + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "minrate"},
110 + {IEEE80211_PARAM_MINRATE,
111 + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_minrate"},
113 #ifdef ATH_REVERSE_ENGINEERING