if (ic->ic_opmode == IEEE80211_M_HOSTAP)
sc->sc_updateslot = UPDATE;
else if (dev->flags & IFF_RUNNING)
if (ic->ic_opmode == IEEE80211_M_HOSTAP)
sc->sc_updateslot = UPDATE;
else if (dev->flags & IFF_RUNNING)
-@@ -5337,7 +5353,7 @@ ath_beacon_send(struct ath_softc *sc, in
+@@ -5345,7 +5361,7 @@ ath_beacon_send(struct ath_softc *sc, in
sc->sc_updateslot = COMMIT; /* commit next beacon */
sc->sc_slotupdate = slot;
} else if ((sc->sc_updateslot == COMMIT) && (sc->sc_slotupdate == slot))
sc->sc_updateslot = COMMIT; /* commit next beacon */
sc->sc_slotupdate = slot;
} else if ((sc->sc_updateslot == COMMIT) && (sc->sc_slotupdate == slot))
-@@ -8088,7 +8106,7 @@ ath_tx_start(struct net_device *dev, str
+@@ -8096,7 +8114,7 @@ ath_tx_start(struct net_device *dev, str
-@@ -9055,7 +9073,7 @@ ath_chan_change(struct ath_softc *sc, st
+@@ -9063,7 +9081,7 @@ ath_chan_change(struct ath_softc *sc, st
ath_rate_setup(dev, mode);
ath_setcurmode(sc, mode);
ath_rate_setup(dev, mode);
ath_setcurmode(sc, mode);
-@@ -10104,8 +10122,7 @@ ath_newassoc(struct ieee80211_node *ni,
+@@ -10120,8 +10138,7 @@ ath_newassoc(struct ieee80211_node *ni,
-@@ -10119,17 +10136,31 @@ ath_getchannels(struct net_device *dev,
+@@ -10135,17 +10152,31 @@ ath_getchannels(struct net_device *dev,
struct ieee80211com *ic = &sc->sc_ic;
const HAL_RATE_TABLE *rt;
struct ieee80211_rateset *rs;
struct ieee80211com *ic = &sc->sc_ic;
const HAL_RATE_TABLE *rt;
struct ieee80211_rateset *rs;
-@@ -10445,7 +10435,7 @@ ath_rate_setup(struct net_device *dev, u
+@@ -10461,7 +10451,7 @@ ath_rate_setup(struct net_device *dev, u
struct ieee80211com *ic = &sc->sc_ic;
const HAL_RATE_TABLE *rt;
struct ieee80211_rateset *rs;
struct ieee80211com *ic = &sc->sc_ic;
const HAL_RATE_TABLE *rt;
struct ieee80211_rateset *rs;
-@@ -10463,6 +10453,12 @@ ath_rate_setup(struct net_device *dev, u
+@@ -10479,6 +10469,12 @@ ath_rate_setup(struct net_device *dev, u
case IEEE80211_MODE_TURBO_G:
sc->sc_rates[mode] = ath_hal_getratetable(ah, HAL_MODE_108G);
break;
case IEEE80211_MODE_TURBO_G:
sc->sc_rates[mode] = ath_hal_getratetable(ah, HAL_MODE_108G);
break;
default:
DPRINTF(sc, ATH_DEBUG_ANY, "Invalid mode %u\n", mode);
return 0;
default:
DPRINTF(sc, ATH_DEBUG_ANY, "Invalid mode %u\n", mode);
return 0;
-@@ -10477,10 +10473,16 @@ ath_rate_setup(struct net_device *dev, u
+@@ -10493,10 +10489,16 @@ ath_rate_setup(struct net_device *dev, u
-@@ -10509,13 +10511,18 @@ ath_setcurmode(struct ath_softc *sc, enu
+@@ -10525,13 +10527,18 @@ ath_setcurmode(struct ath_softc *sc, enu
memset(sc->sc_hwmap, 0, sizeof(sc->sc_hwmap));
for (i = 0; i < 32; i++) {
u_int8_t ix = rt->rateCodeToIndex[i];
memset(sc->sc_hwmap, 0, sizeof(sc->sc_hwmap));
for (i = 0; i < 32; i++) {
u_int8_t ix = rt->rateCodeToIndex[i];
-@@ -10525,7 +10532,7 @@ ath_setcurmode(struct ath_softc *sc, enu
+@@ -10541,7 +10548,7 @@ ath_setcurmode(struct ath_softc *sc, enu
if (rt->info[ix].shortPreamble ||
rt->info[ix].phy == IEEE80211_T_OFDM)
sc->sc_hwmap[i].flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
if (rt->info[ix].shortPreamble ||
rt->info[ix].phy == IEEE80211_T_OFDM)
sc->sc_hwmap[i].flags |= IEEE80211_RADIOTAP_F_SHORTPRE;
ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl, write, filp, buffer, lenp, ppos)
{
struct ath_softc *sc = ctl->extra1;
ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl, write, filp, buffer, lenp, ppos)
{
struct ath_softc *sc = ctl->extra1;
-@@ -11030,25 +11135,33 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
+@@ -11046,25 +11151,34 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
lenp, ppos);
if (ret == 0) {
switch ((long)ctl->extra2) {
+ case ATH_REGDOMAIN:
+ ath_hal_setregdomain(ah, val);
+ break;
lenp, ppos);
if (ret == 0) {
switch ((long)ctl->extra2) {
+ case ATH_REGDOMAIN:
+ ath_hal_setregdomain(ah, val);
+ break;
-@@ -11201,6 +11314,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
+@@ -11217,6 +11331,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
-@@ -11219,6 +11335,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
+@@ -11235,6 +11352,9 @@ ATH_SYSCTL_DECL(ath_sysctl_halparam, ctl
.proc_handler = ath_sysctl_halparam,
.extra2 = (void *)ATH_REGDOMAIN,
},
.proc_handler = ath_sysctl_halparam,
.extra2 = (void *)ATH_REGDOMAIN,
},
for (i = 0; i < nrates; i++)
if (IEEERATE(ic, mode, i) == rate)
return i;
for (i = 0; i < nrates; i++)
if (IEEERATE(ic, mode, i) == rate)
return i;
int ss_last = ss->ss_last;
struct ieee80211_channel *best;
struct ap_state *as = ss->ss_priv;
int ss_last = ss->ss_last;
struct ieee80211_channel *best;
struct ap_state *as = ss->ss_priv;
"%s: best: channel %u rssi %d\n",
__func__, i, as->as_maxrssi[i]);
}
"%s: best: channel %u rssi %d\n",
__func__, i, as->as_maxrssi[i]);
}
-@@ -647,6 +649,7 @@ ap_end(struct ieee80211_scan_state *ss,
+@@ -609,6 +611,7 @@ ap_end(struct ieee80211_scan_state *ss,
/* XXX: notify all VAPs? */
/* if this is a dynamic turbo frequency , start with normal
* mode first */
/* XXX: notify all VAPs? */
/* if this is a dynamic turbo frequency , start with normal
* mode first */
-@@ -661,6 +664,11 @@ ap_end(struct ieee80211_scan_state *ss,
+@@ -623,6 +626,11 @@ ap_end(struct ieee80211_scan_state *ss,