2008-10-07 09:40:09 +08:00
|
|
|
--- a/ath/if_ath.c
|
|
|
|
+++ b/ath/if_ath.c
|
2010-11-12 23:14:27 +08:00
|
|
|
@@ -1260,7 +1260,10 @@ ath_vap_create(struct ieee80211com *ic,
|
2008-10-07 09:40:09 +08:00
|
|
|
case IEEE80211_M_IBSS:
|
|
|
|
if ((sc->sc_nvaps != 0) && (ic->ic_opmode == IEEE80211_M_STA))
|
|
|
|
return NULL;
|
|
|
|
- ic_opmode = opmode;
|
|
|
|
+ if (ic->ic_opmode == IEEE80211_M_HOSTAP)
|
|
|
|
+ ic_opmode = ic->ic_opmode;
|
|
|
|
+ else
|
|
|
|
+ ic_opmode = opmode;
|
|
|
|
break;
|
|
|
|
case IEEE80211_M_AHDEMO:
|
|
|
|
case IEEE80211_M_MONITOR:
|
2010-11-12 23:14:27 +08:00
|
|
|
@@ -1455,7 +1458,7 @@ ath_vap_create(struct ieee80211com *ic,
|
2008-10-07 09:40:09 +08:00
|
|
|
* frames. Other modes carry over directly to the HAL.
|
|
|
|
*/
|
|
|
|
if (ic->ic_opmode == IEEE80211_M_AHDEMO)
|
|
|
|
- sc->sc_opmode = HAL_M_IBSS;
|
|
|
|
+ sc->sc_opmode = HAL_M_HOSTAP;
|
|
|
|
else
|
|
|
|
sc->sc_opmode = (HAL_OPMODE) ic->ic_opmode; /* NB: compatible */
|
|
|
|
|