* [PATCH v2 rebased] staging: vt6656: device.h Replace typedef struct _RCB
From: Malcolm Priestley @ 2013-08-28 20:12 UTC (permalink / raw)
To: gregkh; +Cc: linux-wireless
Replace with struct vnt_rcb
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
drivers/staging/vt6656/device.h | 20 +++++++++-----------
drivers/staging/vt6656/dpc.c | 10 +++++-----
drivers/staging/vt6656/dpc.h | 4 ++--
drivers/staging/vt6656/main_usb.c | 14 ++++++++------
drivers/staging/vt6656/usbpipe.c | 4 ++--
drivers/staging/vt6656/usbpipe.h | 2 +-
6 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/drivers/staging/vt6656/device.h b/drivers/staging/vt6656/device.h
index 3151c8f..8e39634 100644
--- a/drivers/staging/vt6656/device.h
+++ b/drivers/staging/vt6656/device.h
@@ -166,8 +166,7 @@ typedef enum _CONTEXT_TYPE {
} CONTEXT_TYPE;
/* RCB (Receive Control Block) */
-typedef struct _RCB
-{
+struct vnt_rcb {
void *Next;
signed long Ref;
void *pDevice;
@@ -175,8 +174,7 @@ typedef struct _RCB
struct vnt_rx_mgmt sMngPacket;
struct sk_buff *skb;
int bBoolInUse;
-
-} RCB, *PRCB;
+};
/* used to track bulk out irps */
struct vnt_usb_send_context {
@@ -416,14 +414,14 @@ struct vnt_private {
u32 int_interval;
/* Variables to track resources for the BULK In Pipe */
- PRCB pRCBMem;
- PRCB apRCB[CB_MAX_RX_DESC];
+ struct vnt_rcb *pRCBMem;
+ struct vnt_rcb *apRCB[CB_MAX_RX_DESC];
u32 cbRD;
- PRCB FirstRecvFreeList;
- PRCB LastRecvFreeList;
+ struct vnt_rcb *FirstRecvFreeList;
+ struct vnt_rcb *LastRecvFreeList;
u32 NumRecvFreeList;
- PRCB FirstRecvMngList;
- PRCB LastRecvMngList;
+ struct vnt_rcb *FirstRecvMngList;
+ struct vnt_rcb *LastRecvMngList;
u32 NumRecvMngList;
int bIsRxWorkItemQueued;
int bIsRxMngWorkItemQueued;
@@ -774,7 +772,7 @@ struct vnt_private {
#define DequeueRCB(Head, Tail) \
{ \
- PRCB RCB = Head; \
+ struct vnt_rcb *RCB = Head; \
if (!RCB->Next) { \
Tail = NULL; \
} \
diff --git a/drivers/staging/vt6656/dpc.c b/drivers/staging/vt6656/dpc.c
index 4bc362f..ea7d443 100644
--- a/drivers/staging/vt6656/dpc.c
+++ b/drivers/staging/vt6656/dpc.c
@@ -246,7 +246,7 @@ s_vGetDASA (
*pcbHeaderSize = cbHeaderSize;
}
-int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
+int RXbBulkInProcessData(struct vnt_private *pDevice, struct vnt_rcb *pRCB,
unsigned long BytesToIndicate)
{
struct net_device_stats *pStats = &pDevice->stats;
@@ -271,7 +271,7 @@ int RXbBulkInProcessData(struct vnt_private *pDevice, PRCB pRCB,
/* signed long ldBm = 0; */
int bIsWEP = false; int bExtIV = false;
u32 dwWbkStatus;
- PRCB pRCBIndicate = pRCB;
+ struct vnt_rcb *pRCBIndicate = pRCB;
u8 *pbyDAddress;
u16 *pwPLCP_Length;
u8 abyVaildRate[MAX_RATE]
@@ -1336,7 +1336,7 @@ static int s_bAPModeRxData(struct vnt_private *pDevice, struct sk_buff *skb,
void RXvWorkItem(struct vnt_private *pDevice)
{
int ntStatus;
- PRCB pRCB = NULL;
+ struct vnt_rcb *pRCB = NULL;
DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"---->Rx Polling Thread\n");
spin_lock_irq(&pDevice->lock);
@@ -1354,7 +1354,7 @@ void RXvWorkItem(struct vnt_private *pDevice)
}
-void RXvFreeRCB(PRCB pRCB, int bReAllocSkb)
+void RXvFreeRCB(struct vnt_rcb *pRCB, int bReAllocSkb)
{
struct vnt_private *pDevice = pRCB->pDevice;
@@ -1391,7 +1391,7 @@ void RXvFreeRCB(PRCB pRCB, int bReAllocSkb)
void RXvMngWorkItem(struct vnt_private *pDevice)
{
- PRCB pRCB = NULL;
+ struct vnt_rcb *pRCB = NULL;
struct vnt_rx_mgmt *pRxPacket;
int bReAllocSkb = false;
diff --git a/drivers/staging/vt6656/dpc.h b/drivers/staging/vt6656/dpc.h
index 876468f..95388dc 100644
--- a/drivers/staging/vt6656/dpc.h
+++ b/drivers/staging/vt6656/dpc.h
@@ -36,9 +36,9 @@ void RXvWorkItem(void *Context);
void RXvMngWorkItem(void *Context);
-void RXvFreeRCB(PRCB pRCB, int bReAllocSkb);
+void RXvFreeRCB(struct vnt_rcb *pRCB, int bReAllocSkb);
-int RXbBulkInProcessData(struct vnt_private *, PRCB pRCB,
+int RXbBulkInProcessData(struct vnt_private *, struct vnt_rcb *pRCB,
unsigned long BytesToIndicate);
#endif /* __RXTX_H__ */
diff --git a/drivers/staging/vt6656/main_usb.c b/drivers/staging/vt6656/main_usb.c
index 37d66a3..5369717 100644
--- a/drivers/staging/vt6656/main_usb.c
+++ b/drivers/staging/vt6656/main_usb.c
@@ -751,8 +751,8 @@ static void device_free_tx_bufs(struct vnt_private *pDevice)
static void device_free_rx_bufs(struct vnt_private *pDevice)
{
- PRCB pRCB;
- int ii;
+ struct vnt_rcb *pRCB;
+ int ii;
for (ii = 0; ii < pDevice->cbRD; ii++) {
@@ -789,8 +789,8 @@ static void device_free_int_bufs(struct vnt_private *pDevice)
static bool device_alloc_bufs(struct vnt_private *pDevice)
{
struct vnt_usb_send_context *pTxContext;
- PRCB pRCB;
- int ii;
+ struct vnt_rcb *pRCB;
+ int ii;
for (ii = 0; ii < pDevice->cbTD; ii++) {
@@ -811,7 +811,8 @@ static bool device_alloc_bufs(struct vnt_private *pDevice)
}
/* allocate RCB mem */
- pDevice->pRCBMem = kzalloc((sizeof(RCB) * pDevice->cbRD), GFP_KERNEL);
+ pDevice->pRCBMem = kzalloc((sizeof(struct vnt_rcb) * pDevice->cbRD),
+ GFP_KERNEL);
if (pDevice->pRCBMem == NULL) {
DBG_PRT(MSG_LEVEL_ERR,KERN_ERR "%s : alloc rx usb context failed\n", pDevice->dev->name);
goto free_tx;
@@ -822,7 +823,8 @@ static bool device_alloc_bufs(struct vnt_private *pDevice)
pDevice->FirstRecvMngList = NULL;
pDevice->LastRecvMngList = NULL;
pDevice->NumRecvFreeList = 0;
- pRCB = (PRCB) pDevice->pRCBMem;
+
+ pRCB = (struct vnt_rcb *)pDevice->pRCBMem;
for (ii = 0; ii < pDevice->cbRD; ii++) {
diff --git a/drivers/staging/vt6656/usbpipe.c b/drivers/staging/vt6656/usbpipe.c
index 78749ef..3a03f1d 100644
--- a/drivers/staging/vt6656/usbpipe.c
+++ b/drivers/staging/vt6656/usbpipe.c
@@ -421,7 +421,7 @@ static void s_nsInterruptUsbIoCompleteRead(struct urb *urb)
*
*/
-int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, PRCB pRCB)
+int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, struct vnt_rcb *pRCB)
{
int ntStatus = 0;
struct urb *pUrb;
@@ -479,7 +479,7 @@ int PIPEnsBulkInUsbRead(struct vnt_private *pDevice, PRCB pRCB)
static void s_nsBulkInUsbIoCompleteRead(struct urb *urb)
{
- PRCB pRCB = (PRCB)urb->context;
+ struct vnt_rcb *pRCB = (struct vnt_rcb *)urb->context;
struct vnt_private *pDevice = pRCB->pDevice;
unsigned long bytesRead;
int bIndicateReceive = false;
diff --git a/drivers/staging/vt6656/usbpipe.h b/drivers/staging/vt6656/usbpipe.h
index e2a2bce..f537703 100644
--- a/drivers/staging/vt6656/usbpipe.h
+++ b/drivers/staging/vt6656/usbpipe.h
@@ -40,7 +40,7 @@ int PIPEnsControlIn(struct vnt_private *, u8 byRequest, u16 wValue,
u16 wIndex, u16 wLength, u8 *pbyBuffer);
int PIPEnsInterruptRead(struct vnt_private *);
-int PIPEnsBulkInUsbRead(struct vnt_private *, PRCB pRCB);
+int PIPEnsBulkInUsbRead(struct vnt_private *, struct vnt_rcb *pRCB);
int PIPEnsSendBulkOut(struct vnt_private *,
struct vnt_usb_send_context *pContext);
--
1.8.1.2
^ permalink raw reply related
* Re: [PATCH] cfg80211: fix potential deadlock regression
From: Maxime Bizon @ 2013-08-28 19:49 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Johannes Berg
In-Reply-To: <1370377370-23055-1-git-send-email-johannes@sipsolutions.net>
On Tue, 2013-06-04 at 22:22 +0200, Johannes Berg wrote:
> - rtnl_lock();
>
> res = device_add(&rdev->wiphy.dev);
> + if (res)
> + return res;
I just ran across a regression caused by this commit
I'm again getting uevent notifications for wireless devices that are not
yet properly registered (ENODEV on NL80211 when using sysfs phy id)
I originally fixed the bug by taking the cfg80211 mutex across the
whole registration:
commit 5a652052fedbd7869572c757dd2ffc2ed420c69d
Author: Maxime Bizon <mbizon@freebox.fr>
Date: Wed Jul 21 17:21:38 2010 +0200
cfg80211: fix race between sysfs and cfg80211
device_add() is called before adding the phy to the cfg80211 device
list.
So if a userspace program uses sysfs uevents to detect new phy
devices, and queries nl80211 to get phy info, it can get ENODEV even
though the phy exists in sysfs.
An easy workaround is to hold the cfg80211 mutex until the phy is
present in sysfs/cfg80211/debugfs.
It does not seem we can reverse the rfkill_register() and device_add()
because wiphy dev is a parent of rfkill dev.
any idea to fix this ?
Thanks,
--
Maxime
^ permalink raw reply
* [PATCH] staging: vt6656: baseband.h re: baseband.c:877:26: sparse: incorrect type in assignment (different base types)
From: Malcolm Priestley @ 2013-08-28 19:52 UTC (permalink / raw)
To: Greg Kroah-Hartman; +Cc: kbuild test robot, kbuild-all, linux-wireless
In-Reply-To: <20130828000913.GB22736@kroah.com>
sparse warnings: (new ones prefixed by >>)
...
>> drivers/staging/vt6656/baseband.c:877:26: sparse: incorrect type in assignment (different base types)
drivers/staging/vt6656/baseband.c:877:26: expected unsigned short [unsigned] [usertype] len
drivers/staging/vt6656/baseband.c:877:26: got restricted __le16 [usertype] <noident>
>> drivers/staging/vt6656/baseband.c:880:26: sparse: incorrect type in assignment (different base types)
drivers/staging/vt6656/baseband.c:880:26: expected unsigned short [unsigned] [usertype] len
drivers/staging/vt6656/baseband.c:880:26: got restricted __le16 [usertype] <noident>
vnt_phy_field member len should be __le16.
Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: kbuild-all@01.org
Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
drivers/staging/vt6656/baseband.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vt6656/baseband.h b/drivers/staging/vt6656/baseband.h
index a8db17d..79faedf4 100644
--- a/drivers/staging/vt6656/baseband.h
+++ b/drivers/staging/vt6656/baseband.h
@@ -85,7 +85,7 @@
struct vnt_phy_field {
u8 signal;
u8 service;
- u16 len;
+ __le16 len;
} __packed;
unsigned int
--
1.8.1.2
^ permalink raw reply related
* Re: pull-request: mac80211-next 2013-08-27
From: John W. Linville @ 2013-08-28 19:32 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1377593792.20012.4.camel@jlt4.sipsolutions.net>
On Tue, Aug 27, 2013 at 10:56:32AM +0200, Johannes Berg wrote:
> John,
>
> And I also have some more changes for -next, just a few small fixes and
> improvements, nothing really stands out.
>
> johannes
>
>
>
> The following changes since commit 27b3eb9c06a7193bdc9800cd00764a130343bc8a:
>
> mac80211: add APIs to allow keeping connections after WoWLAN (2013-08-16 12:58:43 +0200)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git for-john
>
> for you to fetch changes up to a98655387762394371b88cdfb8215884757978ab:
>
> mac80211: fix change_interface queue assignments (2013-08-26 09:52:58 +0200)
Pulling now...
--
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
* Looking for ath6kl device
From: Lorenzo Nava @ 2013-08-28 19:22 UTC (permalink / raw)
To: linux-wireless
Hi everybody,
I'm looking for a device which uses ath6kl driver. Anybody knows any
available devices with compatible chipset?
Thank you.
Cheers.
Lorenzo
^ permalink raw reply
* Re: pull-request: mac80211 2013-08-27
From: John W. Linville @ 2013-08-28 17:51 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1377593647.20012.2.camel@jlt4.sipsolutions.net>
On Tue, Aug 27, 2013 at 10:54:07AM +0200, Johannes Berg wrote:
> John,
>
> I know it's late, but I have one straggler for the current cycle. If you
> don't want to pull it any more, I guess it's not terribly important as
> it only affects some APs (though those are affected badly and no
> connection is possible.)
>
> This patch fixes a regression with associating to some broken APs that
> send an ECSA IE in their probe responses.
>
> johannes
>
> The following changes since commit 75a423f493ffdf741acae27bf179cd560f7813d7:
>
> mac80211: ibss: fix ignored channel parameter (2013-08-21 15:33:08 +0200)
>
> are available in the git repository at:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git for-john
>
> for you to fetch changes up to d70b7616d9080ec9f868fbd31db5fd4341435d61:
>
> mac80211: ignore (E)CSA in probe response frames (2013-08-23 17:05:12 +0200)
>
> ----------------------------------------------------------------
> Johannes Berg (1):
> mac80211: ignore (E)CSA in probe response frames
>
> net/mac80211/mlme.c | 11 +++--------
> 1 file changed, 3 insertions(+), 8 deletions(-)
It looks nice to have, but not necessary for 3.11 -- I'll pull it
into wireless-next...
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: 802.11p
From: Simon Wunderlich @ 2013-08-28 17:47 UTC (permalink / raw)
To: Marc Murphy; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <F690310232FDDF4AB457E8B3EF90DDE08D321AF2@MARCM-SBS2011.marcmltd.local>
[-- Attachment #1: Type: text/plain, Size: 509 bytes --]
On Wed, Aug 28, 2013 at 03:57:59PM +0000, Marc Murphy wrote:
> Yes I saw that post but no response, it was 6 weeks ago.
> I have had more success finding the source used for the GCDC and looking to see how different it is from the mainline kernel drivers.
>
> Next is to find an Atheros USB 802.11a stick to do some tests with.
If you want to use the GCDC patchset, use some Atheros Mini-PCI hardware. I'd doubt that these patches
will work with anything different from ath5k. :)
Cheers,
Simon
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply
* Re: [PATCH] mac80211: add ieee80211_iterate_active_interfaces_rtnl()
From: Johannes Berg @ 2013-08-28 17:00 UTC (permalink / raw)
To: linux-wireless
In-Reply-To: <1377605145-21353-1-git-send-email-johannes@sipsolutions.net>
On Tue, 2013-08-27 at 14:05 +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> If it is needed to disconnect multiple virtual interfaces after
> (WoWLAN-) suspend, the most obvious approach would be to iterate
> all interfaces by calling ieee80211_iterate_active_interfaces()
> and then call ieee80211_resume_disconnect() for each one. This
> is what the iwlmvm driver does.
Applied.
johannes
^ permalink raw reply
* RE: 802.11p
From: Marc Murphy @ 2013-08-28 15:57 UTC (permalink / raw)
To: sedat.dilek@gmail.com; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <CA+icZUW4vbCfEq9-1ewe=O=fADq42y60T2P7YV4cgNBSntQ9gA@mail.gmail.com>
Yes I saw that post but no response, it was 6 weeks ago.
I have had more success finding the source used for the GCDC and looking to see how different it is from the mainline kernel drivers.
Next is to find an Atheros USB 802.11a stick to do some tests with.
Thanks
Marc
________________________________________
From: Sedat Dilek [sedat.dilek@gmail.com]
Sent: 28 August 2013 15:20
To: Marc Murphy
Cc: linux-wireless@vger.kernel.org
Subject: Re: 802.11p
On Wed, Aug 28, 2013 at 2:15 PM, Marc Murphy <marcmltd@marcm.co.uk> wrote:
> Doh ! updated now.
>
> I have had a read through the docs but there is no direct reference to 802.11p. I initially want to have a play with a couple of embedded units that I have to see if I cant send a message from one to the other but struggling to find any updated ath5 driver.
>
A few weeks ago someone asked about that constellation, check for
"802.11p and ath5k v3.10-rc1" thread on linux-wireless ML.
- Sedat -
> Thanks
> Marc
>
> ________________________________________
> From: Sedat Dilek [sedat.dilek@gmail.com]
> Sent: 28 August 2013 12:23
> To: Marc Murphy
> Cc: linux-wireless@vger.kernel.org
> Subject: Re:
>
> On Wed, Aug 28, 2013 at 1:07 PM, Marc Murphy <marcmltd@marcm.co.uk> wrote:
>> Hello,
>> I have been trawling the mailings and lots of people are asking about 802.11p and I have not managed to find a definitive push back to the mainline kernel.
>>
>
> Hi,
>
> first of all, you should set a "subject" to your email request :-).
>
> I cannot say much about 802.11p, but for first informations I
> recommend the wiki at <http://wireless.kernel.org> and have a look
> into docs section.
>
> For faster replies you can join #linux-wireless IRC channel (Freenode).
>
> - Sedat -
>
>> Is there anywhere in particular that I need to be looking to be able to get the patches so I can have a play ?
>>
>> Thanks
>> Marc--
>> 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 3.11 v2] rt2800: fix wrong TX power compensation
From: John W. Linville @ 2013-08-28 15:10 UTC (permalink / raw)
To: Stanislaw Gruszka
Cc: Fabien ADAM, linux-wireless, users, Paul Menzel,
Gertjan van Wingerde
In-Reply-To: <20130827081340.GB2609@redhat.com>
I had already merged the first one, FWIW -- sorry...
On Tue, Aug 27, 2013 at 10:13:40AM +0200, Stanislaw Gruszka wrote:
> We should not do temperature compensation on devices without
> EXTERNAL_TX_ALC bit set (called DynamicTxAgcControl on vendor driver).
> Such devices can have totally bogus TSSI parameters on the EEPROM,
> but are still treated by us as valid and results in wrong TX power
> calculations.
>
> This fixes inability to connect to AP on slightly longer distance on
> some Ralink chips/devices without EXTERNAL_TX_ALC configured.
>
> Reference:
> http://thread.gmane.org/gmane.linux.drivers.rt2x00.user/2263
>
> Reported-and-tested-by: Fabien ADAM <id2ndr@crocobox.org>
> Cc: stable@vger.kernel.org
> Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
> Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
> Acked-by: Paul Menzel <paulepanter@users.sourceforge.net>
> ---
> drivers/net/wireless/rt2x00/rt2800lib.c | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> v1 -> v2: fix changelog
>
> John,
>
> If possible this should go to 3.11, -next & cc -stable is also fine as
> usual.
>
> Note that in -next version of the patch rt2x00_eeprom_read() should
> be changed to rt2800_eeprom_read() do to commit
> 3e38d3daf881a78ac13e93504a8ac5777040797e
>
> diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c b/drivers/net/wireless/rt2x00/rt2800lib.c
> index 1f80ea5..a0119d3 100644
> --- a/drivers/net/wireless/rt2x00/rt2800lib.c
> +++ b/drivers/net/wireless/rt2x00/rt2800lib.c
> @@ -2790,6 +2790,13 @@ static int rt2800_get_gain_calibration_delta(struct rt2x00_dev *rt2x00dev)
> int i;
>
> /*
> + * First check if temperature compensation is supported.
> + */
> + rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC_CONF1, &eeprom);
> + if (!rt2x00_get_field16(eeprom, EEPROM_NIC_CONF1_EXTERNAL_TX_ALC))
> + return 0;
> +
> + /*
> * Read TSSI boundaries for temperature compensation from
> * the EEPROM.
> *
> --
> 1.7.11.7
>
>
--
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
* [PATCH] ath9k: ar9003_eeprom.c:3618 fix variable name typo
From: John W. Linville @ 2013-08-28 15:09 UTC (permalink / raw)
To: linux-wireless; +Cc: Sujith Manoharan, John W. Linville
From: "John W. Linville" <linville@tuxdriver.com>
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c: In function 'ar9003_hw_ant_ctrl_apply':
>> drivers/net/wireless/ath/ath9k/ar9003_eeprom.c:3618: warning: 'regval' is used uninitialized in this function
It seems obvious that 'regval' should have been 'value'...
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
---
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index a6846ab..f486480 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3615,8 +3615,8 @@ static void ar9003_hw_ant_ctrl_apply(struct ath_hw *ah, bool is2ghz)
value = ar9003_hw_ant_ctrl_common_2_get(ah, is2ghz);
if (AR_SREV_9485(ah) && common->bt_ant_diversity) {
- regval &= ~AR_SWITCH_TABLE_COM2_ALL;
- regval |= ah->config.ant_ctrl_comm2g_switch_enable;
+ value &= ~AR_SWITCH_TABLE_COM2_ALL;
+ value |= ah->config.ant_ctrl_comm2g_switch_enable;
}
REG_RMW_FIELD(ah, AR_PHY_SWITCH_COM_2, AR_SWITCH_TABLE_COM2_ALL, value);
--
1.8.1.4
^ permalink raw reply related
* Re: [PATCH] iw: Print Interworking IE details in scan results.
From: Ben Greear @ 2013-08-28 14:30 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1377678223.13797.7.camel@jlt4.sipsolutions.net>
On 08/28/2013 01:23 AM, Johannes Berg wrote:
> On Tue, 2013-08-27 at 09:07 -0700, greearb@candelatech.com wrote:
>
>> 802.11u Interworking:
>> Network Options: 0xf1
>> Network Type: 1 (Private with Guest)
>> Internet
>> ASRA
>> ESR
>> UESA
>> Venu Group: 2 (Business)
>> Venu Type: 1
>
> That should be "Venue", no?
Yes, I kept typo-ing that..I think I fixed up the code in the patch, but
will double-check.
>
>
>> Signed-off-by: Ben Greear <greearb@candelatech.com>
>
> No need really, btw, this doesn't mean anything in the iw repository - I
> haven't bothered to add something (yet).
>
>> +++ b/scan.c
>> @@ -614,6 +614,69 @@ static void print_ht_capa(const uint8_t type, uint8_t len, const uint8_t *data)
>> print_ht_mcs(data + 3);
>> }
>>
>> +static const char* ntype_11u(uint8_t t) {
>
> I'd prefer kernel style with the opening brace on the next line :)
I'll fix that and re-submit the series.
Thanks,
Ben
>
> johannes
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply
* Re: 802.11p
From: Sedat Dilek @ 2013-08-28 14:20 UTC (permalink / raw)
To: Marc Murphy; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <F690310232FDDF4AB457E8B3EF90DDE08D32184E@MARCM-SBS2011.marcmltd.local>
On Wed, Aug 28, 2013 at 2:15 PM, Marc Murphy <marcmltd@marcm.co.uk> wrote:
> Doh ! updated now.
>
> I have had a read through the docs but there is no direct reference to 802.11p. I initially want to have a play with a couple of embedded units that I have to see if I cant send a message from one to the other but struggling to find any updated ath5 driver.
>
A few weeks ago someone asked about that constellation, check for
"802.11p and ath5k v3.10-rc1" thread on linux-wireless ML.
- Sedat -
> Thanks
> Marc
>
> ________________________________________
> From: Sedat Dilek [sedat.dilek@gmail.com]
> Sent: 28 August 2013 12:23
> To: Marc Murphy
> Cc: linux-wireless@vger.kernel.org
> Subject: Re:
>
> On Wed, Aug 28, 2013 at 1:07 PM, Marc Murphy <marcmltd@marcm.co.uk> wrote:
>> Hello,
>> I have been trawling the mailings and lots of people are asking about 802.11p and I have not managed to find a definitive push back to the mainline kernel.
>>
>
> Hi,
>
> first of all, you should set a "subject" to your email request :-).
>
> I cannot say much about 802.11p, but for first informations I
> recommend the wiki at <http://wireless.kernel.org> and have a look
> into docs section.
>
> For faster replies you can join #linux-wireless IRC channel (Freenode).
>
> - Sedat -
>
>> Is there anywhere in particular that I need to be looking to be able to get the patches so I can have a play ?
>>
>> Thanks
>> Marc--
>> 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 v2 4/4] ath10k: fix issues on non-preemptible systems
From: Michal Kazior @ 2013-08-28 13:16 UTC (permalink / raw)
To: Kalle Valo; +Cc: ath10k, linux-wireless
In-Reply-To: <877gf6lay7.fsf@kamboji.qca.qualcomm.com>
On 28 August 2013 06:02, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Michal Kazior <michal.kazior@tieto.com> writes:
>> There's another solution that I had in mind. Instead of:
>>
>> for (;;) { dequeue(z); process; }
>>
>> I did:
>>
>> q = dequeue_all(z); for (;;) { dequeue(q); process; }
>>
>> I.e. move all queued stuff at the worker entry and move it out of the
>> global queue, that can, and will be, having more stuff queued while
>> the worker does its job).
>>
>> This way workers would exit/restart more often, but from what I tested
>> it didn't really solve the problem. Given enough traffic HTC worker
>> responsible for HTT TX gets overwhelmed eventually. You could try
>> limit how many frames a worker can process during one execution, but
>> how do you guess that? This starvation depends on how fast your CPU
>> is.
>
> I think we should come up with better ways to handle this. To have a
> quota (like you mention above) would be one option. Other option would
> be to have multiple queues and some sort of priorisation or fair
> queueing.
Having quota will not help here in any way. You can re-queue a worker
after each single frame and avoid WMI starvation, however you can
still starve the rest of the system (and that can lead to system reset
via watchdog). I'm also unsure about the overhead queueing a work may
have (on a uP system without preemption in might be negligible, but
what about other systems?), so you'd have to guess the quota size or
else you'd get increased latency/overhead and perhaps slower
performance.
I believe cond_resched is a solution, not a workaround. Slow systems
without preemption need this. I wonder how other drivers got around
it? Or perhaps none of the other drivers had to deal with really
insufficient number of CPU cycles versus lots of work.
We could perhaps move workers out of HTC and have a single TX worker
in core.c for both WMI and HTT that would prioritize WMI, before
trying HTT. This could help guarantee that all beacons (which go
through WMI) are sent in a timely fashion in response to SWBA event.
But that won't fix the overall system starvation.
> And most importantly of all, we should minimise the lenght of queue we
> have inside ath10k. I'm worried that we queue way too many packets
> within ath10k right now.
Felix pointed that out quite some time ago. I would agree but I'm
affraid you'll hurt performance if you decrease the queue depth. There
seems to be some kind of latency thing going on (either on host, or on
firmware/hardware, or both combined). I tried decreasing HTT TX ring
buffer from 2048 to 256. In result on AP135 UDP TX got trimmed at
~330mbps max. Stuffing more throughput even left some idle CPU cycles.
If you consider 3x3 devices that are supposed to get you 1.3gbps, then
you apparently need that 2048 depth.
Michał.
^ permalink raw reply
* RE: 802.11p
From: Marc Murphy @ 2013-08-28 12:15 UTC (permalink / raw)
To: sedat.dilek@gmail.com; +Cc: linux-wireless@vger.kernel.org
Doh ! updated now.
I have had a read through the docs but there is no direct reference to 802.11p. I initially want to have a play with a couple of embedded units that I have to see if I cant send a message from one to the other but struggling to find any updated ath5 driver.
Thanks
Marc
________________________________________
From: Sedat Dilek [sedat.dilek@gmail.com]
Sent: 28 August 2013 12:23
To: Marc Murphy
Cc: linux-wireless@vger.kernel.org
Subject: Re:
On Wed, Aug 28, 2013 at 1:07 PM, Marc Murphy <marcmltd@marcm.co.uk> wrote:
> Hello,
> I have been trawling the mailings and lots of people are asking about 802.11p and I have not managed to find a definitive push back to the mainline kernel.
>
Hi,
first of all, you should set a "subject" to your email request :-).
I cannot say much about 802.11p, but for first informations I
recommend the wiki at <http://wireless.kernel.org> and have a look
into docs section.
For faster replies you can join #linux-wireless IRC channel (Freenode).
- Sedat -
> Is there anywhere in particular that I need to be looking to be able to get the patches so I can have a play ?
>
> Thanks
> Marc--
> 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: sd8787 (mwifiex) on big endian system
From: Tobias Waldekranz @ 2013-08-28 11:52 UTC (permalink / raw)
To: Bing Zhao; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <477F20668A386D41ADCC57781B1F70430EAF1FF23F@SC-VEXCH1.marvell.com>
On Tue, Aug 27, 2013 at 04:42:37PM -0700, Bing Zhao wrote:
> Hi Tobias,
>
> > Hi Bing,
> >
> > Here is the log output without the added udelay. It is always the 0xd9
> > command that fails, but not always with these sdio_ireg/wr_bitmask
> > values. I have seen these combinations:
> >
> > - sdio_ireg incorrect(2), wr_bitmask incorrect(fffe)
> > - sdio_ireg correct(3), wr_bitmask incorrect(fffe)
> > - sdio_ireg incorrect(2), wr_bitmask correct(ffff)
> >
> > Waiting 50 us before reading the mp_regs always returns the correct
> > response.
>
> Thanks for the logs.
>
> Could you try the following change to bypass 0xd9 command?
>
> diff --git a/drivers/net/wireless/mwifiex/sta_cmd.c b/drivers/net/wireless/mwifi
> index c0268b5..3cecc86 100644
> --- a/drivers/net/wireless/mwifiex/sta_cmd.c
> +++ b/drivers/net/wireless/mwifiex/sta_cmd.c
> @@ -1541,6 +1541,7 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8
> if (ret)
> return -1;
>
> +#if 0
> /* Reconfigure tx buf size */
> ret = mwifiex_send_cmd_sync(priv,
> HostCmd_CMD_RECONFIGURE_TX_BUFF,
> @@ -1548,6 +1549,7 @@ int mwifiex_sta_init_cmd(struct mwifiex_private *priv, u8
> &priv->adapter->tx_buf_size);
> if (ret)
> return -1;
> +#endif
>
> if (priv->bss_type != MWIFIEX_BSS_TYPE_UAP) {
> /* Enable IEEE PS by default */
>
> Thanks,
> Bing
>
Hi,
Here is the log:
mmc0: new high speed SDIO card at address 0001
mwifiex_sdio: info: vendor=0x02DF device=0x9119 class=0 function=1
mwifiex_sdio: info: SDIO FUNC1 IO port: 0x10000
mwifiex_sdio mmc0:0001:1: info: downloading FW image (447384 bytes)
mwifiex_sdio mmc0:0001:1: info: FW download over, size 447384 bytes
mwifiex_sdio mmc0:0001:1: WLAN FW is active
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xa9, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141981.833590): 0xa9, act 0x0, len 8, seqno 0x1
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=12
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141981.989543): 0x80a9, result 0, len 8, seqno 0x1
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xa9, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x3, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141981.989581): 0x3, act 0x0, len 71, seqno 0x2
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=75
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.7678): 0x8003, result 0, len 71, seqno 0x2
mwifiex_sdio mmc0:0001:1: info: GET_HW_SPEC: fw_release_number- 0x600e4209
mwifiex_sdio mmc0:0001:1: info: GET_HW_SPEC: permanent addr: 00:06:c6:37:45:28
mwifiex_sdio mmc0:0001:1: info: GET_HW_SPEC: hw_if_version=0x2 version=0x41
mwifiex_sdio mmc0:0001:1: cmd: mp_end_port 16, data port mask 0xfffe
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x3, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: PS Command: Enter PS
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xe4, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.7772): 0xe4, act 0xff, len 30, seqno 0x3
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=34
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.37680): 0x80e4, result 0, len 30, seqno 0x3
mwifiex_sdio mmc0:0001:1: info: mwifiex_ret_enh_power_mode: PS_MODE cmd reply result=0x0 action=0XFF
mwifiex_sdio mmc0:0001:1: cmd: Enabled STA power save
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xe4, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xd6, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.37730): 0xd6, act 0x0, len 44, seqno 0x4
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=804
mwifiex_sdio mmc0:0001:1: info: rx_len = 1024 skb->len = 1024
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 1024
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.58031): 0x80d6, result 0, len 800, seqno 0x4
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xd6, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x1e, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.58065): 0x1e, act 0x0, len 14, seqno 0x5
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=18
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.77665): 0x801e, result 0, len 14, seqno 0x5
mwifiex_sdio mmc0:0001:1: Current TxPower Level=0, Max Power=18, Min Power=4
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x1e, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.77706): 0x83, act 0x1, len 24, seqno 0x6
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x83, cmd_pending=1
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=28
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.97644): 0x8083, result 0, len 24, seqno 0x6
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x83, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.97677): 0xdf, act 0x1, len 14, seqno 0x7
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xdf, cmd_pending=1
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=18
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.117648): 0x80df, result 0, len 14, seqno 0x7
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xdf, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.117679): 0x28, act 0x13, len 12, seqno 0x8
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x28, cmd_pending=1
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=16
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.137678): 0x8028, result 0, len 12, seqno 0x8
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x28, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: PS Command: Enter Auto Deep Sleep
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xe4, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.137743): 0xe4, act 0xff, len 18, seqno 0x9
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=22
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.157687): 0x80e4, result 0, len 18, seqno 0x9
mwifiex_sdio mmc0:0001:1: info: mwifiex_ret_enh_power_mode: PS_MODE cmd reply result=0x0 action=0XFF
mwifiex_sdio mmc0:0001:1: cmd: Enabled auto deep sleep
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xe4, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: SNMP_CMD: cmd_oid = 0x9
mwifiex_sdio mmc0:0001:1: cmd: SNMP_CMD: Action=0x1, OID=0x9, OIDSize=0x2, Value=0x0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x16, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.157781): 0x16, act 0x1, len 16, seqno 0xa
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=20
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.177667): 0x8016, result 0, len 16, seqno 0xa
mwifiex_sdio mmc0:0001:1: info: SNMP_RESP: oid value = 0x9, query_type = 0x1, buf size = 0x2
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x16, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xcd, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.177711): 0xcd, act 0x1, len 16, seqno 0xb
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=20
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.197711): 0x80cd, result 0, len 16, seqno 0xb
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xcd, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xd6, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.197745): 0xd6, act 0x0, len 44, seqno 0xc
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=804
mwifiex_sdio mmc0:0001:1: info: rx_len = 1024 skb->len = 1024
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 1024
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.218053): 0x80d6, result 0, len 800, seqno 0xc
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xd6, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x1e, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.218090): 0x1e, act 0x0, len 14, seqno 0xd
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=18
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.237678): 0x801e, result 0, len 14, seqno 0xd
mwifiex_sdio mmc0:0001:1: Current TxPower Level=0, Max Power=18, Min Power=4
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x1e, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.237719): 0x83, act 0x1, len 24, seqno 0xe
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x83, cmd_pending=1
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=28
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.257659): 0x8083, result 0, len 24, seqno 0xe
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x83, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xdf, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.257693): 0xdf, act 0x1, len 14, seqno 0xf
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=18
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.277659): 0x80df, result 0, len 14, seqno 0xf
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xdf, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.277690): 0x28, act 0x13, len 12, seqno 0x10
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x28, cmd_pending=1
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=16
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.297670): 0x8028, result 0, len 12, seqno 0x10
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x28, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: SNMP_CMD: cmd_oid = 0x9
mwifiex_sdio mmc0:0001:1: cmd: SNMP_CMD: Action=0x1, OID=0x9, OIDSize=0x2, Value=0x0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x16, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.297738): 0x16, act 0x1, len 16, seqno 0x11
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=20
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.317665): 0x8016, result 0, len 16, seqno 0x11
mwifiex_sdio mmc0:0001:1: info: SNMP_RESP: oid value = 0x9, query_type = 0x1, buf size = 0x2
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x16, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.317707): 0xcd, act 0x1, len 16, seqno 0x12
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xcd, cmd_pending=1
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=20
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.318964): 0x80cd, result 0, len 16, seqno 0x12
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xcd, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xd6, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.318993): 0xd6, act 0x0, len 44, seqno 0x13
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=804
mwifiex_sdio mmc0:0001:1: info: rx_len = 1024 skb->len = 1024
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 1024
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.319768): 0x80d6, result 0, len 800, seqno 0x13
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xd6, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x1e, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.319828): 0x1e, act 0x0, len 14, seqno 0x14
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=18
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.320202): 0x801e, result 0, len 14, seqno 0x14
mwifiex_sdio mmc0:0001:1: Current TxPower Level=0, Max Power=18, Min Power=4
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x1e, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.320240): 0x83, act 0x1, len 24, seqno 0x15
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x83, cmd_pending=1
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=28
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.320593): 0x8083, result 0, len 24, seqno 0x15
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x83, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xdf, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.320647): 0xdf, act 0x1, len 14, seqno 0x16
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=18
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.321017): 0x80df, result 0, len 14, seqno 0x16
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xdf, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.321047): 0x28, act 0x13, len 12, seqno 0x17
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x28, cmd_pending=1
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=16
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.321415): 0x8028, result 0, len 12, seqno 0x17
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x28, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: SNMP_CMD: cmd_oid = 0x9
mwifiex_sdio mmc0:0001:1: cmd: SNMP_CMD: Action=0x1, OID=0x9, OIDSize=0x2, Value=0x0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x16, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.321482): 0x16, act 0x1, len 16, seqno 0x18
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=20
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.321850): 0x8016, result 0, len 16, seqno 0x18
mwifiex_sdio mmc0:0001:1: info: SNMP_RESP: oid value = 0x9, query_type = 0x1, buf size = 0x2
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x16, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.321888): 0xcd, act 0x1, len 16, seqno 0x19
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xcd, cmd_pending=1
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=20
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.322259): 0x80cd, result 0, len 16, seqno 0x19
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xcd, cmd_pending=0
mwifiex_sdio mmc0:0001:1: ignoring F/W country code US
mwifiex_sdio mmc0:0001:1: info: mlan0: Marvell 802.11 Adapter
mwifiex_sdio mmc0:0001:1: info: uap0: Marvell 802.11 Adapter
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xeb, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.362104): 0xeb, act 0x1, len 12, seqno 0x201a
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=16
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.364515): 0x80eb, result 0, len 12, seqno 0x201a
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xeb, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xeb, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.364593): 0xeb, act 0x1, len 12, seqno 0x201b
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=16
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.366498): 0x80eb, result 0, len 12, seqno 0x201b
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xeb, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xeb, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1141982.366578): 0xeb, act 0x1, len 12, seqno 0x201c
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=16
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1141982.367029): 0x80eb, result 0, len 12, seqno 0x201c
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xeb, cmd_pending=0
mwifiex_sdio mmc0:0001:1: info: p2p0: Marvell 802.11 Adapter
mwifiex_sdio mmc0:0001:1: info: MWIFIEX VERSION: mwifiex 1.0 (66.14.96.p9)
mwifiex_sdio mmc0:0001:1: driver_version = mwifiex 1.0 (66.14.96.p9)
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=10
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Event ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: info: EVENT: SLEEP
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=1
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=16
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
The driver seems to complete the initialization process. But if I now
launch hostapd, I get a timeout in another command (0xb1):
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x10c, cmd_pending=1
mwifiex_sdio mmc0:0001:1: event: wakeup device...
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x10c, cmd_pending=2
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x3
mwifiex_sdio mmc0:0001:1: int: DNLD: wr_bitmap=0xffff
mwifiex_sdio mmc0:0001:1: info: <--- Tx DONE Interrupt --->
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=0
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=10
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Event ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: info: EVENT: AWAKE
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1142011.253127): 0x10c, act 0x1, len 14, seqno 0x101e
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: Enable Promiscuous mode
mwifiex_sdio mmc0:0001:1: info: old_pkt_filter=0x13, curr_pkt_filter=0x93
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x28, cmd_pending=3
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=0
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=18
mwifiex_sdio mmc0:0001:1: info: Enable Promiscuous mode
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: old_pkt_filter=0x93, curr_pkt_filter=0x93
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: info: Enable Promiscuous mode
mwifiex_sdio mmc0:0001:1: info: old_pkt_filter=0x93, curr_pkt_filter=0x93
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1142011.253760): 0x810c, result 0, len 14, seqno 0x101e
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x10c, cmd_pending=2
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1142011.253789): 0x10c, act 0x1, len 14, seqno 0x101f
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=0
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=18
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1142011.254157): 0x810c, result 0, len 14, seqno 0x101f
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x10c, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1142011.254180): 0x28, act 0x93, len 12, seqno 0x1020
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=0
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=16
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1142011.255185): 0x8028, result 0, len 12, seqno 0x1021
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x28, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x28, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1142011.257267): 0x28, act 0x93, len 12, seqno 0x1022
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=0
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=16
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1142011.257653): 0x8028, result 0, len 12, seqno 0x1022
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x28, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x28, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1142011.257859): 0x28, act 0x93, len 12, seqno 0x1023
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=0
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=16
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1142011.258220): 0x8028, result 0, len 12, seqno 0x1023
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x28, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x28, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1142011.258392): 0x28, act 0x93, len 12, seqno 0x1024
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=0
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=16
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1142011.258745): 0x8028, result 0, len 12, seqno 0x1024
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x28, cmd_pending=0
mwifiex_sdio mmc0:0001:1: info: 11D: no_of_triplet=0x1
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x5b, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xb2, cmd_pending=2
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1142011.259117): 0x5b, act 0x1, len 20, seqno 0x25
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=0
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=24
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1142011.259522): 0x805b, result 0, len 20, seqno 0x25
mwifiex_sdio mmc0:0001:1: info: 11D Domain Info Resp: no_of_triplet=1
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0x5b, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1142011.259553): 0xb2, act 0x0, len 8, seqno 0x1026
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=0
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=12
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1142011.259880): 0x80b2, result 0, len 8, seqno 0x1026
mwifiex_sdio mmc0:0001:1: cmd completed: status=0
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xb2, cmd_pending=0
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xb0, cmd_pending=1
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0xb1, cmd_pending=2
mwifiex_sdio mmc0:0001:1: cmd: QUEUE_CMD: cmd=0x28, cmd_pending=3
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1142011.259960): 0xb0, act 0x1, len 115, seqno 0x1027
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=0
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=119
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Cmd Response ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: cmd: CMD_RESP: (1142011.260400): 0x80b0, result 0, len 115, seqno 0x1027
mwifiex_sdio mmc0:0001:1: cmd: FREE_CMD: cmd=0xb0, cmd_pending=2
mwifiex_sdio mmc0:0001:1: cmd: DNLD_CMD: (1142011.260426): 0xb1, act 0x0, len 8, seqno 0x1028
mwifiex_sdio mmc0:0001:1: info: mwifiex_host_to_card_mp_aggr: tx aggregation disabled
mwifiex_sdio mmc0:0001:1: data: mwifiex_host_to_card_mp_aggr: send current buffer 0
mwifiex_sdio mmc0:0001:1: int: sdio_ireg = 0x1
mwifiex_sdio mmc0:0001:1: info: cmd_sent=0 data_sent=0
mwifiex_sdio mmc0:0001:1: int: UPLD: rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0001
mwifiex_sdio mmc0:0001:1: data: port=0 mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: RX: port=0 rx_len=21
mwifiex_sdio mmc0:0001:1: info: rx_len = 256 skb->len = 256
mwifiex_sdio mmc0:0001:1: info: mwifiex_sdio_card_to_host_mp_aggr: no aggregation for cmd response
mwifiex_sdio mmc0:0001:1: info: RX: port: 0, rx_len: 256
mwifiex_sdio mmc0:0001:1: info: --- Rx: Event ---
mwifiex_sdio mmc0:0001:1: data: mp_rd_bitmap=0x0000
mwifiex_sdio mmc0:0001:1: info: no more rd_port available
mwifiex_sdio mmc0:0001:1: event: 1142011.264553: cause: 0x2e
mwifiex_sdio mmc0:0001:1: AP EVENT: event id: 0x2e
mwifiex_sdio mmc0:0001:1: cmd_wait_q terminated: -512
mwifiex_sdio mmc0:0001:1: mwifiex_cmd_timeout_func: Timeout cmd id (1142021.275294) = 0xb1, act = 0x0
mwifiex_sdio mmc0:0001:1: num_data_h2c_failure = 0
mwifiex_sdio mmc0:0001:1: num_cmd_h2c_failure = 0
mwifiex_sdio mmc0:0001:1: num_cmd_timeout = 1
mwifiex_sdio mmc0:0001:1: num_tx_timeout = 0
mwifiex_sdio mmc0:0001:1: last_cmd_index = 4
mwifiex_sdio mmc0:0001:1: last_cmd_id: 00 28 00 5b 00 b2 00 b0 00 b1
mwifiex_sdio mmc0:0001:1: last_cmd_act: 00 93 00 01 00 00 00 01 00 00
mwifiex_sdio mmc0:0001:1: last_cmd_resp_index = 3
mwifiex_sdio mmc0:0001:1: last_cmd_resp_id: 80 28 80 5b 80 b2 80 b0 80 28
mwifiex_sdio mmc0:0001:1: last_event_index = 3
mwifiex_sdio mmc0:0001:1: last_event: 00 00 00 0b 00 0a 00 2e 00 00
mwifiex_sdio mmc0:0001:1: data_sent=0 cmd_sent=0
mwifiex_sdio mmc0:0001:1: ps_mode=1 ps_state=0
mwifiex_sdio: Resetting card...
--
Thanks
- wkz
^ permalink raw reply
* [PATCHv4 4/6] mac80211: add support for CSA in IBSS mode
From: Simon Wunderlich @ 2013-08-28 11:41 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, Mathias Kretschmer, Simon Wunderlich
In-Reply-To: <1377690093-27024-1-git-send-email-siwu@hrz.tu-chemnitz.de>
This function adds the channel switch announcement implementation for the
IBSS code. It is triggered by userspace (mac80211/cfg) or by external
channel switch announcement, which have to be adopted. Both CSAs in
beacons and action frames are supported. As for AP mode, the channel
switch is applied after some time. However in IBSS mode, the channel
switch IEs are generated in the kernel.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
Changes to PATCHv2:
* moved ibss_disconnect in separate patch
* removed useless comment
Changes to PATCHv1:
* replace cascaded if with switch
* remove remote triggerable WARN_ON (and add forgotten braces ...)
* move function declaration from earlier patch in the series to this
one
* report used BSSID in status messages
---
net/mac80211/cfg.c | 87 ++++++++---
net/mac80211/ibss.c | 354 +++++++++++++++++++++++++++++++++++++++++++-
net/mac80211/ieee80211_i.h | 5 +
net/mac80211/iface.c | 4 +
net/mac80211/rx.c | 36 +++--
net/mac80211/tx.c | 37 ++++-
6 files changed, 480 insertions(+), 43 deletions(-)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 2e7855a..b455e72 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2865,30 +2865,38 @@ void ieee80211_csa_finalize_work(struct work_struct *work)
if (!ieee80211_sdata_running(sdata))
return;
- if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_AP))
- return;
-
sdata->radar_required = sdata->csa_radar_required;
err = ieee80211_vif_change_channel(sdata, &local->csa_chandef,
&changed);
if (WARN_ON(err < 0))
return;
- err = ieee80211_assign_beacon(sdata, sdata->u.ap.next_beacon);
- if (err < 0)
+ ieee80211_bss_info_change_notify(sdata, changed);
+
+ switch (sdata->vif.type) {
+ case NL80211_IFTYPE_AP:
+ err = ieee80211_assign_beacon(sdata, sdata->u.ap.next_beacon);
+ if (err < 0)
+ return;
+ changed |= err;
+ kfree(sdata->u.ap.next_beacon);
+ sdata->u.ap.next_beacon = NULL;
+
+ ieee80211_bss_info_change_notify(sdata, err);
+ break;
+ case NL80211_IFTYPE_ADHOC:
+ ieee80211_ibss_finish_csa(sdata);
+ break;
+ default:
+ WARN_ON(1);
return;
-
- changed |= err;
- kfree(sdata->u.ap.next_beacon);
- sdata->u.ap.next_beacon = NULL;
+ }
sdata->vif.csa_active = false;
ieee80211_wake_queues_by_reason(&sdata->local->hw,
IEEE80211_MAX_QUEUE_MAP,
IEEE80211_QUEUE_STOP_REASON_CSA);
- ieee80211_bss_info_change_notify(sdata, changed);
-
cfg80211_ch_switch_notify(sdata->dev, &local->csa_chandef);
}
@@ -2936,20 +2944,56 @@ static int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
if (sdata->vif.csa_active)
return -EBUSY;
- /* only handle AP for now. */
switch (sdata->vif.type) {
case NL80211_IFTYPE_AP:
+ sdata->csa_counter_offset_beacon =
+ params->counter_offset_beacon;
+ sdata->csa_counter_offset_presp = params->counter_offset_presp;
+ sdata->u.ap.next_beacon =
+ cfg80211_beacon_dup(¶ms->beacon_after);
+ if (!sdata->u.ap.next_beacon)
+ return -ENOMEM;
+
+ err = ieee80211_assign_beacon(sdata, ¶ms->beacon_csa);
+ if (err < 0) {
+ kfree(sdata->u.ap.next_beacon);
+ return err;
+ }
+ break;
+ case NL80211_IFTYPE_ADHOC:
+ if (!sdata->vif.bss_conf.ibss_joined)
+ return -EINVAL;
+
+ if (params->chandef.width != sdata->u.ibss.chandef.width)
+ return -EINVAL;
+
+ switch (params->chandef.width) {
+ case NL80211_CHAN_WIDTH_40:
+ if (cfg80211_get_chandef_type(¶ms->chandef) !=
+ cfg80211_get_chandef_type(&sdata->u.ibss.chandef))
+ return -EINVAL;
+ case NL80211_CHAN_WIDTH_5:
+ case NL80211_CHAN_WIDTH_10:
+ case NL80211_CHAN_WIDTH_20_NOHT:
+ case NL80211_CHAN_WIDTH_20:
+ break;
+ default:
+ return -EINVAL;
+ }
+
+ /* changes into another band are not supported */
+ if (sdata->u.ibss.chandef.chan->band !=
+ params->chandef.chan->band)
+ return -EINVAL;
+
+ err = ieee80211_ibss_csa_beacon(sdata, params);
+ if (err < 0)
+ return err;
break;
default:
return -EOPNOTSUPP;
}
- sdata->u.ap.next_beacon = cfg80211_beacon_dup(¶ms->beacon_after);
- if (!sdata->u.ap.next_beacon)
- return -ENOMEM;
-
- sdata->csa_counter_offset_beacon = params->counter_offset_beacon;
- sdata->csa_counter_offset_presp = params->counter_offset_presp;
sdata->csa_radar_required = params->radar_required;
if (params->block_tx)
@@ -2957,10 +3001,6 @@ static int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
IEEE80211_MAX_QUEUE_MAP,
IEEE80211_QUEUE_STOP_REASON_CSA);
- err = ieee80211_assign_beacon(sdata, ¶ms->beacon_csa);
- if (err < 0)
- return err;
-
local->csa_chandef = params->chandef;
sdata->vif.csa_active = true;
@@ -3014,7 +3054,8 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
need_offchan = true;
if (!ieee80211_is_action(mgmt->frame_control) ||
mgmt->u.action.category == WLAN_CATEGORY_PUBLIC ||
- mgmt->u.action.category == WLAN_CATEGORY_SELF_PROTECTED)
+ mgmt->u.action.category == WLAN_CATEGORY_SELF_PROTECTED ||
+ mgmt->u.action.category == WLAN_CATEGORY_SPECTRUM_MGMT)
break;
rcu_read_lock();
sta = sta_info_get(sdata, mgmt->da);
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 0c3ec08..c004213 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -39,7 +39,8 @@ ieee80211_ibss_build_presp(struct ieee80211_sub_if_data *sdata,
const int beacon_int, const u32 basic_rates,
const u16 capability, u64 tsf,
struct cfg80211_chan_def *chandef,
- bool *have_higher_than_11mbit)
+ bool *have_higher_than_11mbit,
+ struct cfg80211_csa_settings *csa_settings)
{
struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
struct ieee80211_local *local = sdata->local;
@@ -59,6 +60,7 @@ ieee80211_ibss_build_presp(struct ieee80211_sub_if_data *sdata,
2 + 8 /* max Supported Rates */ +
3 /* max DS params */ +
4 /* IBSS params */ +
+ 5 /* Channel Switch Announcement */ +
2 + (IEEE80211_MAX_SUPP_RATES - 8) +
2 + sizeof(struct ieee80211_ht_cap) +
2 + sizeof(struct ieee80211_ht_operation) +
@@ -135,6 +137,16 @@ ieee80211_ibss_build_presp(struct ieee80211_sub_if_data *sdata,
*pos++ = 0;
*pos++ = 0;
+ if (csa_settings) {
+ *pos++ = WLAN_EID_CHANNEL_SWITCH;
+ *pos++ = 3;
+ *pos++ = csa_settings->block_tx ? 1 : 0;
+ *pos++ = ieee80211_frequency_to_channel(
+ csa_settings->chandef.chan->center_freq);
+ sdata->csa_counter_offset_beacon = (pos - presp->head);
+ *pos++ = csa_settings->count;
+ }
+
/* put the remaining rates in WLAN_EID_EXT_SUPP_RATES */
if (rates_n > 8) {
*pos++ = WLAN_EID_EXT_SUPP_RATES;
@@ -276,7 +288,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
presp = ieee80211_ibss_build_presp(sdata, beacon_int, basic_rates,
capability, tsf, &chandef,
- &have_higher_than_11mbit);
+ &have_higher_than_11mbit, NULL);
if (!presp)
return;
@@ -416,6 +428,109 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
tsf, false);
}
+int ieee80211_ibss_csa_beacon(struct ieee80211_sub_if_data *sdata,
+ struct cfg80211_csa_settings *csa_settings)
+{
+ struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct beacon_data *presp, *old_presp;
+ struct cfg80211_bss *cbss;
+ const struct cfg80211_bss_ies *ies;
+ u16 capability;
+ u64 tsf;
+ int ret = 0;
+
+ sdata_assert_lock(sdata);
+
+ capability = WLAN_CAPABILITY_IBSS;
+
+ if (ifibss->privacy)
+ capability |= WLAN_CAPABILITY_PRIVACY;
+
+ cbss = cfg80211_get_bss(sdata->local->hw.wiphy, ifibss->chandef.chan,
+ ifibss->bssid, ifibss->ssid,
+ ifibss->ssid_len, WLAN_CAPABILITY_IBSS |
+ WLAN_CAPABILITY_PRIVACY,
+ capability);
+
+ if (WARN_ON(!cbss)) {
+ ret = -EINVAL;
+ goto out;
+ }
+
+ rcu_read_lock();
+ ies = rcu_dereference(cbss->ies);
+ tsf = ies->tsf;
+ rcu_read_unlock();
+ cfg80211_put_bss(sdata->local->hw.wiphy, cbss);
+
+ old_presp = rcu_dereference_protected(ifibss->presp,
+ lockdep_is_held(&sdata->wdev.mtx));
+
+ presp = ieee80211_ibss_build_presp(sdata,
+ sdata->vif.bss_conf.beacon_int,
+ sdata->vif.bss_conf.basic_rates,
+ capability, tsf, &ifibss->chandef,
+ NULL, csa_settings);
+ if (!presp) {
+ ret = -ENOMEM;
+ goto out;
+ }
+
+ rcu_assign_pointer(ifibss->presp, presp);
+ if (old_presp)
+ kfree_rcu(old_presp, rcu_head);
+
+ ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON);
+ out:
+ return ret;
+}
+
+int ieee80211_ibss_finish_csa(struct ieee80211_sub_if_data *sdata)
+{
+ struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct cfg80211_bss *cbss;
+ int err;
+ u16 capability;
+
+ sdata_lock(sdata);
+ /* update cfg80211 bss information with the new channel */
+ if (!is_zero_ether_addr(ifibss->bssid)) {
+ capability = WLAN_CAPABILITY_IBSS;
+
+ if (ifibss->privacy)
+ capability |= WLAN_CAPABILITY_PRIVACY;
+
+ cbss = cfg80211_get_bss(sdata->local->hw.wiphy,
+ ifibss->chandef.chan,
+ ifibss->bssid, ifibss->ssid,
+ ifibss->ssid_len, WLAN_CAPABILITY_IBSS |
+ WLAN_CAPABILITY_PRIVACY,
+ capability);
+ /* XXX: should not really modify cfg80211 data */
+ if (cbss) {
+ cbss->channel = sdata->local->csa_chandef.chan;
+ cfg80211_put_bss(sdata->local->hw.wiphy, cbss);
+ }
+ }
+
+ ifibss->chandef = sdata->local->csa_chandef;
+
+ /* generate the beacon */
+ err = ieee80211_ibss_csa_beacon(sdata, NULL);
+ sdata_unlock(sdata);
+ if (err < 0)
+ return err;
+
+ return 0;
+}
+
+void ieee80211_ibss_stop(struct ieee80211_sub_if_data *sdata)
+{
+ struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+
+ cancel_work_sync(&ifibss->csa_connection_drop_work);
+}
+
static struct sta_info *ieee80211_ibss_finish_sta(struct sta_info *sta)
__acquires(RCU)
{
@@ -589,6 +704,204 @@ static void ieee80211_ibss_disconnect(struct ieee80211_sub_if_data *sdata)
ieee80211_vif_release_channel(sdata);
}
+static void ieee80211_csa_connection_drop_work(struct work_struct *work)
+{
+ struct ieee80211_sub_if_data *sdata =
+ container_of(work, struct ieee80211_sub_if_data,
+ u.ibss.csa_connection_drop_work);
+
+ ieee80211_ibss_disconnect(sdata);
+ synchronize_rcu();
+ skb_queue_purge(&sdata->skb_queue);
+
+ /* trigger a scan to find another IBSS network to join */
+ ieee80211_queue_work(&sdata->local->hw, &sdata->work);
+}
+
+static bool
+ieee80211_ibss_process_chanswitch(struct ieee80211_sub_if_data *sdata,
+ struct ieee802_11_elems *elems,
+ bool beacon)
+{
+ struct cfg80211_csa_settings params;
+ struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct ieee80211_chanctx_conf *chanctx_conf;
+ struct ieee80211_chanctx *chanctx;
+ enum nl80211_channel_type ch_type;
+ int err, num_chanctx;
+ u32 sta_flags;
+ u8 mode;
+
+ if (sdata->vif.csa_active)
+ return true;
+
+ if (!sdata->vif.bss_conf.ibss_joined)
+ return false;
+
+ sta_flags = IEEE80211_STA_DISABLE_VHT;
+ switch (ifibss->chandef.width) {
+ case NL80211_CHAN_WIDTH_5:
+ case NL80211_CHAN_WIDTH_10:
+ case NL80211_CHAN_WIDTH_20_NOHT:
+ sta_flags |= IEEE80211_STA_DISABLE_HT;
+ /* fall through */
+ case NL80211_CHAN_WIDTH_20:
+ sta_flags |= IEEE80211_STA_DISABLE_40MHZ;
+ break;
+ default:
+ break;
+ }
+
+ memset(¶ms, 0, sizeof(params));
+ err = ieee80211_parse_ch_switch_ie(sdata, elems, beacon,
+ ifibss->chandef.chan->band,
+ sta_flags, ifibss->bssid,
+ ¶ms.count, &mode,
+ ¶ms.chandef);
+
+ /* can't switch to destination channel, fail */
+ if (err < 0)
+ goto disconnect;
+
+ /* did not contain a CSA */
+ if (err)
+ return false;
+
+ if (ifibss->chandef.chan->band != params.chandef.chan->band)
+ goto disconnect;
+
+ switch (ifibss->chandef.width) {
+ case NL80211_CHAN_WIDTH_20_NOHT:
+ case NL80211_CHAN_WIDTH_20:
+ case NL80211_CHAN_WIDTH_40:
+ /* keep our current HT mode (HT20/HT40+/HT40-), even if
+ * another mode has been announced. The mode is not adopted
+ * within the beacon while doing CSA and we should therefore
+ * keep the mode which we announce.
+ */
+ ch_type = cfg80211_get_chandef_type(&ifibss->chandef);
+ cfg80211_chandef_create(¶ms.chandef, params.chandef.chan,
+ ch_type);
+ break;
+ case NL80211_CHAN_WIDTH_5:
+ case NL80211_CHAN_WIDTH_10:
+ if (params.chandef.width != ifibss->chandef.width) {
+ sdata_info(sdata,
+ "IBSS %pM received channel switch from incompatible channel width (%d MHz, width:%d, CF1/2: %d/%d MHz), disconnecting\n",
+ ifibss->bssid,
+ params.chandef.chan->center_freq,
+ params.chandef.width,
+ params.chandef.center_freq1,
+ params.chandef.center_freq2);
+ goto disconnect;
+ }
+ break;
+ default:
+ /* should not happen, sta_flags should prevent VHT modes. */
+ WARN_ON(1);
+ goto disconnect;
+ }
+
+ if (!cfg80211_chandef_usable(sdata->local->hw.wiphy, ¶ms.chandef,
+ IEEE80211_CHAN_DISABLED)) {
+ sdata_info(sdata,
+ "IBSS %pM switches to unsupported channel (%d MHz, width:%d, CF1/2: %d/%d MHz), disconnecting\n",
+ ifibss->bssid,
+ params.chandef.chan->center_freq,
+ params.chandef.width,
+ params.chandef.center_freq1,
+ params.chandef.center_freq2);
+ goto disconnect;
+ }
+
+ err = cfg80211_chandef_dfs_required(sdata->local->hw.wiphy,
+ ¶ms.chandef);
+ if (err < 0)
+ goto disconnect;
+ if (err) {
+ params.radar_required = true;
+
+ /* TODO: IBSS-DFS not (yet) supported, disconnect. */
+ goto disconnect;
+ }
+
+ rcu_read_lock();
+ chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+ if (!chanctx_conf) {
+ rcu_read_unlock();
+ goto disconnect;
+ }
+
+ /* don't handle for multi-VIF cases */
+ chanctx = container_of(chanctx_conf, struct ieee80211_chanctx, conf);
+ if (chanctx->refcount > 1) {
+ rcu_read_unlock();
+ goto disconnect;
+ }
+ num_chanctx = 0;
+ list_for_each_entry_rcu(chanctx, &sdata->local->chanctx_list, list)
+ num_chanctx++;
+
+ if (num_chanctx > 1) {
+ rcu_read_unlock();
+ goto disconnect;
+ }
+ rcu_read_unlock();
+
+ /* all checks done, now perform the channel switch. */
+ ibss_dbg(sdata,
+ "received channel switch announcement to go to channel %d MHz\n",
+ params.chandef.chan->center_freq);
+
+ params.block_tx = !!mode;
+
+ ieee80211_ibss_csa_beacon(sdata, ¶ms);
+ sdata->csa_radar_required = params.radar_required;
+
+ if (params.block_tx)
+ ieee80211_stop_queues_by_reason(&sdata->local->hw,
+ IEEE80211_MAX_QUEUE_MAP,
+ IEEE80211_QUEUE_STOP_REASON_CSA);
+
+ sdata->local->csa_chandef = params.chandef;
+ sdata->vif.csa_active = true;
+
+ ieee80211_bss_info_change_notify(sdata, err);
+ drv_channel_switch_beacon(sdata, ¶ms.chandef);
+
+ return true;
+disconnect:
+ ibss_dbg(sdata, "Can't handle channel switch, disconnect\n");
+ ieee80211_queue_work(&sdata->local->hw,
+ &ifibss->csa_connection_drop_work);
+
+ return true;
+}
+
+static void
+ieee80211_rx_mgmt_spectrum_mgmt(struct ieee80211_sub_if_data *sdata,
+ struct ieee80211_mgmt *mgmt, size_t len,
+ struct ieee80211_rx_status *rx_status,
+ struct ieee802_11_elems *elems)
+{
+ int required_len;
+
+ if (len < IEEE80211_MIN_ACTION_SIZE + 1)
+ return;
+
+ /* CSA is the only action we handle for now */
+ if (mgmt->u.action.u.measurement.action_code !=
+ WLAN_ACTION_SPCT_CHL_SWITCH)
+ return;
+
+ required_len = IEEE80211_MIN_ACTION_SIZE +
+ sizeof(mgmt->u.action.u.chan_switch);
+ if (len < required_len)
+ return;
+
+ ieee80211_ibss_process_chanswitch(sdata, elems, false);
+}
+
static void ieee80211_rx_mgmt_deauth_ibss(struct ieee80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
size_t len)
@@ -751,10 +1064,6 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
/* check if we need to merge IBSS */
- /* we use a fixed BSSID */
- if (sdata->u.ibss.fixed_bssid)
- goto put_bss;
-
/* not an IBSS */
if (!(cbss->capability & WLAN_CAPABILITY_IBSS))
goto put_bss;
@@ -770,10 +1079,18 @@ static void ieee80211_rx_bss_info(struct ieee80211_sub_if_data *sdata,
sdata->u.ibss.ssid_len))
goto put_bss;
+ /* process channel switch */
+ if (ieee80211_ibss_process_chanswitch(sdata, elems, true))
+ goto put_bss;
+
/* same BSSID */
if (ether_addr_equal(cbss->bssid, sdata->u.ibss.bssid))
goto put_bss;
+ /* we use a fixed BSSID */
+ if (sdata->u.ibss.fixed_bssid)
+ goto put_bss;
+
if (ieee80211_have_rx_timestamp(rx_status)) {
/* time when timestamp field was received */
rx_timestamp =
@@ -1142,6 +1459,8 @@ void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
struct ieee80211_rx_status *rx_status;
struct ieee80211_mgmt *mgmt;
u16 fc;
+ struct ieee802_11_elems elems;
+ int ies_len;
rx_status = IEEE80211_SKB_RXCB(skb);
mgmt = (struct ieee80211_mgmt *) skb->data;
@@ -1167,6 +1486,27 @@ void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
case IEEE80211_STYPE_DEAUTH:
ieee80211_rx_mgmt_deauth_ibss(sdata, mgmt, skb->len);
break;
+ case IEEE80211_STYPE_ACTION:
+ switch (mgmt->u.action.category) {
+ case WLAN_CATEGORY_SPECTRUM_MGMT:
+ ies_len = skb->len -
+ offsetof(struct ieee80211_mgmt,
+ u.action.u.chan_switch.variable);
+
+ if (ies_len < 0)
+ break;
+
+ ieee802_11_parse_elems(
+ mgmt->u.action.u.chan_switch.variable,
+ ies_len, true, &elems);
+
+ if (elems.parse_error)
+ break;
+
+ ieee80211_rx_mgmt_spectrum_mgmt(sdata, mgmt, skb->len,
+ rx_status, &elems);
+ break;
+ }
}
mgmt_out:
@@ -1233,6 +1573,8 @@ void ieee80211_ibss_setup_sdata(struct ieee80211_sub_if_data *sdata)
(unsigned long) sdata);
INIT_LIST_HEAD(&ifibss->incomplete_stations);
spin_lock_init(&ifibss->incomplete_lock);
+ INIT_WORK(&ifibss->csa_connection_drop_work,
+ ieee80211_csa_connection_drop_work);
}
/* scan finished notification */
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 63b7c9c..f0f571d 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -487,6 +487,7 @@ struct ieee80211_if_managed {
struct ieee80211_if_ibss {
struct timer_list timer;
+ struct work_struct csa_connection_drop_work;
unsigned long last_scan_completed;
@@ -1331,6 +1332,10 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata);
void ieee80211_ibss_work(struct ieee80211_sub_if_data *sdata);
void ieee80211_ibss_rx_queued_mgmt(struct ieee80211_sub_if_data *sdata,
struct sk_buff *skb);
+int ieee80211_ibss_csa_beacon(struct ieee80211_sub_if_data *sdata,
+ struct cfg80211_csa_settings *csa_settings);
+int ieee80211_ibss_finish_csa(struct ieee80211_sub_if_data *sdata);
+void ieee80211_ibss_stop(struct ieee80211_sub_if_data *sdata);
/* mesh code */
void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata);
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index fcecd63..e48f103 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -766,6 +766,10 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
if (sdata->vif.type == NL80211_IFTYPE_STATION)
ieee80211_mgd_stop(sdata);
+ if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
+ ieee80211_ibss_stop(sdata);
+
+
/*
* Remove all stations associated with this interface.
*
diff --git a/net/mac80211/rx.c b/net/mac80211/rx.c
index 54395d7..8e908e1 100644
--- a/net/mac80211/rx.c
+++ b/net/mac80211/rx.c
@@ -2402,7 +2402,8 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
return RX_DROP_UNUSABLE;
if (!rx->sta && mgmt->u.action.category != WLAN_CATEGORY_PUBLIC &&
- mgmt->u.action.category != WLAN_CATEGORY_SELF_PROTECTED)
+ mgmt->u.action.category != WLAN_CATEGORY_SELF_PROTECTED &&
+ mgmt->u.action.category != WLAN_CATEGORY_SPECTRUM_MGMT)
return RX_DROP_UNUSABLE;
if (!(status->rx_flags & IEEE80211_RX_RA_MATCH))
@@ -2566,31 +2567,46 @@ ieee80211_rx_h_action(struct ieee80211_rx_data *rx)
goto queue;
case WLAN_CATEGORY_SPECTRUM_MGMT:
- if (status->band != IEEE80211_BAND_5GHZ)
- break;
-
- if (sdata->vif.type != NL80211_IFTYPE_STATION)
- break;
-
/* verify action_code is present */
if (len < IEEE80211_MIN_ACTION_SIZE + 1)
break;
switch (mgmt->u.action.u.measurement.action_code) {
case WLAN_ACTION_SPCT_MSR_REQ:
+ if (status->band != IEEE80211_BAND_5GHZ)
+ break;
+
if (len < (IEEE80211_MIN_ACTION_SIZE +
sizeof(mgmt->u.action.u.measurement)))
break;
+
+ if (sdata->vif.type != NL80211_IFTYPE_STATION)
+ break;
+
ieee80211_process_measurement_req(sdata, mgmt, len);
goto handled;
- case WLAN_ACTION_SPCT_CHL_SWITCH:
- if (sdata->vif.type != NL80211_IFTYPE_STATION)
+ case WLAN_ACTION_SPCT_CHL_SWITCH: {
+ u8 *bssid;
+ if (len < (IEEE80211_MIN_ACTION_SIZE +
+ sizeof(mgmt->u.action.u.chan_switch)))
break;
- if (!ether_addr_equal(mgmt->bssid, sdata->u.mgd.bssid))
+ if (sdata->vif.type != NL80211_IFTYPE_STATION &&
+ sdata->vif.type != NL80211_IFTYPE_ADHOC)
+ break;
+
+ if (sdata->vif.type == NL80211_IFTYPE_STATION)
+ bssid = sdata->u.mgd.bssid;
+ else if (sdata->vif.type == NL80211_IFTYPE_ADHOC)
+ bssid = sdata->u.ibss.bssid;
+ else
+ break;
+
+ if (!ether_addr_equal(mgmt->bssid, bssid))
break;
goto queue;
+ }
}
break;
case WLAN_CATEGORY_SA_QUERY:
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 3456c04..dc83fc7 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2357,15 +2357,31 @@ static void ieee80211_update_csa(struct ieee80211_sub_if_data *sdata,
struct probe_resp *resp;
int counter_offset_beacon = sdata->csa_counter_offset_beacon;
int counter_offset_presp = sdata->csa_counter_offset_presp;
+ u8 *beacon_data;
+ size_t beacon_data_len;
+
+ switch (sdata->vif.type) {
+ case NL80211_IFTYPE_AP:
+ beacon_data = beacon->tail;
+ beacon_data_len = beacon->tail_len;
+ break;
+ case NL80211_IFTYPE_ADHOC:
+ beacon_data = beacon->head;
+ beacon_data_len = beacon->head_len;
+ break;
+ default:
+ return;
+ }
+ if (WARN_ON(counter_offset_beacon >= beacon_data_len))
+ return;
/* warn if the driver did not check for/react to csa completeness */
- if (WARN_ON(((u8 *)beacon->tail)[counter_offset_beacon] == 0))
+ if (WARN_ON(beacon_data[counter_offset_beacon] == 0))
return;
- ((u8 *)beacon->tail)[counter_offset_beacon]--;
+ beacon_data[counter_offset_beacon]--;
- if (sdata->vif.type == NL80211_IFTYPE_AP &&
- counter_offset_presp) {
+ if (sdata->vif.type == NL80211_IFTYPE_AP && counter_offset_presp) {
rcu_read_lock();
resp = rcu_dereference(sdata->u.ap.probe_resp);
@@ -2400,6 +2416,15 @@ bool ieee80211_csa_is_complete(struct ieee80211_vif *vif)
goto out;
beacon_data = beacon->tail;
beacon_data_len = beacon->tail_len;
+ } else if (vif->type == NL80211_IFTYPE_ADHOC) {
+ struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+
+ beacon = rcu_dereference(ifibss->presp);
+ if (!beacon)
+ goto out;
+
+ beacon_data = beacon->head;
+ beacon_data_len = beacon->head_len;
} else {
WARN_ON(1);
goto out;
@@ -2484,6 +2509,10 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
if (!presp)
goto out;
+ if (sdata->vif.csa_active)
+ ieee80211_update_csa(sdata, presp);
+
+
skb = dev_alloc_skb(local->tx_headroom + presp->head_len);
if (!skb)
goto out;
--
1.7.10.4
^ permalink raw reply related
* [PATCHv4 5/6] mac80211: send a CSA action frame when changing channel
From: Simon Wunderlich @ 2013-08-28 11:41 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, Mathias Kretschmer, Simon Wunderlich
In-Reply-To: <1377690093-27024-1-git-send-email-siwu@hrz.tu-chemnitz.de>
IBSS members may not immediately be able to send out their beacon when
performing CSA, therefore also send a CSA action frame.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
net/mac80211/ibss.c | 60 +++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index c004213..5ea9b3a 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -428,6 +428,60 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
tsf, false);
}
+static int ieee80211_send_action_csa(struct ieee80211_sub_if_data *sdata,
+ struct cfg80211_csa_settings *csa_settings)
+{
+ struct sk_buff *skb;
+ struct ieee80211_mgmt *mgmt;
+ struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct ieee80211_local *local = sdata->local;
+ int freq;
+ int hdr_len = offsetof(struct ieee80211_mgmt, u.action.u.chan_switch) +
+ sizeof(mgmt->u.action.u.chan_switch);
+ u8 *pos;
+
+ skb = dev_alloc_skb(local->tx_headroom + hdr_len +
+ 5 + /* channel switch announcement element */
+ 3); /* secondary channel offset element */
+ if (!skb)
+ return -1;
+
+ skb_reserve(skb, local->tx_headroom);
+ mgmt = (struct ieee80211_mgmt *)skb_put(skb, hdr_len);
+ memset(mgmt, 0, hdr_len);
+ mgmt->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
+ IEEE80211_STYPE_ACTION);
+
+ eth_broadcast_addr(mgmt->da);
+ memcpy(mgmt->sa, sdata->vif.addr, ETH_ALEN);
+ memcpy(mgmt->bssid, ifibss->bssid, ETH_ALEN);
+ mgmt->u.action.category = WLAN_CATEGORY_SPECTRUM_MGMT;
+ mgmt->u.action.u.chan_switch.action_code = WLAN_ACTION_SPCT_CHL_SWITCH;
+ pos = skb_put(skb, 5);
+ *pos++ = WLAN_EID_CHANNEL_SWITCH; /* EID */
+ *pos++ = 3; /* IE length */
+ *pos++ = csa_settings->block_tx ? 1 : 0; /* CSA mode */
+ freq = csa_settings->chandef.chan->center_freq;
+ *pos++ = ieee80211_frequency_to_channel(freq); /* channel */
+ *pos++ = csa_settings->count; /* count */
+
+ if (csa_settings->chandef.width == NL80211_CHAN_WIDTH_40) {
+ enum nl80211_channel_type ch_type;
+
+ skb_put(skb, 3);
+ *pos++ = WLAN_EID_SECONDARY_CHANNEL_OFFSET; /* EID */
+ *pos++ = 1; /* IE length */
+ ch_type = cfg80211_get_chandef_type(&csa_settings->chandef);
+ if (ch_type == NL80211_CHAN_HT40PLUS)
+ *pos++ = IEEE80211_HT_PARAM_CHA_SEC_ABOVE;
+ else
+ *pos++ = IEEE80211_HT_PARAM_CHA_SEC_BELOW;
+ }
+
+ ieee80211_tx_skb(sdata, skb);
+ return 0;
+}
+
int ieee80211_ibss_csa_beacon(struct ieee80211_sub_if_data *sdata,
struct cfg80211_csa_settings *csa_settings)
{
@@ -480,6 +534,12 @@ int ieee80211_ibss_csa_beacon(struct ieee80211_sub_if_data *sdata,
if (old_presp)
kfree_rcu(old_presp, rcu_head);
+ /* it might not send the beacon for a while. send an action frame
+ * immediately to announce the channel switch.
+ */
+ if (csa_settings)
+ ieee80211_send_action_csa(sdata, csa_settings);
+
ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON);
out:
return ret;
--
1.7.10.4
^ permalink raw reply related
* [PATCHv4 2/6] mac80211: split off channel switch parsing function
From: Simon Wunderlich @ 2013-08-28 11:41 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, Mathias Kretschmer, Simon Wunderlich
In-Reply-To: <1377690093-27024-1-git-send-email-siwu@hrz.tu-chemnitz.de>
The channel switch parsing function can be re-used for the IBSS code,
put the common part into an extra function.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
Changes to PATCHv2:
* move ieee80211_parse_ch_switch_ie() to mlme.c
* document used sta_flags
Changes to PATCHv1:
* keep reporting the BSSID, this is still important debug output
* remove a function declaration which are added in a later patch
---
net/mac80211/ieee80211_i.h | 24 +++++++
net/mac80211/mlme.c | 171 ++++----------------------------------------
net/mac80211/spectmgmt.c | 162 +++++++++++++++++++++++++++++++++++++++++
3 files changed, 198 insertions(+), 159 deletions(-)
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index b618651..63b7c9c 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1318,6 +1318,7 @@ void ieee80211_mgd_stop(struct ieee80211_sub_if_data *sdata);
void ieee80211_mgd_conn_tx_status(struct ieee80211_sub_if_data *sdata,
__le16 fc, bool acked);
void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata);
+u32 chandef_downgrade(struct cfg80211_chan_def *c);
/* IBSS code */
void ieee80211_ibss_notify_scan_completed(struct ieee80211_local *local);
@@ -1481,6 +1482,29 @@ void ieee80211_apply_vhtcap_overrides(struct ieee80211_sub_if_data *sdata,
void ieee80211_process_measurement_req(struct ieee80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
size_t len);
+/**
+ * ieee80211_parse_ch_switch_ie - parses channel switch IEs
+ * @sdata: the sdata of the interface which has received the frame
+ * @elems: parsed 802.11 elements received with the frame
+ * @beacon: indicates if the frame was a beacon or probe response
+ * @current_band: indicates the current band
+ * @sta_flags: contains information about own capabilities and restrictions
+ * to decide which channel switch announcements can be accepted. Only the
+ * following subset of &enum ieee80211_sta_flags are evaluated:
+ * %IEEE80211_STA_DISABLE_HT, %IEEE80211_STA_DISABLE_VHT,
+ * %IEEE80211_STA_DISABLE_40MHZ, %IEEE80211_STA_DISABLE_80P80MHZ,
+ * %IEEE80211_STA_DISABLE_160MHZ.
+ * @count: to be filled with the counter until the switch (on success only)
+ * @bssid: the currently connected bssid (for reporting)
+ * @mode: to be filled with CSA mode (on success only)
+ * @new_chandef: to be filled with destination chandef (on success only)
+ * Return: 0 on success, <0 on error and >0 if there is nothing to parse.
+ */
+int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
+ struct ieee802_11_elems *elems, bool beacon,
+ enum ieee80211_band current_band,
+ u32 sta_flags, u8 *bssid, u8 *count, u8 *mode,
+ struct cfg80211_chan_def *new_chandef);
/* Suspend/resume and hw reconfiguration */
int ieee80211_reconfig(struct ieee80211_local *local);
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 2aab130..aa26db4 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -145,7 +145,7 @@ static int ecw2cw(int ecw)
return (1 << ecw) - 1;
}
-static u32 chandef_downgrade(struct cfg80211_chan_def *c)
+u32 chandef_downgrade(struct cfg80211_chan_def *c)
{
u32 ret;
int tmp;
@@ -1000,20 +1000,12 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
struct ieee80211_local *local = sdata->local;
struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
struct cfg80211_bss *cbss = ifmgd->associated;
- struct ieee80211_bss *bss;
struct ieee80211_chanctx *chanctx;
- enum ieee80211_band new_band;
- int new_freq;
- u8 new_chan_no;
+ enum ieee80211_band current_band;
u8 count;
u8 mode;
- struct ieee80211_channel *new_chan;
struct cfg80211_chan_def new_chandef = {};
- struct cfg80211_chan_def new_vht_chandef = {};
- const struct ieee80211_sec_chan_offs_ie *sec_chan_offs;
- const struct ieee80211_wide_bw_chansw_ie *wide_bw_chansw_ie;
- const struct ieee80211_ht_operation *ht_oper;
- int secondary_channel_offset = -1;
+ int res;
sdata_assert_lock(sdata);
@@ -1027,162 +1019,23 @@ ieee80211_sta_process_chanswitch(struct ieee80211_sub_if_data *sdata,
if (ifmgd->flags & IEEE80211_STA_CSA_RECEIVED)
return;
- sec_chan_offs = elems->sec_chan_offs;
- wide_bw_chansw_ie = elems->wide_bw_chansw_ie;
- ht_oper = elems->ht_operation;
-
- if (ifmgd->flags & (IEEE80211_STA_DISABLE_HT |
- IEEE80211_STA_DISABLE_40MHZ)) {
- sec_chan_offs = NULL;
- wide_bw_chansw_ie = NULL;
- /* only used for bandwidth here */
- ht_oper = NULL;
- }
-
- if (ifmgd->flags & IEEE80211_STA_DISABLE_VHT)
- wide_bw_chansw_ie = NULL;
-
- if (elems->ext_chansw_ie) {
- if (!ieee80211_operating_class_to_band(
- elems->ext_chansw_ie->new_operating_class,
- &new_band)) {
- sdata_info(sdata,
- "cannot understand ECSA IE operating class %d, disconnecting\n",
- elems->ext_chansw_ie->new_operating_class);
- ieee80211_queue_work(&local->hw,
- &ifmgd->csa_connection_drop_work);
- }
- new_chan_no = elems->ext_chansw_ie->new_ch_num;
- count = elems->ext_chansw_ie->count;
- mode = elems->ext_chansw_ie->mode;
- } else if (elems->ch_switch_ie) {
- new_band = cbss->channel->band;
- new_chan_no = elems->ch_switch_ie->new_ch_num;
- count = elems->ch_switch_ie->count;
- mode = elems->ch_switch_ie->mode;
- } else {
- /* nothing here we understand */
- return;
- }
-
- bss = (void *)cbss->priv;
-
- new_freq = ieee80211_channel_to_frequency(new_chan_no, new_band);
- new_chan = ieee80211_get_channel(sdata->local->hw.wiphy, new_freq);
- if (!new_chan || new_chan->flags & IEEE80211_CHAN_DISABLED) {
- sdata_info(sdata,
- "AP %pM switches to unsupported channel (%d MHz), disconnecting\n",
- ifmgd->associated->bssid, new_freq);
+ current_band = cbss->channel->band;
+ res = ieee80211_parse_ch_switch_ie(sdata, elems, beacon, current_band,
+ ifmgd->flags,
+ ifmgd->associated->bssid, &count,
+ &mode, &new_chandef);
+ if (res < 0)
ieee80211_queue_work(&local->hw,
&ifmgd->csa_connection_drop_work);
+ if (res)
return;
- }
-
- if (!beacon && sec_chan_offs) {
- secondary_channel_offset = sec_chan_offs->sec_chan_offs;
- } else if (beacon && ht_oper) {
- secondary_channel_offset =
- ht_oper->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET;
- } else if (!(ifmgd->flags & IEEE80211_STA_DISABLE_HT)) {
- /*
- * If it's not a beacon, HT is enabled and the IE not present,
- * it's 20 MHz, 802.11-2012 8.5.2.6:
- * This element [the Secondary Channel Offset Element] is
- * present when switching to a 40 MHz channel. It may be
- * present when switching to a 20 MHz channel (in which
- * case the secondary channel offset is set to SCN).
- */
- secondary_channel_offset = IEEE80211_HT_PARAM_CHA_SEC_NONE;
- }
-
- switch (secondary_channel_offset) {
- default:
- /* secondary_channel_offset was present but is invalid */
- case IEEE80211_HT_PARAM_CHA_SEC_NONE:
- cfg80211_chandef_create(&new_chandef, new_chan,
- NL80211_CHAN_HT20);
- break;
- case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
- cfg80211_chandef_create(&new_chandef, new_chan,
- NL80211_CHAN_HT40PLUS);
- break;
- case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
- cfg80211_chandef_create(&new_chandef, new_chan,
- NL80211_CHAN_HT40MINUS);
- break;
- case -1:
- cfg80211_chandef_create(&new_chandef, new_chan,
- NL80211_CHAN_NO_HT);
- /* keep width for 5/10 MHz channels */
- switch (sdata->vif.bss_conf.chandef.width) {
- case NL80211_CHAN_WIDTH_5:
- case NL80211_CHAN_WIDTH_10:
- new_chandef.width = sdata->vif.bss_conf.chandef.width;
- break;
- default:
- break;
- }
- break;
- }
-
- if (wide_bw_chansw_ie) {
- new_vht_chandef.chan = new_chan;
- new_vht_chandef.center_freq1 =
- ieee80211_channel_to_frequency(
- wide_bw_chansw_ie->new_center_freq_seg0,
- new_band);
-
- switch (wide_bw_chansw_ie->new_channel_width) {
- default:
- /* hmmm, ignore VHT and use HT if present */
- case IEEE80211_VHT_CHANWIDTH_USE_HT:
- new_vht_chandef.chan = NULL;
- break;
- case IEEE80211_VHT_CHANWIDTH_80MHZ:
- new_vht_chandef.width = NL80211_CHAN_WIDTH_80;
- break;
- case IEEE80211_VHT_CHANWIDTH_160MHZ:
- new_vht_chandef.width = NL80211_CHAN_WIDTH_160;
- break;
- case IEEE80211_VHT_CHANWIDTH_80P80MHZ:
- /* field is otherwise reserved */
- new_vht_chandef.center_freq2 =
- ieee80211_channel_to_frequency(
- wide_bw_chansw_ie->new_center_freq_seg1,
- new_band);
- new_vht_chandef.width = NL80211_CHAN_WIDTH_80P80;
- break;
- }
- if (ifmgd->flags & IEEE80211_STA_DISABLE_80P80MHZ &&
- new_vht_chandef.width == NL80211_CHAN_WIDTH_80P80)
- chandef_downgrade(&new_vht_chandef);
- if (ifmgd->flags & IEEE80211_STA_DISABLE_160MHZ &&
- new_vht_chandef.width == NL80211_CHAN_WIDTH_160)
- chandef_downgrade(&new_vht_chandef);
- if (ifmgd->flags & IEEE80211_STA_DISABLE_40MHZ &&
- new_vht_chandef.width > NL80211_CHAN_WIDTH_20)
- chandef_downgrade(&new_vht_chandef);
- }
-
- /* if VHT data is there validate & use it */
- if (new_vht_chandef.chan) {
- if (!cfg80211_chandef_compatible(&new_vht_chandef,
- &new_chandef)) {
- sdata_info(sdata,
- "AP %pM CSA has inconsistent channel data, disconnecting\n",
- ifmgd->associated->bssid);
- ieee80211_queue_work(&local->hw,
- &ifmgd->csa_connection_drop_work);
- return;
- }
- new_chandef = new_vht_chandef;
- }
if (!cfg80211_chandef_usable(local->hw.wiphy, &new_chandef,
IEEE80211_CHAN_DISABLED)) {
sdata_info(sdata,
"AP %pM switches to unsupported channel (%d MHz, width:%d, CF1/2: %d/%d MHz), disconnecting\n",
- ifmgd->associated->bssid, new_freq,
+ ifmgd->associated->bssid,
+ new_chandef.chan->center_freq,
new_chandef.width, new_chandef.center_freq1,
new_chandef.center_freq2);
ieee80211_queue_work(&local->hw,
diff --git a/net/mac80211/spectmgmt.c b/net/mac80211/spectmgmt.c
index 578eea3..4f2c873 100644
--- a/net/mac80211/spectmgmt.c
+++ b/net/mac80211/spectmgmt.c
@@ -21,6 +21,168 @@
#include "sta_info.h"
#include "wme.h"
+int ieee80211_parse_ch_switch_ie(struct ieee80211_sub_if_data *sdata,
+ struct ieee802_11_elems *elems, bool beacon,
+ enum ieee80211_band current_band,
+ u32 sta_flags, u8 *bssid, u8 *count, u8 *mode,
+ struct cfg80211_chan_def *new_chandef)
+{
+ enum ieee80211_band new_band;
+ int new_freq;
+ u8 new_chan_no;
+ struct ieee80211_channel *new_chan;
+ struct cfg80211_chan_def new_vht_chandef = {};
+ const struct ieee80211_sec_chan_offs_ie *sec_chan_offs;
+ const struct ieee80211_wide_bw_chansw_ie *wide_bw_chansw_ie;
+ const struct ieee80211_ht_operation *ht_oper;
+ int secondary_channel_offset = -1;
+
+ sec_chan_offs = elems->sec_chan_offs;
+ wide_bw_chansw_ie = elems->wide_bw_chansw_ie;
+ ht_oper = elems->ht_operation;
+
+ if (sta_flags & (IEEE80211_STA_DISABLE_HT |
+ IEEE80211_STA_DISABLE_40MHZ)) {
+ sec_chan_offs = NULL;
+ wide_bw_chansw_ie = NULL;
+ /* only used for bandwidth here */
+ ht_oper = NULL;
+ }
+
+ if (sta_flags & IEEE80211_STA_DISABLE_VHT)
+ wide_bw_chansw_ie = NULL;
+
+ if (elems->ext_chansw_ie) {
+ if (!ieee80211_operating_class_to_band(
+ elems->ext_chansw_ie->new_operating_class,
+ &new_band)) {
+ sdata_info(sdata,
+ "cannot understand ECSA IE operating class %d, disconnecting\n",
+ elems->ext_chansw_ie->new_operating_class);
+ return -EINVAL;
+ }
+ new_chan_no = elems->ext_chansw_ie->new_ch_num;
+ *count = elems->ext_chansw_ie->count;
+ *mode = elems->ext_chansw_ie->mode;
+ } else if (elems->ch_switch_ie) {
+ new_band = current_band;
+ new_chan_no = elems->ch_switch_ie->new_ch_num;
+ *count = elems->ch_switch_ie->count;
+ *mode = elems->ch_switch_ie->mode;
+ } else {
+ /* nothing here we understand */
+ return 1;
+ }
+
+ new_freq = ieee80211_channel_to_frequency(new_chan_no, new_band);
+ new_chan = ieee80211_get_channel(sdata->local->hw.wiphy, new_freq);
+ if (!new_chan || new_chan->flags & IEEE80211_CHAN_DISABLED) {
+ sdata_info(sdata,
+ "BSS %pM switches to unsupported channel (%d MHz), disconnecting\n",
+ bssid, new_freq);
+ return -EINVAL;
+ }
+
+ if (!beacon && sec_chan_offs) {
+ secondary_channel_offset = sec_chan_offs->sec_chan_offs;
+ } else if (beacon && ht_oper) {
+ secondary_channel_offset =
+ ht_oper->ht_param & IEEE80211_HT_PARAM_CHA_SEC_OFFSET;
+ } else if (!(sta_flags & IEEE80211_STA_DISABLE_HT)) {
+ /* If it's not a beacon, HT is enabled and the IE not present,
+ * it's 20 MHz, 802.11-2012 8.5.2.6:
+ * This element [the Secondary Channel Offset Element] is
+ * present when switching to a 40 MHz channel. It may be
+ * present when switching to a 20 MHz channel (in which
+ * case the secondary channel offset is set to SCN).
+ */
+ secondary_channel_offset = IEEE80211_HT_PARAM_CHA_SEC_NONE;
+ }
+
+ switch (secondary_channel_offset) {
+ default:
+ /* secondary_channel_offset was present but is invalid */
+ case IEEE80211_HT_PARAM_CHA_SEC_NONE:
+ cfg80211_chandef_create(new_chandef, new_chan,
+ NL80211_CHAN_HT20);
+ break;
+ case IEEE80211_HT_PARAM_CHA_SEC_ABOVE:
+ cfg80211_chandef_create(new_chandef, new_chan,
+ NL80211_CHAN_HT40PLUS);
+ break;
+ case IEEE80211_HT_PARAM_CHA_SEC_BELOW:
+ cfg80211_chandef_create(new_chandef, new_chan,
+ NL80211_CHAN_HT40MINUS);
+ break;
+ case -1:
+ cfg80211_chandef_create(new_chandef, new_chan,
+ NL80211_CHAN_NO_HT);
+ /* keep width for 5/10 MHz channels */
+ switch (sdata->vif.bss_conf.chandef.width) {
+ case NL80211_CHAN_WIDTH_5:
+ case NL80211_CHAN_WIDTH_10:
+ new_chandef->width = sdata->vif.bss_conf.chandef.width;
+ break;
+ default:
+ break;
+ }
+ break;
+ }
+
+ if (wide_bw_chansw_ie) {
+ new_vht_chandef.chan = new_chan;
+ new_vht_chandef.center_freq1 =
+ ieee80211_channel_to_frequency(
+ wide_bw_chansw_ie->new_center_freq_seg0,
+ new_band);
+
+ switch (wide_bw_chansw_ie->new_channel_width) {
+ default:
+ /* hmmm, ignore VHT and use HT if present */
+ case IEEE80211_VHT_CHANWIDTH_USE_HT:
+ new_vht_chandef.chan = NULL;
+ break;
+ case IEEE80211_VHT_CHANWIDTH_80MHZ:
+ new_vht_chandef.width = NL80211_CHAN_WIDTH_80;
+ break;
+ case IEEE80211_VHT_CHANWIDTH_160MHZ:
+ new_vht_chandef.width = NL80211_CHAN_WIDTH_160;
+ break;
+ case IEEE80211_VHT_CHANWIDTH_80P80MHZ:
+ /* field is otherwise reserved */
+ new_vht_chandef.center_freq2 =
+ ieee80211_channel_to_frequency(
+ wide_bw_chansw_ie->new_center_freq_seg1,
+ new_band);
+ new_vht_chandef.width = NL80211_CHAN_WIDTH_80P80;
+ break;
+ }
+ if (sta_flags & IEEE80211_STA_DISABLE_80P80MHZ &&
+ new_vht_chandef.width == NL80211_CHAN_WIDTH_80P80)
+ chandef_downgrade(&new_vht_chandef);
+ if (sta_flags & IEEE80211_STA_DISABLE_160MHZ &&
+ new_vht_chandef.width == NL80211_CHAN_WIDTH_160)
+ chandef_downgrade(&new_vht_chandef);
+ if (sta_flags & IEEE80211_STA_DISABLE_40MHZ &&
+ new_vht_chandef.width > NL80211_CHAN_WIDTH_20)
+ chandef_downgrade(&new_vht_chandef);
+ }
+
+ /* if VHT data is there validate & use it */
+ if (new_vht_chandef.chan) {
+ if (!cfg80211_chandef_compatible(&new_vht_chandef,
+ new_chandef)) {
+ sdata_info(sdata,
+ "BSS %pM: CSA has inconsistent channel data, disconnecting\n",
+ bssid);
+ return -EINVAL;
+ }
+ *new_chandef = new_vht_chandef;
+ }
+
+ return 0;
+}
+
static void ieee80211_send_refuse_measurement_request(struct ieee80211_sub_if_data *sdata,
struct ieee80211_msrment_ie *request_ie,
const u8 *da, const u8 *bssid,
--
1.7.10.4
^ permalink raw reply related
* [PATCHv4 3/6] mac80211: split off ibss disconnect
From: Simon Wunderlich @ 2013-08-28 11:41 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, Mathias Kretschmer, Simon Wunderlich
In-Reply-To: <1377690093-27024-1-git-send-email-siwu@hrz.tu-chemnitz.de>
IBSS CSA will require to disconnect if a channel switch fails, but
mac80211 should search and re-connect after this disconnect. To allow
such usage, split off the ibss disconnect process in a separate function
which only performs the disconnect without overwriting nl80211-supplied
parameters.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
Changes to PATCHv3:
* move sta_active_ibss instead of declaring the prototype in the top
---
net/mac80211/ibss.c | 172 +++++++++++++++++++++++++++------------------------
1 file changed, 92 insertions(+), 80 deletions(-)
diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index a12afe7..0c3ec08 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -499,6 +499,96 @@ ieee80211_ibss_add_sta(struct ieee80211_sub_if_data *sdata, const u8 *bssid,
return ieee80211_ibss_finish_sta(sta);
}
+static int ieee80211_sta_active_ibss(struct ieee80211_sub_if_data *sdata)
+{
+ struct ieee80211_local *local = sdata->local;
+ int active = 0;
+ struct sta_info *sta;
+
+ sdata_assert_lock(sdata);
+
+ rcu_read_lock();
+
+ list_for_each_entry_rcu(sta, &local->sta_list, list) {
+ if (sta->sdata == sdata &&
+ time_after(sta->last_rx + IEEE80211_IBSS_MERGE_INTERVAL,
+ jiffies)) {
+ active++;
+ break;
+ }
+ }
+
+ rcu_read_unlock();
+
+ return active;
+}
+
+static void ieee80211_ibss_disconnect(struct ieee80211_sub_if_data *sdata)
+{
+ struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
+ struct ieee80211_local *local = sdata->local;
+ struct cfg80211_bss *cbss;
+ struct beacon_data *presp;
+ struct sta_info *sta;
+ int active_ibss;
+ u16 capability;
+
+ active_ibss = ieee80211_sta_active_ibss(sdata);
+
+ if (!active_ibss && !is_zero_ether_addr(ifibss->bssid)) {
+ capability = WLAN_CAPABILITY_IBSS;
+
+ if (ifibss->privacy)
+ capability |= WLAN_CAPABILITY_PRIVACY;
+
+ cbss = cfg80211_get_bss(local->hw.wiphy, ifibss->chandef.chan,
+ ifibss->bssid, ifibss->ssid,
+ ifibss->ssid_len, WLAN_CAPABILITY_IBSS |
+ WLAN_CAPABILITY_PRIVACY,
+ capability);
+
+ if (cbss) {
+ cfg80211_unlink_bss(local->hw.wiphy, cbss);
+ cfg80211_put_bss(sdata->local->hw.wiphy, cbss);
+ }
+ }
+
+ ifibss->state = IEEE80211_IBSS_MLME_SEARCH;
+
+ sta_info_flush(sdata);
+
+ spin_lock_bh(&ifibss->incomplete_lock);
+ while (!list_empty(&ifibss->incomplete_stations)) {
+ sta = list_first_entry(&ifibss->incomplete_stations,
+ struct sta_info, list);
+ list_del(&sta->list);
+ spin_unlock_bh(&ifibss->incomplete_lock);
+
+ sta_info_free(local, sta);
+ spin_lock_bh(&ifibss->incomplete_lock);
+ }
+ spin_unlock_bh(&ifibss->incomplete_lock);
+
+ netif_carrier_off(sdata->dev);
+
+ sdata->vif.bss_conf.ibss_joined = false;
+ sdata->vif.bss_conf.ibss_creator = false;
+ sdata->vif.bss_conf.enable_beacon = false;
+ sdata->vif.bss_conf.ssid_len = 0;
+
+ /* remove beacon */
+ presp = rcu_dereference_protected(ifibss->presp,
+ lockdep_is_held(&sdata->wdev.mtx));
+ RCU_INIT_POINTER(sdata->u.ibss.presp, NULL);
+ if (presp)
+ kfree_rcu(presp, rcu_head);
+
+ clear_bit(SDATA_STATE_OFFCHANNEL_BEACON_STOPPED, &sdata->state);
+ ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED |
+ BSS_CHANGED_IBSS);
+ ieee80211_vif_release_channel(sdata);
+}
+
static void ieee80211_rx_mgmt_deauth_ibss(struct ieee80211_sub_if_data *sdata,
struct ieee80211_mgmt *mgmt,
size_t len)
@@ -775,30 +865,6 @@ void ieee80211_ibss_rx_no_sta(struct ieee80211_sub_if_data *sdata,
ieee80211_queue_work(&local->hw, &sdata->work);
}
-static int ieee80211_sta_active_ibss(struct ieee80211_sub_if_data *sdata)
-{
- struct ieee80211_local *local = sdata->local;
- int active = 0;
- struct sta_info *sta;
-
- sdata_assert_lock(sdata);
-
- rcu_read_lock();
-
- list_for_each_entry_rcu(sta, &local->sta_list, list) {
- if (sta->sdata == sdata &&
- time_after(sta->last_rx + IEEE80211_IBSS_MERGE_INTERVAL,
- jiffies)) {
- active++;
- break;
- }
- }
-
- rcu_read_unlock();
-
- return active;
-}
-
static void ieee80211_ibss_sta_expire(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_local *local = sdata->local;
@@ -1265,73 +1331,19 @@ int ieee80211_ibss_join(struct ieee80211_sub_if_data *sdata,
int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
- struct ieee80211_local *local = sdata->local;
- struct cfg80211_bss *cbss;
- u16 capability;
- int active_ibss;
- struct sta_info *sta;
- struct beacon_data *presp;
- active_ibss = ieee80211_sta_active_ibss(sdata);
-
- if (!active_ibss && !is_zero_ether_addr(ifibss->bssid)) {
- capability = WLAN_CAPABILITY_IBSS;
-
- if (ifibss->privacy)
- capability |= WLAN_CAPABILITY_PRIVACY;
-
- cbss = cfg80211_get_bss(local->hw.wiphy, ifibss->chandef.chan,
- ifibss->bssid, ifibss->ssid,
- ifibss->ssid_len, WLAN_CAPABILITY_IBSS |
- WLAN_CAPABILITY_PRIVACY,
- capability);
-
- if (cbss) {
- cfg80211_unlink_bss(local->hw.wiphy, cbss);
- cfg80211_put_bss(local->hw.wiphy, cbss);
- }
- }
-
- ifibss->state = IEEE80211_IBSS_MLME_SEARCH;
- memset(ifibss->bssid, 0, ETH_ALEN);
+ ieee80211_ibss_disconnect(sdata);
ifibss->ssid_len = 0;
-
- sta_info_flush(sdata);
-
- spin_lock_bh(&ifibss->incomplete_lock);
- while (!list_empty(&ifibss->incomplete_stations)) {
- sta = list_first_entry(&ifibss->incomplete_stations,
- struct sta_info, list);
- list_del(&sta->list);
- spin_unlock_bh(&ifibss->incomplete_lock);
-
- sta_info_free(local, sta);
- spin_lock_bh(&ifibss->incomplete_lock);
- }
- spin_unlock_bh(&ifibss->incomplete_lock);
-
- netif_carrier_off(sdata->dev);
+ memset(ifibss->bssid, 0, ETH_ALEN);
/* remove beacon */
kfree(sdata->u.ibss.ie);
- presp = rcu_dereference_protected(ifibss->presp,
- lockdep_is_held(&sdata->wdev.mtx));
- RCU_INIT_POINTER(sdata->u.ibss.presp, NULL);
/* on the next join, re-program HT parameters */
memset(&ifibss->ht_capa, 0, sizeof(ifibss->ht_capa));
memset(&ifibss->ht_capa_mask, 0, sizeof(ifibss->ht_capa_mask));
- sdata->vif.bss_conf.ibss_joined = false;
- sdata->vif.bss_conf.ibss_creator = false;
- sdata->vif.bss_conf.enable_beacon = false;
- sdata->vif.bss_conf.ssid_len = 0;
- clear_bit(SDATA_STATE_OFFCHANNEL_BEACON_STOPPED, &sdata->state);
- ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED |
- BSS_CHANGED_IBSS);
- ieee80211_vif_release_channel(sdata);
synchronize_rcu();
- kfree(presp);
skb_queue_purge(&sdata->skb_queue);
--
1.7.10.4
^ permalink raw reply related
* [PATCHv4 1/6] cfg80211: export cfg80211_chandef_dfs_required
From: Simon Wunderlich @ 2013-08-28 11:41 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, Mathias Kretschmer, Simon Wunderlich
In-Reply-To: <1377690093-27024-1-git-send-email-siwu@hrz.tu-chemnitz.de>
It will be used later by the IBSS CSA implementation of mac80211.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
Changes to PATCHv1:
* remove one more newline in net/wireless/core.h
---
include/net/cfg80211.h | 9 +++++++++
net/wireless/chan.c | 1 +
net/wireless/core.h | 9 ---------
3 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index d530c54..47fdb1d 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -437,6 +437,15 @@ bool cfg80211_chandef_usable(struct wiphy *wiphy,
u32 prohibited_flags);
/**
+ * cfg80211_chandef_dfs_required - checks if radar detection is required
+ * @wiphy: the wiphy to validate against
+ * @chandef: the channel definition to check
+ * Return: 1 if radar detection is required, 0 if it is not, < 0 on error
+ */
+int cfg80211_chandef_dfs_required(struct wiphy *wiphy,
+ const struct cfg80211_chan_def *c);
+
+/**
* ieee80211_chandef_rate_flags - returns rate flags for a channel
*
* In some channel types, not all rates may be used - for example CCK
diff --git a/net/wireless/chan.c b/net/wireless/chan.c
index 50f6195..16f3c3a 100644
--- a/net/wireless/chan.c
+++ b/net/wireless/chan.c
@@ -328,6 +328,7 @@ int cfg80211_chandef_dfs_required(struct wiphy *wiphy,
return cfg80211_get_chans_dfs_required(wiphy, chandef->center_freq2,
width);
}
+EXPORT_SYMBOL(cfg80211_chandef_dfs_required);
static bool cfg80211_secondary_chans_ok(struct wiphy *wiphy,
u32 center_freq, u32 bandwidth,
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 9ad43c6..b43efac 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -382,15 +382,6 @@ int cfg80211_can_use_iftype_chan(struct cfg80211_registered_device *rdev,
enum cfg80211_chan_mode chanmode,
u8 radar_detect);
-/**
- * cfg80211_chandef_dfs_required - checks if radar detection is required
- * @wiphy: the wiphy to validate against
- * @chandef: the channel definition to check
- * Return: 1 if radar detection is required, 0 if it is not, < 0 on error
- */
-int cfg80211_chandef_dfs_required(struct wiphy *wiphy,
- const struct cfg80211_chan_def *c);
-
void cfg80211_set_dfs_state(struct wiphy *wiphy,
const struct cfg80211_chan_def *chandef,
enum nl80211_dfs_state dfs_state);
--
1.7.10.4
^ permalink raw reply related
* [PATCHv4 0/6] add IBSS channel switch announcement support
From: Simon Wunderlich @ 2013-08-28 11:41 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, Mathias Kretschmer, Simon Wunderlich
This is the third iteration of the channel switch support for IBSS mode patchset
(thanks Johannes for comments). CSA for IBSS will be required for IBSS-DFS support
later. The patchset builds on top of the previously submitted AP DFS patchset.
Changes:
* move sta_active_ibss instead of declaring the prototype in the top (Johannes)
* rebase on latest mac80211-next
The rough design is:
* Userspace may request to change channel using the already introduced
NL80211_CMD_CHANNEL_SWITCH command. Unlike AP mode, it does not contain
IEs or offset for CSA elements, because this is to be generated by the kernel.
* Also other stations may request a channel change by sending (E)CSA within
beacons or action frames. This is parsed and further handled as if it would
have come from userspace.
* When performing a channel switch, an action frame is sent, because beaconing
is distributed among IBSS peers and might be lost early. Furthermore,
channel switch announcement IEs are added to the beacon/probe response.
* When a channel switch could was not understood, it disconnects from the
IBSS and tries to re-connect.
Discussion points:
* When disconnecting from the IBSS because a channel switch announcement was
bogus or not understood, we might reconnect to the same BSS again - on the
old channel, because the other stas are still there, and stay there.
Although it is "accepted behaviour" in IEEE 802.11 that not all station
could make it, we should consider ignoring beacons/presp if they include CSAs
when scanning for networks to prevent this problem.
As always, any comments are appreciated.
Cheers,
Simon
Simon Wunderlich (6):
cfg80211: export cfg80211_chandef_dfs_required
mac80211: split off channel switch parsing function
mac80211: split off ibss disconnect
mac80211: add support for CSA in IBSS mode
mac80211: send a CSA action frame when changing channel
nl80211: enable IBSS support for channel switch announcements
include/net/cfg80211.h | 9 +
net/mac80211/cfg.c | 87 +++++--
net/mac80211/ibss.c | 586 +++++++++++++++++++++++++++++++++++++-------
net/mac80211/ieee80211_i.h | 29 +++
net/mac80211/iface.c | 4 +
net/mac80211/mlme.c | 171 +------------
net/mac80211/rx.c | 36 ++-
net/mac80211/spectmgmt.c | 162 ++++++++++++
net/mac80211/tx.c | 37 ++-
net/wireless/chan.c | 1 +
net/wireless/core.h | 9 -
net/wireless/nl80211.c | 49 ++--
12 files changed, 874 insertions(+), 306 deletions(-)
--
1.7.10.4
^ permalink raw reply
* [PATCHv4 6/6] nl80211: enable IBSS support for channel switch announcements
From: Simon Wunderlich @ 2013-08-28 11:41 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg, Mathias Kretschmer, Simon Wunderlich
In-Reply-To: <1377690093-27024-1-git-send-email-siwu@hrz.tu-chemnitz.de>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
net/wireless/nl80211.c | 49 +++++++++++++++++++++++++++++++++---------------
1 file changed, 34 insertions(+), 15 deletions(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index af8d84a..ae61711 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -5634,15 +5634,26 @@ static int nl80211_channel_switch(struct sk_buff *skb, struct genl_info *info)
static struct nlattr *csa_attrs[NL80211_ATTR_MAX+1];
u8 radar_detect_width = 0;
int err;
+ bool need_new_beacon = false;
if (!rdev->ops->channel_switch ||
!(rdev->wiphy.flags & WIPHY_FLAG_HAS_CHANNEL_SWITCH))
return -EOPNOTSUPP;
- /* may add IBSS support later */
- if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
- dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO)
+ switch (dev->ieee80211_ptr->iftype) {
+ case NL80211_IFTYPE_AP:
+ case NL80211_IFTYPE_P2P_GO:
+ need_new_beacon = true;
+
+ /* useless if AP is not running */
+ if (!wdev->beacon_interval)
+ return -EINVAL;
+ break;
+ case NL80211_IFTYPE_ADHOC:
+ break;
+ default:
return -EOPNOTSUPP;
+ }
memset(¶ms, 0, sizeof(params));
@@ -5651,15 +5662,16 @@ static int nl80211_channel_switch(struct sk_buff *skb, struct genl_info *info)
return -EINVAL;
/* only important for AP, IBSS and mesh create IEs internally */
- if (!info->attrs[NL80211_ATTR_CSA_IES])
- return -EINVAL;
-
- /* useless if AP is not running */
- if (!wdev->beacon_interval)
+ if (need_new_beacon &&
+ (!info->attrs[NL80211_ATTR_CSA_IES] ||
+ !info->attrs[NL80211_ATTR_CSA_C_OFF_BEACON]))
return -EINVAL;
params.count = nla_get_u32(info->attrs[NL80211_ATTR_CH_SWITCH_COUNT]);
+ if (!need_new_beacon)
+ goto skip_beacons;
+
err = nl80211_parse_beacon(info->attrs, ¶ms.beacon_after);
if (err)
return err;
@@ -5699,6 +5711,7 @@ static int nl80211_channel_switch(struct sk_buff *skb, struct genl_info *info)
return -EINVAL;
}
+skip_beacons:
err = nl80211_parse_chandef(rdev, info, ¶ms.chandef);
if (err)
return err;
@@ -5706,12 +5719,17 @@ static int nl80211_channel_switch(struct sk_buff *skb, struct genl_info *info)
if (!cfg80211_reg_can_beacon(&rdev->wiphy, ¶ms.chandef))
return -EINVAL;
- err = cfg80211_chandef_dfs_required(wdev->wiphy, ¶ms.chandef);
- if (err < 0) {
- return err;
- } else if (err) {
- radar_detect_width = BIT(params.chandef.width);
- params.radar_required = true;
+ /* DFS channels are only supported for AP/P2P GO ... for now. */
+ if (dev->ieee80211_ptr->iftype == NL80211_IFTYPE_AP ||
+ dev->ieee80211_ptr->iftype == NL80211_IFTYPE_P2P_GO) {
+ err = cfg80211_chandef_dfs_required(wdev->wiphy,
+ ¶ms.chandef);
+ if (err < 0) {
+ return err;
+ } else if (err) {
+ radar_detect_width = BIT(params.chandef.width);
+ params.radar_required = true;
+ }
}
err = cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype,
@@ -10740,7 +10758,8 @@ void cfg80211_ch_switch_notify(struct net_device *dev,
wdev_lock(wdev);
if (WARN_ON(wdev->iftype != NL80211_IFTYPE_AP &&
- wdev->iftype != NL80211_IFTYPE_P2P_GO))
+ wdev->iftype != NL80211_IFTYPE_P2P_GO &&
+ wdev->iftype != NL80211_IFTYPE_ADHOC))
goto out;
wdev->channel = chandef->chan;
--
1.7.10.4
^ permalink raw reply related
* [PATCH v2 2/2] ath10k: implement per-VDEV FW statistics
From: Bartosz Markowski @ 2013-08-28 11:41 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Bartosz Markowski
In-Reply-To: <1377690079-18645-1-git-send-email-bartosz.markowski@tieto.com>
The WMI_REQUEST_PEER_STAT command with latst (1.0.0.716) FW
can return per-VDEV statistics. Using debugfs we can fetch this info now.
This is a backward compatible change. In case of older FW the VDEV
statistics are simply not returned.
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/core.h | 22 ++++++++
drivers/net/wireless/ath/ath10k/debug.c | 81 +++++++++++++++++++++++-----
drivers/net/wireless/ath/ath10k/wmi.c | 4 +-
drivers/net/wireless/ath/ath10k/wmi.h | 87 ++++++++++++++++++++++++++-----
4 files changed, 167 insertions(+), 27 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/core.h b/drivers/net/wireless/ath/ath10k/core.h
index ab05c4c..f94482b 100644
--- a/drivers/net/wireless/ath/ath10k/core.h
+++ b/drivers/net/wireless/ath/ath10k/core.h
@@ -119,10 +119,27 @@ struct ath10k_wmi {
struct work_struct wmi_event_work;
};
+struct ath10k_vdev_stat {
+ u32 vdev_id;
+ struct wmi_snr_info vdev_snr;
+ u32 tx_frames_count[MAX_AC];
+ u32 rx_frames_count;
+ u32 multiple_retry_cnt[MAX_AC];
+ u32 fail_count[MAX_AC];
+ u32 rts_fail_count;
+ u32 rts_success_count;
+ u32 rts_err_count;
+ u32 rx_discard_count;
+ u32 ack_fail_count;
+ u32 tx_rate_history[MAX_TX_RATE_VALUES];
+ u32 bcn_rssi_history[MAX_RSSI_VALUES];
+};
+
struct ath10k_peer_stat {
u8 peer_macaddr[ETH_ALEN];
u32 peer_rssi;
u32 peer_tx_rate;
+ u32 peer_rx_rate;
};
struct ath10k_target_stats {
@@ -176,6 +193,8 @@ struct ath10k_target_stats {
s32 mpdu_errs;
/* VDEV STATS */
+ struct ath10k_vdev_stat vdev_stat[TARGET_NUM_VDEVS];
+ u8 vdevs;
/* PEER STATS */
u8 peers;
@@ -274,6 +293,9 @@ enum ath10k_fw_features {
/* wmi_mgmt_rx_hdr contains extra RSSI information */
ATH10K_FW_FEATURE_EXT_WMI_MGMT_RX = 0,
+ /* firmware support per-VEDV statistics */
+ ATH10K_FW_FEATURE_VDEV_STATS = 1,
+
/* keep last */
ATH10K_FW_FEATURE_COUNT,
};
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index 3d65594..026e55d 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -228,34 +228,59 @@ void ath10k_debug_read_target_stats(struct ath10k *ar,
tmp += sizeof(struct wmi_pdev_stats);
}
- /* 0 or max vdevs */
- /* Currently firmware does not support VDEV stats */
if (num_vdev_stats) {
struct wmi_vdev_stats *vdev_stats;
+ struct ath10k_vdev_stat *s;
+
+ stats->vdevs = num_vdev_stats;
for (i = 0; i < num_vdev_stats; i++) {
vdev_stats = (struct wmi_vdev_stats *)tmp;
+ s = &stats->vdev_stat[i];
+
+ s->vdev_id = __le32_to_cpu(vdev_stats->vdev_id);
+ s->vdev_snr.beacon_snr =
+ __le32_to_cpu(vdev_stats->vdev_snr.beacon_snr);
+ s->vdev_snr.data_snr =
+ __le32_to_cpu(vdev_stats->vdev_snr.data_snr);
+
+ /* TODO:read remaining vdev stats */
+
tmp += sizeof(struct wmi_vdev_stats);
}
}
if (num_peer_stats) {
- struct wmi_peer_stats *peer_stats;
struct ath10k_peer_stat *s;
+ struct wmi_peer_stats_1 *peer_stats_1;
+ struct wmi_peer_stats_2 *peer_stats_2;
stats->peers = num_peer_stats;
for (i = 0; i < num_peer_stats; i++) {
- peer_stats = (struct wmi_peer_stats *)tmp;
- s = &stats->peer_stat[i];
+ peer_stats_1 = (struct wmi_peer_stats_1 *)tmp;
- WMI_MAC_ADDR_TO_CHAR_ARRAY(&peer_stats->peer_macaddr,
- s->peer_macaddr);
- s->peer_rssi = __le32_to_cpu(peer_stats->peer_rssi);
- s->peer_tx_rate =
- __le32_to_cpu(peer_stats->peer_tx_rate);
+ s = &stats->peer_stat[i];
- tmp += sizeof(struct wmi_peer_stats);
+ WMI_MAC_ADDR_TO_CHAR_ARRAY(
+ &peer_stats_1->common.peer_macaddr,
+ s->peer_macaddr);
+ s->peer_rssi = __le32_to_cpu(peer_stats_1->
+ common.peer_rssi);
+ s->peer_tx_rate = __le32_to_cpu(peer_stats_1->
+ common.peer_tx_rate);
+
+ if (test_bit(ATH10K_FW_FEATURE_VDEV_STATS,
+ ar->fw_features)) {
+ peer_stats_2 = (struct wmi_peer_stats_2 *)tmp;
+
+ s->peer_rx_rate =
+ __le32_to_cpu(peer_stats_2->peer_rx_rate);
+
+ tmp += sizeof(struct wmi_peer_stats_2);
+ } else {
+ tmp += sizeof(struct wmi_peer_stats_1);
+ }
}
}
@@ -270,7 +295,7 @@ static ssize_t ath10k_read_fw_stats(struct file *file, char __user *user_buf,
struct ath10k *ar = file->private_data;
struct ath10k_target_stats *fw_stats;
char *buf = NULL;
- unsigned int len = 0, buf_len = 2500;
+ unsigned int len = 0, buf_len = 3000;
ssize_t ret_cnt = 0;
long left;
int i;
@@ -408,6 +433,27 @@ static ssize_t ath10k_read_fw_stats(struct file *file, char __user *user_buf,
len += scnprintf(buf + len, buf_len - len, "%30s %10d\n",
"MPDU errors (FCS, MIC, ENC)", fw_stats->mpdu_errs);
+ if (fw_stats->vdevs) {
+ len += scnprintf(buf + len, buf_len - len, "\n");
+ len += scnprintf(buf + len, buf_len - len, "%30s\n",
+ "ath10k VDEV stats");
+ len += scnprintf(buf + len, buf_len - len, "%30s\n\n",
+ "=================");
+ }
+
+ for (i = 0; i < fw_stats->vdevs; i++) {
+ len += scnprintf(buf + len, buf_len - len, "%30s %10u\n",
+ "VDEV ID", fw_stats->vdev_stat[i].vdev_id);
+ len += scnprintf(buf + len, buf_len - len, "%30s %10u\n",
+ "Beacon SNR",
+ fw_stats->vdev_stat[i].vdev_snr.beacon_snr);
+ len += scnprintf(buf + len, buf_len - len, "%30s %10u\n",
+ "Data SNR",
+ fw_stats->vdev_stat[i].vdev_snr.data_snr);
+ len += scnprintf(buf + len, buf_len - len, "\n");
+ }
+
+
len += scnprintf(buf + len, buf_len - len, "\n");
len += scnprintf(buf + len, buf_len - len, "%30s\n",
"ath10k PEER stats");
@@ -418,11 +464,18 @@ static ssize_t ath10k_read_fw_stats(struct file *file, char __user *user_buf,
len += scnprintf(buf + len, buf_len - len, "%30s %pM\n",
"Peer MAC address",
fw_stats->peer_stat[i].peer_macaddr);
- len += scnprintf(buf + len, buf_len - len, "%30s %u\n",
+ len += scnprintf(buf + len, buf_len - len, "%30s %10u\n",
"Peer RSSI", fw_stats->peer_stat[i].peer_rssi);
- len += scnprintf(buf + len, buf_len - len, "%30s %u\n",
+ len += scnprintf(buf + len, buf_len - len, "%30s %10u\n",
"Peer TX rate",
fw_stats->peer_stat[i].peer_tx_rate);
+
+ if (test_bit(ATH10K_FW_FEATURE_VDEV_STATS, ar->fw_features))
+ len += scnprintf(buf + len, buf_len - len,
+ "%30s %10u\n",
+ "Peer RX rate",
+ fw_stats->peer_stat[i].peer_rx_rate);
+
len += scnprintf(buf + len, buf_len - len, "\n");
}
spin_unlock_bh(&ar->data_lock);
diff --git a/drivers/net/wireless/ath/ath10k/wmi.c b/drivers/net/wireless/ath/ath10k/wmi.c
index 32fd5e7..3ebab3d 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.c
+++ b/drivers/net/wireless/ath/ath10k/wmi.c
@@ -957,8 +957,10 @@ static void ath10k_wmi_service_ready_event_rx(struct ath10k *ar,
ar->phy_capability = __le32_to_cpu(ev->phy_capability);
ar->num_rf_chains = __le32_to_cpu(ev->num_rf_chains);
- if (ar->fw_version_build > 636)
+ if (ar->fw_version_build > 636) {
set_bit(ATH10K_FW_FEATURE_EXT_WMI_MGMT_RX, ar->fw_features);
+ set_bit(ATH10K_FW_FEATURE_VDEV_STATS, ar->fw_features);
+ }
if (ar->num_rf_chains > WMI_MAX_SPATIAL_STREAM) {
ath10k_warn("hardware advertises support for more spatial streams than it should (%d > %d)\n",
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index 5b94707..99c7ba1 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -60,6 +60,11 @@
*
*/
+#define MAX_AC 4 /* Maximum value of access category */
+
+#define MAX_TX_RATE_VALUES 10 /* Max Tx rates */
+#define MAX_RSSI_VALUES 10 /* Max RSSI values */
+
/* Control Path */
struct wmi_cmd_hdr {
__le32 cmd_id;
@@ -1828,11 +1833,10 @@ enum wmi_stats_id {
struct wmi_request_stats_cmd {
__le32 stats_id;
-
- /*
- * Space to add parameters like
- * peer mac addr
- */
+ /* unique id identifying the VDEV, generated by the caller */
+ __le32 vdev_id;
+ /* peer MAC address */
+ struct wmi_mac_addr peer_macaddr;
} __packed;
/* Suspend option */
@@ -1881,7 +1885,6 @@ struct wmi_stats_event {
/*
* PDEV statistics
- * TODO: add all PDEV stats here
*/
struct wmi_pdev_stats {
__le32 chan_nf; /* Channel noise floor */
@@ -1894,24 +1897,84 @@ struct wmi_pdev_stats {
struct wal_dbg_stats wal; /* WAL dbg stats */
} __packed;
-/*
- * VDEV statistics
- * TODO: add all VDEV stats here
- */
+struct wmi_snr_info {
+ __le32 beacon_snr;
+ __le32 data_snr;
+} __packed;
+
struct wmi_vdev_stats {
+ /* unique id identifying the VDEV, generated by the caller */
__le32 vdev_id;
+ struct wmi_snr_info vdev_snr;
+ /*
+ * Total number of packets(per AC) that were successfully transmitted
+ * (with and without retries, including multi-cast, broadcast)
+ */
+ __le32 tx_frm_cnt[MAX_AC];
+ /*
+ * Total number of packets that were successfully received
+ * (after appropriate filter rules including multi-cast, broadcast)
+ */
+ __le32 rx_frm_cnt;
+ /*
+ * The number of MSDU packets and MMPDU frames per AC that the 802.11
+ * station successfully transmitted after more than one retransmission
+ * attempt
+ */
+ __le32 multiple_retry_cnt[MAX_AC];
+ /* Total number packets(per AC) failed to transmit */
+ __le32 fail_cnt[MAX_AC];
+ /*
+ * Total number of RTS/CTS sequence failures for transmission of a
+ * packet
+ */
+ __le32 rts_fail_cnt;
+ /*
+ * Total number of RTS/CTS sequence success for transmission of a
+ * packet
+ */
+ __le32 rts_succ_cnt;
+ /*
+ * The receive error count.
+ * HAL will provide the RxP FCS error global
+ */
+ __le32 rx_err_cnt;
+ /*
+ * The sum of the receive error count and dropped-receive-buffer
+ * error count. (FCS error)
+ */
+ __le32 rx_discard_cnt;
+ /*
+ * Total number packets failed transmit because of no ACK
+ * from the remote entity
+ */
+ __le32 ack_fail_cnt;
+ /* History of last ten transmit rate, in units of 500 kbit/sec */
+ __le32 tx_rate_history[MAX_TX_RATE_VALUES];
+ /* History of last ten Beacon rssi of the connected Bss */
+ __le32 bcn_rssi_history[MAX_RSSI_VALUES];
} __packed;
/*
* peer statistics.
- * TODO: add more stats
*/
-struct wmi_peer_stats {
+struct wmi_peer_stats_common {
struct wmi_mac_addr peer_macaddr;
__le32 peer_rssi;
__le32 peer_tx_rate;
} __packed;
+struct wmi_peer_stats_1 {
+ struct wmi_peer_stats_common common;
+} __packed;
+
+
+struct wmi_peer_stats_2 {
+ struct wmi_peer_stats_common common;
+ __le32 peer_rx_rate;
+} __packed;
+
+
struct wmi_vdev_create_cmd {
__le32 vdev_id;
__le32 vdev_type;
--
1.7.10
^ permalink raw reply related
* [PATCH v2 1/2] ath10k: update wal_dbg_tx_stats structure with missing parameter.
From: Bartosz Markowski @ 2013-08-28 11:41 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Bartosz Markowski
In-Reply-To: <1377690079-18645-1-git-send-email-bartosz.markowski@tieto.com>
It's very imporatant to keep these structs up to date with FW abi,
due to the arithmetic we use while read the fw_stats.
Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
---
drivers/net/wireless/ath/ath10k/wmi.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/wmi.h b/drivers/net/wireless/ath/ath10k/wmi.h
index 08860c4..5b94707 100644
--- a/drivers/net/wireless/ath/ath10k/wmi.h
+++ b/drivers/net/wireless/ath/ath10k/wmi.h
@@ -1767,6 +1767,9 @@ struct wal_dbg_tx_stats {
/* wal pdev resets */
__le32 pdev_resets;
+ /* frames dropped due to non-availability of stateless TIDs */
+ __le32 stateless_tid_alloc_failure;
+
__le32 phy_underrun;
/* MPDU is more than txop limit */
--
1.7.10
^ 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