2008-06-04 16:16:18 +03:00
|
|
|
--- a/ath/if_ath.c
|
|
|
|
+++ b/ath/if_ath.c
|
2010-11-12 17:14:27 +02:00
|
|
|
@@ -1307,6 +1307,7 @@ ath_vap_create(struct ieee80211com *ic,
|
2008-03-07 03:36:41 +02:00
|
|
|
vap->iv_key_set = ath_key_set;
|
|
|
|
vap->iv_key_update_begin = ath_key_update_begin;
|
|
|
|
vap->iv_key_update_end = ath_key_update_end;
|
|
|
|
+ vap->iv_maxrateindex = 0;
|
|
|
|
if (sc->sc_default_ieee80211_debug) {
|
|
|
|
/* User specified defaults for new VAPs were provided, so
|
|
|
|
* use those (only). */
|
2008-06-04 16:16:18 +03:00
|
|
|
--- a/ath_rate/minstrel/minstrel.c
|
|
|
|
+++ b/ath_rate/minstrel/minstrel.c
|
2008-11-02 15:04:36 +02:00
|
|
|
@@ -622,8 +622,12 @@ ath_rate_ctl_reset(struct ath_softc *sc,
|
2008-03-07 03:36:41 +02:00
|
|
|
return;
|
|
|
|
}
|
|
|
|
sn->static_rate_ndx = -1;
|
|
|
|
+ if (vap->iv_maxrateindex == 0 || ni->ni_rates.rs_nrates <= 0
|
|
|
|
+ || vap->iv_maxrateindex > ni->ni_rates.rs_nrates)
|
|
|
|
+ sn->num_rates = ni->ni_rates.rs_nrates;
|
|
|
|
+ else
|
|
|
|
+ sn->num_rates = vap->iv_maxrateindex;
|
|
|
|
|
|
|
|
- sn->num_rates = ni->ni_rates.rs_nrates;
|
|
|
|
for (x = 0; x < ni->ni_rates.rs_nrates; x++) {
|
|
|
|
sn->rs_rateattempts [x] = 0;
|
|
|
|
sn->rs_thisprob [x] = 0;
|
2008-06-04 16:16:18 +03:00
|
|
|
--- a/ath_rate/sample/sample.c
|
|
|
|
+++ b/ath_rate/sample/sample.c
|
2008-11-02 15:04:36 +02:00
|
|
|
@@ -835,7 +835,12 @@ ath_rate_ctl_reset(struct ath_softc *sc,
|
2008-03-07 03:36:41 +02:00
|
|
|
}
|
|
|
|
sn->static_rate_ndx = -1;
|
|
|
|
|
|
|
|
- sn->num_rates = ni->ni_rates.rs_nrates;
|
|
|
|
+ if (vap->iv_maxrateindex == 0 || ni->ni_rates.rs_nrates <= 0
|
|
|
|
+ || vap->iv_maxrateindex > ni->ni_rates.rs_nrates)
|
|
|
|
+ sn->num_rates = ni->ni_rates.rs_nrates;
|
|
|
|
+ else
|
|
|
|
+ sn->num_rates = vap->iv_maxrateindex;
|
|
|
|
+
|
|
|
|
for (x = 0; x < ni->ni_rates.rs_nrates; x++) {
|
|
|
|
sn->rates[x].rate = ni->ni_rates.rs_rates[x] & IEEE80211_RATE_VAL;
|
|
|
|
sn->rates[x].rix = sc->sc_rixmap[sn->rates[x].rate];
|
2008-06-04 16:16:18 +03:00
|
|
|
--- a/net80211/ieee80211_ioctl.h
|
|
|
|
+++ b/net80211/ieee80211_ioctl.h
|
2008-11-02 15:04:36 +02:00
|
|
|
@@ -641,6 +641,7 @@ enum {
|
2008-03-07 03:36:41 +02:00
|
|
|
FCC requires 30m, so that is the default. */
|
|
|
|
IEEE80211_PARAM_BEACON_MISS_THRESH = 73, /* Beacon miss threshold (in beacons) */
|
|
|
|
IEEE80211_PARAM_BEACON_MISS_THRESH_MS = 74, /* Beacon miss threshold (in ms) */
|
|
|
|
+ IEEE80211_PARAM_MAXRATE = 75, /* Maximum rate (by table index) */
|
|
|
|
};
|
|
|
|
|
|
|
|
#define SIOCG80211STATS (SIOCDEVPRIVATE+2)
|
2008-06-04 16:16:18 +03:00
|
|
|
--- a/net80211/ieee80211_var.h
|
|
|
|
+++ b/net80211/ieee80211_var.h
|
2008-11-02 15:04:36 +02:00
|
|
|
@@ -281,6 +281,7 @@ struct ieee80211vap {
|
2008-03-07 03:36:41 +02:00
|
|
|
struct ieee80211_spy iv_spy; /* IWSPY support */
|
|
|
|
struct ieee80211_app_ie app_ie[IEEE80211_APPIE_NUM_OF_FRAME]; /* app-specified IEs by frame type */
|
|
|
|
u_int32_t app_filter; /* filters which management frames are forwarded to app */
|
2009-05-21 21:11:08 +03:00
|
|
|
+ u_int iv_maxrateindex;
|
2008-03-07 03:36:41 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/* Debug functions need the defintion of struct ieee80211vap because iv_debug
|
2008-06-04 16:16:18 +03:00
|
|
|
--- a/net80211/ieee80211_wireless.c
|
|
|
|
+++ b/net80211/ieee80211_wireless.c
|
2008-11-02 15:04:36 +02:00
|
|
|
@@ -2839,6 +2839,12 @@ ieee80211_ioctl_setparam(struct net_devi
|
2008-03-07 03:36:41 +02:00
|
|
|
else
|
|
|
|
ic->ic_flags_ext &= ~IEEE80211_FEXT_MARKDFS;
|
|
|
|
break;
|
|
|
|
+ case IEEE80211_PARAM_MAXRATE:
|
|
|
|
+ if (value > 0)
|
|
|
|
+ vap->iv_maxrateindex = value;
|
|
|
|
+ else
|
|
|
|
+ vap->iv_maxrateindex = 0;
|
|
|
|
+ break;
|
|
|
|
#ifdef ATH_REVERSE_ENGINEERING
|
|
|
|
case IEEE80211_PARAM_DUMPREGS:
|
|
|
|
ieee80211_dump_registers(dev, info, w, extra);
|
2008-11-02 15:04:36 +02:00
|
|
|
@@ -3174,6 +3180,9 @@ ieee80211_ioctl_getparam(struct net_devi
|
2008-03-07 03:36:41 +02:00
|
|
|
else
|
|
|
|
param[0] = 0;
|
|
|
|
break;
|
|
|
|
+ case IEEE80211_PARAM_MAXRATE:
|
|
|
|
+ param[0] = vap->iv_maxrateindex;
|
|
|
|
+ break;
|
|
|
|
default:
|
|
|
|
return -EOPNOTSUPP;
|
|
|
|
}
|
2008-11-02 15:04:36 +02:00
|
|
|
@@ -5610,6 +5619,10 @@ static const struct iw_priv_args ieee802
|
2008-03-07 03:36:41 +02:00
|
|
|
0, IW_PRIV_TYPE_APPIEBUF, "getiebuf" },
|
|
|
|
{ IEEE80211_IOCTL_FILTERFRAME,
|
|
|
|
IW_PRIV_TYPE_FILTER , 0, "setfilter" },
|
|
|
|
+ {IEEE80211_PARAM_MAXRATE,
|
|
|
|
+ IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "maxrate"},
|
|
|
|
+ {IEEE80211_PARAM_MAXRATE,
|
|
|
|
+ 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_maxrate"},
|
|
|
|
|
|
|
|
#ifdef ATH_REVERSE_ENGINEERING
|
|
|
|
/*
|