From: Jouni Malinen <jouni.malinen@atheros.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Subject: [PATCH 1/5] ath9k: Allow AP mode to be enabled
Date: Mon, 11 Aug 2008 14:01:47 +0300 [thread overview]
Message-ID: <20080811110238.358118211@localhost> (raw)
In-Reply-To: 20080811110146.877112595@localhost
Signed-off-by: Jouni Malinen <jouni.malinen@atheros.com>
Index: wireless-testing/drivers/net/wireless/ath9k/main.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/ath9k/main.c
+++ wireless-testing/drivers/net/wireless/ath9k/main.c
@@ -426,10 +426,13 @@ static int ath9k_add_interface(struct ie
case IEEE80211_IF_TYPE_IBSS:
ic_opmode = ATH9K_M_IBSS;
break;
+ case IEEE80211_IF_TYPE_AP:
+ ic_opmode = ATH9K_M_HOSTAP;
+ break;
default:
DPRINTF(sc, ATH_DBG_FATAL,
- "%s: Only STA and IBSS are supported currently\n",
- __func__);
+ "%s: Interface type %d not yet supported\n",
+ __func__, conf->type);
return -EOPNOTSUPP;
}
@@ -530,6 +533,7 @@ static int ath9k_config_interface(struct
struct ieee80211_if_conf *conf)
{
struct ath_softc *sc = hw->priv;
+ struct ath_hal *ah = sc->sc_ah;
struct ath_vap *avp;
u32 rfilt = 0;
int error, i;
@@ -542,6 +546,17 @@ static int ath9k_config_interface(struct
return -EINVAL;
}
+ /* TODO: Need to decide which hw opmode to use for multi-interface
+ * cases */
+ if (vif->type == IEEE80211_IF_TYPE_AP &&
+ ah->ah_opmode != ATH9K_M_HOSTAP) {
+ ah->ah_opmode = ATH9K_M_HOSTAP;
+ ath9k_hw_setopmode(ah);
+ ath9k_hw_write_associd(ah, sc->sc_myaddr, 0);
+ /* Request full reset to get hw opmode changed properly */
+ sc->sc_flags |= SC_OP_FULL_RESET;
+ }
+
if ((conf->changed & IEEE80211_IFCC_BSSID) &&
!is_zero_ether_addr(conf->bssid)) {
switch (vif->type) {
Index: wireless-testing/drivers/net/wireless/ath9k/core.c
===================================================================
--- wireless-testing.orig/drivers/net/wireless/ath9k/core.c
+++ wireless-testing/drivers/net/wireless/ath9k/core.c
@@ -549,9 +549,15 @@ int ath_vap_listen(struct ath_softc *sc,
* XXXX
* Disable BMISS interrupt when we're not associated
*/
- ath9k_hw_set_interrupts(ah,
- sc->sc_imask & ~(ATH9K_INT_SWBA | ATH9K_INT_BMISS));
- sc->sc_imask &= ~(ATH9K_INT_SWBA | ATH9K_INT_BMISS);
+ if (sc->sc_ah->ah_opmode == ATH9K_M_HOSTAP) {
+ ath9k_hw_set_interrupts(ah, sc->sc_imask & ~ATH9K_INT_BMISS);
+ sc->sc_imask &= ~ATH9K_INT_BMISS;
+ } else {
+ ath9k_hw_set_interrupts(
+ ah,
+ sc->sc_imask & ~(ATH9K_INT_SWBA | ATH9K_INT_BMISS));
+ sc->sc_imask &= ~(ATH9K_INT_SWBA | ATH9K_INT_BMISS);
+ }
/* need to reconfigure the beacons when it moves to RUN */
sc->sc_flags &= ~SC_OP_BEACONS;
--
--
Jouni Malinen PGP id EFC895FA
next prev parent reply other threads:[~2008-08-11 11:03 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-11 11:01 [PATCH 0/5] ath9k: Preliminary changes to enabled access point mode Jouni Malinen
2008-08-11 11:01 ` Jouni Malinen [this message]
2008-08-11 11:01 ` [PATCH 2/5] ath9k: Updated Beacon generation to use mac80211-style Jouni Malinen
2008-08-11 11:01 ` [PATCH 3/5] ath9k: Fix TX status reporting Jouni Malinen
2008-08-11 11:01 ` [PATCH 4/5] ath9k: Assign seq# when mac80211 requests this Jouni Malinen
2008-08-11 11:01 ` [PATCH 5/5] ath9k: Fix TX control flag use for no ACK and RTS/CTS Jouni Malinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080811110238.358118211@localhost \
--to=jouni.malinen@atheros.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).