Ok so my research has led me to conclude that my eee (which has an Athero AR5BXB63 wireless chip) can only put ath5k into master mode if I patch ath5k.
I downloaded compat wireless, and the patch (found here:
http://wifi.ozo.com/airo/openwrt/fir...80211-patches/)
The patch mentions a specific git snapshot, but the link is broken to it. I think this might be the issue.
Anyways when I go into the compat wireless directory for ath5k and attempt to patch, this is the output from the command:
Code:
[songwhale@localhost ath5k]$ sudo patch ./base.c 007-ath5k-ap-mode.patch
patching file ./base.c
Hunk #1 FAILED at 190.
Hunk #2 FAILED at 2122.
Hunk #3 FAILED at 2134.
Hunk #4 FAILED at 2147.
Hunk #5 FAILED at 2707.
Hunk #6 FAILED at 2771.
Hunk #7 FAILED at 2779.
Hunk #8 FAILED at 3019.
Hunk #9 FAILED at 3038.
9 out of 9 hunks FAILED -- saving rejects to file ./base.c.rej
This is the contents of the base.c.rejects file:
Code:
***************
*** 190,197 ****
struct ieee80211_tx_queue_stats *stats);
static u64 ath5k_get_tsf(struct ieee80211_hw *hw);
static void ath5k_reset_tsf(struct ieee80211_hw *hw);
- static int ath5k_beacon_update(struct ieee80211_hw *hw,
- struct sk_buff *skb);
static struct ieee80211_ops ath5k_hw_ops = {
.tx = ath5k_tx,
--- 190,196 ----
struct ieee80211_tx_queue_stats *stats);
static u64 ath5k_get_tsf(struct ieee80211_hw *hw);
static void ath5k_reset_tsf(struct ieee80211_hw *hw);
+ static int ath5k_beacon_update(struct ath5k_softc *sc, struct sk_buff *skb);
static struct ieee80211_ops ath5k_hw_ops = {
.tx = ath5k_tx,
***************
*** 2123,2130 ****
*
* In IBSS mode we use a self-linked tx descriptor if possible. We enable SWBA
* interrupts to detect TSF updates only.
- *
- * AP mode is missing.
*/
static void
ath5k_beacon_config(struct ath5k_softc *sc)
--- 2122,2127 ----
*
* In IBSS mode we use a self-linked tx descriptor if possible. We enable SWBA
* interrupts to detect TSF updates only.
*/
static void
ath5k_beacon_config(struct ath5k_softc *sc)
***************
*** 2137,2143 ****
if (sc->opmode == IEEE80211_IF_TYPE_STA) {
sc->imask |= AR5K_INT_BMISS;
- } else if (sc->opmode == IEEE80211_IF_TYPE_IBSS) {
/*
* In IBSS mode we use a self-linked tx descriptor and let the
* hardware send the beacons automatically. We have to load it
--- 2134,2141 ----
if (sc->opmode == IEEE80211_IF_TYPE_STA) {
sc->imask |= AR5K_INT_BMISS;
+ } else if (sc->opmode == IEEE80211_IF_TYPE_IBSS ||
+ sc->opmode == IEEE80211_IF_TYPE_AP) {
/*
* In IBSS mode we use a self-linked tx descriptor and let the
* hardware send the beacons automatically. We have to load it
***************
*** 2149,2161 ****
sc->imask |= AR5K_INT_SWBA;
- if (ath5k_hw_hasveol(ah)) {
- spin_lock(&sc->block);
- ath5k_beacon_send(sc);
- spin_unlock(&sc->block);
- }
}
- /* TODO else AP */
ath5k_hw_set_intr(ah, sc->imask);
}
--- 2147,2161 ----
sc->imask |= AR5K_INT_SWBA;
+ if (sc->opmode == IEEE80211_IF_TYPE_IBSS) {
+ if (ath5k_hw_hasveol(ah)) {
+ spin_lock(&sc->block);
+ ath5k_beacon_send(sc);
+ spin_unlock(&sc->block);
+ }
+ } else
+ ath5k_beacon_update_timers(sc, -1);
}
ath5k_hw_set_intr(ah, sc->imask);
}
***************
*** 2707,2712 ****
sc->vif = conf->vif;
switch (conf->type) {
case IEEE80211_IF_TYPE_STA:
case IEEE80211_IF_TYPE_IBSS:
case IEEE80211_IF_TYPE_MNTR:
--- 2707,2713 ----
sc->vif = conf->vif;
switch (conf->type) {
+ case IEEE80211_IF_TYPE_AP:
case IEEE80211_IF_TYPE_STA:
case IEEE80211_IF_TYPE_IBSS:
case IEEE80211_IF_TYPE_MNTR:
***************
*** 2770,2776 ****
ret = -EIO;
goto unlock;
}
- if (conf->bssid) {
/* Cache for later use during resets */
memcpy(ah->ah_bssid, conf->bssid, ETH_ALEN);
/* XXX: assoc id is set to 0 for now, mac80211 doesn't have
--- 2771,2777 ----
ret = -EIO;
goto unlock;
}
+ if (conf->changed & IEEE80211_IFCC_BSSID && conf->bssid) {
/* Cache for later use during resets */
memcpy(ah->ah_bssid, conf->bssid, ETH_ALEN);
/* XXX: assoc id is set to 0 for now, mac80211 doesn't have
***************
*** 2778,2795 ****
ath5k_hw_set_associd(ah, ah->ah_bssid, 0);
mmiowb();
}
-
if (conf->changed & IEEE80211_IFCC_BEACON &&
- vif->type == IEEE80211_IF_TYPE_IBSS) {
struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
if (!beacon) {
ret = -ENOMEM;
goto unlock;
}
- /* call old handler for now */
- ath5k_beacon_update(hw, beacon);
}
-
mutex_unlock(&sc->lock);
return ath5k_reset_wake(sc);
--- 2779,2794 ----
ath5k_hw_set_associd(ah, ah->ah_bssid, 0);
mmiowb();
}
if (conf->changed & IEEE80211_IFCC_BEACON &&
+ (vif->type == IEEE80211_IF_TYPE_IBSS ||
+ vif->type == IEEE80211_IF_TYPE_AP)) {
struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
if (!beacon) {
ret = -ENOMEM;
goto unlock;
}
+ ath5k_beacon_update(sc, beacon);
}
mutex_unlock(&sc->lock);
return ath5k_reset_wake(sc);
***************
*** 3020,3038 ****
}
static int
- ath5k_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
{
- struct ath5k_softc *sc = hw->priv;
unsigned long flags;
int ret;
ath5k_debug_dump_skb(sc, skb, "BC ", 1);
- if (sc->opmode != IEEE80211_IF_TYPE_IBSS) {
- ret = -EIO;
- goto end;
- }
-
spin_lock_irqsave(&sc->block, flags);
ath5k_txbuf_free(sc, sc->bbuf);
sc->bbuf->skb = skb;
--- 3019,3031 ----
}
static int
+ ath5k_beacon_update(struct ath5k_softc *sc, struct sk_buff *skb)
{
unsigned long flags;
int ret;
ath5k_debug_dump_skb(sc, skb, "BC ", 1);
spin_lock_irqsave(&sc->block, flags);
ath5k_txbuf_free(sc, sc->bbuf);
sc->bbuf->skb = skb;
***************
*** 3045,3051 ****
mmiowb();
}
- end:
return ret;
}
--- 3038,3043 ----
mmiowb();
}
return ret;
}
Again, I think the issue might be that I wasn't able to grab the git snapshot the patch readme () mentioned, but I'm very new to using git and have no clue how to find a similar one. (Or it could be some other issue, I'm just completely stumped as to how to get this patch to work)