* [PATCH v3] ath5k: Simplify loop when setting up channels
From: Bruno Randolf @ 2011-01-21 3:19 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, ath5k-devel, me
Simplify confusing code and get rid of an unnecessary variable.
Signed-off-by: Bruno Randolf <br1@einfach.org>
---
v3: Bob pointed out another wrong check: count <= max.
The loop really was confusing _me_...
---
drivers/net/wireless/ath/ath5k/base.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/net/wireless/ath/ath5k/base.c b/drivers/net/wireless/ath/ath5k/base.c
index 6850112..69ec878 100644
--- a/drivers/net/wireless/ath/ath5k/base.c
+++ b/drivers/net/wireless/ath/ath5k/base.c
@@ -261,7 +261,7 @@ ath5k_copy_channels(struct ath5k_hw *ah,
unsigned int mode,
unsigned int max)
{
- unsigned int i, count, size, chfreq, freq, ch;
+ unsigned int count, size, chfreq, freq, ch;
enum ieee80211_band band;
if (!test_bit(mode, ah->ah_modes))
@@ -285,8 +285,8 @@ ath5k_copy_channels(struct ath5k_hw *ah,
return 0;
}
- for (i = 0, count = 0; i < size && max > 0; i++) {
- ch = i + 1 ;
+ count = 0;
+ for (ch = 1; ch <= size && count < max; ch++) {
freq = ieee80211_channel_to_frequency(ch, band);
if (freq == 0) /* mapping failed - not a standard channel */
@@ -312,7 +312,6 @@ ath5k_copy_channels(struct ath5k_hw *ah,
}
count++;
- max--;
}
return count;
^ permalink raw reply related
* Re: [RFC 2/3] mac80211: Support scanning only current active channel.
From: Ben Greear @ 2011-01-21 4:39 UTC (permalink / raw)
To: Helmut Schaa; +Cc: Johannes Berg, linux-wireless
In-Reply-To: <201101202014.51161.helmut.schaa@googlemail.com>
On 01/20/2011 11:14 AM, Helmut Schaa wrote:
> Am Donnerstag, 20. Januar 2011 schrieb Ben Greear:
>> On 01/20/2011 10:17 AM, Johannes Berg wrote:
>>> Yeah, so maybe it needs some re-work, but I think what you're doing is a
>>> pretty strange hack.
>>
>> If you have time to write some patches, I'll be happy to test them on
>> our ath9k and ath5k systems.
>
> Try this, I only ran a quick test with iwlagn (disable_hw_scan=1), seems to
> work fine. However, I did not think much about it yet ;)
I think it has a few issues, but might be moving in the right direction.
First, it doesn't deal with not calling change-channel on scan completion
if we never left the operating channel. And doesn't mitigate the off-channel
call when scanning starts.
> @@ -534,6 +536,21 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
> static void ieee80211_scan_state_leave_oper_channel(struct ieee80211_local *local,
> unsigned long *next_delay)
> {
> + struct ieee80211_channel *chan;
> + chan = local->scan_req->channels[local->scan_channel_idx];
> +
> + /* remember when we left the operating channel */
> + local->leave_oper_channel_time = jiffies;
> +
> + /* advance to the next channel to be scanned */
> + local->next_scan_state = SCAN_SET_CHANNEL;
> +
> + /* Scanning operating channel, take the shortcut */
> + if (chan == local->oper_channel) {
> + *next_delay = 0;
> + return;
> + }
I think here you might need to compare against the current channel, which could be
one we are scanning on before we scan the operating channel, not the oper_channel.
> static void ieee80211_scan_state_enter_oper_channel(struct ieee80211_local *local,
> @@ -583,8 +594,10 @@ static void ieee80211_scan_state_set_channel(struct ieee80211_local *local,
> chan = local->scan_req->channels[local->scan_channel_idx];
>
> local->scan_channel = chan;
> - if (ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL))
> - skip = 1;
> +
> + if (chan != local->oper_channel)
> + if (ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL))
> + skip = 1;
Same problem here I think.
I may be mis-understanding what oper_channel implies, however.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* [PATCH] mac80211: Optimize scans on current operating channel.
From: greearb @ 2011-01-21 5:39 UTC (permalink / raw)
To: linux-wireless; +Cc: Ben Greear
From: Ben Greear <greearb@candelatech.com>
This should decrease un-necessary flushes, on/off channel work,
and channel changes in cases where the only scanned channel is
the current operating channel.
Signed-off-by: Ben Greear <greearb@candelatech.com>
---
:100644 100644 c47d7c0... 59fe5e7... M net/mac80211/ieee80211_i.h
:100644 100644 1236710... e6de0e7... M net/mac80211/rx.c
:100644 100644 3e660db... 5804fbb... M net/mac80211/scan.c
net/mac80211/ieee80211_i.h | 5 +++++
net/mac80211/rx.c | 11 ++++++++---
net/mac80211/scan.c | 41 +++++++++++++++++++++++++----------------
3 files changed, 38 insertions(+), 19 deletions(-)
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index c47d7c0..59fe5e7 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -660,6 +660,10 @@ struct tpt_led_trigger {
* that the scan completed.
* @SCAN_ABORTED: Set for our scan work function when the driver reported
* a scan complete for an aborted scan.
+ * @SCAN_LEFT_OPER_CHANNEL: Set this flag if the scan process leaves the
+ * operating channel at any time. If scanning ONLY the current operating
+ * channel this flag should not be set, and this will allow fewer
+ * offchannel changes.
*/
enum {
SCAN_SW_SCANNING,
@@ -667,6 +671,7 @@ enum {
SCAN_OFF_CHANNEL,
SCAN_COMPLETED,
SCAN_ABORTED,
+ SCAN_LEFT_OPER_CHANNEL,
};
/**
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 1236710..e6de0e7 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -388,6 +388,7 @@ ieee80211_rx_h_passive_scan(struct ieee80211_rx_data *rx)
struct ieee80211_local *local = rx->local;
struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
struct sk_buff *skb = rx->skb;
+ int ret;
if (likely(!(status->rx_flags & IEEE80211_RX_IN_SCAN)))
return RX_CONTINUE;
@@ -396,10 +397,14 @@ ieee80211_rx_h_passive_scan(struct ieee80211_rx_data *rx)
return ieee80211_scan_rx(rx->sdata, skb);
if (test_bit(SCAN_SW_SCANNING, &local->scanning)) {
- /* drop all the other packets during a software scan anyway */
- if (ieee80211_scan_rx(rx->sdata, skb) != RX_QUEUED)
+ ret = ieee80211_scan_rx(rx->sdata, skb);
+ /* drop all the other packets while scanning off channel */
+ if (ret != RX_QUEUED &&
+ test_bit(SCAN_OFF_CHANNEL, &local->scanning)) {
dev_kfree_skb(skb);
- return RX_QUEUED;
+ return RX_QUEUED;
+ }
+ return ret;
}
/* scanning finished during invoking of handlers */
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 3e660db..5804fbb 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -293,11 +293,14 @@ static void __ieee80211_scan_completed_finish(struct ieee80211_hw *hw,
{
struct ieee80211_local *local = hw_to_local(hw);
- ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
+ if (test_bit(SCAN_LEFT_OPER_CHANNEL, &local->scanning) || was_hw_scan)
+ ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
+
if (!was_hw_scan) {
ieee80211_configure_filter(local);
drv_sw_scan_complete(local);
- ieee80211_offchannel_return(local, true);
+ if (test_bit(SCAN_LEFT_OPER_CHANNEL, &local->scanning))
+ ieee80211_offchannel_return(local, true);
}
mutex_lock(&local->mtx);
@@ -397,13 +400,10 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local)
drv_sw_scan_start(local);
- ieee80211_offchannel_stop_beaconing(local);
-
local->leave_oper_channel_time = 0;
local->next_scan_state = SCAN_DECISION;
local->scan_channel_idx = 0;
-
- drv_flush(local, false);
+ __clear_bit(SCAN_LEFT_OPER_CHANNEL, &local->scanning);
ieee80211_configure_filter(local);
@@ -543,7 +543,18 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
}
mutex_unlock(&local->iflist_mtx);
- if (local->scan_channel) {
+ next_chan = local->scan_req->channels[local->scan_channel_idx];
+
+ if (local->oper_channel == local->hw.conf.channel) {
+ if (next_chan == local->oper_channel)
+ local->next_scan_state = SCAN_SET_CHANNEL;
+ else
+ /*
+ * we're on the operating channel currently, let's
+ * leave that channel now to scan another one
+ */
+ local->next_scan_state = SCAN_LEAVE_OPER_CHANNEL;
+ } else {
/*
* we're currently scanning a different channel, let's
* see if we can scan another channel without interfering
@@ -559,7 +570,6 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
*
* Otherwise switch back to the operating channel.
*/
- next_chan = local->scan_req->channels[local->scan_channel_idx];
bad_latency = time_after(jiffies +
ieee80211_scan_get_channel_time(next_chan),
@@ -577,12 +587,6 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
local->next_scan_state = SCAN_ENTER_OPER_CHANNEL;
else
local->next_scan_state = SCAN_SET_CHANNEL;
- } else {
- /*
- * we're on the operating channel currently, let's
- * leave that channel now to scan another one
- */
- local->next_scan_state = SCAN_LEAVE_OPER_CHANNEL;
}
*next_delay = 0;
@@ -591,9 +595,12 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
static void ieee80211_scan_state_leave_oper_channel(struct ieee80211_local *local,
unsigned long *next_delay)
{
+ ieee80211_offchannel_stop_beaconing(local);
+
ieee80211_offchannel_stop_station(local);
__set_bit(SCAN_OFF_CHANNEL, &local->scanning);
+ __set_bit(SCAN_LEFT_OPER_CHANNEL, &local->scanning);
/*
* What if the nullfunc frames didn't arrive?
@@ -640,8 +647,10 @@ static void ieee80211_scan_state_set_channel(struct ieee80211_local *local,
chan = local->scan_req->channels[local->scan_channel_idx];
local->scan_channel = chan;
- if (ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL))
- skip = 1;
+
+ if (chan != local->hw.conf.channel)
+ if (ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL))
+ skip = 1;
/* advance state machine to next channel/band */
local->scan_channel_idx++;
--
1.7.2.3
^ permalink raw reply related
* Re: [RFC 2/3] mac80211: Support scanning only current active channel.
From: Ben Greear @ 2011-01-21 5:42 UTC (permalink / raw)
To: Helmut Schaa; +Cc: Johannes Berg, linux-wireless
In-Reply-To: <201101202014.51161.helmut.schaa@googlemail.com>
On 01/20/2011 11:14 AM, Helmut Schaa wrote:
> Am Donnerstag, 20. Januar 2011 schrieb Ben Greear:
>> On 01/20/2011 10:17 AM, Johannes Berg wrote:
>>> Yeah, so maybe it needs some re-work, but I think what you're doing is a
>>> pretty strange hack.
>>
>> If you have time to write some patches, I'll be happy to test them on
>> our ath9k and ath5k systems.
>
> Try this, I only ran a quick test with iwlagn (disable_hw_scan=1), seems to
> work fine. However, I did not think much about it yet ;)
I re-worked your patch, made it a bit more like my original
one, and re-posted it. A quick test on ath9k with 128 stations
seems to be positive, but I haven't added tracing yet to make
sure it really skips going on/off channel when it's supposed to.
If you get a chance to try it out, please let me know how it goes.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* [RFC] ath9k: fix race conditions when stop device
From: Stanislaw Gruszka @ 2011-01-21 6:06 UTC (permalink / raw)
To: Luis R. Rodriguez, Jouni Malinen, Vasanthakumar Thiagarajan,
Senthil Balasubramanian
Cc: ath9k-devel, linux-wireless, Ben Greear
We do not kill any scheduled tasklets when stopping device, that may
cause usage of resources after free. Moreover we enable interrupts
in tasklet function, so we could potentially end with interrupts
enabled when driver is not ready to receive them.
I think patch could fix Ben's kernel crash from:
http://marc.info/?l=linux-wireless&m=129438358921501&w=2
RFC for now as I'm not quite familiar with ath9k. If get confirmation
patch is correct, I will repost and cc to -stable.
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
drivers/net/wireless/ath/ath9k/init.c | 5 -----
drivers/net/wireless/ath/ath9k/main.c | 9 +++++++++
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 767d8b8..b3254a3 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -598,8 +598,6 @@ err_btcoex:
err_queues:
ath9k_hw_deinit(ah);
err_hw:
- tasklet_kill(&sc->intr_tq);
- tasklet_kill(&sc->bcon_tasklet);
kfree(ah);
sc->sc_ah = NULL;
@@ -807,9 +805,6 @@ static void ath9k_deinit_softc(struct ath_softc *sc)
ath9k_hw_deinit(sc->sc_ah);
- tasklet_kill(&sc->intr_tq);
- tasklet_kill(&sc->bcon_tasklet);
-
kfree(sc->sc_ah);
sc->sc_ah = NULL;
}
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index c03184e..42cfd96 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1320,6 +1320,9 @@ static void ath9k_stop(struct ieee80211_hw *hw)
spin_lock_bh(&sc->sc_pcu_lock);
+ /* prevent tasklets to enable interrupts once we disable them */
+ ah->imask &= ~ATH9K_INT_GLOBAL;
+
/* make sure h/w will not generate any interrupt
* before setting the invalid flag. */
ath9k_hw_disable_interrupts(ah);
@@ -1337,6 +1340,12 @@ static void ath9k_stop(struct ieee80211_hw *hw)
spin_unlock_bh(&sc->sc_pcu_lock);
+ /* we can now sync irq and kill any running tasklets, since we already
+ * disabled interrupts and not holding a spin lock */
+ synchronize_irq(sc->irq);
+ tasklet_kill(&sc->intr_tq);
+ tasklet_kill(&sc->bcon_tasklet);
+
ath9k_ps_restore(sc);
sc->ps_idle = true;
--
1.7.1
^ permalink raw reply related
* [RFC/RFT] ath9k_htc: fix race conditions when stop device
From: Stanislaw Gruszka @ 2011-01-21 6:12 UTC (permalink / raw)
To: Luis R. Rodriguez, Jouni Malinen, Vasanthakumar Thiagarajan,
Senthil Balasubramanian
Cc: ath9k-devel, linux-wireless
Similar fix I already posted for ath9k. When stopping device, disable
interrupts, kill tasklets and then works, in correct order. Patch drop
mutex in them middle of a function, which I don't like and can possibly
not be correct. Perhaps this can be arranged differently. Also
there is no synchronize_irq, which IMHO should be added somewhere in
htc/wmi stop.
RFC/RTC for now (note I'm not able to test patch).
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
drivers/net/wireless/ath/ath9k/htc_drv_init.c | 3 ---
drivers/net/wireless/ath/ath9k/htc_drv_main.c | 21 +++++++++++++++------
2 files changed, 15 insertions(+), 9 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
index 8e04586..a7bc26d 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
@@ -142,9 +142,6 @@ static void ath9k_deinit_priv(struct ath9k_htc_priv *priv)
{
ath9k_htc_exit_debug(priv->ah);
ath9k_hw_deinit(priv->ah);
- tasklet_kill(&priv->swba_tasklet);
- tasklet_kill(&priv->rx_tasklet);
- tasklet_kill(&priv->tx_tasklet);
kfree(priv->ah);
priv->ah = NULL;
}
diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
index f14f37d..a702089 100644
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
@@ -1026,12 +1026,6 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
int ret = 0;
u8 cmd_rsp;
- /* Cancel all the running timers/work .. */
- cancel_work_sync(&priv->fatal_work);
- cancel_work_sync(&priv->ps_work);
- cancel_delayed_work_sync(&priv->ath9k_led_blink_work);
- ath9k_led_stop_brightness(priv);
-
mutex_lock(&priv->mutex);
if (priv->op_flags & OP_INVALID) {
@@ -1045,8 +1039,23 @@ static void ath9k_htc_stop(struct ieee80211_hw *hw)
WMI_CMD(WMI_DISABLE_INTR_CMDID);
WMI_CMD(WMI_DRAIN_TXQ_ALL_CMDID);
WMI_CMD(WMI_STOP_RECV_CMDID);
+
+ tasklet_kill(&priv->swba_tasklet);
+ tasklet_kill(&priv->rx_tasklet);
+ tasklet_kill(&priv->tx_tasklet);
+
skb_queue_purge(&priv->tx_queue);
+ mutex_unlock(&priv->mutex);
+
+ /* Cancel all the running timers/work .. */
+ cancel_work_sync(&priv->fatal_work);
+ cancel_work_sync(&priv->ps_work);
+ cancel_delayed_work_sync(&priv->ath9k_led_blink_work);
+ ath9k_led_stop_brightness(priv);
+
+ mutex_lock(&priv->mutex);
+
/* Remove monitor interface here */
if (ah->opmode == NL80211_IFTYPE_MONITOR) {
if (ath9k_htc_remove_monitor_interface(priv))
--
1.7.1
^ permalink raw reply related
* Re: [RFC/WIP 30/33] ath9k_htc: Fix host RX initialization
From: Vasanthakumar Thiagarajan @ 2011-01-21 6:31 UTC (permalink / raw)
To: Sujith; +Cc: linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org
In-Reply-To: <19768.63373.791952.897019@gargle.gargle.HOWL>
On Fri, Jan 21, 2011 at 08:33:41AM +0530, Sujith wrote:
> From: Sujith Manoharan <Sujith.Manoharan@atheros.com>
>
> There is no need to set the BSSID mask or opmode when
> initializing RX, they would be set correctly in the HW reset
> routine.
>
> Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
> ---
> drivers/net/wireless/ath/ath9k/htc_drv_txrx.c | 8 --------
> 1 files changed, 0 insertions(+), 8 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
> index 9913ef0..458164f 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_txrx.c
> @@ -451,20 +451,12 @@ u32 ath9k_htc_calcrxfilter(struct ath9k_htc_priv *priv)
> static void ath9k_htc_opmode_init(struct ath9k_htc_priv *priv)
> {
> struct ath_hw *ah = priv->ah;
> - struct ath_common *common = ath9k_hw_common(ah);
> -
> u32 rfilt, mfilt[2];
>
> /* configure rx filter */
> rfilt = ath9k_htc_calcrxfilter(priv);
> ath9k_hw_setrxfilter(ah, rfilt);
>
> - /* configure bssid mask */
> - ath_hw_setbssidmask(common);
> -
> - /* configure operational mode */
> - ath9k_hw_setopmode(ah);
I think we need to take care a bug in reg AR_STA_ID1 configuration.
During hw reset, operating mode is set in AR_STA_ID1 but right after
it's overwritten. See the following code segment in
ath9k_hw_reset().
ath9k_hw_set_operating_mode(ah, ah->opmode);
ENABLE_REGWRITE_BUFFER(ah);
REG_WRITE(ah, AR_STA_ID0, get_unaligned_le32(common->macaddr));
REG_WRITE(ah, AR_STA_ID1, get_unaligned_le16(common->macaddr + 4)
| macStaId1
| AR_STA_ID1_RTS_USE_DEF
| (ah->config.
ack_6mb ? AR_STA_ID1_ACKCTS_6MB : 0)
| ah->sta_id1_defaults);
Existing code works because we configure the opmode again through
ath9k_htc_opmode_init() after reset.
Vasanth
^ permalink raw reply
* Re: [RFC/WIP 15/33] ath9k_htc: Add ANI for AP mode
From: Vasanthakumar Thiagarajan @ 2011-01-21 6:33 UTC (permalink / raw)
To: Sujith; +Cc: linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org
In-Reply-To: <19768.63236.977078.2280@gargle.gargle.HOWL>
On Fri, Jan 21, 2011 at 08:31:24AM +0530, Sujith wrote:
> From: Sujith Manoharan <Sujith.Manoharan@atheros.com>
>
> + if (priv->ah->opmode == NL80211_IFTYPE_AP)
> + cancel_delayed_work_sync(&priv->ath9k_ani_work);
> +
What about ANI for other vifs?
Vasanth
^ permalink raw reply
* Re: [RFC/WIP 30/33] ath9k_htc: Fix host RX initialization
From: Sujith @ 2011-01-21 6:44 UTC (permalink / raw)
To: Vasanthakumar Thiagarajan
Cc: linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org
In-Reply-To: <20110121063059.GA20058@vasanth-laptop>
Vasanthakumar Thiagarajan wrote:
> I think we need to take care a bug in reg AR_STA_ID1 configuration.
> During hw reset, operating mode is set in AR_STA_ID1 but right after
> it's overwritten. See the following code segment in
> ath9k_hw_reset().
>
> ath9k_hw_set_operating_mode(ah, ah->opmode);
>
> ENABLE_REGWRITE_BUFFER(ah);
>
> REG_WRITE(ah, AR_STA_ID0, get_unaligned_le32(common->macaddr));
> REG_WRITE(ah, AR_STA_ID1, get_unaligned_le16(common->macaddr + 4)
> | macStaId1
> | AR_STA_ID1_RTS_USE_DEF
> | (ah->config.
> ack_6mb ? AR_STA_ID1_ACKCTS_6MB : 0)
> | ah->sta_id1_defaults);
>
>
> Existing code works because we configure the opmode again through
> ath9k_htc_opmode_init() after reset.
Looks like I changed this, see commit 6819d57f07440a8f9540967d9212a70e9c98eceb
But yes, opmode_init() in both ath9k and ath9k_htc takes care of this.
I'll fix this.
Sujith
^ permalink raw reply
* Re: [RFC/WIP 15/33] ath9k_htc: Add ANI for AP mode
From: Sujith @ 2011-01-21 6:44 UTC (permalink / raw)
To: Vasanthakumar Thiagarajan
Cc: linux-wireless@vger.kernel.org, ath9k-devel@lists.ath9k.org
In-Reply-To: <20110121063353.GB20058@vasanth-laptop>
Vasanthakumar Thiagarajan wrote:
> On Fri, Jan 21, 2011 at 08:31:24AM +0530, Sujith wrote:
> > From: Sujith Manoharan <Sujith.Manoharan@atheros.com>
> >
> > + if (priv->ah->opmode == NL80211_IFTYPE_AP)
> > + cancel_delayed_work_sync(&priv->ath9k_ani_work);
> > +
>
> What about ANI for other vifs?
I have a half-finished patch handling ANI in multi-VIF scenario, will
fold it into this.
Sujith
^ permalink raw reply
* Re: [PATCH] mac80211: Optimize scans on current operating channel.
From: Helmut Schaa @ 2011-01-21 8:19 UTC (permalink / raw)
To: greearb; +Cc: linux-wireless
In-Reply-To: <1295588389-10860-1-git-send-email-greearb@candelatech.com>
Am Freitag, 21. Januar 2011 schrieb greearb@candelatech.com:
> From: Ben Greear <greearb@candelatech.com>
>
> This should decrease un-necessary flushes, on/off channel work,
> and channel changes in cases where the only scanned channel is
> the current operating channel.
>
> Signed-off-by: Ben Greear <greearb@candelatech.com>
> ---
> :100644 100644 c47d7c0... 59fe5e7... M net/mac80211/ieee80211_i.h
> :100644 100644 1236710... e6de0e7... M net/mac80211/rx.c
> :100644 100644 3e660db... 5804fbb... M net/mac80211/scan.c
> net/mac80211/ieee80211_i.h | 5 +++++
> net/mac80211/rx.c | 11 ++++++++---
> net/mac80211/scan.c | 41 +++++++++++++++++++++++++----------------
> 3 files changed, 38 insertions(+), 19 deletions(-)
>
> diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
> index c47d7c0..59fe5e7 100644
> --- a/net/mac80211/ieee80211_i.h
> +++ b/net/mac80211/ieee80211_i.h
> @@ -660,6 +660,10 @@ struct tpt_led_trigger {
> * that the scan completed.
> * @SCAN_ABORTED: Set for our scan work function when the driver reported
> * a scan complete for an aborted scan.
> + * @SCAN_LEFT_OPER_CHANNEL: Set this flag if the scan process leaves the
> + * operating channel at any time. If scanning ONLY the current operating
> + * channel this flag should not be set, and this will allow fewer
> + * offchannel changes.
> */
> enum {
> SCAN_SW_SCANNING,
> @@ -667,6 +671,7 @@ enum {
> SCAN_OFF_CHANNEL,
> SCAN_COMPLETED,
> SCAN_ABORTED,
> + SCAN_LEFT_OPER_CHANNEL,
> };
>
> /**
> diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
> index 1236710..e6de0e7 100644
> --- a/net/mac80211/rx.c
> +++ b/net/mac80211/rx.c
> @@ -388,6 +388,7 @@ ieee80211_rx_h_passive_scan(struct ieee80211_rx_data *rx)
> struct ieee80211_local *local = rx->local;
> struct ieee80211_rx_status *status = IEEE80211_SKB_RXCB(rx->skb);
> struct sk_buff *skb = rx->skb;
> + int ret;
>
> if (likely(!(status->rx_flags & IEEE80211_RX_IN_SCAN)))
> return RX_CONTINUE;
> @@ -396,10 +397,14 @@ ieee80211_rx_h_passive_scan(struct ieee80211_rx_data *rx)
> return ieee80211_scan_rx(rx->sdata, skb);
>
> if (test_bit(SCAN_SW_SCANNING, &local->scanning)) {
> - /* drop all the other packets during a software scan anyway */
> - if (ieee80211_scan_rx(rx->sdata, skb) != RX_QUEUED)
> + ret = ieee80211_scan_rx(rx->sdata, skb);
> + /* drop all the other packets while scanning off channel */
> + if (ret != RX_QUEUED &&
> + test_bit(SCAN_OFF_CHANNEL, &local->scanning)) {
> dev_kfree_skb(skb);
> - return RX_QUEUED;
> + return RX_QUEUED;
> + }
> + return ret;
> }
>
> /* scanning finished during invoking of handlers */
> diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
> index 3e660db..5804fbb 100644
> --- a/net/mac80211/scan.c
> +++ b/net/mac80211/scan.c
> @@ -293,11 +293,14 @@ static void __ieee80211_scan_completed_finish(struct ieee80211_hw *hw,
> {
> struct ieee80211_local *local = hw_to_local(hw);
>
> - ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
> + if (test_bit(SCAN_LEFT_OPER_CHANNEL, &local->scanning) || was_hw_scan)
> + ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
> +
Why not
if (!test_bit(SCAN_OFF_CHANNEL, &local->scanning) || was_hw_scan)
instead? If the last scanned channel was a off channel scan this bit will
still be set. And that way you don't need this new flag.
> if (!was_hw_scan) {
> ieee80211_configure_filter(local);
> drv_sw_scan_complete(local);
> - ieee80211_offchannel_return(local, true);
> + if (test_bit(SCAN_LEFT_OPER_CHANNEL, &local->scanning))
> + ieee80211_offchannel_return(local, true);
Same here.
> }
>
> mutex_lock(&local->mtx);
> @@ -397,13 +400,10 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local)
>
> drv_sw_scan_start(local);
>
> - ieee80211_offchannel_stop_beaconing(local);
> -
You could split that out in a second patch since this change might also make sense
on its own.
> local->leave_oper_channel_time = 0;
> local->next_scan_state = SCAN_DECISION;
> local->scan_channel_idx = 0;
> -
> - drv_flush(local, false);
> + __clear_bit(SCAN_LEFT_OPER_CHANNEL, &local->scanning);
>
> ieee80211_configure_filter(local);
>
> @@ -543,7 +543,18 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
> }
> mutex_unlock(&local->iflist_mtx);
>
> - if (local->scan_channel) {
> + next_chan = local->scan_req->channels[local->scan_channel_idx];
> +
> + if (local->oper_channel == local->hw.conf.channel) {
Isn't that equivalent to !test_bit(SCAN_OFF_CHANNEL, ...)?
> + if (next_chan == local->oper_channel)
> + local->next_scan_state = SCAN_SET_CHANNEL;
> + else
> + /*
> + * we're on the operating channel currently, let's
> + * leave that channel now to scan another one
> + */
> + local->next_scan_state = SCAN_LEAVE_OPER_CHANNEL;
> + } else {
> /*
> * we're currently scanning a different channel, let's
> * see if we can scan another channel without interfering
> @@ -559,7 +570,6 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
> *
> * Otherwise switch back to the operating channel.
> */
> - next_chan = local->scan_req->channels[local->scan_channel_idx];
>
> bad_latency = time_after(jiffies +
> ieee80211_scan_get_channel_time(next_chan),
> @@ -577,12 +587,6 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
> local->next_scan_state = SCAN_ENTER_OPER_CHANNEL;
> else
> local->next_scan_state = SCAN_SET_CHANNEL;
> - } else {
> - /*
> - * we're on the operating channel currently, let's
> - * leave that channel now to scan another one
> - */
> - local->next_scan_state = SCAN_LEAVE_OPER_CHANNEL;
> }
>
> *next_delay = 0;
> @@ -591,9 +595,12 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
> static void ieee80211_scan_state_leave_oper_channel(struct ieee80211_local *local,
> unsigned long *next_delay)
> {
> + ieee80211_offchannel_stop_beaconing(local);
> +
> ieee80211_offchannel_stop_station(local);
>
> __set_bit(SCAN_OFF_CHANNEL, &local->scanning);
> + __set_bit(SCAN_LEFT_OPER_CHANNEL, &local->scanning);
>
> /*
> * What if the nullfunc frames didn't arrive?
> @@ -640,8 +647,10 @@ static void ieee80211_scan_state_set_channel(struct ieee80211_local *local,
> chan = local->scan_req->channels[local->scan_channel_idx];
>
> local->scan_channel = chan;
> - if (ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL))
> - skip = 1;
> +
> + if (chan != local->hw.conf.channel)
> + if (ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL))
> + skip = 1;
>
> /* advance state machine to next channel/band */
> local->scan_channel_idx++;
>
^ permalink raw reply
* Re: AR5523 driver - old Atheros USB
From: Luis R. Rodriguez @ 2011-01-21 8:27 UTC (permalink / raw)
To: kolakaluri krishna chaitanya; +Cc: linux-wireless
In-Reply-To: <AANLkTi=prKVMfxmjeO0zFecq9sF2Sxa_CsHuxmo=0AN5@mail.gmail.com>
On Thu, Jan 20, 2011 at 10:15 PM, kolakaluri krishna chaitanya
<kittychaitus@gmail.com> wrote:
> Hi,
> Sorry for my very very late reply but just in case if the work is still
> pending i would like to take it up.
> Thanks
> Kris
Do it, search for the wiki page for the same name driver.
Luis
^ permalink raw reply
* [PATCH] ath9k: clean up enums and unused macros
From: Mohammed Shafi Shajakhan @ 2011-01-21 8:33 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, lrodriguez, Mohammed Shafi Shajakhan
From: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
Remove unused macros and cleanup buffer_type enumeration
Signed-off-by: Mohammed Shafi Shajakhan <mshajakhan@atheros.com>
---
drivers/net/wireless/ath/ath9k/ath9k.h | 7 +++----
drivers/net/wireless/ath/ath9k/xmit.c | 2 --
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 6e22135..818b085 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -95,9 +95,9 @@ struct ath_config {
* @BUF_XRETRY: To denote excessive retries of the buffer
*/
enum buffer_type {
- BUF_AMPDU = BIT(2),
- BUF_AGGR = BIT(3),
- BUF_XRETRY = BIT(5),
+ BUF_AMPDU = BIT(0),
+ BUF_AGGR = BIT(1),
+ BUF_XRETRY = BIT(2),
};
#define bf_isampdu(bf) (bf->bf_state.bf_type & BUF_AMPDU)
@@ -137,7 +137,6 @@ void ath_descdma_cleanup(struct ath_softc *sc, struct ath_descdma *dd,
(((_tid) == 4) || ((_tid) == 5)) ? WME_AC_VI : \
WME_AC_VO)
-#define ADDBA_EXCHANGE_ATTEMPTS 10
#define ATH_AGGR_DELIM_SZ 4
#define ATH_AGGR_MINPLEN 256 /* in bytes, minimum packet length */
/* number of delimiters for encryption padding */
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index ad569e1..59ccecf 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -19,7 +19,6 @@
#define BITS_PER_BYTE 8
#define OFDM_PLCP_BITS 22
-#define HT_RC_2_MCS(_rc) ((_rc) & 0x1f)
#define HT_RC_2_STREAMS(_rc) ((((_rc) & 0x78) >> 3) + 1)
#define L_STF 8
#define L_LTF 8
@@ -32,7 +31,6 @@
#define NUM_SYMBOLS_PER_USEC(_usec) (_usec >> 2)
#define NUM_SYMBOLS_PER_USEC_HALFGI(_usec) (((_usec*5)-4)/18)
-#define OFDM_SIFS_TIME 16
static u16 bits_per_symbol[][2] = {
/* 20MHz 40MHz */
--
1.7.0.4
^ permalink raw reply related
* Re: [RFC/WIP 23/33] ath9k_htc: Enable AP mode
From: Johannes Berg @ 2011-01-21 8:43 UTC (permalink / raw)
To: Sujith; +Cc: linux-wireless, ath9k-devel
In-Reply-To: <19768.63310.121728.324735@gargle.gargle.HOWL>
On Fri, 2011-01-21 at 08:32 +0530, Sujith wrote:
> From: Sujith Manoharan <Sujith.Manoharan@atheros.com>
>
> Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
> ---
> drivers/net/wireless/ath/ath9k/htc_drv_init.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
> index dc96c06..b4ae719 100644
> --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
> +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
> @@ -753,7 +753,8 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
>
> hw->wiphy->interface_modes =
> BIT(NL80211_IFTYPE_STATION) |
> - BIT(NL80211_IFTYPE_ADHOC);
> + BIT(NL80211_IFTYPE_ADHOC) |
> + BIT(NL80211_IFTYPE_AP);
It'd be kinda nice if that could be made dependent on firmware
capability bits or version since otherwise everybody will think they
have it ... and it will not work?
johannes
^ permalink raw reply
* Re: [RFC/WIP 23/33] ath9k_htc: Enable AP mode
From: Sujith @ 2011-01-21 10:00 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, ath9k-devel
In-Reply-To: <1295599422.3831.0.camel@jlt3.sipsolutions.net>
Johannes Berg wrote:
> On Fri, 2011-01-21 at 08:32 +0530, Sujith wrote:
> > From: Sujith Manoharan <Sujith.Manoharan@atheros.com>
> >
> > Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
> > ---
> > drivers/net/wireless/ath/ath9k/htc_drv_init.c | 3 ++-
> > 1 files changed, 2 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_init.c b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
> > index dc96c06..b4ae719 100644
> > --- a/drivers/net/wireless/ath/ath9k/htc_drv_init.c
> > +++ b/drivers/net/wireless/ath/ath9k/htc_drv_init.c
> > @@ -753,7 +753,8 @@ static void ath9k_set_hw_capab(struct ath9k_htc_priv *priv,
> >
> > hw->wiphy->interface_modes =
> > BIT(NL80211_IFTYPE_STATION) |
> > - BIT(NL80211_IFTYPE_ADHOC);
> > + BIT(NL80211_IFTYPE_ADHOC) |
> > + BIT(NL80211_IFTYPE_AP);
>
> It'd be kinda nice if that could be made dependent on firmware
> capability bits or version since otherwise everybody will think they
> have it ... and it will not work?
Well, the current firmware has no version mechanism and this series requires
the new FW for non-AP modes too. I am aware that breaking compatibilty with existing FW
is frowned upon, but unfortunately this is required since the command layout has
been cleaned up. I'll add a check to bail out at driver load time when the old FW is used.
Sujith
^ permalink raw reply
* Re: ath9k problem with kernel 2.6.37
From: Mohammed Shafi @ 2011-01-21 10:04 UTC (permalink / raw)
To: James; +Cc: linux-wireless
In-Reply-To: <4D3882D5.2080902@lockie.ca>
On Fri, Jan 21, 2011 at 12:15 AM, James <bjlockie@lockie.ca> wrote:
> On 01/20/11 03:35, Mohammed Shafi wrote:
>> On Thu, Jan 20, 2011 at 12:52 PM, James <bjlockie@lockie.ca> wrote:
>>> phy0: Atheros AR5416 MAC/BB Rev:2 AR2133 RF Rev:81
>>> mem=0xffffc90001880000, irq=17
>>>
>>> I get few or no results when I do
>>> iwlist wlan1 scan with kernel 2.6.37
>>>
>> We will check it out
>>
>>> but it is consistently good with kernel 2.6.36.2
>>>
>>> Is there a way to compare the kernel configs to make sure I didn't
>>> change anything?
>> Please try with latest compat wireless, which might be helpful
> I got:
> http://wireless.kernel.org/download/compat-wireless-2.6/compat-wireless-2.6.tar.bz2
>
> I can't compile it:
> /usr/src/compat-wireless-2011-01-19 $ sudo make
> /usr/src/compat-wireless-2011-01-19/config.mk:202: "WARNING:
> CONFIG_CFG80211_WEXT will be deactivated or not working because kernel
> was compiled with CONFIG_WIRELESS_EXT=n. Tools using wext interface like
> iwconfig will not work. To activate it build your kernel e.g. with
> CONFIG_LIBIPW=m."
> ./scripts/gen-compat-autoconf.sh config.mk > include/linux/compat_autoconf.h
> make -C /lib/modules/2.6.37/build M=/usr/src/compat-wireless-2011-01-19
> modules
> make[1]: Entering directory `/usr/src/linux-2.6.37'
> CC [M] /usr/src/compat-wireless-2011-01-19/compat/main.o
> CC [M] /usr/src/compat-wireless-2011-01-19/compat/compat-2.6.38.o
> LD [M] /usr/src/compat-wireless-2011-01-19/compat/compat.o
> CC [M] /usr/src/compat-wireless-2011-01-19/drivers/bluetooth/hci_vhci.o
> CC [M] /usr/src/compat-wireless-2011-01-19/drivers/bluetooth/bcm203x.o
> CC [M] /usr/src/compat-wireless-2011-01-19/drivers/bluetooth/bpa10x.o
> CC [M] /usr/src/compat-wireless-2011-01-19/drivers/bluetooth/bfusb.o
> CC [M] /usr/src/compat-wireless-2011-01-19/drivers/bluetooth/btusb.o
> CC [M] /usr/src/compat-wireless-2011-01-19/drivers/bluetooth/ath3k.o
> CC [M]
> /usr/src/compat-wireless-2011-01-19/drivers/bluetooth/btmrvl_main.o
> LD [M] /usr/src/compat-wireless-2011-01-19/drivers/bluetooth/btmrvl.o
> CC [M]
> /usr/src/compat-wireless-2011-01-19/drivers/misc/eeprom/eeprom_93cx6.o
> CC [M] /usr/src/compat-wireless-2011-01-19/drivers/net/b44.o
> /usr/src/compat-wireless-2011-01-19/drivers/net/b44.c:13:1: warning:
> "pr_fmt" redefined
> In file included from include/linux/kernel.h:20,
> from include/linux/skbuff.h:17,
> from include/linux/if_ether.h:125,
> from include/linux/netdevice.h:29,
> from
> /usr/src/compat-wireless-2011-01-19/include/linux/compat-2.6.29.h:5,
> from
> /usr/src/compat-wireless-2011-01-19/include/linux/compat-2.6.h:24,
> from <command-line>:0:
> include/linux/printk.h:161:1: warning: this is the location of the
> previous definition
> /usr/src/compat-wireless-2011-01-19/drivers/net/b44.c: In function
> 'b44_pci_init':
> /usr/src/compat-wireless-2011-01-19/drivers/net/b44.c:2345: error:
> implicit declaration of function 'ssb_pcihost_register'
> make[3]: *** [/usr/src/compat-wireless-2011-01-19/drivers/net/b44.o] Error 1
> make[2]: *** [/usr/src/compat-wireless-2011-01-19/drivers/net] Error 2
> make[1]: *** [_module_/usr/src/compat-wireless-2011-01-19] Error 2
> make[1]: Leaving directory `/usr/src/linux-2.6.37'
> make: *** [modules] Error 2
>
> Do I understand it correctly that it is just newer and will be in the
> kernel eventually?
Easy way is to install the compat wireless in the kernel (like Ubuntu
2.6.25 generic where by default WEXT will be enabled).
Otherwise you must take care of enabling all those things in kernel config
like CONFIG_WIRELESS_EXT=y
hope this helps.
>
> How can I see what version of the driver I am using?
>>> --
>>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>>> the body of a message to majordomo@vger.kernel.org
>>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>>
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
>
>
^ permalink raw reply
* [RFC/RFT] ath9k_htc: fix race conditions when stop device
From: Sujith @ 2011-01-21 10:21 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: Luis R. Rodriguez, Jouni Malinen, Vasanthakumar Thiagarajan,
Senthil Balasubramanian, ath9k-devel, linux-wireless
In-Reply-To: <20110121061204.GA3041@redhat.com>
Stanislaw Gruszka wrote:
> Similar fix I already posted for ath9k. When stopping device, disable
> interrupts, kill tasklets and then works, in correct order. Patch drop
> mutex in them middle of a function, which I don't like and can possibly
> not be correct. Perhaps this can be arranged differently. Also
> there is no synchronize_irq, which IMHO should be added somewhere in
> htc/wmi stop.
It should be okay if the work instances are canceled first before the mutex
is acquired. And I don't think synchronize_irq() is required since this is a USB driver.
But when the driver is loaded and unloaded without bringing the interface up,
stop() wouldn't be called at all, but I guess it's alright since no tasklet would
have been scheduled. So just moving the tasklet_kill() functions to stop() would
be fine. I tested with ath9k_htc and saw no issues.
Sujith
^ permalink raw reply
* Re: [PATCH 2] cfg80211: Extend channel to frequency mapping for 802.11j
From: Luciano Coelho @ 2011-01-21 12:16 UTC (permalink / raw)
To: Bruno Randolf
Cc: johannes@sipsolutions.net, linville@tuxdriver.com,
gwingerde@gmail.com, libertas-dev@lists.infradead.org,
dcbw@redhat.com, IvDoorn@gmail.com,
linux-wireless@vger.kernel.org, users@rt2x00.serialmonkey.com,
bprodoehl@gmail.com
In-Reply-To: <20110117043728.8024.13541.stgit@localhost6.localdomain6>
On Mon, 2011-01-17 at 05:37 +0100, Bruno Randolf wrote:
> Extend channel to frequency mapping for 802.11j Japan 4.9GHz band, according to
> IEEE802.11 section 17.3.8.3.2 and Annex J. Because there are now overlapping
> channel numbers in the 2GHz and 5GHz band we can't map from channel to
> frequency without knowing the band. This is no problem as in most contexts we
> know the band. In places where we don't know the band (and WEXT compatibility)
> we assume the 2GHz band for channels below 14.
>
> This patch does not implement all channel to frequency mappings defined in
> 802.11, it's just an extension for 802.11j 20MHz channels. 5MHz and 10MHz
> channels as well as 802.11y channels have been omitted.
>
> The following drivers have been updated to reflect the API changes:
> iwl-3945, iwl-agn, iwmc3200wifi, libertas, mwl8k, rt2x00, wl1251, wl12xx.
> The drivers have been compile-tested only.
>
> Signed-off-by: Bruno Randolf <br1@einfach.org>
>
> ---
For the wl12xx part:
> diff --git a/drivers/net/wireless/wl12xx/rx.c b/drivers/net/wireless/wl12xx/rx.c
> index 682304c..ec8d843 100644
> --- a/drivers/net/wireless/wl12xx/rx.c
> +++ b/drivers/net/wireless/wl12xx/rx.c
> @@ -76,7 +76,7 @@ static void wl1271_rx_status(struct wl1271 *wl,
> */
> wl->noise = desc->rssi - (desc->snr >> 1);
>
> - status->freq = ieee80211_channel_to_frequency(desc->channel);
> + status->freq = ieee80211_channel_to_frequency(desc->channel, desc_band);
>
> if (desc->flags & WL1271_RX_DESC_ENCRYPT_MASK) {
> status->flag |= RX_FLAG_IV_STRIPPED | RX_FLAG_MMIC_STRIPPED;
Acked-by: Luciano Coelho <coelho@ti.com>
--
Cheers,
Luca.
^ permalink raw reply
* Re: [RFC/RFT] ath9k_htc: fix race conditions when stop device
From: Stanislaw Gruszka @ 2011-01-21 12:51 UTC (permalink / raw)
To: Sujith
Cc: Luis R. Rodriguez, Jouni Malinen, Vasanthakumar Thiagarajan,
Senthil Balasubramanian, ath9k-devel, linux-wireless
In-Reply-To: <19769.24127.113716.558660@gargle.gargle.HOWL>
On Fri, 21 Jan 2011 15:51:51 +0530
Sujith <m.sujith@gmail.com> wrote:
> Stanislaw Gruszka wrote:
> > Similar fix I already posted for ath9k. When stopping device, disable
> > interrupts, kill tasklets and then works, in correct order. Patch drop
> > mutex in them middle of a function, which I don't like and can possibly
> > not be correct. Perhaps this can be arranged differently. Also
> > there is no synchronize_irq, which IMHO should be added somewhere in
> > htc/wmi stop.
>
> It should be okay if the work instances are canceled first before the mutex
> is acquired.
IIRC, there is possibility to schedule priv->ps_work from ath9k_rx_tasklet (when
receive beacon frame and being in power save mode), so we should cancel that work
after assure tasklet will not be executed.
> And I don't think synchronize_irq() is required since this is a USB driver.
>
> But when the driver is loaded and unloaded without bringing the interface up,
> stop() wouldn't be called at all, but I guess it's alright since no tasklet would
> have been scheduled.
I assumed ath9k_htc_rxep() and ath9k_htc_txep() can not be called before _start()
(and after _stop() of course), hence removing tasklet_kill's from ath9k_deinit_priv()
> I tested with ath9k_htc and saw no issues.
Thanks!
Stanislaw
^ permalink raw reply
* Re: [PATCHv2] wl12xx: Increase scan channel dwell time for passive scans
From: Luciano Coelho @ 2011-01-21 13:35 UTC (permalink / raw)
To: juuso.oikarinen@nokia.com; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <1295332325-26477-1-git-send-email-juuso.oikarinen@nokia.com>
Hi Juuso,
Just a quick comment/question:
On Tue, 2011-01-18 at 07:32 +0100, juuso.oikarinen@nokia.com wrote:
> From: Juuso Oikarinen <juuso.oikarinen@nokia.com>
>
> The passive scan channel dwell time currently used is 30ms-60ms. A typical
> beacon interval for AP's is 100ms. This leads to a ~30% worst-case probability
> of finding an AP via passive scanning.
The beacon intervals are defined in TUs.
> For 5GHz bands for DFS frequencies passive scanning is the only scanning
> option. Hence for these, the probability of finding an AP is very low.
>
> To fix this, increase the passive channel scan dwell times (also the early
> leave value, as 5GHz channels are still typically very silent.) Use a value
> of 100ms, because that covers most typical AP configurations.
In the firmware API, the dwell times are expressed in milli-TUs. So I
guess here you mean "use a value of 100 TUs", isn't it?
> Based on testing the probability of finding an AP (102.4ms beacon interval) on
> a single scan round are as follows (based on 100 iterations):
Here you use milliseconds for the AP beacon interval. 102.4ms is 100
TUs, so that's correct.
It's just a bit confusing because of the slight difference between TUs
and msecs. Gery was wondering why you were using 100ms if the most
common beacon interval is 102.4ms (100 TUs). Of course, you're actually
using 100 TUs, so it's fine.
I just think it's easier to follow if you forget msecs and use only TUs
in your explanation.
--
Cheers,
Luca.
^ permalink raw reply
* Re: [PATCH] mac80211: Optimize scans on current operating channel.
From: Ben Greear @ 2011-01-21 13:59 UTC (permalink / raw)
To: Helmut Schaa; +Cc: linux-wireless
In-Reply-To: <201101210919.13673.helmut.schaa@googlemail.com>
On 01/21/2011 12:19 AM, Helmut Schaa wrote:
> Am Freitag, 21. Januar 2011 schrieb greearb@candelatech.com:
>> From: Ben Greear<greearb@candelatech.com>
>>
>> This should decrease un-necessary flushes, on/off channel work,
>> and channel changes in cases where the only scanned channel is
>> the current operating channel.
>> /* scanning finished during invoking of handlers */
>> diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
>> index 3e660db..5804fbb 100644
>> --- a/net/mac80211/scan.c
>> +++ b/net/mac80211/scan.c
>> @@ -293,11 +293,14 @@ static void __ieee80211_scan_completed_finish(struct ieee80211_hw *hw,
>> {
>> struct ieee80211_local *local = hw_to_local(hw);
>>
>> - ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
>> + if (test_bit(SCAN_LEFT_OPER_CHANNEL,&local->scanning) || was_hw_scan)
>> + ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
>> +
>
> Why not
>
> if (!test_bit(SCAN_OFF_CHANNEL,&local->scanning) || was_hw_scan)
>
> instead? If the last scanned channel was a off channel scan this bit will
> still be set. And that way you don't need this new flag.
If the last channel scanned is the oper-channel, I'm not sure we
call the return-to-oper-channel logic in the scan code. I can
double check that, and either way, your suggestion would probably
be OK.
>
>> if (!was_hw_scan) {
>> ieee80211_configure_filter(local);
>> drv_sw_scan_complete(local);
>> - ieee80211_offchannel_return(local, true);
>> + if (test_bit(SCAN_LEFT_OPER_CHANNEL,&local->scanning))
>> + ieee80211_offchannel_return(local, true);
>
> Same here.
What if the last channel to scan was the operating channel? We are now
back on channel, but if we earlier scanned something that was not the
operating channel, we would have called the offchannel stop beacon
stuff, and just returning to the oper channel in the scan code doesn't
call the offchannel_return logic if I recall correctly.
>
>> }
>>
>> mutex_lock(&local->mtx);
>> @@ -397,13 +400,10 @@ static int ieee80211_start_sw_scan(struct ieee80211_local *local)
>>
>> drv_sw_scan_start(local);
>>
>> - ieee80211_offchannel_stop_beaconing(local);
>> -
>
> You could split that out in a second patch since this change might also make sense
> on its own.
Maybe, but it's pretty inter-related to what I'm trying to accomplish...
>
>> local->leave_oper_channel_time = 0;
>> local->next_scan_state = SCAN_DECISION;
>> local->scan_channel_idx = 0;
>> -
>> - drv_flush(local, false);
>> + __clear_bit(SCAN_LEFT_OPER_CHANNEL,&local->scanning);
>>
>> ieee80211_configure_filter(local);
>>
>> @@ -543,7 +543,18 @@ static void ieee80211_scan_state_decision(struct ieee80211_local *local,
>> }
>> mutex_unlock(&local->iflist_mtx);
>>
>> - if (local->scan_channel) {
>> + next_chan = local->scan_req->channels[local->scan_channel_idx];
>> +
>> + if (local->oper_channel == local->hw.conf.channel) {
>
> Isn't that equivalent to !test_bit(SCAN_OFF_CHANNEL, ...)?
It probably should be, but if I can compare channels directly,
that seems less likely to break than depending on having a flag
set correctly in all cases...especially border cases where oper-channel
is first, last, or only channel to be scanned.
Thanks for the review. I'll try to post a revised patch
later today.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: [PATCH] mac80211: Optimize scans on current operating channel.
From: Ben Greear @ 2011-01-21 14:27 UTC (permalink / raw)
To: Helmut Schaa; +Cc: linux-wireless
In-Reply-To: <4D39915C.9080405@candelatech.com>
On 01/21/2011 05:59 AM, Ben Greear wrote:
> On 01/21/2011 12:19 AM, Helmut Schaa wrote:
>> Am Freitag, 21. Januar 2011 schrieb greearb@candelatech.com:
>>> From: Ben Greear<greearb@candelatech.com>
>>>
>>> This should decrease un-necessary flushes, on/off channel work,
>>> and channel changes in cases where the only scanned channel is
>>> the current operating channel.
>
>>> /* scanning finished during invoking of handlers */
>>> diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
>>> index 3e660db..5804fbb 100644
>>> --- a/net/mac80211/scan.c
>>> +++ b/net/mac80211/scan.c
>>> @@ -293,11 +293,14 @@ static void __ieee80211_scan_completed_finish(struct ieee80211_hw *hw,
>>> {
>>> struct ieee80211_local *local = hw_to_local(hw);
>>>
>>> - ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
>>> + if (test_bit(SCAN_LEFT_OPER_CHANNEL,&local->scanning) || was_hw_scan)
>>> + ieee80211_hw_config(local, IEEE80211_CONF_CHANGE_CHANNEL);
>>> +
>>
>> Why not
>>
>> if (!test_bit(SCAN_OFF_CHANNEL,&local->scanning) || was_hw_scan)
>>
>> instead? If the last scanned channel was a off channel scan this bit will
>> still be set. And that way you don't need this new flag.
>
> If the last channel scanned is the oper-channel, I'm not sure we
> call the return-to-oper-channel logic in the scan code. I can
> double check that, and either way, your suggestion would probably
> be OK.
>>
>>> if (!was_hw_scan) {
>>> ieee80211_configure_filter(local);
>>> drv_sw_scan_complete(local);
>>> - ieee80211_offchannel_return(local, true);
>>> + if (test_bit(SCAN_LEFT_OPER_CHANNEL,&local->scanning))
>>> + ieee80211_offchannel_return(local, true);
>>
>> Same here.
>
> What if the last channel to scan was the operating channel? We are now
> back on channel, but if we earlier scanned something that was not the
> operating channel, we would have called the offchannel stop beacon
> stuff, and just returning to the oper channel in the scan code doesn't
> call the offchannel_return logic if I recall correctly.
Ok, I looked at this more, and if the oper-channel is not the first
channel in the scan list, we can be scanning on the oper channel without
having called the enter_oper_channel logic. This means that the SCAN_OFF_CHANNEL
flag can be TRUE, and yet we can be configured for the oper-channel.
If the oper-channel is the one and only channel to scan, then SCAN_OFF_CHANNEL
will not be set.
It's also possible we temporarily flipped back to the oper-channel state
in the state_decision method.
And maybe then the scan is canceled half way through?
I can imagine someone wanting to call the enter-oper-channel logic if we start
scanning on the oper-channel, which would break the offchannel_return logic
in the patch snippet above if we only test for SCAN_OFF_CHANNEL.
It is too much for me to follow, so I think a new flag specifying only that we
need to call the offchannel_return logic is the most straight-forward way
to go.
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* RE: [PATCH] staging: brcm80211: fix suspend/resume issue in brcmsmac
From: Arend Van Spriel @ 2011-01-21 14:37 UTC (permalink / raw)
To: Greg KH
Cc: gregkh@suse.de, devel@linuxdriverproject.org,
linux-wireless@vger.kernel.org
In-Reply-To: <20110120201753.GA18529@kroah.com>
Hi Greg,
I did not retest the suspend/resume change functionally (only compiled it). I decided
to do that on v2.6.38-rc1 to be sure and on my system the suspend works. However,
upon resume my system reboots without any feedback. System seem to come to
live (DVD spinning) and then BIOS boot screen pops up. So I tried suspend/resume
without our driver loaded. Results were the same. Also 2.6.37 shows same behaviour.
On 2.6.37-rc5 I did not have any issues and suspend/resume worked for our driver
and the kernel in general. Anyone else observed such behaviour?
Gr. AvS
________________________________________
From: linux-wireless-owner@vger.kernel.org [linux-wireless-owner@vger.kernel.org] On Behalf Of Greg KH [greg@kroah.com]
Sent: Thursday, January 20, 2011 9:17 PM
To: Arend Van Spriel
Cc: gregkh@suse.de; devel@linuxdriverproject.org; linux-wireless@vger.kernel.org
Subject: Re: [PATCH] staging: brcm80211: fix suspend/resume issue in brcmsmac
On Wed, Jan 12, 2011 at 06:59:27PM +0100, Arend van Spriel wrote:
> PCI PM suspend callback took down the interface and resume brought
> it back up. In the mac80211 context this is done in subsequent calls.
> Rework implementation so that suspend only stores config, and sets
> PCI power state. The resume return to full power state (D0), restores
> the config, and brings hardware back up. Full bringup is done by
> subsequent mac80211 calls.
>
> Reviewed-by: Brett Rudley <brudley@broadcom.com>
> Signed-off-by: Arend van Spriel <arend@broadcom.com>
> ---
> drivers/staging/brcm80211/brcmsmac/wl_mac80211.c | 28 ++++++++++++---------
> drivers/staging/brcm80211/brcmsmac/wl_mac80211.h | 4 +--
> 2 files changed, 17 insertions(+), 15 deletions(-)
This patch doesn't apply to Linus's tree, which is where it needs to go
right now. Can you please redo it so that I can apply it?
thanks,
greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [PATCH] staging: brcm80211: fix suspend/resume issue in brcmsmac
From: Greg KH @ 2011-01-21 15:12 UTC (permalink / raw)
To: Arend Van Spriel
Cc: Greg KH, devel@linuxdriverproject.org,
linux-wireless@vger.kernel.org
In-Reply-To: <400C43189542CE41BC0A5B252FC90136952F05955A@SJEXCHCCR02.corp.ad.broadcom.com>
On Fri, Jan 21, 2011 at 06:37:54AM -0800, Arend Van Spriel wrote:
> Hi Greg,
>
> I did not retest the suspend/resume change functionally (only compiled it). I decided
> to do that on v2.6.38-rc1 to be sure and on my system the suspend works. However,
> upon resume my system reboots without any feedback. System seem to come to
> live (DVD spinning) and then BIOS boot screen pops up. So I tried suspend/resume
> without our driver loaded. Results were the same. Also 2.6.37 shows same behaviour.
>
> On 2.6.37-rc5 I did not have any issues and suspend/resume worked for our driver
> and the kernel in general. Anyone else observed such behaviour?
Yes, lots of other people reported problems with this, I thought you got
the reports (like from Jon Masters?)
thanks,
greg k-h
^ permalink raw reply
* [PATCH] ath9k_hw: replace magic values in register writes with proper defines
From: Felix Fietkau @ 2011-01-21 17:46 UTC (permalink / raw)
To: linux-wireless; +Cc: linville, lrodriguez
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
---
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 24 ++++++++++++------------
drivers/net/wireless/ath/ath9k/ar9003_phy.h | 2 ++
2 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 4819747..a256556 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3959,19 +3959,19 @@ static int ar9003_hw_tx_power_regwrite(struct ath_hw *ah, u8 * pPwrArray)
{
#define POW_SM(_r, _s) (((_r) & 0x3f) << (_s))
/* make sure forced gain is not set */
- REG_WRITE(ah, 0xa458, 0);
+ REG_WRITE(ah, AR_PHY_TX_FORCED_GAIN, 0);
/* Write the OFDM power per rate set */
/* 6 (LSB), 9, 12, 18 (MSB) */
- REG_WRITE(ah, 0xa3c0,
+ REG_WRITE(ah, AR_PHY_POWER_TX_RATE(0),
POW_SM(pPwrArray[ALL_TARGET_LEGACY_6_24], 24) |
POW_SM(pPwrArray[ALL_TARGET_LEGACY_6_24], 16) |
POW_SM(pPwrArray[ALL_TARGET_LEGACY_6_24], 8) |
POW_SM(pPwrArray[ALL_TARGET_LEGACY_6_24], 0));
/* 24 (LSB), 36, 48, 54 (MSB) */
- REG_WRITE(ah, 0xa3c4,
+ REG_WRITE(ah, AR_PHY_POWER_TX_RATE(1),
POW_SM(pPwrArray[ALL_TARGET_LEGACY_54], 24) |
POW_SM(pPwrArray[ALL_TARGET_LEGACY_48], 16) |
POW_SM(pPwrArray[ALL_TARGET_LEGACY_36], 8) |
@@ -3980,14 +3980,14 @@ static int ar9003_hw_tx_power_regwrite(struct ath_hw *ah, u8 * pPwrArray)
/* Write the CCK power per rate set */
/* 1L (LSB), reserved, 2L, 2S (MSB) */
- REG_WRITE(ah, 0xa3c8,
+ REG_WRITE(ah, AR_PHY_POWER_TX_RATE(2),
POW_SM(pPwrArray[ALL_TARGET_LEGACY_1L_5L], 24) |
POW_SM(pPwrArray[ALL_TARGET_LEGACY_1L_5L], 16) |
/* POW_SM(txPowerTimes2, 8) | this is reserved for AR9003 */
POW_SM(pPwrArray[ALL_TARGET_LEGACY_1L_5L], 0));
/* 5.5L (LSB), 5.5S, 11L, 11S (MSB) */
- REG_WRITE(ah, 0xa3cc,
+ REG_WRITE(ah, AR_PHY_POWER_TX_RATE(3),
POW_SM(pPwrArray[ALL_TARGET_LEGACY_11S], 24) |
POW_SM(pPwrArray[ALL_TARGET_LEGACY_11L], 16) |
POW_SM(pPwrArray[ALL_TARGET_LEGACY_5S], 8) |
@@ -3997,7 +3997,7 @@ static int ar9003_hw_tx_power_regwrite(struct ath_hw *ah, u8 * pPwrArray)
/* Write the HT20 power per rate set */
/* 0/8/16 (LSB), 1-3/9-11/17-19, 4, 5 (MSB) */
- REG_WRITE(ah, 0xa3d0,
+ REG_WRITE(ah, AR_PHY_POWER_TX_RATE(4),
POW_SM(pPwrArray[ALL_TARGET_HT20_5], 24) |
POW_SM(pPwrArray[ALL_TARGET_HT20_4], 16) |
POW_SM(pPwrArray[ALL_TARGET_HT20_1_3_9_11_17_19], 8) |
@@ -4005,7 +4005,7 @@ static int ar9003_hw_tx_power_regwrite(struct ath_hw *ah, u8 * pPwrArray)
);
/* 6 (LSB), 7, 12, 13 (MSB) */
- REG_WRITE(ah, 0xa3d4,
+ REG_WRITE(ah, AR_PHY_POWER_TX_RATE(5),
POW_SM(pPwrArray[ALL_TARGET_HT20_13], 24) |
POW_SM(pPwrArray[ALL_TARGET_HT20_12], 16) |
POW_SM(pPwrArray[ALL_TARGET_HT20_7], 8) |
@@ -4013,7 +4013,7 @@ static int ar9003_hw_tx_power_regwrite(struct ath_hw *ah, u8 * pPwrArray)
);
/* 14 (LSB), 15, 20, 21 */
- REG_WRITE(ah, 0xa3e4,
+ REG_WRITE(ah, AR_PHY_POWER_TX_RATE(9),
POW_SM(pPwrArray[ALL_TARGET_HT20_21], 24) |
POW_SM(pPwrArray[ALL_TARGET_HT20_20], 16) |
POW_SM(pPwrArray[ALL_TARGET_HT20_15], 8) |
@@ -4023,7 +4023,7 @@ static int ar9003_hw_tx_power_regwrite(struct ath_hw *ah, u8 * pPwrArray)
/* Mixed HT20 and HT40 rates */
/* HT20 22 (LSB), HT20 23, HT40 22, HT40 23 (MSB) */
- REG_WRITE(ah, 0xa3e8,
+ REG_WRITE(ah, AR_PHY_POWER_TX_RATE(10),
POW_SM(pPwrArray[ALL_TARGET_HT40_23], 24) |
POW_SM(pPwrArray[ALL_TARGET_HT40_22], 16) |
POW_SM(pPwrArray[ALL_TARGET_HT20_23], 8) |
@@ -4035,7 +4035,7 @@ static int ar9003_hw_tx_power_regwrite(struct ath_hw *ah, u8 * pPwrArray)
* correct PAR difference between HT40 and HT20/LEGACY
* 0/8/16 (LSB), 1-3/9-11/17-19, 4, 5 (MSB)
*/
- REG_WRITE(ah, 0xa3d8,
+ REG_WRITE(ah, AR_PHY_POWER_TX_RATE(6),
POW_SM(pPwrArray[ALL_TARGET_HT40_5], 24) |
POW_SM(pPwrArray[ALL_TARGET_HT40_4], 16) |
POW_SM(pPwrArray[ALL_TARGET_HT40_1_3_9_11_17_19], 8) |
@@ -4043,7 +4043,7 @@ static int ar9003_hw_tx_power_regwrite(struct ath_hw *ah, u8 * pPwrArray)
);
/* 6 (LSB), 7, 12, 13 (MSB) */
- REG_WRITE(ah, 0xa3dc,
+ REG_WRITE(ah, AR_PHY_POWER_TX_RATE(7),
POW_SM(pPwrArray[ALL_TARGET_HT40_13], 24) |
POW_SM(pPwrArray[ALL_TARGET_HT40_12], 16) |
POW_SM(pPwrArray[ALL_TARGET_HT40_7], 8) |
@@ -4051,7 +4051,7 @@ static int ar9003_hw_tx_power_regwrite(struct ath_hw *ah, u8 * pPwrArray)
);
/* 14 (LSB), 15, 20, 21 */
- REG_WRITE(ah, 0xa3ec,
+ REG_WRITE(ah, AR_PHY_POWER_TX_RATE(11),
POW_SM(pPwrArray[ALL_TARGET_HT40_21], 24) |
POW_SM(pPwrArray[ALL_TARGET_HT40_20], 16) |
POW_SM(pPwrArray[ALL_TARGET_HT40_15], 8) |
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.h b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
index 59bab6b..8bdda2c 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.h
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.h
@@ -486,6 +486,8 @@
#define AR_PHY_HEAVYCLIP_40 (AR_SM_BASE + 0x1ac)
#define AR_PHY_ILLEGAL_TXRATE (AR_SM_BASE + 0x1b0)
+#define AR_PHY_POWER_TX_RATE(_d) (AR_SM_BASE + 0x1c0 + ((_d) << 2))
+
#define AR_PHY_PWRTX_MAX (AR_SM_BASE + 0x1f0)
#define AR_PHY_POWER_TX_SUB (AR_SM_BASE + 0x1f4)
--
1.7.3.2
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox