* Re: [RFC 02/07] compat-wireless: Connection quality monitor extensions
From: Johannes Berg @ 2011-10-13 10:49 UTC (permalink / raw)
To: Janusz Dziedzic
Cc: Dmitry Tarnyagin, linux-wireless, Bartosz MARKOWSKI,
Janusz DZIEDZIC
In-Reply-To: <CAFED-jk8xp62A8cyR1qbbFzfM1AJRMUzGQ1Z3b4pDGdBPWYOrw@mail.gmail.com>
Hi,
Please trim your quotes. There's no point in quoting all of the email to
reply to specific points.
> >> +++ b/include/linux/nl80211.h
> >> @@ -2311,6 +2311,14 @@ enum nl80211_ps_state {
> >> * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event
> >> * @NL80211_ATTR_CQM_PKT_LOSS_EVENT: a u32 value indicating that this many
> >> * consecutive packets were not acknowledged by the peer
> >> + * @NL80211_ATTR_CQM_BEACON_MISS_THOLD: BEACON threshold. This value
> >> specifies
> >> + * the threshold for the BEACON loss level at which an event will be
> >> + * sent. Zero to disable.
> >
> > Should it really be zero to disable rather than leaving it out to
> > disable?
>
> Similar like in case of NL80211_ATTR_CQM_RSSI_
> Usefull to disable in run-time also - when associated.
I don't think you understood my question, but I think it's actually OK
as is so you can change other config w/o disabling this.
> >> + * @NL80211_ATTR_CQM_BEACON_MISS_THOLD_EVENT: BEACON miss event
> >> + * @NL80211_ATTR_CQM_TX_FAIL_THOLD: TX threshold. This value specifies the
> >> + * the threshold for the TX loss level at which an event will be
> >> + * sent. Zero to disable.
> >> + * @NL80211_ATTR_CQM_TX_FAIL_THOLD_EVENT: TX threshold event
> >
> > How's this not the same as PKT_LOSS_EVENT?
>
> Based on supplicant code - this is mapped to EVENT_STATION_LOW_ACK.
> Seems used only in case we are GO/AP and not configurable from user space.
> I think possible to reuse PKT_LOSS_EVENT.
> But still new HW_FLAGS is required for that and counter configuration
> from user space could be usefull.
Yeah so add the config for PKT_LOSS_EVENT.
> >> + if (!(local->hw.flags &
> IEEE80211_HW_SUPPORTS_CQM_BEACON_MISS)) {
> >> + if (sdata->vif.type != NL80211_IFTYPE_STATION)
> >> + return -EOPNOTSUPP;
> >> + return 0;
> >
> > This looks/is wrong in multiple ways.
>
>
> Could you add more description here - this is almost the same like
> ieee80211_set_cqm_rssi_config() fuction.
Well so evidently this accepts the config if the HW supports it and the
interface type isn't station -- that's bad.
Also, I haven't seen any evidence that you implemented support for this
in mac80211 if the device doesn't support it, so you can't do it this
way.
> >> - } else {
> >> + } else if (!(local->hw.flags &
> >> + IEEE80211_HW_SUPPORTS_CQM_BEACON_MISS) &&
> >> + !(local->hw.flags &
> >> + IEEE80211_HW_SUPPORTS_CQM_TX_FAIL)) {
> >> /*
> >> * We actually lost the connection ... or did we?
> >> * Let's make sure!
> >
> > explain.
>
> In case of BEACON_MISS we should not report connection_loss to upper
> layer, we should only notify about beacon_miss and give a chance to
> roam without disconnection. Without that first we will see
> disconnection in wpa_supplicant. Next if roam will fail and driver
> support IEEE80211_HW_SUPPORTS_CQM_BEACON_MISS should report this
> connection_lost by itself via ieee80211_connection_loss().
So then the test is wrong -- it has to be dependent on wpa_s actually
having asked for this.
I really don't want to be reviewing this with so many basic errors. It
looks like you blindly copied parts of the other CQM things without
understanding what they do. Please find somebody else to review &
explain things with you first, I can't do that at this point.
johannes
^ permalink raw reply
* Re: [RFC 02/07] compat-wireless: Connection quality monitor extensions
From: Janusz Dziedzic @ 2011-10-13 10:42 UTC (permalink / raw)
To: Johannes Berg
Cc: Dmitry Tarnyagin, linux-wireless, Bartosz MARKOWSKI,
Janusz DZIEDZIC
In-Reply-To: <1318407677.3933.18.camel@jlt3.sipsolutions.net>
Hello Johannes,
Generally we deliver this patch because is usefull in roaming cases.
Speed up roaming when beacon miss will be detected (without
disconnection in upper layer).
Some questions below.
2011/10/12 Johannes Berg <johannes@sipsolutions.net>:
> On Wed, 2011-10-12 at 03:02 +0200, Dmitry Tarnyagin wrote:
>
>> added:
>> * beacon miss threshold - This value specifies the threshold
>> for the BEACON loss level
>> * tx fail - This value specifies the threshold for the TX loss level
>
> That's a bit short for a changelog for such a big patch. The patch might
> stand to be split up into two and be explained better.
>
> Also, as Julian pointed out -- get your compat vs. wireless tree in
> order. You don't want to be modifying the compat repository, it's even
> impossible, you need to be submitting patches against wireless-next or
> -testing. You also need to make sure they apply against those trees,
> which this patch obviously can't:
>
>
>> include/linux/compat-3.0.h | 2 +
>
> as you can see easily :)
>
>> +++ b/include/linux/nl80211.h
>> @@ -2311,6 +2311,14 @@ enum nl80211_ps_state {
>> * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event
>> * @NL80211_ATTR_CQM_PKT_LOSS_EVENT: a u32 value indicating that this many
>> * consecutive packets were not acknowledged by the peer
>> + * @NL80211_ATTR_CQM_BEACON_MISS_THOLD: BEACON threshold. This value
>> specifies
>> + * the threshold for the BEACON loss level at which an event will be
>> + * sent. Zero to disable.
>
> Should it really be zero to disable rather than leaving it out to
> disable?
Similar like in case of NL80211_ATTR_CQM_RSSI_
Usefull to disable in run-time also - when associated.
>
>> + * @NL80211_ATTR_CQM_BEACON_MISS_THOLD_EVENT: BEACON miss event
>> + * @NL80211_ATTR_CQM_TX_FAIL_THOLD: TX threshold. This value specifies the
>> + * the threshold for the TX loss level at which an event will be
>> + * sent. Zero to disable.
>> + * @NL80211_ATTR_CQM_TX_FAIL_THOLD_EVENT: TX threshold event
>
> How's this not the same as PKT_LOSS_EVENT?
Based on supplicant code - this is mapped to EVENT_STATION_LOW_ACK.
Seems used only in case we are GO/AP and not configurable from user space.
I think possible to reuse PKT_LOSS_EVENT.
But still new HW_FLAGS is required for that and counter configuration
from user space could be usefull.
>
> Some advertising for whether this is supported or not is necessary.
>
>> +++ b/include/net/mac80211.h
>
> Again a fairly complex patch modifying both cfg80211 and mac80211 -- not
> good. Keep in mind that there are in fact drivers not using mac80211.
>
>> @@ -244,6 +244,10 @@ enum ieee80211_rssi_event {
>> * @cqm_rssi_thold: Connection quality monitor RSSI threshold, a zero
>> value
>> * implies disabled
>> * @cqm_rssi_hyst: Connection quality monitor RSSI hysteresis
>> + * @cqm_beacon_miss_thold: Connection quality monitor beacon threshold, a
>> zero
>> + * value implies disabled
>> + * @cqm_tx_fail_thold: Connection quality monitor tx threshold, a zero
>> value
>> + * implies disabled
>
> Your line-wrapping makes this hard to read :(
>
>> +++ b/net/mac80211/cfg.c
>> @@ -1751,6 +1751,58 @@ static int ieee80211_set_cqm_rssi_config(struct
>> wiphy *wiphy,
>> return 0;
>> }
>>
>> +static int ieee80211_set_cqm_beacon_miss_config(struct wiphy *wiphy,
>> + struct net_device *dev,
>> + u32 beacon_thold)
>> +{
>> + struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
>> + struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
>> + struct ieee80211_vif *vif = &sdata->vif;
>> + struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
>> +
>> + if (beacon_thold == bss_conf->cqm_beacon_miss_thold)
>> + return 0;
>> +
>> + bss_conf->cqm_beacon_miss_thold = beacon_thold;
>> +
>> + if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_BEACON_MISS)) {
>> + if (sdata->vif.type != NL80211_IFTYPE_STATION)
>> + return -EOPNOTSUPP;
>> + return 0;
>
> This looks/is wrong in multiple ways.
Could you add more description here - this is almost the same like
ieee80211_set_cqm_rssi_config() fuction.
>
>> +++ b/net/mac80211/mlme.c
>> @@ -2174,7 +2174,10 @@ void ieee80211_sta_work(struct
>> ieee80211_sub_if_data *sdata)
>> ifmgd->probe_send_count, max_tries);
>> #endif
>> ieee80211_mgd_probe_ap_send(sdata);
>> - } else {
>> + } else if (!(local->hw.flags &
>> + IEEE80211_HW_SUPPORTS_CQM_BEACON_MISS) &&
>> + !(local->hw.flags &
>> + IEEE80211_HW_SUPPORTS_CQM_TX_FAIL)) {
>> /*
>> * We actually lost the connection ... or did we?
>> * Let's make sure!
>
> explain.
In case of BEACON_MISS we should not report connection_loss to upper
layer, we should only notify about beacon_miss and give a chance to
roam without disconnection. Without that first we will see
disconnection in wpa_supplicant. Next if roam will fail and driver
support IEEE80211_HW_SUPPORTS_CQM_BEACON_MISS should report this
connection_lost by itself via ieee80211_connection_loss().
>
>> diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
>> index 21fc970..4194b3e 100644
>> --- a/net/wireless/mlme.c
>> +++ b/net/wireless/mlme.c
>> @@ -1097,6 +1097,7 @@ void cfg80211_gtk_rekey_notify(struct net_device
>> *dev, const u8 *bssid,
>> }
>> EXPORT_SYMBOL(cfg80211_gtk_rekey_notify);
>>
>> +
>> void cfg80211_pmksa_candidate_notify(struct net_device *dev, int index,
>
> spurious whitespace change
>
> johannes
>
> --
> 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
>
BR
Janusz
^ permalink raw reply
* Re: [PATCH] ath6kl: Fix endpoint_stats debugfs buffer length calculation
From: Kalle Valo @ 2011-10-13 10:29 UTC (permalink / raw)
To: Jouni Malinen; +Cc: linux-wireless, Joe Perches
In-Reply-To: <20111011190821.GA29419@jouni.qca.qualcomm.com>
On 10/11/2011 10:08 PM, Jouni Malinen wrote:
> The previous version did not really make much sense and the theoretical
> maximum length would be a bit longer. Calculate the length more
> accurately. In addition, there is no need to clear the buffer, so use
> kmalloc instead of kzalloc. For bonus points, add the forgotten
> cred_rpt_from_other value to the file.
Thanks, applied.
Kalle
^ permalink raw reply
* Re: [PATCH] ath6kl: unbreak suspend
From: Kalle Valo @ 2011-10-13 10:22 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless, Sam Leffler
In-Reply-To: <20111012074216.26442.87419.stgit@localhost6.localdomain6>
On 10/12/2011 10:42 AM, Kalle Valo wrote:
> From: Sam Leffler <sleffler@chromium.org>
>
> Add missing {}'s that caused ath6kl_sdio_suspend to always return -EINVAL
> causing suspend to be aborted.
>
> kvalo: I broke this in commit f7325b85e ("ath6kl: add sdio debug messages")
Applied. Thanks Sam.
Kalle
^ permalink raw reply
* Re: [PATCH 22/22] brcm80211: removed file wifi.c
From: Arend van Spriel @ 2011-10-13 8:51 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
Alwin Beukers
In-Reply-To: <CAB=NE6XYFB4uWcRR1kSNKLaJC4W1E3uLZOd3hGEArjzsmNG4PQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 843 bytes --]
On 10/12/2011 11:54 PM, Luis R. Rodriguez wrote:
> On Wed, Oct 12, 2011 at 11:51 AM, Arend van Spriel <arend@broadcom.com> wrote:
>> From: Alwin Beukers <alwin@broadcom.com>
>>
>> Wifi.c was empty after previous cleanups, so it was removed.
>>
>> Reviewed-by: Arend van Spriel <arend@broadcom.com>
>> Signed-off-by: Arend van Spriel <arend@broadcom.com>
>
> Heh, remove Reviewed-by dude.
>
> Luis
>
I had a remark on this in earlier commits. So I am clearly missing the
point here. The author submitted this change and others for review to me
and I reviewed it as requested. Hence the Reviewed-by: entry.
I have been given the task to publish these patches and I sign them off
for the "Developer's Certificate of Origin". Hence the Signed-off-by: entry.
Is there something wrong with this reasoning?
Gr. AvS
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]
^ permalink raw reply
* Re: [PATCH] ath6kl: fix firmware start address for ar6003 hw2.0
From: Kalle Valo @ 2011-10-13 6:25 UTC (permalink / raw)
To: Sangwook Lee; +Cc: linux-wireless
In-Reply-To: <CADPsn1bWC6=dgoUn7_1--a=jcNHq0Hw6Drmg+8HcY5xPLVrSBA@mail.gmail.com>
Hi Sangwook,
On 10/12/2011 01:45 PM, Sangwook Lee wrote:
>>>> Before I'm able to find a hw 2.0 device, can you try to debug this more?
>>>> When scanning fails can check if ath6kldev_intr_bh_handler() is called
>>>> or not? When scanning fails it usually happens because irqs are failing.
>
> Yes, it seems true. when scanning fails. it failed to receive no more sdio irqs.
Do you get any interrupts at all from ar6003?
> For the temporary testing, I made sdio polling kernel thread and then let it
> call ath6kldev_intr_bh_handler(). With hw2.0, it works fine with
> scanning issue.
> Do you know any ideas to solve this problem clearly ?
Sorry, I don't have any ideas right now. I have seen interrupt problems
before but they have always been due to a problem in the SDIO
controller. I don't know if your problem is an SDIO controller problem
or just related to hw2.0.
Kalle
^ permalink raw reply
* [PATCH v2] ath9k_hw: Fix ASPM L1 issue for AR9480
From: Rajkumar Manoharan @ 2011-10-13 5:19 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Rajkumar Manoharan, stable
Because of not clearing Bit 14 of AR_WA, the ASPM L1 is not
enabled when entering into sleep mode. AR9480 does not need
bit 14 to be set.
Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index fd7c207..58794a4 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -541,6 +541,9 @@ static int __ath9k_hw_init(struct ath_hw *ah)
return -EIO;
}
+ if (AR_SREV_9480(ah))
+ ah->WARegVal &= ~AR_WA_D3_L1_DISABLE;
+
ath9k_hw_init_defaults(ah);
ath9k_hw_init_config(ah);
@@ -1776,8 +1779,7 @@ static void ath9k_set_power_sleep(struct ath_hw *ah, int setChip)
}
/* Clear Bit 14 of AR_WA after putting chip into Full Sleep mode. */
- if (!AR_SREV_9480(ah))
- REG_WRITE(ah, AR_WA, ah->WARegVal & ~AR_WA_D3_L1_DISABLE);
+ REG_WRITE(ah, AR_WA, ah->WARegVal & ~AR_WA_D3_L1_DISABLE);
}
/*
--
1.7.7
^ permalink raw reply related
* Re: [PATCH 3.2 1/2] Revert "b43: trivial: do not report any link quality instead of invalid one"
From: Rafał Miłecki @ 2011-10-13 4:38 UTC (permalink / raw)
To: sedat.dilek; +Cc: linux-wireless, John W. Linville, b43-dev
In-Reply-To: <CA+icZUXzPSm8FdqMbAm34GEDVM-BADOwY==aYiUegd0uhEnACQ@mail.gmail.com>
W dniu 13 października 2011 00:22 użytkownik Sedat Dilek
<sedat.dilek@googlemail.com> napisał:
> 2011/10/12 Rafał Miłecki <zajec5@gmail.com>:
>> This reverts commit 55ad5962e97430c83d51df36fc18865ee4f78c48.
>>
>> I assumed N is newer than LP, which isn't true. This regressed LP case.
>>
>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
>> ---
>> It seems that wasn't so "trivial", sorry for this regression :|
>> ---
>> drivers/net/wireless/b43/xmit.c | 12 +++++-------
>> 1 files changed, 5 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
>> index 5f812d1..b8de62c 100644
>> --- a/drivers/net/wireless/b43/xmit.c
>> +++ b/drivers/net/wireless/b43/xmit.c
>> @@ -735,13 +735,11 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
>> }
>>
>> /* Link quality statistics */
>> - if ((chanstat & B43_RX_CHAN_PHYTYPE) >= B43_PHYTYPE_N) {
>> - /*
>> - s8 rssi = max(rxhdr->power0, rxhdr->power1);
>> - TODO: Find out what the rssi value is (dBm or percentage?)
>> - and also find out what the maximum possible value is.
>> - Fill status.ssi and status.signal fields.
>> - */
>> + if ((chanstat & B43_RX_CHAN_PHYTYPE) == B43_PHYTYPE_N) {
>> +// s8 rssi = max(rxhdr->power0, rxhdr->power1);
>> + //TODO: Find out what the rssi value is (dBm or percentage?)
>> + // and also find out what the maximum possible value is.
>> + // Fill status.ssi and status.signal fields.
>> } else {
>> status.signal = b43_rssi_postprocess(dev, rxhdr->jssi,
>> (phystat0 & B43_RX_PHYST0_OFDM),
>> --
>> 1.7.3.4
>>
>
> Commenting style?
> Isn't C99-like commenting not well seen?
This is simple revert, the code was like that before my patch.
My 2/2 patch remove that ugly commenting style.
--
Rafał
^ permalink raw reply
* Re: [PATCH] ath9k_hw: Fix ASPM L1 issue for AR9462
From: Rajkumar Manoharan @ 2011-10-13 3:46 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, stable
In-Reply-To: <20111012185034.GH18764@tuxdriver.com>
On Wed, Oct 12, 2011 at 02:50:34PM -0400, John W. Linville wrote:
> On Wed, Oct 12, 2011 at 02:40:44PM -0400, John W. Linville wrote:
> > On Mon, Oct 10, 2011 at 11:25:45AM +0530, Rajkumar Manoharan wrote:
> > > Because of not clearing Bit 14 of AR_WA, the ASPM L1 is not
> > > enabled when entering into sleep mode. AR9462 does not need
> > > bit 14 to be set.
> > >
> > > Cc: stable@kernel.org
> > > Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
> >
> > CC [M] drivers/net/wireless/ath/ath9k/hw.o
> > drivers/net/wireless/ath/ath9k/hw.c: In function ???__ath9k_hw_init???:
> > drivers/net/wireless/ath/ath9k/hw.c:544:2: error: implicit declaration of function ???AR_SREV_9462???
> >
> > Missing a patch dependency?
>
> I see that is defined by a series posted just before that -- one that
> hasn't even appeared in wireless-next yet. Cc: stable@kernel.org
> seems a bit inappropriate...
>
> That series needs rework anyway -- how about you just fold this one
> into that earlier series?
>
First of all sorry for the inconvenience. While splitting stable patch
from the patchset, I made it on top of patchset that caused the dependancy.
I will resend patch.
--
Rajkumar
^ permalink raw reply
* [PATCH] mwifiex: fix make namespacecheck warnings
From: Bing Zhao @ 2011-10-13 3:29 UTC (permalink / raw)
To: linux-wireless
Cc: John W. Linville, Amitkumar Karwar, Kiran Divekar, Yogesh Powar,
Frank Huang, Bing Zhao
From: Amitkumar Karwar <akarwar@marvell.com>
This patch takes care of warnings found by running
'make namespacecheck':
1. Remove dead code.
2. Reorder function definitions to avoid forward declarations.
3. Remove unnecessary function/structure declarations and mark
them as static.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
drivers/net/wireless/mwifiex/cfp.c | 10 +++---
drivers/net/wireless/mwifiex/fw.h | 6 ---
drivers/net/wireless/mwifiex/init.c | 56 +++++++++++++++---------------
drivers/net/wireless/mwifiex/main.h | 8 ----
drivers/net/wireless/mwifiex/scan.c | 50 +++++++++++++-------------
drivers/net/wireless/mwifiex/sta_ioctl.c | 4 +-
drivers/net/wireless/mwifiex/txrx.c | 40 ---------------------
7 files changed, 60 insertions(+), 114 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/cfp.c b/drivers/net/wireless/mwifiex/cfp.c
index d0cada5..f2e6de0 100644
--- a/drivers/net/wireless/mwifiex/cfp.c
+++ b/drivers/net/wireless/mwifiex/cfp.c
@@ -48,7 +48,7 @@ static u8 adhoc_rates_bg[BG_SUPPORTED_RATES] = { 0x82, 0x84, 0x8b, 0x96,
static u8 adhoc_rates_a[A_SUPPORTED_RATES] = { 0x8c, 0x12, 0x98, 0x24,
0xb0, 0x48, 0x60, 0x6c, 0 };
-u8 supported_rates_a[A_SUPPORTED_RATES] = { 0x0c, 0x12, 0x18, 0x24,
+static u8 supported_rates_a[A_SUPPORTED_RATES] = { 0x0c, 0x12, 0x18, 0x24,
0xb0, 0x48, 0x60, 0x6c, 0 };
static u16 mwifiex_data_rates[MWIFIEX_SUPPORTED_RATES_EXT] = { 0x02, 0x04,
0x0B, 0x16, 0x00, 0x0C, 0x12, 0x18,
@@ -57,19 +57,19 @@ static u16 mwifiex_data_rates[MWIFIEX_SUPPORTED_RATES_EXT] = { 0x02, 0x04,
0x75, 0x82, 0x0C, 0x1B, 0x36, 0x51,
0x6C, 0xA2, 0xD8, 0xF3, 0x10E, 0x00 };
-u8 supported_rates_b[B_SUPPORTED_RATES] = { 0x02, 0x04, 0x0b, 0x16, 0 };
+static u8 supported_rates_b[B_SUPPORTED_RATES] = { 0x02, 0x04, 0x0b, 0x16, 0 };
-u8 supported_rates_g[G_SUPPORTED_RATES] = { 0x0c, 0x12, 0x18, 0x24,
+static u8 supported_rates_g[G_SUPPORTED_RATES] = { 0x0c, 0x12, 0x18, 0x24,
0x30, 0x48, 0x60, 0x6c, 0 };
-u8 supported_rates_bg[BG_SUPPORTED_RATES] = { 0x02, 0x04, 0x0b, 0x0c,
+static u8 supported_rates_bg[BG_SUPPORTED_RATES] = { 0x02, 0x04, 0x0b, 0x0c,
0x12, 0x16, 0x18, 0x24, 0x30, 0x48,
0x60, 0x6c, 0 };
u16 region_code_index[MWIFIEX_MAX_REGION_CODE] = { 0x10, 0x20, 0x30,
0x32, 0x40, 0x41, 0xff };
-u8 supported_rates_n[N_SUPPORTED_RATES] = { 0x02, 0x04, 0 };
+static u8 supported_rates_n[N_SUPPORTED_RATES] = { 0x02, 0x04, 0 };
/*
* This function maps an index in supported rates table into
diff --git a/drivers/net/wireless/mwifiex/fw.h b/drivers/net/wireless/mwifiex/fw.h
index 71c61b7..0cc5d73 100644
--- a/drivers/net/wireless/mwifiex/fw.h
+++ b/drivers/net/wireless/mwifiex/fw.h
@@ -57,12 +57,6 @@ struct tx_packet_hdr {
#define GET_FW_DEFAULT_BANDS(adapter) \
((adapter->fw_cap_info >> 8) & ALL_802_11_BANDS)
-extern u8 supported_rates_b[B_SUPPORTED_RATES];
-extern u8 supported_rates_g[G_SUPPORTED_RATES];
-extern u8 supported_rates_bg[BG_SUPPORTED_RATES];
-extern u8 supported_rates_a[A_SUPPORTED_RATES];
-extern u8 supported_rates_n[N_SUPPORTED_RATES];
-
#define HostCmd_WEP_KEY_INDEX_MASK 0x3fff
#define KEY_INFO_ENABLED 0x01
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
index 0ce72fc..d792b3f 100644
--- a/drivers/net/wireless/mwifiex/init.c
+++ b/drivers/net/wireless/mwifiex/init.c
@@ -283,6 +283,34 @@ static void mwifiex_init_adapter(struct mwifiex_adapter *adapter)
}
/*
+ * This function releases the lock variables and frees the locks and
+ * associated locks.
+ */
+static void mwifiex_free_lock_list(struct mwifiex_adapter *adapter)
+{
+ struct mwifiex_private *priv;
+ s32 i, j;
+
+ /* Free lists */
+ list_del(&adapter->cmd_free_q);
+ list_del(&adapter->cmd_pending_q);
+ list_del(&adapter->scan_pending_q);
+
+ for (i = 0; i < adapter->priv_num; i++)
+ list_del(&adapter->bss_prio_tbl[i].bss_prio_head);
+
+ for (i = 0; i < adapter->priv_num; i++) {
+ if (adapter->priv[i]) {
+ priv = adapter->priv[i];
+ for (j = 0; j < MAX_NUM_TID; ++j)
+ list_del(&priv->wmm.tid_tbl_ptr[j].ra_list);
+ list_del(&priv->tx_ba_stream_tbl_ptr);
+ list_del(&priv->rx_reorder_tbl_ptr);
+ }
+ }
+}
+
+/*
* This function frees the adapter structure.
*
* The freeing operation is done recursively, by canceling all
@@ -376,34 +404,6 @@ int mwifiex_init_lock_list(struct mwifiex_adapter *adapter)
}
/*
- * This function releases the lock variables and frees the locks and
- * associated locks.
- */
-void mwifiex_free_lock_list(struct mwifiex_adapter *adapter)
-{
- struct mwifiex_private *priv;
- s32 i, j;
-
- /* Free lists */
- list_del(&adapter->cmd_free_q);
- list_del(&adapter->cmd_pending_q);
- list_del(&adapter->scan_pending_q);
-
- for (i = 0; i < adapter->priv_num; i++)
- list_del(&adapter->bss_prio_tbl[i].bss_prio_head);
-
- for (i = 0; i < adapter->priv_num; i++) {
- if (adapter->priv[i]) {
- priv = adapter->priv[i];
- for (j = 0; j < MAX_NUM_TID; ++j)
- list_del(&priv->wmm.tid_tbl_ptr[j].ra_list);
- list_del(&priv->tx_ba_stream_tbl_ptr);
- list_del(&priv->rx_reorder_tbl_ptr);
- }
- }
-}
-
-/*
* This function initializes the firmware.
*
* The following operations are performed sequentially -
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index 7db20db..30f138b 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -658,7 +658,6 @@ struct mwifiex_adapter {
};
int mwifiex_init_lock_list(struct mwifiex_adapter *adapter);
-void mwifiex_free_lock_list(struct mwifiex_adapter *adapter);
int mwifiex_init_fw(struct mwifiex_adapter *adapter);
@@ -709,8 +708,6 @@ int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb,
int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags);
int mwifiex_write_data_complete(struct mwifiex_adapter *adapter,
struct sk_buff *skb, int status);
-int mwifiex_recv_packet_complete(struct mwifiex_adapter *,
- struct sk_buff *skb, int status);
void mwifiex_clean_txrx(struct mwifiex_private *priv);
u8 mwifiex_check_last_packet_indication(struct mwifiex_private *priv);
void mwifiex_check_ps_cond(struct mwifiex_adapter *adapter);
@@ -740,8 +737,6 @@ int mwifiex_process_sta_rx_packet(struct mwifiex_adapter *,
int mwifiex_process_sta_event(struct mwifiex_private *);
void *mwifiex_process_sta_txpd(struct mwifiex_private *, struct sk_buff *skb);
int mwifiex_sta_init_cmd(struct mwifiex_private *, u8 first_sta);
-int mwifiex_scan_networks(struct mwifiex_private *priv,
- const struct mwifiex_user_scan_cfg *user_scan_in);
int mwifiex_cmd_802_11_scan(struct host_cmd_ds_command *cmd,
struct mwifiex_scan_cmd_config *scan_cfg);
void mwifiex_queue_scan_cmd(struct mwifiex_private *priv,
@@ -901,9 +896,6 @@ int mwifiex_copy_mcast_addr(struct mwifiex_multicast_list *mlist,
int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter);
int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
struct mwifiex_802_11_ssid *req_ssid);
-int mwifiex_set_hs_params(struct mwifiex_private *priv,
- u16 action, int cmd_type,
- struct mwifiex_ds_hs_cfg *hscfg);
int mwifiex_cancel_hs(struct mwifiex_private *priv, int cmd_type);
int mwifiex_enable_hs(struct mwifiex_adapter *adapter);
int mwifiex_disable_auto_ds(struct mwifiex_private *priv);
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index 5456dcb..dae8dbb 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -172,29 +172,6 @@ mwifiex_ssid_cmp(struct mwifiex_802_11_ssid *ssid1,
}
/*
- * Sends IOCTL request to start a scan with user configurations.
- *
- * This function allocates the IOCTL request buffer, fills it
- * with requisite parameters and calls the IOCTL handler.
- *
- * Upon completion, it also generates a wireless event to notify
- * applications.
- */
-int mwifiex_set_user_scan_ioctl(struct mwifiex_private *priv,
- struct mwifiex_user_scan_cfg *scan_req)
-{
- int status;
-
- priv->adapter->scan_wait_q_woken = false;
-
- status = mwifiex_scan_networks(priv, scan_req);
- if (!status)
- status = mwifiex_wait_queue_complete(priv->adapter);
-
- return status;
-}
-
-/*
* This function checks if wapi is enabled in driver and scanned network is
* compatible with it.
*/
@@ -1316,8 +1293,8 @@ mwifiex_radio_type_to_band(u8 radio_type)
* order to send the appropriate scan commands to firmware to populate or
* update the internal driver scan table.
*/
-int mwifiex_scan_networks(struct mwifiex_private *priv,
- const struct mwifiex_user_scan_cfg *user_scan_in)
+static int mwifiex_scan_networks(struct mwifiex_private *priv,
+ const struct mwifiex_user_scan_cfg *user_scan_in)
{
int ret = 0;
struct mwifiex_adapter *adapter = priv->adapter;
@@ -1399,6 +1376,29 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
}
/*
+ * Sends IOCTL request to start a scan with user configurations.
+ *
+ * This function allocates the IOCTL request buffer, fills it
+ * with requisite parameters and calls the IOCTL handler.
+ *
+ * Upon completion, it also generates a wireless event to notify
+ * applications.
+ */
+int mwifiex_set_user_scan_ioctl(struct mwifiex_private *priv,
+ struct mwifiex_user_scan_cfg *scan_req)
+{
+ int status;
+
+ priv->adapter->scan_wait_q_woken = false;
+
+ status = mwifiex_scan_networks(priv, scan_req);
+ if (!status)
+ status = mwifiex_wait_queue_complete(priv->adapter);
+
+ return status;
+}
+
+/*
* This function prepares a scan command to be sent to the firmware.
*
* This uses the scan command configuration sent to the command processing
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index d39bb72..ea4a29b 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -293,8 +293,8 @@ done:
* This function prepares the correct firmware command and
* issues it.
*/
-int mwifiex_set_hs_params(struct mwifiex_private *priv, u16 action,
- int cmd_type, struct mwifiex_ds_hs_cfg *hs_cfg)
+static int mwifiex_set_hs_params(struct mwifiex_private *priv, u16 action,
+ int cmd_type, struct mwifiex_ds_hs_cfg *hs_cfg)
{
struct mwifiex_adapter *adapter = priv->adapter;
diff --git a/drivers/net/wireless/mwifiex/txrx.c b/drivers/net/wireless/mwifiex/txrx.c
index 4c3421e..a206f41 100644
--- a/drivers/net/wireless/mwifiex/txrx.c
+++ b/drivers/net/wireless/mwifiex/txrx.c
@@ -161,43 +161,3 @@ done:
return 0;
}
-/*
- * Packet receive completion callback handler.
- *
- * This function calls another completion callback handler which
- * updates the statistics, and optionally updates the parent buffer
- * use count before freeing the received packet.
- */
-int mwifiex_recv_packet_complete(struct mwifiex_adapter *adapter,
- struct sk_buff *skb, int status)
-{
- struct mwifiex_rxinfo *rx_info = MWIFIEX_SKB_RXCB(skb);
- struct mwifiex_rxinfo *rx_info_parent;
- struct mwifiex_private *priv;
- struct sk_buff *skb_parent;
- unsigned long flags;
-
- priv = adapter->priv[rx_info->bss_index];
-
- if (priv && (status == -1))
- priv->stats.rx_dropped++;
-
- if (rx_info->parent) {
- skb_parent = rx_info->parent;
- rx_info_parent = MWIFIEX_SKB_RXCB(skb_parent);
-
- spin_lock_irqsave(&priv->rx_pkt_lock, flags);
- --rx_info_parent->use_count;
-
- if (!rx_info_parent->use_count) {
- spin_unlock_irqrestore(&priv->rx_pkt_lock, flags);
- dev_kfree_skb_any(skb_parent);
- } else {
- spin_unlock_irqrestore(&priv->rx_pkt_lock, flags);
- }
- } else {
- dev_kfree_skb_any(skb);
- }
-
- return 0;
-}
--
1.7.0.2
^ permalink raw reply related
* [PATCH v2] mwifiex: use separate wait condition for each command node
From: Bing Zhao @ 2011-10-13 3:28 UTC (permalink / raw)
To: linux-wireless
Cc: John W. Linville, Amitkumar Karwar, Kiran Divekar, Yogesh Powar,
Frank Huang, Bing Zhao
From: Amitkumar Karwar <akarwar@marvell.com>
Currently global wait condition (adapter->cmd_wait_q.condition)
is used while sending synchronous commands to FW. When two threads
enter in mwifiex_send_cmd_sync() routine at the same time, both the
threads wait for their command responses. Since wait condition is
same for both, they wake up simultaneously after getting response
of 1st command. After this when a thread is waiting for command
response of 3rd command, it wakes up after getting response of 2nd
command and so on. Therefore we don't wait for the response of last
command(0xaa) during unload. Hence while next time loading the driver
command time out is seen for INIT command.
This problem is resolved by having separate wait condition flag for
each command(except scan command). Since scan command is treated
differently (by maintaining scan pending q etc.), newly defined flag
(scan_wait_q_woken) is used as a scan wait condition.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
v2: define wait condition in each cmd and mark it as completed
when cmd response is received. This way multiple cmds can
wait on one waitqueue. (Johannes Berg)
drivers/net/wireless/mwifiex/cmdevt.c | 23 ++++++++++++++---------
drivers/net/wireless/mwifiex/decl.h | 1 -
drivers/net/wireless/mwifiex/main.c | 2 +-
drivers/net/wireless/mwifiex/main.h | 7 ++++++-
drivers/net/wireless/mwifiex/scan.c | 8 +++++---
drivers/net/wireless/mwifiex/sta_ioctl.c | 6 ++++--
drivers/net/wireless/mwifiex/util.c | 5 +++--
7 files changed, 33 insertions(+), 19 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c
index 508de7f..ac27815 100644
--- a/drivers/net/wireless/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/mwifiex/cmdevt.c
@@ -40,8 +40,12 @@ mwifiex_init_cmd_node(struct mwifiex_private *priv,
{
cmd_node->priv = priv;
cmd_node->cmd_oid = cmd_oid;
- cmd_node->wait_q_enabled = priv->adapter->cmd_wait_q_required;
- priv->adapter->cmd_wait_q_required = false;
+ if (priv->adapter->cmd_wait_q_required) {
+ cmd_node->wait_q_enabled = priv->adapter->cmd_wait_q_required;
+ priv->adapter->cmd_wait_q_required = false;
+ cmd_node->cmd_wait_q_woken = false;
+ cmd_node->condition = &cmd_node->cmd_wait_q_woken;
+ }
cmd_node->data_buf = data_buf;
cmd_node->cmd_skb = cmd_node->skb;
}
@@ -418,7 +422,6 @@ int mwifiex_send_cmd_sync(struct mwifiex_private *priv, uint16_t cmd_no,
struct mwifiex_adapter *adapter = priv->adapter;
adapter->cmd_wait_q_required = true;
- adapter->cmd_wait_q.condition = false;
ret = mwifiex_send_cmd_async(priv, cmd_no, cmd_action, cmd_oid,
data_buf);
@@ -511,10 +514,12 @@ int mwifiex_send_cmd_async(struct mwifiex_private *priv, uint16_t cmd_no,
}
/* Send command */
- if (cmd_no == HostCmd_CMD_802_11_SCAN)
+ if (cmd_no == HostCmd_CMD_802_11_SCAN) {
mwifiex_queue_scan_cmd(priv, cmd_node);
- else
+ } else {
+ adapter->cmd_queued = cmd_node;
mwifiex_insert_cmd_to_pending_q(adapter, cmd_node, true);
+ }
return ret;
}
@@ -535,7 +540,7 @@ mwifiex_insert_cmd_to_free_q(struct mwifiex_adapter *adapter,
return;
if (cmd_node->wait_q_enabled)
- mwifiex_complete_cmd(adapter);
+ mwifiex_complete_cmd(adapter, cmd_node);
/* Clean the node */
mwifiex_clean_cmd_node(adapter, cmd_node);
@@ -882,7 +887,7 @@ mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter)
adapter->curr_cmd->wait_q_enabled = false;
spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, flags);
adapter->cmd_wait_q.status = -1;
- mwifiex_complete_cmd(adapter);
+ mwifiex_complete_cmd(adapter, adapter->curr_cmd);
}
/* Cancel all pending command */
spin_lock_irqsave(&adapter->cmd_pending_q_lock, flags);
@@ -893,7 +898,7 @@ mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter)
if (cmd_node->wait_q_enabled) {
adapter->cmd_wait_q.status = -1;
- mwifiex_complete_cmd(adapter);
+ mwifiex_complete_cmd(adapter, cmd_node);
cmd_node->wait_q_enabled = false;
}
mwifiex_insert_cmd_to_free_q(adapter, cmd_node);
@@ -976,7 +981,7 @@ mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter)
spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, cmd_flags);
}
adapter->cmd_wait_q.status = -1;
- mwifiex_complete_cmd(adapter);
+ mwifiex_complete_cmd(adapter, adapter->curr_cmd);
}
/*
diff --git a/drivers/net/wireless/mwifiex/decl.h b/drivers/net/wireless/mwifiex/decl.h
index 6ca62c8..ae17ce0 100644
--- a/drivers/net/wireless/mwifiex/decl.h
+++ b/drivers/net/wireless/mwifiex/decl.h
@@ -98,7 +98,6 @@ struct mwifiex_802_11_ssid {
struct mwifiex_wait_queue {
wait_queue_head_t wait;
- u16 condition;
int status;
};
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
index 849144d..25ce86b 100644
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
@@ -685,8 +685,8 @@ mwifiex_add_card(void *card, struct semaphore *sem,
init_waitqueue_head(&adapter->hs_activate_wait_q);
adapter->cmd_wait_q_required = false;
init_waitqueue_head(&adapter->cmd_wait_q.wait);
- adapter->cmd_wait_q.condition = false;
adapter->cmd_wait_q.status = 0;
+ adapter->scan_wait_q_woken = false;
adapter->workqueue = create_workqueue("MWIFIEX_WORK_QUEUE");
if (!adapter->workqueue)
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index ec45607..7db20db 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -520,6 +520,8 @@ struct cmd_ctrl_node {
void *data_buf;
u32 wait_q_enabled;
struct sk_buff *skb;
+ u8 *condition;
+ u8 cmd_wait_q_woken;
};
struct mwifiex_if_ops {
@@ -651,6 +653,8 @@ struct mwifiex_adapter {
u32 arp_filter_size;
u16 cmd_wait_q_required;
struct mwifiex_wait_queue cmd_wait_q;
+ u8 scan_wait_q_woken;
+ struct cmd_ctrl_node *cmd_queued;
};
int mwifiex_init_lock_list(struct mwifiex_adapter *adapter);
@@ -670,7 +674,8 @@ int mwifiex_recv_packet(struct mwifiex_adapter *, struct sk_buff *skb);
int mwifiex_process_event(struct mwifiex_adapter *adapter);
-int mwifiex_complete_cmd(struct mwifiex_adapter *adapter);
+int mwifiex_complete_cmd(struct mwifiex_adapter *adapter,
+ struct cmd_ctrl_node *cmd_node);
int mwifiex_send_cmd_async(struct mwifiex_private *priv, uint16_t cmd_no,
u16 cmd_action, u32 cmd_oid, void *data_buf);
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index ca37619..5456dcb 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -185,7 +185,7 @@ int mwifiex_set_user_scan_ioctl(struct mwifiex_private *priv,
{
int status;
- priv->adapter->cmd_wait_q.condition = false;
+ priv->adapter->scan_wait_q_woken = false;
status = mwifiex_scan_networks(priv, scan_req);
if (!status)
@@ -1380,6 +1380,7 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
list_del(&cmd_node->list);
spin_unlock_irqrestore(&adapter->scan_pending_q_lock,
flags);
+ adapter->cmd_queued = cmd_node;
mwifiex_insert_cmd_to_pending_q(adapter, cmd_node,
true);
} else {
@@ -1788,7 +1789,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
/* Need to indicate IOCTL complete */
if (adapter->curr_cmd->wait_q_enabled) {
adapter->cmd_wait_q.status = 0;
- mwifiex_complete_cmd(adapter);
+ mwifiex_complete_cmd(adapter, adapter->curr_cmd);
}
if (priv->report_scan_result)
priv->report_scan_result = false;
@@ -1845,6 +1846,7 @@ mwifiex_queue_scan_cmd(struct mwifiex_private *priv,
unsigned long flags;
cmd_node->wait_q_enabled = true;
+ cmd_node->condition = &adapter->scan_wait_q_woken;
spin_lock_irqsave(&adapter->scan_pending_q_lock, flags);
list_add_tail(&cmd_node->list, &adapter->scan_pending_q);
spin_unlock_irqrestore(&adapter->scan_pending_q_lock, flags);
@@ -1911,7 +1913,7 @@ int mwifiex_request_scan(struct mwifiex_private *priv,
}
priv->scan_pending_on_block = true;
- priv->adapter->cmd_wait_q.condition = false;
+ priv->adapter->scan_wait_q_woken = false;
if (req_ssid && req_ssid->ssid_len != 0)
/* Specific SSID scan */
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index f20550a..d39bb72 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -55,7 +55,9 @@ int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter)
{
bool cancel_flag = false;
int status = adapter->cmd_wait_q.status;
+ struct cmd_ctrl_node *cmd_queued = adapter->cmd_queued;
+ adapter->cmd_queued = NULL;
dev_dbg(adapter->dev, "cmd pending\n");
atomic_inc(&adapter->cmd_pending);
@@ -64,8 +66,8 @@ int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter)
/* Wait for completion */
wait_event_interruptible(adapter->cmd_wait_q.wait,
- adapter->cmd_wait_q.condition);
- if (!adapter->cmd_wait_q.condition)
+ *(cmd_queued->condition));
+ if (!*(cmd_queued->condition))
cancel_flag = true;
if (cancel_flag) {
diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c
index d412915..06976f5 100644
--- a/drivers/net/wireless/mwifiex/util.c
+++ b/drivers/net/wireless/mwifiex/util.c
@@ -185,13 +185,14 @@ int mwifiex_recv_packet(struct mwifiex_adapter *adapter, struct sk_buff *skb)
* corresponding waiting function. Otherwise, it processes the
* IOCTL response and frees the response buffer.
*/
-int mwifiex_complete_cmd(struct mwifiex_adapter *adapter)
+int mwifiex_complete_cmd(struct mwifiex_adapter *adapter,
+ struct cmd_ctrl_node *cmd_node)
{
atomic_dec(&adapter->cmd_pending);
dev_dbg(adapter->dev, "cmd completed: status=%d\n",
adapter->cmd_wait_q.status);
- adapter->cmd_wait_q.condition = true;
+ *(cmd_node->condition) = true;
if (adapter->cmd_wait_q.status == -ETIMEDOUT)
dev_err(adapter->dev, "cmd timeout\n");
--
1.7.0.2
^ permalink raw reply related
* Re: Bug#645055: realtek 8188CE ad-hoc mode not supported
From: Antoine Beaupré @ 2011-10-13 2:31 UTC (permalink / raw)
To: Ben Hutchings, Larry Finger; +Cc: linux-wireless, 645055
In-Reply-To: <1318472723.4024.208.camel@deadeye>
[-- Attachment #1: Type: text/plain, Size: 706 bytes --]
On Thu, 13 Oct 2011 03:25:17 +0100, Ben Hutchings <ben@decadent.org.uk> wrote:
> > but the
> > iw interface changes the mode for an existing interface when using rtl8192ce.
> >
> > BTW, I added a new iface because I did not want to interrupt my
> > internat connection.
>
> Hmm. Maybe the change_interface operation is only needed to change
> type/mode while the interface is up.
>
> Antoine, did you bring the interface down before setting its mode?
Crap. No, I didn't. And now it works if I bring it down first. Oh well,
I guess I just made a lot of noise for nothing, this bug can be closed,
thank you!
A.
--
Travail, du latin Tri Palium trois pieux, instrument de torture.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply
* Re: Bug#645055: realtek 8188CE ad-hoc mode not supported
From: Ben Hutchings @ 2011-10-13 2:25 UTC (permalink / raw)
To: Larry Finger, Antoine Beaupré; +Cc: linux-wireless, 645055
In-Reply-To: <4E964896.5050004@lwfinger.net>
[-- Attachment #1: Type: text/plain, Size: 1557 bytes --]
On Wed, 2011-10-12 at 21:10 -0500, Larry Finger wrote:
> On 10/12/2011 06:24 PM, Ben Hutchings wrote:
> > I looked a little further and saw that nl80211 does support changing
> > interface type (mode). But this driver (rtl8192ce) only supports
> > creating new interfaces, not changing their type.
> >
> > Should mac80211 drivers generally support changing interface type
> > (change_interface operation)?
>
> I don't think that implementation of the WEXT interface is necessary.
The change_interface operation appears to be used in implementation of
nl80211 too.
> As to using iw, the following sequence worked:
>
> iw dev wlan14 interface add wlan15 type adhoc
> iw dev set rename5 type managed
> iw dev set rename5 type adhoc
>
> Why it was called "rename5" when I asked for "wlan15" is not understood,
udev's persistent name generator isn't able to distinguish the two
interfaces by MAC address, so it decides the new interface should also
be named 'wlan14'. udev does renaming in two steps for some reason, and
the second step obviously fails.
> but the
> iw interface changes the mode for an existing interface when using rtl8192ce.
>
> BTW, I added a new iface because I did not want to interrupt my
> internat connection.
Hmm. Maybe the change_interface operation is only needed to change
type/mode while the interface is up.
Antoine, did you bring the interface down before setting its mode?
Ben.
--
Ben Hutchings
Quantity is no substitute for quality, but it's the only one we've got.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: Bug#645055: realtek 8188CE ad-hoc mode not supported
From: Larry Finger @ 2011-10-13 2:10 UTC (permalink / raw)
To: Ben Hutchings; +Cc: linux-wireless, 645055, Antoine Beaupré
In-Reply-To: <1318461858.4024.197.camel@deadeye>
On 10/12/2011 06:24 PM, Ben Hutchings wrote:
> I looked a little further and saw that nl80211 does support changing
> interface type (mode). But this driver (rtl8192ce) only supports
> creating new interfaces, not changing their type.
>
> Should mac80211 drivers generally support changing interface type
> (change_interface operation)?
I don't think that implementation of the WEXT interface is necessary. As to
using iw, the following sequence worked:
iw dev wlan14 interface add wlan15 type adhoc
iw dev set rename5 type managed
iw dev set rename5 type adhoc
Why it was called "rename5" when I asked for "wlan15" is not understood, but the
iw interface changes the mode for an existing interface when using rtl8192ce.
BTW, I added a new iface because I did not want to interrupt my internat connection.
Larry
^ permalink raw reply
* Re: Bug#645055: realtek 8188CE ad-hoc mode not supported
From: Antoine Beaupré @ 2011-10-13 1:46 UTC (permalink / raw)
To: Ben Hutchings, linux-wireless; +Cc: 645055
In-Reply-To: <1318461858.4024.197.camel@deadeye>
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]
On Thu, 13 Oct 2011 00:24:12 +0100, Ben Hutchings <ben@decadent.org.uk> wrote:
> I looked a little further and saw that nl80211 does support changing
> interface type (mode). But this driver (rtl8192ce) only supports
> creating new interfaces, not changing their type.
>
> Should mac80211 drivers generally support changing interface type
> (change_interface operation)?
Seems to me really counter-intuitive that it didn't work. It was the
first time I ever see such a problem.
I have seen numerous drivers not support "Master" or "Monitor" mode,
because of limitations of the implementation or the hardware, but if
this is purely a API problem, it seems like a problem that should be
fixed...
Is this the right place though?
A.
--
The idea that Bill Gates has appeared like a knight in shining armour to
lead all customers out of a mire of technological chaos neatly ignores
the fact that it was he who, by peddling second-rate technology, led
them into it in the first place. - Douglas Adams (1952-2001)
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply
* Re: Bug#645055: realtek 8188CE ad-hoc mode not supported
From: Ben Hutchings @ 2011-10-12 23:24 UTC (permalink / raw)
To: linux-wireless; +Cc: 645055, Antoine Beaupré
In-Reply-To: <20111012160135.GK3366@decadent.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]
On Wed, 2011-10-12 at 17:01 +0100, Ben Hutchings wrote:
> On Wed, Oct 12, 2011 at 11:20:31AM -0400, Antoine Beaupré wrote:
> > On Wed, 12 Oct 2011 14:08:32 +0100, Ben Hutchings <ben@decadent.org.uk> wrote:
> > > Can you create an ad-hoc interface like this:
> > >
> > > iw dev wlan0 interface add wlan1 type adhoc
> > >
> > > (you'll need the iw package).
> >
> > Interesting - this works. Didn't know of the iw tool. But this creates a
> > separate interface, kind of odd!
> >
> > The adhoc mode works like that. I am not sure I understand why it
> > doesn't work with iwconfig, can you enlighten me?
>
> iwconfig uses the original WEXT (wireless extensions) configuration
> interface. This interface was never very well specified and was
> implemented in inconsistent ways by different drivers.
>
> The newer configuration interface used by iw, Network Manager and
> other tools is nl80211 (netlink for IEEE 802.11).
[...]
I looked a little further and saw that nl80211 does support changing
interface type (mode). But this driver (rtl8192ce) only supports
creating new interfaces, not changing their type.
Should mac80211 drivers generally support changing interface type
(change_interface operation)?
Ben.
--
Ben Hutchings
Quantity is no substitute for quality, but it's the only one we've got.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: [PATCH 3.2 1/2] Revert "b43: trivial: do not report any link quality instead of invalid one"
From: Sedat Dilek @ 2011-10-12 22:22 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville, b43-dev
In-Reply-To: <1318454295-20573-1-git-send-email-zajec5@gmail.com>
2011/10/12 Rafał Miłecki <zajec5@gmail.com>:
> This reverts commit 55ad5962e97430c83d51df36fc18865ee4f78c48.
>
> I assumed N is newer than LP, which isn't true. This regressed LP case.
>
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
> It seems that wasn't so "trivial", sorry for this regression :|
> ---
> drivers/net/wireless/b43/xmit.c | 12 +++++-------
> 1 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
> index 5f812d1..b8de62c 100644
> --- a/drivers/net/wireless/b43/xmit.c
> +++ b/drivers/net/wireless/b43/xmit.c
> @@ -735,13 +735,11 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
> }
>
> /* Link quality statistics */
> - if ((chanstat & B43_RX_CHAN_PHYTYPE) >= B43_PHYTYPE_N) {
> - /*
> - s8 rssi = max(rxhdr->power0, rxhdr->power1);
> - TODO: Find out what the rssi value is (dBm or percentage?)
> - and also find out what the maximum possible value is.
> - Fill status.ssi and status.signal fields.
> - */
> + if ((chanstat & B43_RX_CHAN_PHYTYPE) == B43_PHYTYPE_N) {
> +// s8 rssi = max(rxhdr->power0, rxhdr->power1);
> + //TODO: Find out what the rssi value is (dBm or percentage?)
> + // and also find out what the maximum possible value is.
> + // Fill status.ssi and status.signal fields.
> } else {
> status.signal = b43_rssi_postprocess(dev, rxhdr->jssi,
> (phystat0 & B43_RX_PHYST0_OFDM),
> --
> 1.7.3.4
>
Commenting style?
Isn't C99-like commenting not well seen?
- Sedat -
[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/CodingStyle#l423
[2] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/CodingStyle#l444
^ permalink raw reply
* Re: Driver for Intel Pro/Wireless 2200BG
From: Julian Calaby @ 2011-10-12 21:58 UTC (permalink / raw)
To: Jayanthi Venugopal; +Cc: linux-wireless
In-Reply-To: <CAFvH45QeG7DQeLORkf4io=gfVAhuiKh1KtWGEwZscg1LY7hM8Q@mail.gmail.com>
Hi,
On Wed, Oct 12, 2011 at 23:58, Jayanthi Venugopal <jay.venug@gmail.com> wrote:
> Hi,
> I would like to download and install the above driver .I am not able
> to download the driver from
> http://ipw2200.sourceforge.net/index.php
>
> I would like the driver and the installation instruction as well.
This driver should be part of your existing Linux Kernel. It should
automatically load when the card is detected, and you should be able
to use your wireless card with the standard wireless / networking
tools.
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
^ permalink raw reply
* Re: [PATCH 22/22] brcm80211: removed file wifi.c
From: Luis R. Rodriguez @ 2011-10-12 21:54 UTC (permalink / raw)
To: Arend van Spriel; +Cc: linville, linux-wireless, Alwin Beukers
In-Reply-To: <1318445492-24207-23-git-send-email-arend@broadcom.com>
On Wed, Oct 12, 2011 at 11:51 AM, Arend van Spriel <arend@broadcom.com> wrote:
> From: Alwin Beukers <alwin@broadcom.com>
>
> Wifi.c was empty after previous cleanups, so it was removed.
>
> Reviewed-by: Arend van Spriel <arend@broadcom.com>
> Signed-off-by: Arend van Spriel <arend@broadcom.com>
Heh, remove Reviewed-by dude.
Luis
^ permalink raw reply
* [PATCH 2/2] b43: N-PHY: report signal to mac80211
From: Rafał Miłecki @ 2011-10-12 21:18 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki
In-Reply-To: <1318454295-20573-1-git-send-email-zajec5@gmail.com>
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
John: do you think it is still possible to get this for 3.2?
---
drivers/net/wireless/b43/xmit.c | 18 ++++++++++++------
drivers/net/wireless/b43/xmit.h | 10 +++++++++-
2 files changed, 21 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index b8de62c..c73e860 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -735,16 +735,22 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
}
/* Link quality statistics */
- if ((chanstat & B43_RX_CHAN_PHYTYPE) == B43_PHYTYPE_N) {
-// s8 rssi = max(rxhdr->power0, rxhdr->power1);
- //TODO: Find out what the rssi value is (dBm or percentage?)
- // and also find out what the maximum possible value is.
- // Fill status.ssi and status.signal fields.
- } else {
+ switch (chanstat & B43_RX_CHAN_PHYTYPE) {
+ case B43_PHYTYPE_N:
+ if (rxhdr->power0 == 16 || rxhdr->power0 == 32)
+ status.signal = max(rxhdr->power1, rxhdr->power2);
+ else
+ status.signal = max(rxhdr->power0, rxhdr->power1);
+ break;
+ case B43_PHYTYPE_A:
+ case B43_PHYTYPE_B:
+ case B43_PHYTYPE_G:
+ case B43_PHYTYPE_LP:
status.signal = b43_rssi_postprocess(dev, rxhdr->jssi,
(phystat0 & B43_RX_PHYST0_OFDM),
(phystat0 & B43_RX_PHYST0_GAINCTL),
(phystat3 & B43_RX_PHYST3_TRSTATE));
+ break;
}
if (phystat0 & B43_RX_PHYST0_OFDM)
diff --git a/drivers/net/wireless/b43/xmit.h b/drivers/net/wireless/b43/xmit.h
index f6e8bc4..16c514d 100644
--- a/drivers/net/wireless/b43/xmit.h
+++ b/drivers/net/wireless/b43/xmit.h
@@ -248,7 +248,15 @@ struct b43_rxhdr_fw4 {
__s8 power1; /* PHY RX Status 1: Power 1 */
} __packed;
} __packed;
- __le16 phy_status2; /* PHY RX Status 2 */
+ union {
+ /* RSSI for N-PHYs */
+ struct {
+ __s8 power2;
+ PAD_BYTES(1);
+ } __packed;
+
+ __le16 phy_status2; /* PHY RX Status 2 */
+ } __packed;
__le16 phy_status3; /* PHY RX Status 3 */
union {
/* Tested with 598.314, 644.1001 and 666.2 */
--
1.7.3.4
^ permalink raw reply related
* [PATCH 3.2 1/2] Revert "b43: trivial: do not report any link quality instead of invalid one"
From: Rafał Miłecki @ 2011-10-12 21:18 UTC (permalink / raw)
To: linux-wireless, John W. Linville; +Cc: b43-dev, Rafał Miłecki
This reverts commit 55ad5962e97430c83d51df36fc18865ee4f78c48.
I assumed N is newer than LP, which isn't true. This regressed LP case.
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
---
It seems that wasn't so "trivial", sorry for this regression :|
---
drivers/net/wireless/b43/xmit.c | 12 +++++-------
1 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
index 5f812d1..b8de62c 100644
--- a/drivers/net/wireless/b43/xmit.c
+++ b/drivers/net/wireless/b43/xmit.c
@@ -735,13 +735,11 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
}
/* Link quality statistics */
- if ((chanstat & B43_RX_CHAN_PHYTYPE) >= B43_PHYTYPE_N) {
- /*
- s8 rssi = max(rxhdr->power0, rxhdr->power1);
- TODO: Find out what the rssi value is (dBm or percentage?)
- and also find out what the maximum possible value is.
- Fill status.ssi and status.signal fields.
- */
+ if ((chanstat & B43_RX_CHAN_PHYTYPE) == B43_PHYTYPE_N) {
+// s8 rssi = max(rxhdr->power0, rxhdr->power1);
+ //TODO: Find out what the rssi value is (dBm or percentage?)
+ // and also find out what the maximum possible value is.
+ // Fill status.ssi and status.signal fields.
} else {
status.signal = b43_rssi_postprocess(dev, rxhdr->jssi,
(phystat0 & B43_RX_PHYST0_OFDM),
--
1.7.3.4
^ permalink raw reply related
* [PATCH 4/5 V3] rtlwifi: rtl8192se: Updates from latest Realtek driver version - Part II
From: Larry Finger @ 2011-10-12 20:59 UTC (permalink / raw)
To: John W Linville; +Cc: chaoming_li, linux-wireless
From: Chaoming Li <chaoming_li@realsil.com.cn>
This patch incorporate the differences between the 06/20/2011 and
08/16/2011 Realtek releases of the rtl8192se driver.
The changes include:
1. Fixing some typos in register usage.
2. A change in the handling of decryption status for 802.11w packets.
Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---
V3 - sync patch with wireless-next
John,
The problem was a patch in my tree that had never been submitted to you. I pulled
a fresh copy of your wireless-next tree and fixed this one. The other patch
can wait for 3.3.
Larry
---
rtl8192se/hw.c | 22 +++++++++++-----------
rtl8192se/reg.h | 1 +
rtl8192se/sw.c | 1 +
rtl8192se/trx.c | 55 +++++++++++++++++++++++++++++++++----------------------
wifi.h | 2 ++
5 files changed, 48 insertions(+), 33 deletions(-)
Index: wireless-next/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
===================================================================
--- wireless-next.orig/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
+++ wireless-next/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
@@ -1382,7 +1382,7 @@ static void _rtl92se_power_domain_init(s
rtl_write_byte(rtlpriv, LDOA15_CTRL, 0x34);
/* Reset MAC-IO and CPU and Core Digital BIT10/11/15 */
- tmpu1b = rtl_read_byte(rtlpriv, SYS_FUNC_EN + 1);
+ tmpu1b = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1);
/* If IPS we need to turn LED on. So we not
* not disable BIT 3/7 of reg3. */
@@ -1391,7 +1391,7 @@ static void _rtl92se_power_domain_init(s
else
tmpu1b &= 0x73;
- rtl_write_byte(rtlpriv, SYS_FUNC_EN + 1, tmpu1b);
+ rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, tmpu1b);
/* wait for BIT 10/11/15 to pull high automatically!! */
mdelay(1);
@@ -1428,15 +1428,15 @@ static void _rtl92se_power_domain_init(s
rtl_write_byte(rtlpriv, LDOA15_CTRL, (tmpu1b | BIT(0)));
/* Set Digital Vdd to Retention isolation Path. */
- tmpu2b = rtl_read_word(rtlpriv, SYS_ISO_CTRL);
- rtl_write_word(rtlpriv, SYS_ISO_CTRL, (tmpu2b | BIT(11)));
+ tmpu2b = rtl_read_word(rtlpriv, REG_SYS_ISO_CTRL);
+ rtl_write_word(rtlpriv, REG_SYS_ISO_CTRL, (tmpu2b | BIT(11)));
/* For warm reboot NIC disappera bug. */
- tmpu2b = rtl_read_word(rtlpriv, SYS_FUNC_EN);
- rtl_write_word(rtlpriv, SYS_FUNC_EN, (tmpu2b | BIT(13)));
+ tmpu2b = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN);
+ rtl_write_word(rtlpriv, REG_SYS_FUNC_EN, (tmpu2b | BIT(13)));
- rtl_write_byte(rtlpriv, SYS_ISO_CTRL + 1, 0x68);
+ rtl_write_byte(rtlpriv, REG_SYS_ISO_CTRL + 1, 0x68);
/* Enable AFE PLL Macro Block */
tmpu1b = rtl_read_byte(rtlpriv, AFE_PLL_CTRL);
@@ -1447,17 +1447,17 @@ static void _rtl92se_power_domain_init(s
mdelay(1);
/* Release isolation AFE PLL & MD */
- rtl_write_byte(rtlpriv, SYS_ISO_CTRL, 0xA6);
+ rtl_write_byte(rtlpriv, REG_SYS_ISO_CTRL, 0xA6);
/* Enable MAC clock */
tmpu2b = rtl_read_word(rtlpriv, SYS_CLKR);
rtl_write_word(rtlpriv, SYS_CLKR, (tmpu2b | BIT(12) | BIT(11)));
/* Enable Core digital and enable IOREG R/W */
- tmpu2b = rtl_read_word(rtlpriv, SYS_FUNC_EN);
- rtl_write_word(rtlpriv, SYS_FUNC_EN, (tmpu2b | BIT(11)));
+ tmpu2b = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN);
+ rtl_write_word(rtlpriv, REG_SYS_FUNC_EN, (tmpu2b | BIT(11)));
/* enable REG_EN */
- rtl_write_word(rtlpriv, SYS_FUNC_EN, (tmpu2b | BIT(11) | BIT(15)));
+ rtl_write_word(rtlpriv, REG_SYS_FUNC_EN, (tmpu2b | BIT(11) | BIT(15)));
/* Switch the control path. */
tmpu2b = rtl_read_word(rtlpriv, SYS_CLKR);
Index: wireless-next/drivers/net/wireless/rtlwifi/rtl8192se/reg.h
===================================================================
--- wireless-next.orig/drivers/net/wireless/rtlwifi/rtl8192se/reg.h
+++ wireless-next/drivers/net/wireless/rtlwifi/rtl8192se/reg.h
@@ -735,6 +735,7 @@
#define HWSET_MAX_SIZE_92S 128
#define EFUSE_MAX_SECTION 16
#define EFUSE_REAL_CONTENT_LEN 512
+#define EFUSE_OOB_PROTECT_BYTES 15
#define RTL8190_EEPROM_ID 0x8129
#define EEPROM_HPON 0x02
Index: wireless-next/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
===================================================================
--- wireless-next.orig/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
+++ wireless-next/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
@@ -307,6 +307,7 @@ static struct rtl_hal_cfg rtl92se_hal_cf
.maps[EFUSE_HWSET_MAX_SIZE] = HWSET_MAX_SIZE_92S,
.maps[EFUSE_MAX_SECTION_MAP] = EFUSE_MAX_SECTION,
.maps[EFUSE_REAL_CONTENT_SIZE] = EFUSE_REAL_CONTENT_LEN,
+ .maps[EFUSE_OOB_PROTECT_BYTES_LEN] = EFUSE_OOB_PROTECT_BYTES,
.maps[RWCAM] = REG_RWCAM,
.maps[WCAMI] = REG_WCAMI,
Index: wireless-next/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
===================================================================
--- wireless-next.orig/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
+++ wireless-next/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
@@ -124,18 +124,15 @@ static void _rtl92se_query_rxphystatus(s
u8 i, max_spatial_stream;
u32 rssi, total_rssi = 0;
bool in_powersavemode = false;
- bool is_cck_rate;
+ bool is_cck = pstats->is_cck;
- is_cck_rate = SE_RX_HAL_IS_CCK_RATE(pdesc);
pstats->packet_matchbssid = packet_match_bssid;
pstats->packet_toself = packet_toself;
- pstats->is_cck = is_cck_rate;
pstats->packet_beacon = packet_beacon;
- pstats->is_cck = is_cck_rate;
pstats->rx_mimo_signalquality[0] = -1;
pstats->rx_mimo_signalquality[1] = -1;
- if (is_cck_rate) {
+ if (is_cck) {
u8 report, cck_highpwr;
cck_buf = (struct phy_sts_cck_8192s_t *)p_drvinfo;
@@ -246,9 +243,8 @@ static void _rtl92se_query_rxphystatus(s
pstats->rxpower = rx_pwr_all;
pstats->recvsignalpower = rx_pwr_all;
- if (GET_RX_STATUS_DESC_RX_HT(pdesc) &&
- GET_RX_STATUS_DESC_RX_MCS(pdesc) >= DESC92_RATEMCS8 &&
- GET_RX_STATUS_DESC_RX_MCS(pdesc) <= DESC92_RATEMCS15)
+ if (pstats->is_ht && pstats->rate >= DESC92_RATEMCS8 &&
+ pstats->rate <= DESC92_RATEMCS15)
max_spatial_stream = 2;
else
max_spatial_stream = 1;
@@ -266,7 +262,7 @@ static void _rtl92se_query_rxphystatus(s
}
}
- if (is_cck_rate)
+ if (is_cck)
pstats->signalstrength = (u8)(_rtl92se_signal_scale_mapping(hw,
pwdb_all));
else if (rf_rx_num != 0)
@@ -518,6 +514,8 @@ bool rtl92se_rx_query_desc(struct ieee80
{
struct rx_fwinfo *p_drvinfo;
u32 phystatus = (u32)GET_RX_STATUS_DESC_PHY_STATUS(pdesc);
+ struct ieee80211_hdr *hdr;
+ bool first_ampdu = false;
stats->length = (u16)GET_RX_STATUS_DESC_PKT_LEN(pdesc);
stats->rx_drvinfo_size = (u8)GET_RX_STATUS_DESC_DRVINFO_SIZE(pdesc) * 8;
@@ -530,8 +528,12 @@ bool rtl92se_rx_query_desc(struct ieee80
stats->rate = (u8)GET_RX_STATUS_DESC_RX_MCS(pdesc);
stats->shortpreamble = (u16)GET_RX_STATUS_DESC_SPLCP(pdesc);
stats->isampdu = (bool)(GET_RX_STATUS_DESC_PAGGR(pdesc) == 1);
+ stats->isfirst_ampdu = (bool) ((GET_RX_STATUS_DESC_PAGGR(pdesc) == 1)
+ && (GET_RX_STATUS_DESC_FAGGR(pdesc) == 1));
stats->timestamp_low = GET_RX_STATUS_DESC_TSFL(pdesc);
stats->rx_is40Mhzpacket = (bool)GET_RX_STATUS_DESC_BW(pdesc);
+ stats->is_ht = (bool)GET_RX_STATUS_DESC_RX_HT(pdesc);
+ stats->is_cck = SE_RX_HAL_IS_CCK_RATE(pdesc);
if (stats->hwerror)
return false;
@@ -539,30 +541,39 @@ bool rtl92se_rx_query_desc(struct ieee80
rx_status->freq = hw->conf.channel->center_freq;
rx_status->band = hw->conf.channel->band;
- if (GET_RX_STATUS_DESC_CRC32(pdesc))
- rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
+ hdr = (struct ieee80211_hdr *)(skb->data + stats->rx_drvinfo_size
+ + stats->rx_bufshift);
- if (!GET_RX_STATUS_DESC_SWDEC(pdesc))
- rx_status->flag |= RX_FLAG_DECRYPTED;
+ if (stats->crc)
+ rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
- if (GET_RX_STATUS_DESC_BW(pdesc))
+ if (stats->rx_is40Mhzpacket)
rx_status->flag |= RX_FLAG_40MHZ;
- if (GET_RX_STATUS_DESC_RX_HT(pdesc))
+ if (stats->is_ht)
rx_status->flag |= RX_FLAG_HT;
rx_status->flag |= RX_FLAG_MACTIME_MPDU;
- if (stats->decrypted)
- rx_status->flag |= RX_FLAG_DECRYPTED;
+ /* hw will set stats->decrypted true, if it finds the
+ * frame is open data frame or mgmt frame,
+ * hw will not decrypt robust managment frame
+ * for IEEE80211w but still set stats->decrypted
+ * true, so here we should set it back to undecrypted
+ * for IEEE80211w frame, and mac80211 sw will help
+ * to decrypt it */
+ if (stats->decrypted) {
+ if ((ieee80211_is_robust_mgmt_frame(hdr)) &&
+ (ieee80211_has_protected(hdr->frame_control)))
+ rx_status->flag &= ~RX_FLAG_DECRYPTED;
+ else
+ rx_status->flag |= RX_FLAG_DECRYPTED;
+ }
rx_status->rate_idx = rtlwifi_rate_mapping(hw,
- (bool)GET_RX_STATUS_DESC_RX_HT(pdesc),
- (u8)GET_RX_STATUS_DESC_RX_MCS(pdesc),
- (bool)GET_RX_STATUS_DESC_PAGGR(pdesc));
-
+ stats->is_ht, stats->rate, first_ampdu);
- rx_status->mactime = GET_RX_STATUS_DESC_TSFL(pdesc);
+ rx_status->mactime = stats->timestamp_low;
if (phystatus) {
p_drvinfo = (struct rx_fwinfo *)(skb->data +
stats->rx_bufshift);
Index: wireless-next/drivers/net/wireless/rtlwifi/wifi.h
===================================================================
--- wireless-next.orig/drivers/net/wireless/rtlwifi/wifi.h
+++ wireless-next/drivers/net/wireless/rtlwifi/wifi.h
@@ -450,6 +450,7 @@ enum rtl_var_map {
EFUSE_HWSET_MAX_SIZE,
EFUSE_MAX_SECTION_MAP,
EFUSE_REAL_CONTENT_SIZE,
+ EFUSE_OOB_PROTECT_BYTES_LEN,
/*CAM map */
RWCAM,
@@ -1324,6 +1325,7 @@ struct rtl_stats {
s8 rx_mimo_signalquality[2];
bool packet_matchbssid;
bool is_cck;
+ bool is_ht;
bool packet_toself;
bool packet_beacon; /*for rssi */
char cck_adc_pwdb[4]; /*for rx path selection */
^ permalink raw reply
* Re: linux-next: build failure after merge of the moduleh tree
From: John W. Linville @ 2011-10-12 19:26 UTC (permalink / raw)
To: Arend van Spriel; +Cc: Stephen Rothwell, linux-wireless@vger.kernel.org
In-Reply-To: <4E95E9C5.6060006@broadcom.com>
On Wed, Oct 12, 2011 at 09:25:57PM +0200, Arend van Spriel wrote:
> On 10/12/2011 08:29 AM, Stephen Rothwell wrote:
> > Hi Paul,
> >
> > After merging the moduleh tree, today's linux-next build (x86_64
> > allmodconfig) failed like this:
> >
> > drivers/net/wireless/brcm80211/brcmutil/utils.c:20:15: error: expected declaration specifiers or '...' before string constant
> > drivers/net/wireless/brcm80211/brcmutil/utils.c:21:20: error: expected declaration specifiers or '...' before string constant
> > drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c:51:1: warning: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Wimplicit-int]
> > drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c:51:1: warning: parameter names (without types) in function declaration [enabled by default]
> >
> > Caused by commit 5b435de0d786 ("net: wireless: add brcm80211 drivers")
> > from the wireless tree interacting with the module.h split up.
> >
> > These files clearly should include module.h (John, please apply this to the
> > wireless tree):
> >
> > From d89b14ffc84a2b8a54ffe89453b8bbf9cabf1468 Mon Sep 17 00:00:00 2001
> > From: Stephen Rothwell <sfr@canb.auug.org.au>
> > Date: Wed, 12 Oct 2011 17:07:06 +1100
> > Subject: [PATCH] net: wireless: brcm80211: include module.h
> >
> > Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
>
> Hi John,
>
> Do you intend to take this patch as well. I used it to prepare the patch
> series I sent earlier titled "[PATCH 00/22] brcm80211: mainline patch
> related cleanup" identified by:
>
> Message-ID: <1318445492-24207-1-git-send-email-arend@broadcom.com>
>
> Gr. AvS
>
> ps: If you want the bare patch file, I still have it on disk here.
Please send it to me -- I missed the original.
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: [PATCH 22/22] brcm80211: removed file wifi.c
From: Johannes Berg @ 2011-10-12 19:28 UTC (permalink / raw)
To: Arend van Spriel
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
Alwin Beukers
In-Reply-To: <4E95E897.8090709@broadcom.com>
On Wed, 2011-10-12 at 21:20 +0200, Arend van Spriel wrote:
> On 10/12/2011 09:13 PM, Johannes Berg wrote:
> > On Wed, 2011-10-12 at 20:51 +0200, Arend van Spriel wrote:
> >
> >> -#include <brcmu_wifi.h>
> >
> > Does that header file have any content left?
> >
> > johannes
> >
> >
>
> It has, but we intend to get rid of brcmutil
Ok, I didn't check :)
> although the pktq functions
> are giving me a headache or it is due to the cold I caught.
Oh. Hope you feel better soon!
johannes
^ permalink raw reply
* Re: linux-next: build failure after merge of the moduleh tree
From: Arend van Spriel @ 2011-10-12 19:25 UTC (permalink / raw)
To: John W. Linville; +Cc: Stephen Rothwell, linux-wireless@vger.kernel.org
In-Reply-To: <20111012172954.4d5a638ef2a399b72bce5bf1@canb.auug.org.au>
On 10/12/2011 08:29 AM, Stephen Rothwell wrote:
> Hi Paul,
>
> After merging the moduleh tree, today's linux-next build (x86_64
> allmodconfig) failed like this:
>
> drivers/net/wireless/brcm80211/brcmutil/utils.c:20:15: error: expected declaration specifiers or '...' before string constant
> drivers/net/wireless/brcm80211/brcmutil/utils.c:21:20: error: expected declaration specifiers or '...' before string constant
> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c:51:1: warning: type defaults to 'int' in declaration of 'MODULE_DEVICE_TABLE' [-Wimplicit-int]
> drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c:51:1: warning: parameter names (without types) in function declaration [enabled by default]
>
> Caused by commit 5b435de0d786 ("net: wireless: add brcm80211 drivers")
> from the wireless tree interacting with the module.h split up.
>
> These files clearly should include module.h (John, please apply this to the
> wireless tree):
>
> From d89b14ffc84a2b8a54ffe89453b8bbf9cabf1468 Mon Sep 17 00:00:00 2001
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Wed, 12 Oct 2011 17:07:06 +1100
> Subject: [PATCH] net: wireless: brcm80211: include module.h
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Hi John,
Do you intend to take this patch as well. I used it to prepare the patch
series I sent earlier titled "[PATCH 00/22] brcm80211: mainline patch
related cleanup" identified by:
Message-ID: <1318445492-24207-1-git-send-email-arend@broadcom.com>
Gr. AvS
ps: If you want the bare patch file, I still have it on disk here.
^ permalink raw reply
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