diff --git a/net80211/_ieee80211.h b/net80211/_ieee80211.h index 466f5fa..3a3734a 100644 --- a/net80211/_ieee80211.h +++ b/net80211/_ieee80211.h @@ -307,12 +307,10 @@ struct ieee80211_rateset { struct ieee80211_roam { int8_t rssi11a; /* rssi thresh for 11a bss */ - int8_t rssi11b; /* for 11g sta in 11b bss */ + int8_t rssi11g; /* for 11g */ int8_t rssi11bOnly; /* for 11b sta */ - u_int8_t pad1; u_int8_t rate11a; /* rate thresh for 11a bss */ - u_int8_t rate11b; /* for 11g sta in 11b bss */ + u_int8_t rate11g; /* for 11g */ u_int8_t rate11bOnly; /* for 11b sta */ - u_int8_t pad2; }; #endif /* _NET80211__IEEE80211_H_ */ diff --git a/net80211/ieee80211_scan.c b/net80211/ieee80211_scan.c index c3d6418..c5bd561 100644 --- a/net80211/ieee80211_scan.c +++ b/net80211/ieee80211_scan.c @@ -88,10 +88,10 @@ struct scan_state { */ #define SCAN_VALID_DEFAULT 60 /* scan cache valid age (secs) */ #define ROAM_RSSI_11A_DEFAULT 9 /* rssi threshold for 11a bss */ -#define ROAM_RSSI_11B_DEFAULT 9 /* rssi threshold for 11b bss */ +#define ROAM_RSSI_11G_DEFAULT 9 /* rssi threshold for 11g bss */ #define ROAM_RSSI_11BONLY_DEFAULT 9 /* rssi threshold for 11b-only bss */ #define ROAM_RATE_11A_DEFAULT 2 * 24 /* tx rate threshold for 11a bss */ -#define ROAM_RATE_11B_DEFAULT 2 * 9 /* tx rate threshold for 11b bss */ +#define ROAM_RATE_11G_DEFAULT 2 * 9 /* tx rate threshold for 11g bss */ #define ROAM_RATE_11BONLY_DEFAULT 2 * 5 /* tx rate threshold for 11b-only bss */ static void scan_restart_pwrsav(unsigned long); @@ -142,10 +142,10 @@ ieee80211_scan_vattach(struct ieee80211vap *vap) vap->iv_bgscanintvl = IEEE80211_BGSCAN_INTVAL_DEFAULT * HZ; vap->iv_scanvalid = SCAN_VALID_DEFAULT * HZ; vap->iv_roam.rssi11a = ROAM_RSSI_11A_DEFAULT; - vap->iv_roam.rssi11b = ROAM_RSSI_11B_DEFAULT; + vap->iv_roam.rssi11g = ROAM_RSSI_11G_DEFAULT; vap->iv_roam.rssi11bOnly = ROAM_RSSI_11BONLY_DEFAULT; vap->iv_roam.rate11a = ROAM_RATE_11A_DEFAULT; - vap->iv_roam.rate11b = ROAM_RATE_11B_DEFAULT; + vap->iv_roam.rate11g = ROAM_RATE_11G_DEFAULT; vap->iv_roam.rate11bOnly = ROAM_RATE_11BONLY_DEFAULT; } diff --git a/net80211/ieee80211_scan_sta.c b/net80211/ieee80211_scan_sta.c index a6eef48..8835882 100644 --- a/net80211/ieee80211_scan_sta.c +++ b/net80211/ieee80211_scan_sta.c @@ -984,10 +984,9 @@ sta_roam_check(struct ieee80211_scan_state *ss, struct ieee80211vap *vap) return; } - /* XXX do we need 11g too? */ if (IEEE80211_IS_CHAN_ANYG(ic->ic_bsschan)) { - roamRate = vap->iv_roam.rate11b; - roamRssi = vap->iv_roam.rssi11b; + roamRate = vap->iv_roam.rate11g; + roamRssi = vap->iv_roam.rssi11g; } else if (IEEE80211_IS_CHAN_B(ic->ic_bsschan)) { roamRate = vap->iv_roam.rate11bOnly; roamRssi = vap->iv_roam.rssi11bOnly; diff --git a/net80211/ieee80211_wireless.c b/net80211/ieee80211_wireless.c index 6125ceb..fca35ca 100644 --- a/net80211/ieee80211_wireless.c +++ b/net80211/ieee80211_wireless.c @@ -2799,7 +2799,7 @@ ieee80211_ioctl_setparam(struct net_device *dev, struct iw_request_info *info, vap->iv_roam.rssi11bOnly = value; break; case IEEE80211_PARAM_ROAM_RSSI_11G: - vap->iv_roam.rssi11b = value; + vap->iv_roam.rssi11g = value; break; case IEEE80211_PARAM_ROAM_RATE_11A: vap->iv_roam.rate11a = value; @@ -2808,7 +2808,7 @@ ieee80211_ioctl_setparam(struct net_device *dev, struct iw_request_info *info, vap->iv_roam.rate11bOnly = value; break; case IEEE80211_PARAM_ROAM_RATE_11G: - vap->iv_roam.rate11b = value; + vap->iv_roam.rate11g = value; break; case IEEE80211_PARAM_UAPSDINFO: if (vap->iv_opmode == IEEE80211_M_HOSTAP) { @@ -3166,7 +3166,7 @@ ieee80211_ioctl_getparam(struct net_device *dev, struct iw_request_info *info, param[0] = vap->iv_roam.rssi11bOnly; break; case IEEE80211_PARAM_ROAM_RSSI_11G: - param[0] = vap->iv_roam.rssi11b; + param[0] = vap->iv_roam.rssi11g; break; case IEEE80211_PARAM_ROAM_RATE_11A: param[0] = vap->iv_roam.rate11a; @@ -3175,7 +3175,7 @@ ieee80211_ioctl_getparam(struct net_device *dev, struct iw_request_info *info, param[0] = vap->iv_roam.rate11bOnly; break; case IEEE80211_PARAM_ROAM_RATE_11G: - param[0] = vap->iv_roam.rate11b; + param[0] = vap->iv_roam.rate11g; break; case IEEE80211_PARAM_UAPSDINFO: if (vap->iv_opmode == IEEE80211_M_HOSTAP) { @@ -5595,17 +5595,17 @@ static const struct iw_priv_args ieee80211_priv_args[] = { { IEEE80211_PARAM_ROAM_RSSI_11G, 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_rssi11g" }, { IEEE80211_PARAM_ROAM_RATE_11A, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "rate11a" }, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "rate11a_x2" }, { IEEE80211_PARAM_ROAM_RATE_11A, - 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_rate11a" }, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_rate11a_x2" }, { IEEE80211_PARAM_ROAM_RATE_11B, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "rate11b" }, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "rate11b_x2" }, { IEEE80211_PARAM_ROAM_RATE_11B, - 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_rate11b" }, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_rate11b_x2" }, { IEEE80211_PARAM_ROAM_RATE_11G, - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "rate11g" }, + IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "rate11g_x2" }, { IEEE80211_PARAM_ROAM_RATE_11G, - 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_rate11g" }, + 0, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, "get_rate11g_x2" }, { IEEE80211_PARAM_UAPSDINFO, IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "uapsd" }, { IEEE80211_PARAM_UAPSDINFO,