* Re: [PATCH 22/22] brcm80211: removed file wifi.c
From: Luis R. Rodriguez @ 2011-10-12 21:54 UTC (permalink / raw)
To: Arend van Spriel; +Cc: linville, linux-wireless, Alwin Beukers
In-Reply-To: <1318445492-24207-23-git-send-email-arend@broadcom.com>
On Wed, Oct 12, 2011 at 11:51 AM, Arend van Spriel <arend@broadcom.com> wrote:
> From: Alwin Beukers <alwin@broadcom.com>
>
> Wifi.c was empty after previous cleanups, so it was removed.
>
> Reviewed-by: Arend van Spriel <arend@broadcom.com>
> Signed-off-by: Arend van Spriel <arend@broadcom.com>
Heh, remove Reviewed-by dude.
Luis
^ permalink raw reply
* Re: Driver for Intel Pro/Wireless 2200BG
From: Julian Calaby @ 2011-10-12 21:58 UTC (permalink / raw)
To: Jayanthi Venugopal; +Cc: linux-wireless
In-Reply-To: <CAFvH45QeG7DQeLORkf4io=gfVAhuiKh1KtWGEwZscg1LY7hM8Q@mail.gmail.com>
Hi,
On Wed, Oct 12, 2011 at 23:58, Jayanthi Venugopal <jay.venug@gmail.com> wrote:
> Hi,
> I would like to download and install the above driver .I am not able
> to download the driver from
> http://ipw2200.sourceforge.net/index.php
>
> I would like the driver and the installation instruction as well.
This driver should be part of your existing Linux Kernel. It should
automatically load when the card is detected, and you should be able
to use your wireless card with the standard wireless / networking
tools.
Thanks,
--
Julian Calaby
Email: julian.calaby@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
.Plan: http://sites.google.com/site/juliancalaby/
^ permalink raw reply
* Re: [PATCH 3.2 1/2] Revert "b43: trivial: do not report any link quality instead of invalid one"
From: Sedat Dilek @ 2011-10-12 22:22 UTC (permalink / raw)
To: Rafał Miłecki; +Cc: linux-wireless, John W. Linville, b43-dev
In-Reply-To: <1318454295-20573-1-git-send-email-zajec5@gmail.com>
2011/10/12 Rafał Miłecki <zajec5@gmail.com>:
> This reverts commit 55ad5962e97430c83d51df36fc18865ee4f78c48.
>
> I assumed N is newer than LP, which isn't true. This regressed LP case.
>
> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
> ---
> It seems that wasn't so "trivial", sorry for this regression :|
> ---
> drivers/net/wireless/b43/xmit.c | 12 +++++-------
> 1 files changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
> index 5f812d1..b8de62c 100644
> --- a/drivers/net/wireless/b43/xmit.c
> +++ b/drivers/net/wireless/b43/xmit.c
> @@ -735,13 +735,11 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
> }
>
> /* Link quality statistics */
> - if ((chanstat & B43_RX_CHAN_PHYTYPE) >= B43_PHYTYPE_N) {
> - /*
> - s8 rssi = max(rxhdr->power0, rxhdr->power1);
> - TODO: Find out what the rssi value is (dBm or percentage?)
> - and also find out what the maximum possible value is.
> - Fill status.ssi and status.signal fields.
> - */
> + if ((chanstat & B43_RX_CHAN_PHYTYPE) == B43_PHYTYPE_N) {
> +// s8 rssi = max(rxhdr->power0, rxhdr->power1);
> + //TODO: Find out what the rssi value is (dBm or percentage?)
> + // and also find out what the maximum possible value is.
> + // Fill status.ssi and status.signal fields.
> } else {
> status.signal = b43_rssi_postprocess(dev, rxhdr->jssi,
> (phystat0 & B43_RX_PHYST0_OFDM),
> --
> 1.7.3.4
>
Commenting style?
Isn't C99-like commenting not well seen?
- Sedat -
[1] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/CodingStyle#l423
[2] http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=blob;f=Documentation/CodingStyle#l444
^ permalink raw reply
* Re: Bug#645055: realtek 8188CE ad-hoc mode not supported
From: Ben Hutchings @ 2011-10-12 23:24 UTC (permalink / raw)
To: linux-wireless; +Cc: 645055, Antoine Beaupré
In-Reply-To: <20111012160135.GK3366@decadent.org.uk>
[-- Attachment #1: Type: text/plain, Size: 1352 bytes --]
On Wed, 2011-10-12 at 17:01 +0100, Ben Hutchings wrote:
> On Wed, Oct 12, 2011 at 11:20:31AM -0400, Antoine Beaupré wrote:
> > On Wed, 12 Oct 2011 14:08:32 +0100, Ben Hutchings <ben@decadent.org.uk> wrote:
> > > Can you create an ad-hoc interface like this:
> > >
> > > iw dev wlan0 interface add wlan1 type adhoc
> > >
> > > (you'll need the iw package).
> >
> > Interesting - this works. Didn't know of the iw tool. But this creates a
> > separate interface, kind of odd!
> >
> > The adhoc mode works like that. I am not sure I understand why it
> > doesn't work with iwconfig, can you enlighten me?
>
> iwconfig uses the original WEXT (wireless extensions) configuration
> interface. This interface was never very well specified and was
> implemented in inconsistent ways by different drivers.
>
> The newer configuration interface used by iw, Network Manager and
> other tools is nl80211 (netlink for IEEE 802.11).
[...]
I looked a little further and saw that nl80211 does support changing
interface type (mode). But this driver (rtl8192ce) only supports
creating new interfaces, not changing their type.
Should mac80211 drivers generally support changing interface type
(change_interface operation)?
Ben.
--
Ben Hutchings
Quantity is no substitute for quality, but it's the only one we've got.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: Bug#645055: realtek 8188CE ad-hoc mode not supported
From: Antoine Beaupré @ 2011-10-13 1:46 UTC (permalink / raw)
To: Ben Hutchings, linux-wireless; +Cc: 645055
In-Reply-To: <1318461858.4024.197.camel@deadeye>
[-- Attachment #1: Type: text/plain, Size: 1037 bytes --]
On Thu, 13 Oct 2011 00:24:12 +0100, Ben Hutchings <ben@decadent.org.uk> wrote:
> I looked a little further and saw that nl80211 does support changing
> interface type (mode). But this driver (rtl8192ce) only supports
> creating new interfaces, not changing their type.
>
> Should mac80211 drivers generally support changing interface type
> (change_interface operation)?
Seems to me really counter-intuitive that it didn't work. It was the
first time I ever see such a problem.
I have seen numerous drivers not support "Master" or "Monitor" mode,
because of limitations of the implementation or the hardware, but if
this is purely a API problem, it seems like a problem that should be
fixed...
Is this the right place though?
A.
--
The idea that Bill Gates has appeared like a knight in shining armour to
lead all customers out of a mire of technological chaos neatly ignores
the fact that it was he who, by peddling second-rate technology, led
them into it in the first place. - Douglas Adams (1952-2001)
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply
* Re: Bug#645055: realtek 8188CE ad-hoc mode not supported
From: Larry Finger @ 2011-10-13 2:10 UTC (permalink / raw)
To: Ben Hutchings; +Cc: linux-wireless, 645055, Antoine Beaupré
In-Reply-To: <1318461858.4024.197.camel@deadeye>
On 10/12/2011 06:24 PM, Ben Hutchings wrote:
> I looked a little further and saw that nl80211 does support changing
> interface type (mode). But this driver (rtl8192ce) only supports
> creating new interfaces, not changing their type.
>
> Should mac80211 drivers generally support changing interface type
> (change_interface operation)?
I don't think that implementation of the WEXT interface is necessary. As to
using iw, the following sequence worked:
iw dev wlan14 interface add wlan15 type adhoc
iw dev set rename5 type managed
iw dev set rename5 type adhoc
Why it was called "rename5" when I asked for "wlan15" is not understood, but the
iw interface changes the mode for an existing interface when using rtl8192ce.
BTW, I added a new iface because I did not want to interrupt my internat connection.
Larry
^ permalink raw reply
* Re: Bug#645055: realtek 8188CE ad-hoc mode not supported
From: Ben Hutchings @ 2011-10-13 2:25 UTC (permalink / raw)
To: Larry Finger, Antoine Beaupré; +Cc: linux-wireless, 645055
In-Reply-To: <4E964896.5050004@lwfinger.net>
[-- Attachment #1: Type: text/plain, Size: 1557 bytes --]
On Wed, 2011-10-12 at 21:10 -0500, Larry Finger wrote:
> On 10/12/2011 06:24 PM, Ben Hutchings wrote:
> > I looked a little further and saw that nl80211 does support changing
> > interface type (mode). But this driver (rtl8192ce) only supports
> > creating new interfaces, not changing their type.
> >
> > Should mac80211 drivers generally support changing interface type
> > (change_interface operation)?
>
> I don't think that implementation of the WEXT interface is necessary.
The change_interface operation appears to be used in implementation of
nl80211 too.
> As to using iw, the following sequence worked:
>
> iw dev wlan14 interface add wlan15 type adhoc
> iw dev set rename5 type managed
> iw dev set rename5 type adhoc
>
> Why it was called "rename5" when I asked for "wlan15" is not understood,
udev's persistent name generator isn't able to distinguish the two
interfaces by MAC address, so it decides the new interface should also
be named 'wlan14'. udev does renaming in two steps for some reason, and
the second step obviously fails.
> but the
> iw interface changes the mode for an existing interface when using rtl8192ce.
>
> BTW, I added a new iface because I did not want to interrupt my
> internat connection.
Hmm. Maybe the change_interface operation is only needed to change
type/mode while the interface is up.
Antoine, did you bring the interface down before setting its mode?
Ben.
--
Ben Hutchings
Quantity is no substitute for quality, but it's the only one we've got.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]
^ permalink raw reply
* Re: Bug#645055: realtek 8188CE ad-hoc mode not supported
From: Antoine Beaupré @ 2011-10-13 2:31 UTC (permalink / raw)
To: Ben Hutchings, Larry Finger; +Cc: linux-wireless, 645055
In-Reply-To: <1318472723.4024.208.camel@deadeye>
[-- Attachment #1: Type: text/plain, Size: 706 bytes --]
On Thu, 13 Oct 2011 03:25:17 +0100, Ben Hutchings <ben@decadent.org.uk> wrote:
> > but the
> > iw interface changes the mode for an existing interface when using rtl8192ce.
> >
> > BTW, I added a new iface because I did not want to interrupt my
> > internat connection.
>
> Hmm. Maybe the change_interface operation is only needed to change
> type/mode while the interface is up.
>
> Antoine, did you bring the interface down before setting its mode?
Crap. No, I didn't. And now it works if I bring it down first. Oh well,
I guess I just made a lot of noise for nothing, this bug can be closed,
thank you!
A.
--
Travail, du latin Tri Palium trois pieux, instrument de torture.
[-- Attachment #2: Type: application/pgp-signature, Size: 835 bytes --]
^ permalink raw reply
* [PATCH v2] mwifiex: use separate wait condition for each command node
From: Bing Zhao @ 2011-10-13 3:28 UTC (permalink / raw)
To: linux-wireless
Cc: John W. Linville, Amitkumar Karwar, Kiran Divekar, Yogesh Powar,
Frank Huang, Bing Zhao
From: Amitkumar Karwar <akarwar@marvell.com>
Currently global wait condition (adapter->cmd_wait_q.condition)
is used while sending synchronous commands to FW. When two threads
enter in mwifiex_send_cmd_sync() routine at the same time, both the
threads wait for their command responses. Since wait condition is
same for both, they wake up simultaneously after getting response
of 1st command. After this when a thread is waiting for command
response of 3rd command, it wakes up after getting response of 2nd
command and so on. Therefore we don't wait for the response of last
command(0xaa) during unload. Hence while next time loading the driver
command time out is seen for INIT command.
This problem is resolved by having separate wait condition flag for
each command(except scan command). Since scan command is treated
differently (by maintaining scan pending q etc.), newly defined flag
(scan_wait_q_woken) is used as a scan wait condition.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
v2: define wait condition in each cmd and mark it as completed
when cmd response is received. This way multiple cmds can
wait on one waitqueue. (Johannes Berg)
drivers/net/wireless/mwifiex/cmdevt.c | 23 ++++++++++++++---------
drivers/net/wireless/mwifiex/decl.h | 1 -
drivers/net/wireless/mwifiex/main.c | 2 +-
drivers/net/wireless/mwifiex/main.h | 7 ++++++-
drivers/net/wireless/mwifiex/scan.c | 8 +++++---
drivers/net/wireless/mwifiex/sta_ioctl.c | 6 ++++--
drivers/net/wireless/mwifiex/util.c | 5 +++--
7 files changed, 33 insertions(+), 19 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c
index 508de7f..ac27815 100644
--- a/drivers/net/wireless/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/mwifiex/cmdevt.c
@@ -40,8 +40,12 @@ mwifiex_init_cmd_node(struct mwifiex_private *priv,
{
cmd_node->priv = priv;
cmd_node->cmd_oid = cmd_oid;
- cmd_node->wait_q_enabled = priv->adapter->cmd_wait_q_required;
- priv->adapter->cmd_wait_q_required = false;
+ if (priv->adapter->cmd_wait_q_required) {
+ cmd_node->wait_q_enabled = priv->adapter->cmd_wait_q_required;
+ priv->adapter->cmd_wait_q_required = false;
+ cmd_node->cmd_wait_q_woken = false;
+ cmd_node->condition = &cmd_node->cmd_wait_q_woken;
+ }
cmd_node->data_buf = data_buf;
cmd_node->cmd_skb = cmd_node->skb;
}
@@ -418,7 +422,6 @@ int mwifiex_send_cmd_sync(struct mwifiex_private *priv, uint16_t cmd_no,
struct mwifiex_adapter *adapter = priv->adapter;
adapter->cmd_wait_q_required = true;
- adapter->cmd_wait_q.condition = false;
ret = mwifiex_send_cmd_async(priv, cmd_no, cmd_action, cmd_oid,
data_buf);
@@ -511,10 +514,12 @@ int mwifiex_send_cmd_async(struct mwifiex_private *priv, uint16_t cmd_no,
}
/* Send command */
- if (cmd_no == HostCmd_CMD_802_11_SCAN)
+ if (cmd_no == HostCmd_CMD_802_11_SCAN) {
mwifiex_queue_scan_cmd(priv, cmd_node);
- else
+ } else {
+ adapter->cmd_queued = cmd_node;
mwifiex_insert_cmd_to_pending_q(adapter, cmd_node, true);
+ }
return ret;
}
@@ -535,7 +540,7 @@ mwifiex_insert_cmd_to_free_q(struct mwifiex_adapter *adapter,
return;
if (cmd_node->wait_q_enabled)
- mwifiex_complete_cmd(adapter);
+ mwifiex_complete_cmd(adapter, cmd_node);
/* Clean the node */
mwifiex_clean_cmd_node(adapter, cmd_node);
@@ -882,7 +887,7 @@ mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter)
adapter->curr_cmd->wait_q_enabled = false;
spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, flags);
adapter->cmd_wait_q.status = -1;
- mwifiex_complete_cmd(adapter);
+ mwifiex_complete_cmd(adapter, adapter->curr_cmd);
}
/* Cancel all pending command */
spin_lock_irqsave(&adapter->cmd_pending_q_lock, flags);
@@ -893,7 +898,7 @@ mwifiex_cancel_all_pending_cmd(struct mwifiex_adapter *adapter)
if (cmd_node->wait_q_enabled) {
adapter->cmd_wait_q.status = -1;
- mwifiex_complete_cmd(adapter);
+ mwifiex_complete_cmd(adapter, cmd_node);
cmd_node->wait_q_enabled = false;
}
mwifiex_insert_cmd_to_free_q(adapter, cmd_node);
@@ -976,7 +981,7 @@ mwifiex_cancel_pending_ioctl(struct mwifiex_adapter *adapter)
spin_unlock_irqrestore(&adapter->mwifiex_cmd_lock, cmd_flags);
}
adapter->cmd_wait_q.status = -1;
- mwifiex_complete_cmd(adapter);
+ mwifiex_complete_cmd(adapter, adapter->curr_cmd);
}
/*
diff --git a/drivers/net/wireless/mwifiex/decl.h b/drivers/net/wireless/mwifiex/decl.h
index 6ca62c8..ae17ce0 100644
--- a/drivers/net/wireless/mwifiex/decl.h
+++ b/drivers/net/wireless/mwifiex/decl.h
@@ -98,7 +98,6 @@ struct mwifiex_802_11_ssid {
struct mwifiex_wait_queue {
wait_queue_head_t wait;
- u16 condition;
int status;
};
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
index 849144d..25ce86b 100644
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
@@ -685,8 +685,8 @@ mwifiex_add_card(void *card, struct semaphore *sem,
init_waitqueue_head(&adapter->hs_activate_wait_q);
adapter->cmd_wait_q_required = false;
init_waitqueue_head(&adapter->cmd_wait_q.wait);
- adapter->cmd_wait_q.condition = false;
adapter->cmd_wait_q.status = 0;
+ adapter->scan_wait_q_woken = false;
adapter->workqueue = create_workqueue("MWIFIEX_WORK_QUEUE");
if (!adapter->workqueue)
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index ec45607..7db20db 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -520,6 +520,8 @@ struct cmd_ctrl_node {
void *data_buf;
u32 wait_q_enabled;
struct sk_buff *skb;
+ u8 *condition;
+ u8 cmd_wait_q_woken;
};
struct mwifiex_if_ops {
@@ -651,6 +653,8 @@ struct mwifiex_adapter {
u32 arp_filter_size;
u16 cmd_wait_q_required;
struct mwifiex_wait_queue cmd_wait_q;
+ u8 scan_wait_q_woken;
+ struct cmd_ctrl_node *cmd_queued;
};
int mwifiex_init_lock_list(struct mwifiex_adapter *adapter);
@@ -670,7 +674,8 @@ int mwifiex_recv_packet(struct mwifiex_adapter *, struct sk_buff *skb);
int mwifiex_process_event(struct mwifiex_adapter *adapter);
-int mwifiex_complete_cmd(struct mwifiex_adapter *adapter);
+int mwifiex_complete_cmd(struct mwifiex_adapter *adapter,
+ struct cmd_ctrl_node *cmd_node);
int mwifiex_send_cmd_async(struct mwifiex_private *priv, uint16_t cmd_no,
u16 cmd_action, u32 cmd_oid, void *data_buf);
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index ca37619..5456dcb 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -185,7 +185,7 @@ int mwifiex_set_user_scan_ioctl(struct mwifiex_private *priv,
{
int status;
- priv->adapter->cmd_wait_q.condition = false;
+ priv->adapter->scan_wait_q_woken = false;
status = mwifiex_scan_networks(priv, scan_req);
if (!status)
@@ -1380,6 +1380,7 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
list_del(&cmd_node->list);
spin_unlock_irqrestore(&adapter->scan_pending_q_lock,
flags);
+ adapter->cmd_queued = cmd_node;
mwifiex_insert_cmd_to_pending_q(adapter, cmd_node,
true);
} else {
@@ -1788,7 +1789,7 @@ int mwifiex_ret_802_11_scan(struct mwifiex_private *priv,
/* Need to indicate IOCTL complete */
if (adapter->curr_cmd->wait_q_enabled) {
adapter->cmd_wait_q.status = 0;
- mwifiex_complete_cmd(adapter);
+ mwifiex_complete_cmd(adapter, adapter->curr_cmd);
}
if (priv->report_scan_result)
priv->report_scan_result = false;
@@ -1845,6 +1846,7 @@ mwifiex_queue_scan_cmd(struct mwifiex_private *priv,
unsigned long flags;
cmd_node->wait_q_enabled = true;
+ cmd_node->condition = &adapter->scan_wait_q_woken;
spin_lock_irqsave(&adapter->scan_pending_q_lock, flags);
list_add_tail(&cmd_node->list, &adapter->scan_pending_q);
spin_unlock_irqrestore(&adapter->scan_pending_q_lock, flags);
@@ -1911,7 +1913,7 @@ int mwifiex_request_scan(struct mwifiex_private *priv,
}
priv->scan_pending_on_block = true;
- priv->adapter->cmd_wait_q.condition = false;
+ priv->adapter->scan_wait_q_woken = false;
if (req_ssid && req_ssid->ssid_len != 0)
/* Specific SSID scan */
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index f20550a..d39bb72 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -55,7 +55,9 @@ int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter)
{
bool cancel_flag = false;
int status = adapter->cmd_wait_q.status;
+ struct cmd_ctrl_node *cmd_queued = adapter->cmd_queued;
+ adapter->cmd_queued = NULL;
dev_dbg(adapter->dev, "cmd pending\n");
atomic_inc(&adapter->cmd_pending);
@@ -64,8 +66,8 @@ int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter)
/* Wait for completion */
wait_event_interruptible(adapter->cmd_wait_q.wait,
- adapter->cmd_wait_q.condition);
- if (!adapter->cmd_wait_q.condition)
+ *(cmd_queued->condition));
+ if (!*(cmd_queued->condition))
cancel_flag = true;
if (cancel_flag) {
diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c
index d412915..06976f5 100644
--- a/drivers/net/wireless/mwifiex/util.c
+++ b/drivers/net/wireless/mwifiex/util.c
@@ -185,13 +185,14 @@ int mwifiex_recv_packet(struct mwifiex_adapter *adapter, struct sk_buff *skb)
* corresponding waiting function. Otherwise, it processes the
* IOCTL response and frees the response buffer.
*/
-int mwifiex_complete_cmd(struct mwifiex_adapter *adapter)
+int mwifiex_complete_cmd(struct mwifiex_adapter *adapter,
+ struct cmd_ctrl_node *cmd_node)
{
atomic_dec(&adapter->cmd_pending);
dev_dbg(adapter->dev, "cmd completed: status=%d\n",
adapter->cmd_wait_q.status);
- adapter->cmd_wait_q.condition = true;
+ *(cmd_node->condition) = true;
if (adapter->cmd_wait_q.status == -ETIMEDOUT)
dev_err(adapter->dev, "cmd timeout\n");
--
1.7.0.2
^ permalink raw reply related
* [PATCH] mwifiex: fix make namespacecheck warnings
From: Bing Zhao @ 2011-10-13 3:29 UTC (permalink / raw)
To: linux-wireless
Cc: John W. Linville, Amitkumar Karwar, Kiran Divekar, Yogesh Powar,
Frank Huang, Bing Zhao
From: Amitkumar Karwar <akarwar@marvell.com>
This patch takes care of warnings found by running
'make namespacecheck':
1. Remove dead code.
2. Reorder function definitions to avoid forward declarations.
3. Remove unnecessary function/structure declarations and mark
them as static.
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
---
drivers/net/wireless/mwifiex/cfp.c | 10 +++---
drivers/net/wireless/mwifiex/fw.h | 6 ---
drivers/net/wireless/mwifiex/init.c | 56 +++++++++++++++---------------
drivers/net/wireless/mwifiex/main.h | 8 ----
drivers/net/wireless/mwifiex/scan.c | 50 +++++++++++++-------------
drivers/net/wireless/mwifiex/sta_ioctl.c | 4 +-
drivers/net/wireless/mwifiex/txrx.c | 40 ---------------------
7 files changed, 60 insertions(+), 114 deletions(-)
diff --git a/drivers/net/wireless/mwifiex/cfp.c b/drivers/net/wireless/mwifiex/cfp.c
index d0cada5..f2e6de0 100644
--- a/drivers/net/wireless/mwifiex/cfp.c
+++ b/drivers/net/wireless/mwifiex/cfp.c
@@ -48,7 +48,7 @@ static u8 adhoc_rates_bg[BG_SUPPORTED_RATES] = { 0x82, 0x84, 0x8b, 0x96,
static u8 adhoc_rates_a[A_SUPPORTED_RATES] = { 0x8c, 0x12, 0x98, 0x24,
0xb0, 0x48, 0x60, 0x6c, 0 };
-u8 supported_rates_a[A_SUPPORTED_RATES] = { 0x0c, 0x12, 0x18, 0x24,
+static u8 supported_rates_a[A_SUPPORTED_RATES] = { 0x0c, 0x12, 0x18, 0x24,
0xb0, 0x48, 0x60, 0x6c, 0 };
static u16 mwifiex_data_rates[MWIFIEX_SUPPORTED_RATES_EXT] = { 0x02, 0x04,
0x0B, 0x16, 0x00, 0x0C, 0x12, 0x18,
@@ -57,19 +57,19 @@ static u16 mwifiex_data_rates[MWIFIEX_SUPPORTED_RATES_EXT] = { 0x02, 0x04,
0x75, 0x82, 0x0C, 0x1B, 0x36, 0x51,
0x6C, 0xA2, 0xD8, 0xF3, 0x10E, 0x00 };
-u8 supported_rates_b[B_SUPPORTED_RATES] = { 0x02, 0x04, 0x0b, 0x16, 0 };
+static u8 supported_rates_b[B_SUPPORTED_RATES] = { 0x02, 0x04, 0x0b, 0x16, 0 };
-u8 supported_rates_g[G_SUPPORTED_RATES] = { 0x0c, 0x12, 0x18, 0x24,
+static u8 supported_rates_g[G_SUPPORTED_RATES] = { 0x0c, 0x12, 0x18, 0x24,
0x30, 0x48, 0x60, 0x6c, 0 };
-u8 supported_rates_bg[BG_SUPPORTED_RATES] = { 0x02, 0x04, 0x0b, 0x0c,
+static u8 supported_rates_bg[BG_SUPPORTED_RATES] = { 0x02, 0x04, 0x0b, 0x0c,
0x12, 0x16, 0x18, 0x24, 0x30, 0x48,
0x60, 0x6c, 0 };
u16 region_code_index[MWIFIEX_MAX_REGION_CODE] = { 0x10, 0x20, 0x30,
0x32, 0x40, 0x41, 0xff };
-u8 supported_rates_n[N_SUPPORTED_RATES] = { 0x02, 0x04, 0 };
+static u8 supported_rates_n[N_SUPPORTED_RATES] = { 0x02, 0x04, 0 };
/*
* This function maps an index in supported rates table into
diff --git a/drivers/net/wireless/mwifiex/fw.h b/drivers/net/wireless/mwifiex/fw.h
index 71c61b7..0cc5d73 100644
--- a/drivers/net/wireless/mwifiex/fw.h
+++ b/drivers/net/wireless/mwifiex/fw.h
@@ -57,12 +57,6 @@ struct tx_packet_hdr {
#define GET_FW_DEFAULT_BANDS(adapter) \
((adapter->fw_cap_info >> 8) & ALL_802_11_BANDS)
-extern u8 supported_rates_b[B_SUPPORTED_RATES];
-extern u8 supported_rates_g[G_SUPPORTED_RATES];
-extern u8 supported_rates_bg[BG_SUPPORTED_RATES];
-extern u8 supported_rates_a[A_SUPPORTED_RATES];
-extern u8 supported_rates_n[N_SUPPORTED_RATES];
-
#define HostCmd_WEP_KEY_INDEX_MASK 0x3fff
#define KEY_INFO_ENABLED 0x01
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
index 0ce72fc..d792b3f 100644
--- a/drivers/net/wireless/mwifiex/init.c
+++ b/drivers/net/wireless/mwifiex/init.c
@@ -283,6 +283,34 @@ static void mwifiex_init_adapter(struct mwifiex_adapter *adapter)
}
/*
+ * This function releases the lock variables and frees the locks and
+ * associated locks.
+ */
+static void mwifiex_free_lock_list(struct mwifiex_adapter *adapter)
+{
+ struct mwifiex_private *priv;
+ s32 i, j;
+
+ /* Free lists */
+ list_del(&adapter->cmd_free_q);
+ list_del(&adapter->cmd_pending_q);
+ list_del(&adapter->scan_pending_q);
+
+ for (i = 0; i < adapter->priv_num; i++)
+ list_del(&adapter->bss_prio_tbl[i].bss_prio_head);
+
+ for (i = 0; i < adapter->priv_num; i++) {
+ if (adapter->priv[i]) {
+ priv = adapter->priv[i];
+ for (j = 0; j < MAX_NUM_TID; ++j)
+ list_del(&priv->wmm.tid_tbl_ptr[j].ra_list);
+ list_del(&priv->tx_ba_stream_tbl_ptr);
+ list_del(&priv->rx_reorder_tbl_ptr);
+ }
+ }
+}
+
+/*
* This function frees the adapter structure.
*
* The freeing operation is done recursively, by canceling all
@@ -376,34 +404,6 @@ int mwifiex_init_lock_list(struct mwifiex_adapter *adapter)
}
/*
- * This function releases the lock variables and frees the locks and
- * associated locks.
- */
-void mwifiex_free_lock_list(struct mwifiex_adapter *adapter)
-{
- struct mwifiex_private *priv;
- s32 i, j;
-
- /* Free lists */
- list_del(&adapter->cmd_free_q);
- list_del(&adapter->cmd_pending_q);
- list_del(&adapter->scan_pending_q);
-
- for (i = 0; i < adapter->priv_num; i++)
- list_del(&adapter->bss_prio_tbl[i].bss_prio_head);
-
- for (i = 0; i < adapter->priv_num; i++) {
- if (adapter->priv[i]) {
- priv = adapter->priv[i];
- for (j = 0; j < MAX_NUM_TID; ++j)
- list_del(&priv->wmm.tid_tbl_ptr[j].ra_list);
- list_del(&priv->tx_ba_stream_tbl_ptr);
- list_del(&priv->rx_reorder_tbl_ptr);
- }
- }
-}
-
-/*
* This function initializes the firmware.
*
* The following operations are performed sequentially -
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index 7db20db..30f138b 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -658,7 +658,6 @@ struct mwifiex_adapter {
};
int mwifiex_init_lock_list(struct mwifiex_adapter *adapter);
-void mwifiex_free_lock_list(struct mwifiex_adapter *adapter);
int mwifiex_init_fw(struct mwifiex_adapter *adapter);
@@ -709,8 +708,6 @@ int mwifiex_process_tx(struct mwifiex_private *priv, struct sk_buff *skb,
int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags);
int mwifiex_write_data_complete(struct mwifiex_adapter *adapter,
struct sk_buff *skb, int status);
-int mwifiex_recv_packet_complete(struct mwifiex_adapter *,
- struct sk_buff *skb, int status);
void mwifiex_clean_txrx(struct mwifiex_private *priv);
u8 mwifiex_check_last_packet_indication(struct mwifiex_private *priv);
void mwifiex_check_ps_cond(struct mwifiex_adapter *adapter);
@@ -740,8 +737,6 @@ int mwifiex_process_sta_rx_packet(struct mwifiex_adapter *,
int mwifiex_process_sta_event(struct mwifiex_private *);
void *mwifiex_process_sta_txpd(struct mwifiex_private *, struct sk_buff *skb);
int mwifiex_sta_init_cmd(struct mwifiex_private *, u8 first_sta);
-int mwifiex_scan_networks(struct mwifiex_private *priv,
- const struct mwifiex_user_scan_cfg *user_scan_in);
int mwifiex_cmd_802_11_scan(struct host_cmd_ds_command *cmd,
struct mwifiex_scan_cmd_config *scan_cfg);
void mwifiex_queue_scan_cmd(struct mwifiex_private *priv,
@@ -901,9 +896,6 @@ int mwifiex_copy_mcast_addr(struct mwifiex_multicast_list *mlist,
int mwifiex_wait_queue_complete(struct mwifiex_adapter *adapter);
int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
struct mwifiex_802_11_ssid *req_ssid);
-int mwifiex_set_hs_params(struct mwifiex_private *priv,
- u16 action, int cmd_type,
- struct mwifiex_ds_hs_cfg *hscfg);
int mwifiex_cancel_hs(struct mwifiex_private *priv, int cmd_type);
int mwifiex_enable_hs(struct mwifiex_adapter *adapter);
int mwifiex_disable_auto_ds(struct mwifiex_private *priv);
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index 5456dcb..dae8dbb 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -172,29 +172,6 @@ mwifiex_ssid_cmp(struct mwifiex_802_11_ssid *ssid1,
}
/*
- * Sends IOCTL request to start a scan with user configurations.
- *
- * This function allocates the IOCTL request buffer, fills it
- * with requisite parameters and calls the IOCTL handler.
- *
- * Upon completion, it also generates a wireless event to notify
- * applications.
- */
-int mwifiex_set_user_scan_ioctl(struct mwifiex_private *priv,
- struct mwifiex_user_scan_cfg *scan_req)
-{
- int status;
-
- priv->adapter->scan_wait_q_woken = false;
-
- status = mwifiex_scan_networks(priv, scan_req);
- if (!status)
- status = mwifiex_wait_queue_complete(priv->adapter);
-
- return status;
-}
-
-/*
* This function checks if wapi is enabled in driver and scanned network is
* compatible with it.
*/
@@ -1316,8 +1293,8 @@ mwifiex_radio_type_to_band(u8 radio_type)
* order to send the appropriate scan commands to firmware to populate or
* update the internal driver scan table.
*/
-int mwifiex_scan_networks(struct mwifiex_private *priv,
- const struct mwifiex_user_scan_cfg *user_scan_in)
+static int mwifiex_scan_networks(struct mwifiex_private *priv,
+ const struct mwifiex_user_scan_cfg *user_scan_in)
{
int ret = 0;
struct mwifiex_adapter *adapter = priv->adapter;
@@ -1399,6 +1376,29 @@ int mwifiex_scan_networks(struct mwifiex_private *priv,
}
/*
+ * Sends IOCTL request to start a scan with user configurations.
+ *
+ * This function allocates the IOCTL request buffer, fills it
+ * with requisite parameters and calls the IOCTL handler.
+ *
+ * Upon completion, it also generates a wireless event to notify
+ * applications.
+ */
+int mwifiex_set_user_scan_ioctl(struct mwifiex_private *priv,
+ struct mwifiex_user_scan_cfg *scan_req)
+{
+ int status;
+
+ priv->adapter->scan_wait_q_woken = false;
+
+ status = mwifiex_scan_networks(priv, scan_req);
+ if (!status)
+ status = mwifiex_wait_queue_complete(priv->adapter);
+
+ return status;
+}
+
+/*
* This function prepares a scan command to be sent to the firmware.
*
* This uses the scan command configuration sent to the command processing
diff --git a/drivers/net/wireless/mwifiex/sta_ioctl.c b/drivers/net/wireless/mwifiex/sta_ioctl.c
index d39bb72..ea4a29b 100644
--- a/drivers/net/wireless/mwifiex/sta_ioctl.c
+++ b/drivers/net/wireless/mwifiex/sta_ioctl.c
@@ -293,8 +293,8 @@ done:
* This function prepares the correct firmware command and
* issues it.
*/
-int mwifiex_set_hs_params(struct mwifiex_private *priv, u16 action,
- int cmd_type, struct mwifiex_ds_hs_cfg *hs_cfg)
+static int mwifiex_set_hs_params(struct mwifiex_private *priv, u16 action,
+ int cmd_type, struct mwifiex_ds_hs_cfg *hs_cfg)
{
struct mwifiex_adapter *adapter = priv->adapter;
diff --git a/drivers/net/wireless/mwifiex/txrx.c b/drivers/net/wireless/mwifiex/txrx.c
index 4c3421e..a206f41 100644
--- a/drivers/net/wireless/mwifiex/txrx.c
+++ b/drivers/net/wireless/mwifiex/txrx.c
@@ -161,43 +161,3 @@ done:
return 0;
}
-/*
- * Packet receive completion callback handler.
- *
- * This function calls another completion callback handler which
- * updates the statistics, and optionally updates the parent buffer
- * use count before freeing the received packet.
- */
-int mwifiex_recv_packet_complete(struct mwifiex_adapter *adapter,
- struct sk_buff *skb, int status)
-{
- struct mwifiex_rxinfo *rx_info = MWIFIEX_SKB_RXCB(skb);
- struct mwifiex_rxinfo *rx_info_parent;
- struct mwifiex_private *priv;
- struct sk_buff *skb_parent;
- unsigned long flags;
-
- priv = adapter->priv[rx_info->bss_index];
-
- if (priv && (status == -1))
- priv->stats.rx_dropped++;
-
- if (rx_info->parent) {
- skb_parent = rx_info->parent;
- rx_info_parent = MWIFIEX_SKB_RXCB(skb_parent);
-
- spin_lock_irqsave(&priv->rx_pkt_lock, flags);
- --rx_info_parent->use_count;
-
- if (!rx_info_parent->use_count) {
- spin_unlock_irqrestore(&priv->rx_pkt_lock, flags);
- dev_kfree_skb_any(skb_parent);
- } else {
- spin_unlock_irqrestore(&priv->rx_pkt_lock, flags);
- }
- } else {
- dev_kfree_skb_any(skb);
- }
-
- return 0;
-}
--
1.7.0.2
^ permalink raw reply related
* Re: [PATCH] ath9k_hw: Fix ASPM L1 issue for AR9462
From: Rajkumar Manoharan @ 2011-10-13 3:46 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, stable
In-Reply-To: <20111012185034.GH18764@tuxdriver.com>
On Wed, Oct 12, 2011 at 02:50:34PM -0400, John W. Linville wrote:
> On Wed, Oct 12, 2011 at 02:40:44PM -0400, John W. Linville wrote:
> > On Mon, Oct 10, 2011 at 11:25:45AM +0530, Rajkumar Manoharan wrote:
> > > Because of not clearing Bit 14 of AR_WA, the ASPM L1 is not
> > > enabled when entering into sleep mode. AR9462 does not need
> > > bit 14 to be set.
> > >
> > > Cc: stable@kernel.org
> > > Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
> >
> > CC [M] drivers/net/wireless/ath/ath9k/hw.o
> > drivers/net/wireless/ath/ath9k/hw.c: In function ???__ath9k_hw_init???:
> > drivers/net/wireless/ath/ath9k/hw.c:544:2: error: implicit declaration of function ???AR_SREV_9462???
> >
> > Missing a patch dependency?
>
> I see that is defined by a series posted just before that -- one that
> hasn't even appeared in wireless-next yet. Cc: stable@kernel.org
> seems a bit inappropriate...
>
> That series needs rework anyway -- how about you just fold this one
> into that earlier series?
>
First of all sorry for the inconvenience. While splitting stable patch
from the patchset, I made it on top of patchset that caused the dependancy.
I will resend patch.
--
Rajkumar
^ permalink raw reply
* Re: [PATCH 3.2 1/2] Revert "b43: trivial: do not report any link quality instead of invalid one"
From: Rafał Miłecki @ 2011-10-13 4:38 UTC (permalink / raw)
To: sedat.dilek; +Cc: linux-wireless, John W. Linville, b43-dev
In-Reply-To: <CA+icZUXzPSm8FdqMbAm34GEDVM-BADOwY==aYiUegd0uhEnACQ@mail.gmail.com>
W dniu 13 października 2011 00:22 użytkownik Sedat Dilek
<sedat.dilek@googlemail.com> napisał:
> 2011/10/12 Rafał Miłecki <zajec5@gmail.com>:
>> This reverts commit 55ad5962e97430c83d51df36fc18865ee4f78c48.
>>
>> I assumed N is newer than LP, which isn't true. This regressed LP case.
>>
>> Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
>> ---
>> It seems that wasn't so "trivial", sorry for this regression :|
>> ---
>> drivers/net/wireless/b43/xmit.c | 12 +++++-------
>> 1 files changed, 5 insertions(+), 7 deletions(-)
>>
>> diff --git a/drivers/net/wireless/b43/xmit.c b/drivers/net/wireless/b43/xmit.c
>> index 5f812d1..b8de62c 100644
>> --- a/drivers/net/wireless/b43/xmit.c
>> +++ b/drivers/net/wireless/b43/xmit.c
>> @@ -735,13 +735,11 @@ void b43_rx(struct b43_wldev *dev, struct sk_buff *skb, const void *_rxhdr)
>> }
>>
>> /* Link quality statistics */
>> - if ((chanstat & B43_RX_CHAN_PHYTYPE) >= B43_PHYTYPE_N) {
>> - /*
>> - s8 rssi = max(rxhdr->power0, rxhdr->power1);
>> - TODO: Find out what the rssi value is (dBm or percentage?)
>> - and also find out what the maximum possible value is.
>> - Fill status.ssi and status.signal fields.
>> - */
>> + if ((chanstat & B43_RX_CHAN_PHYTYPE) == B43_PHYTYPE_N) {
>> +// s8 rssi = max(rxhdr->power0, rxhdr->power1);
>> + //TODO: Find out what the rssi value is (dBm or percentage?)
>> + // and also find out what the maximum possible value is.
>> + // Fill status.ssi and status.signal fields.
>> } else {
>> status.signal = b43_rssi_postprocess(dev, rxhdr->jssi,
>> (phystat0 & B43_RX_PHYST0_OFDM),
>> --
>> 1.7.3.4
>>
>
> Commenting style?
> Isn't C99-like commenting not well seen?
This is simple revert, the code was like that before my patch.
My 2/2 patch remove that ugly commenting style.
--
Rafał
^ permalink raw reply
* [PATCH v2] ath9k_hw: Fix ASPM L1 issue for AR9480
From: Rajkumar Manoharan @ 2011-10-13 5:19 UTC (permalink / raw)
To: linville; +Cc: linux-wireless, Rajkumar Manoharan, stable
Because of not clearing Bit 14 of AR_WA, the ASPM L1 is not
enabled when entering into sleep mode. AR9480 does not need
bit 14 to be set.
Cc: stable@kernel.org
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/hw.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/hw.c b/drivers/net/wireless/ath/ath9k/hw.c
index fd7c207..58794a4 100644
--- a/drivers/net/wireless/ath/ath9k/hw.c
+++ b/drivers/net/wireless/ath/ath9k/hw.c
@@ -541,6 +541,9 @@ static int __ath9k_hw_init(struct ath_hw *ah)
return -EIO;
}
+ if (AR_SREV_9480(ah))
+ ah->WARegVal &= ~AR_WA_D3_L1_DISABLE;
+
ath9k_hw_init_defaults(ah);
ath9k_hw_init_config(ah);
@@ -1776,8 +1779,7 @@ static void ath9k_set_power_sleep(struct ath_hw *ah, int setChip)
}
/* Clear Bit 14 of AR_WA after putting chip into Full Sleep mode. */
- if (!AR_SREV_9480(ah))
- REG_WRITE(ah, AR_WA, ah->WARegVal & ~AR_WA_D3_L1_DISABLE);
+ REG_WRITE(ah, AR_WA, ah->WARegVal & ~AR_WA_D3_L1_DISABLE);
}
/*
--
1.7.7
^ permalink raw reply related
* Re: [PATCH] ath6kl: fix firmware start address for ar6003 hw2.0
From: Kalle Valo @ 2011-10-13 6:25 UTC (permalink / raw)
To: Sangwook Lee; +Cc: linux-wireless
In-Reply-To: <CADPsn1bWC6=dgoUn7_1--a=jcNHq0Hw6Drmg+8HcY5xPLVrSBA@mail.gmail.com>
Hi Sangwook,
On 10/12/2011 01:45 PM, Sangwook Lee wrote:
>>>> Before I'm able to find a hw 2.0 device, can you try to debug this more?
>>>> When scanning fails can check if ath6kldev_intr_bh_handler() is called
>>>> or not? When scanning fails it usually happens because irqs are failing.
>
> Yes, it seems true. when scanning fails. it failed to receive no more sdio irqs.
Do you get any interrupts at all from ar6003?
> For the temporary testing, I made sdio polling kernel thread and then let it
> call ath6kldev_intr_bh_handler(). With hw2.0, it works fine with
> scanning issue.
> Do you know any ideas to solve this problem clearly ?
Sorry, I don't have any ideas right now. I have seen interrupt problems
before but they have always been due to a problem in the SDIO
controller. I don't know if your problem is an SDIO controller problem
or just related to hw2.0.
Kalle
^ permalink raw reply
* Re: [PATCH 22/22] brcm80211: removed file wifi.c
From: Arend van Spriel @ 2011-10-13 8:51 UTC (permalink / raw)
To: Luis R. Rodriguez
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
Alwin Beukers
In-Reply-To: <CAB=NE6XYFB4uWcRR1kSNKLaJC4W1E3uLZOd3hGEArjzsmNG4PQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 843 bytes --]
On 10/12/2011 11:54 PM, Luis R. Rodriguez wrote:
> On Wed, Oct 12, 2011 at 11:51 AM, Arend van Spriel <arend@broadcom.com> wrote:
>> From: Alwin Beukers <alwin@broadcom.com>
>>
>> Wifi.c was empty after previous cleanups, so it was removed.
>>
>> Reviewed-by: Arend van Spriel <arend@broadcom.com>
>> Signed-off-by: Arend van Spriel <arend@broadcom.com>
>
> Heh, remove Reviewed-by dude.
>
> Luis
>
I had a remark on this in earlier commits. So I am clearly missing the
point here. The author submitted this change and others for review to me
and I reviewed it as requested. Hence the Reviewed-by: entry.
I have been given the task to publish these patches and I sign them off
for the "Developer's Certificate of Origin". Hence the Signed-off-by: entry.
Is there something wrong with this reasoning?
Gr. AvS
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]
^ permalink raw reply
* Re: [PATCH] ath6kl: unbreak suspend
From: Kalle Valo @ 2011-10-13 10:22 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless, Sam Leffler
In-Reply-To: <20111012074216.26442.87419.stgit@localhost6.localdomain6>
On 10/12/2011 10:42 AM, Kalle Valo wrote:
> From: Sam Leffler <sleffler@chromium.org>
>
> Add missing {}'s that caused ath6kl_sdio_suspend to always return -EINVAL
> causing suspend to be aborted.
>
> kvalo: I broke this in commit f7325b85e ("ath6kl: add sdio debug messages")
Applied. Thanks Sam.
Kalle
^ permalink raw reply
* Re: [PATCH] ath6kl: Fix endpoint_stats debugfs buffer length calculation
From: Kalle Valo @ 2011-10-13 10:29 UTC (permalink / raw)
To: Jouni Malinen; +Cc: linux-wireless, Joe Perches
In-Reply-To: <20111011190821.GA29419@jouni.qca.qualcomm.com>
On 10/11/2011 10:08 PM, Jouni Malinen wrote:
> The previous version did not really make much sense and the theoretical
> maximum length would be a bit longer. Calculate the length more
> accurately. In addition, there is no need to clear the buffer, so use
> kmalloc instead of kzalloc. For bonus points, add the forgotten
> cred_rpt_from_other value to the file.
Thanks, applied.
Kalle
^ permalink raw reply
* Re: [RFC 02/07] compat-wireless: Connection quality monitor extensions
From: Janusz Dziedzic @ 2011-10-13 10:42 UTC (permalink / raw)
To: Johannes Berg
Cc: Dmitry Tarnyagin, linux-wireless, Bartosz MARKOWSKI,
Janusz DZIEDZIC
In-Reply-To: <1318407677.3933.18.camel@jlt3.sipsolutions.net>
Hello Johannes,
Generally we deliver this patch because is usefull in roaming cases.
Speed up roaming when beacon miss will be detected (without
disconnection in upper layer).
Some questions below.
2011/10/12 Johannes Berg <johannes@sipsolutions.net>:
> On Wed, 2011-10-12 at 03:02 +0200, Dmitry Tarnyagin wrote:
>
>> added:
>> * beacon miss threshold - This value specifies the threshold
>> for the BEACON loss level
>> * tx fail - This value specifies the threshold for the TX loss level
>
> That's a bit short for a changelog for such a big patch. The patch might
> stand to be split up into two and be explained better.
>
> Also, as Julian pointed out -- get your compat vs. wireless tree in
> order. You don't want to be modifying the compat repository, it's even
> impossible, you need to be submitting patches against wireless-next or
> -testing. You also need to make sure they apply against those trees,
> which this patch obviously can't:
>
>
>> include/linux/compat-3.0.h | 2 +
>
> as you can see easily :)
>
>> +++ b/include/linux/nl80211.h
>> @@ -2311,6 +2311,14 @@ enum nl80211_ps_state {
>> * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event
>> * @NL80211_ATTR_CQM_PKT_LOSS_EVENT: a u32 value indicating that this many
>> * consecutive packets were not acknowledged by the peer
>> + * @NL80211_ATTR_CQM_BEACON_MISS_THOLD: BEACON threshold. This value
>> specifies
>> + * the threshold for the BEACON loss level at which an event will be
>> + * sent. Zero to disable.
>
> Should it really be zero to disable rather than leaving it out to
> disable?
Similar like in case of NL80211_ATTR_CQM_RSSI_
Usefull to disable in run-time also - when associated.
>
>> + * @NL80211_ATTR_CQM_BEACON_MISS_THOLD_EVENT: BEACON miss event
>> + * @NL80211_ATTR_CQM_TX_FAIL_THOLD: TX threshold. This value specifies the
>> + * the threshold for the TX loss level at which an event will be
>> + * sent. Zero to disable.
>> + * @NL80211_ATTR_CQM_TX_FAIL_THOLD_EVENT: TX threshold event
>
> How's this not the same as PKT_LOSS_EVENT?
Based on supplicant code - this is mapped to EVENT_STATION_LOW_ACK.
Seems used only in case we are GO/AP and not configurable from user space.
I think possible to reuse PKT_LOSS_EVENT.
But still new HW_FLAGS is required for that and counter configuration
from user space could be usefull.
>
> Some advertising for whether this is supported or not is necessary.
>
>> +++ b/include/net/mac80211.h
>
> Again a fairly complex patch modifying both cfg80211 and mac80211 -- not
> good. Keep in mind that there are in fact drivers not using mac80211.
>
>> @@ -244,6 +244,10 @@ enum ieee80211_rssi_event {
>> * @cqm_rssi_thold: Connection quality monitor RSSI threshold, a zero
>> value
>> * implies disabled
>> * @cqm_rssi_hyst: Connection quality monitor RSSI hysteresis
>> + * @cqm_beacon_miss_thold: Connection quality monitor beacon threshold, a
>> zero
>> + * value implies disabled
>> + * @cqm_tx_fail_thold: Connection quality monitor tx threshold, a zero
>> value
>> + * implies disabled
>
> Your line-wrapping makes this hard to read :(
>
>> +++ b/net/mac80211/cfg.c
>> @@ -1751,6 +1751,58 @@ static int ieee80211_set_cqm_rssi_config(struct
>> wiphy *wiphy,
>> return 0;
>> }
>>
>> +static int ieee80211_set_cqm_beacon_miss_config(struct wiphy *wiphy,
>> + struct net_device *dev,
>> + u32 beacon_thold)
>> +{
>> + struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
>> + struct ieee80211_local *local = wdev_priv(dev->ieee80211_ptr);
>> + struct ieee80211_vif *vif = &sdata->vif;
>> + struct ieee80211_bss_conf *bss_conf = &vif->bss_conf;
>> +
>> + if (beacon_thold == bss_conf->cqm_beacon_miss_thold)
>> + return 0;
>> +
>> + bss_conf->cqm_beacon_miss_thold = beacon_thold;
>> +
>> + if (!(local->hw.flags & IEEE80211_HW_SUPPORTS_CQM_BEACON_MISS)) {
>> + if (sdata->vif.type != NL80211_IFTYPE_STATION)
>> + return -EOPNOTSUPP;
>> + return 0;
>
> This looks/is wrong in multiple ways.
Could you add more description here - this is almost the same like
ieee80211_set_cqm_rssi_config() fuction.
>
>> +++ b/net/mac80211/mlme.c
>> @@ -2174,7 +2174,10 @@ void ieee80211_sta_work(struct
>> ieee80211_sub_if_data *sdata)
>> ifmgd->probe_send_count, max_tries);
>> #endif
>> ieee80211_mgd_probe_ap_send(sdata);
>> - } else {
>> + } else if (!(local->hw.flags &
>> + IEEE80211_HW_SUPPORTS_CQM_BEACON_MISS) &&
>> + !(local->hw.flags &
>> + IEEE80211_HW_SUPPORTS_CQM_TX_FAIL)) {
>> /*
>> * We actually lost the connection ... or did we?
>> * Let's make sure!
>
> explain.
In case of BEACON_MISS we should not report connection_loss to upper
layer, we should only notify about beacon_miss and give a chance to
roam without disconnection. Without that first we will see
disconnection in wpa_supplicant. Next if roam will fail and driver
support IEEE80211_HW_SUPPORTS_CQM_BEACON_MISS should report this
connection_lost by itself via ieee80211_connection_loss().
>
>> diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
>> index 21fc970..4194b3e 100644
>> --- a/net/wireless/mlme.c
>> +++ b/net/wireless/mlme.c
>> @@ -1097,6 +1097,7 @@ void cfg80211_gtk_rekey_notify(struct net_device
>> *dev, const u8 *bssid,
>> }
>> EXPORT_SYMBOL(cfg80211_gtk_rekey_notify);
>>
>> +
>> void cfg80211_pmksa_candidate_notify(struct net_device *dev, int index,
>
> spurious whitespace change
>
> johannes
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
BR
Janusz
^ permalink raw reply
* Re: [RFC 02/07] compat-wireless: Connection quality monitor extensions
From: Johannes Berg @ 2011-10-13 10:49 UTC (permalink / raw)
To: Janusz Dziedzic
Cc: Dmitry Tarnyagin, linux-wireless, Bartosz MARKOWSKI,
Janusz DZIEDZIC
In-Reply-To: <CAFED-jk8xp62A8cyR1qbbFzfM1AJRMUzGQ1Z3b4pDGdBPWYOrw@mail.gmail.com>
Hi,
Please trim your quotes. There's no point in quoting all of the email to
reply to specific points.
> >> +++ b/include/linux/nl80211.h
> >> @@ -2311,6 +2311,14 @@ enum nl80211_ps_state {
> >> * @NL80211_ATTR_CQM_RSSI_THRESHOLD_EVENT: RSSI threshold event
> >> * @NL80211_ATTR_CQM_PKT_LOSS_EVENT: a u32 value indicating that this many
> >> * consecutive packets were not acknowledged by the peer
> >> + * @NL80211_ATTR_CQM_BEACON_MISS_THOLD: BEACON threshold. This value
> >> specifies
> >> + * the threshold for the BEACON loss level at which an event will be
> >> + * sent. Zero to disable.
> >
> > Should it really be zero to disable rather than leaving it out to
> > disable?
>
> Similar like in case of NL80211_ATTR_CQM_RSSI_
> Usefull to disable in run-time also - when associated.
I don't think you understood my question, but I think it's actually OK
as is so you can change other config w/o disabling this.
> >> + * @NL80211_ATTR_CQM_BEACON_MISS_THOLD_EVENT: BEACON miss event
> >> + * @NL80211_ATTR_CQM_TX_FAIL_THOLD: TX threshold. This value specifies the
> >> + * the threshold for the TX loss level at which an event will be
> >> + * sent. Zero to disable.
> >> + * @NL80211_ATTR_CQM_TX_FAIL_THOLD_EVENT: TX threshold event
> >
> > How's this not the same as PKT_LOSS_EVENT?
>
> Based on supplicant code - this is mapped to EVENT_STATION_LOW_ACK.
> Seems used only in case we are GO/AP and not configurable from user space.
> I think possible to reuse PKT_LOSS_EVENT.
> But still new HW_FLAGS is required for that and counter configuration
> from user space could be usefull.
Yeah so add the config for PKT_LOSS_EVENT.
> >> + if (!(local->hw.flags &
> IEEE80211_HW_SUPPORTS_CQM_BEACON_MISS)) {
> >> + if (sdata->vif.type != NL80211_IFTYPE_STATION)
> >> + return -EOPNOTSUPP;
> >> + return 0;
> >
> > This looks/is wrong in multiple ways.
>
>
> Could you add more description here - this is almost the same like
> ieee80211_set_cqm_rssi_config() fuction.
Well so evidently this accepts the config if the HW supports it and the
interface type isn't station -- that's bad.
Also, I haven't seen any evidence that you implemented support for this
in mac80211 if the device doesn't support it, so you can't do it this
way.
> >> - } else {
> >> + } else if (!(local->hw.flags &
> >> + IEEE80211_HW_SUPPORTS_CQM_BEACON_MISS) &&
> >> + !(local->hw.flags &
> >> + IEEE80211_HW_SUPPORTS_CQM_TX_FAIL)) {
> >> /*
> >> * We actually lost the connection ... or did we?
> >> * Let's make sure!
> >
> > explain.
>
> In case of BEACON_MISS we should not report connection_loss to upper
> layer, we should only notify about beacon_miss and give a chance to
> roam without disconnection. Without that first we will see
> disconnection in wpa_supplicant. Next if roam will fail and driver
> support IEEE80211_HW_SUPPORTS_CQM_BEACON_MISS should report this
> connection_lost by itself via ieee80211_connection_loss().
So then the test is wrong -- it has to be dependent on wpa_s actually
having asked for this.
I really don't want to be reviewing this with so many basic errors. It
looks like you blindly copied parts of the other CQM things without
understanding what they do. Please find somebody else to review &
explain things with you first, I can't do that at this point.
johannes
^ permalink raw reply
* [PATCH] mac80211: fix TID for null poll response
From: Johannes Berg @ 2011-10-13 11:19 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
From: Johannes Berg <johannes.berg@intel.com>
The queue mapping/TID for non-QoS null data
responses to is never set, making it default
to BK. Fix that.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/sta_info.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
--- a/net/mac80211/sta_info.c 2011-10-07 10:43:31.000000000 +0200
+++ b/net/mac80211/sta_info.c 2011-10-13 13:16:57.000000000 +0200
@@ -1203,11 +1203,9 @@ static void ieee80211_send_null_response
memcpy(nullfunc->addr2, sdata->vif.addr, ETH_ALEN);
memcpy(nullfunc->addr3, sdata->vif.addr, ETH_ALEN);
+ skb->priority = tid;
+ skb_set_queue_mapping(skb, ieee802_1d_to_ac[tid]);
if (qos) {
- skb->priority = tid;
-
- skb_set_queue_mapping(skb, ieee802_1d_to_ac[tid]);
-
nullfunc->qos_ctrl = cpu_to_le16(tid);
if (reason == IEEE80211_FRAME_RELEASE_UAPSD)
^ permalink raw reply
* [PATCH 1/4] ath6kl: merge htc debug levels
From: Kalle Valo @ 2011-10-13 12:21 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless
It's not really necessary to have separate debug levels for htc tx and rx
so combine them.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/debug.c | 5 +-
drivers/net/wireless/ath/ath6kl/debug.h | 4 +
drivers/net/wireless/ath/ath6kl/hif.c | 6 +-
drivers/net/wireless/ath/ath6kl/htc.c | 84 ++++++++++++++++---------------
4 files changed, 50 insertions(+), 49 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/debug.c b/drivers/net/wireless/ath/ath6kl/debug.c
index dd37785..e52f7e3 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.c
+++ b/drivers/net/wireless/ath/ath6kl/debug.c
@@ -180,9 +180,10 @@ void dump_cred_dist_stats(struct htc_target *target)
list_for_each_entry(ep_list, &target->cred_dist_list, list)
dump_cred_dist(ep_list);
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "ctxt:%p dist:%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:%p dist:%p\n",
target->cred_dist_cntxt, NULL);
- ath6kl_dbg(ATH6KL_DBG_TRC, "credit distribution, total : %d, free : %d\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC,
+ "credit distribution, total : %d, free : %d\n",
target->cred_dist_cntxt->total_avail_credits,
target->cred_dist_cntxt->cur_free_credits);
}
diff --git a/drivers/net/wireless/ath/ath6kl/debug.h b/drivers/net/wireless/ath/ath6kl/debug.h
index 7d5323d..01f4015 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.h
+++ b/drivers/net/wireless/ath/ath6kl/debug.h
@@ -25,8 +25,8 @@ enum ATH6K_DEBUG_MASK {
ATH6KL_DBG_WLAN_TX = BIT(2), /* wlan tx */
ATH6KL_DBG_WLAN_RX = BIT(3), /* wlan rx */
ATH6KL_DBG_BMI = BIT(4), /* bmi tracing */
- ATH6KL_DBG_HTC_SEND = BIT(5), /* htc send */
- ATH6KL_DBG_HTC_RECV = BIT(6), /* htc recv */
+ ATH6KL_DBG_HTC = BIT(5),
+ /* hole */
ATH6KL_DBG_IRQ = BIT(7), /* interrupt processing */
ATH6KL_DBG_PM = BIT(8), /* power management */
ATH6KL_DBG_WLAN_NODE = BIT(9), /* general wlan node tracing */
diff --git a/drivers/net/wireless/ath/ath6kl/hif.c b/drivers/net/wireless/ath/ath6kl/hif.c
index 57c9aff..7cc6cec 100644
--- a/drivers/net/wireless/ath/ath6kl/hif.c
+++ b/drivers/net/wireless/ath/ath6kl/hif.c
@@ -51,7 +51,7 @@ int ath6kl_hif_rw_comp_handler(void *context, int status)
{
struct htc_packet *packet = context;
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"ath6kl_hif_rw_comp_handler (pkt:0x%p , status: %d\n",
packet, status);
@@ -119,7 +119,7 @@ int ath6kl_hif_poll_mboxmsg_rx(struct ath6kl_device *dev, u32 *lk_ahd,
/* delay a little */
mdelay(ATH6KL_TIME_QUANTUM);
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV, "retry mbox poll : %d\n", i);
+ ath6kl_dbg(ATH6KL_DBG_HTC, "retry mbox poll : %d\n", i);
}
if (i == 0) {
@@ -186,7 +186,7 @@ int ath6kl_hif_submit_scat_req(struct ath6kl_device *dev,
dev->ar->mbox_info.htc_addr;
}
- ath6kl_dbg((ATH6KL_DBG_HTC_RECV | ATH6KL_DBG_HTC_SEND),
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"ath6kl_hif_submit_scat_req, entries: %d, total len: %d mbox:0x%X (mode: %s : %s)\n",
scat_req->scat_entries, scat_req->len,
scat_req->addr, !read ? "async" : "sync",
diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c
index 9b8cb22..241a7ce 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.c
+++ b/drivers/net/wireless/ath/ath6kl/htc.c
@@ -102,7 +102,7 @@ static void htc_tx_comp_update(struct htc_target *target,
packet->info.tx.cred_used;
endpoint->cred_dist.txq_depth = get_queue_depth(&endpoint->txq);
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
target->cred_dist_cntxt, &target->cred_dist_list);
ath6k_credit_distribute(target->cred_dist_cntxt,
@@ -118,7 +118,7 @@ static void htc_tx_complete(struct htc_endpoint *endpoint,
if (list_empty(txq))
return;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"send complete ep %d, (%d pkts)\n",
endpoint->eid, get_queue_depth(txq));
@@ -148,7 +148,7 @@ static void htc_async_tx_scat_complete(struct htc_target *target,
INIT_LIST_HEAD(&tx_compq);
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc_async_tx_scat_complete total len: %d entries: %d\n",
scat_req->len, scat_req->scat_entries);
@@ -190,12 +190,12 @@ static int ath6kl_htc_tx_issue(struct htc_target *target,
send_len = packet->act_len + HTC_HDR_LENGTH;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "%s: transmit len : %d (%s)\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "%s: transmit len : %d (%s)\n",
__func__, send_len, sync ? "sync" : "async");
padded_len = CALC_TXRX_PADDED_LEN(target, send_len);
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"DevSendPacket, padded len: %d mbox:0x%X (mode:%s)\n",
padded_len,
target->dev->ar->mbox_info.htc_addr,
@@ -227,7 +227,7 @@ static int htc_check_credits(struct htc_target *target,
*req_cred = (len > target->tgt_cred_sz) ?
DIV_ROUND_UP(len, target->tgt_cred_sz) : 1;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "creds required:%d got:%d\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "creds required:%d got:%d\n",
*req_cred, ep->cred_dist.credits);
if (ep->cred_dist.credits < *req_cred) {
@@ -237,7 +237,7 @@ static int htc_check_credits(struct htc_target *target,
/* Seek more credits */
ep->cred_dist.seek_cred = *req_cred - ep->cred_dist.credits;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
target->cred_dist_cntxt, &ep->cred_dist);
ath6k_seek_credits(target->cred_dist_cntxt, &ep->cred_dist);
@@ -245,7 +245,7 @@ static int htc_check_credits(struct htc_target *target,
ep->cred_dist.seek_cred = 0;
if (ep->cred_dist.credits < *req_cred) {
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"not enough credits for ep %d - leaving packet in queue\n",
eid);
return -EINVAL;
@@ -260,7 +260,7 @@ static int htc_check_credits(struct htc_target *target,
ep->cred_dist.seek_cred =
ep->cred_dist.cred_per_msg - ep->cred_dist.credits;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
target->cred_dist_cntxt, &ep->cred_dist);
ath6k_seek_credits(target->cred_dist_cntxt, &ep->cred_dist);
@@ -270,7 +270,7 @@ static int htc_check_credits(struct htc_target *target,
/* tell the target we need credits ASAP! */
*flags |= HTC_FLAGS_NEED_CREDIT_UPDATE;
ep->ep_st.cred_low_indicate += 1;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "host needs credits\n");
+ ath6kl_dbg(ATH6KL_DBG_HTC, "host needs credits\n");
}
}
@@ -295,7 +295,7 @@ static void ath6kl_htc_tx_pkts_get(struct htc_target *target,
packet = list_first_entry(&endpoint->txq, struct htc_packet,
list);
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"got head pkt:0x%p , queue depth: %d\n",
packet, get_queue_depth(&endpoint->txq));
@@ -404,7 +404,7 @@ static int ath6kl_htc_tx_setup_scat_list(struct htc_target *target,
scat_req->len += len;
scat_req->scat_entries++;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"%d, adding pkt : 0x%p len:%d (remaining space:%d)\n",
i, packet, len, rem_scat);
}
@@ -455,12 +455,12 @@ static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
if (!scat_req) {
/* no scatter resources */
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"no more scatter resources\n");
break;
}
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "pkts to scatter: %d\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "pkts to scatter: %d\n",
n_scat);
scat_req->len = 0;
@@ -479,7 +479,7 @@ static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
n_sent_bundle++;
tot_pkts_bundle += scat_req->scat_entries;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"send scatter total bytes: %d , entries: %d\n",
scat_req->len, scat_req->scat_entries);
ath6kl_hif_submit_scat_req(target->dev, scat_req, false);
@@ -490,7 +490,7 @@ static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
*sent_bundle = n_sent_bundle;
*n_bundle_pkts = tot_pkts_bundle;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "%s (sent:%d)\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "%s (sent:%d)\n",
__func__, n_sent_bundle);
return;
@@ -510,7 +510,7 @@ static void ath6kl_htc_tx_from_queue(struct htc_target *target,
if (endpoint->tx_proc_cnt > 1) {
endpoint->tx_proc_cnt--;
spin_unlock_bh(&target->tx_lock);
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "htc_try_send (busy)\n");
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc_try_send (busy)\n");
return;
}
@@ -588,13 +588,13 @@ static bool ath6kl_htc_tx_try(struct htc_target *target,
overflow = true;
if (overflow)
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"ep %d, tx queue will overflow :%d , tx depth:%d, max:%d\n",
endpoint->eid, overflow, txq_depth,
endpoint->max_txq_depth);
if (overflow && ep_cb.tx_full) {
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"indicating overflowed tx packet: 0x%p\n", tx_pkt);
if (ep_cb.tx_full(endpoint->target, tx_pkt) ==
@@ -629,7 +629,7 @@ static void htc_chk_ep_txq(struct htc_target *target)
spin_lock_bh(&target->tx_lock);
if (!list_empty(&endpoint->txq)) {
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"ep %d has %d credits and %d packets in tx queue\n",
cred_dist->endpoint,
endpoint->cred_dist.credits,
@@ -736,7 +736,7 @@ int ath6kl_htc_tx(struct htc_target *target, struct htc_packet *packet)
struct htc_endpoint *endpoint;
struct list_head queue;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc_tx: ep id: %d, buf: 0x%p, len: %d\n",
packet->endpoint, packet->buf, packet->act_len);
@@ -787,7 +787,7 @@ void ath6kl_htc_flush_txep(struct htc_target *target,
list_for_each_entry_safe(packet, tmp_pkt, &discard_q, list) {
packet->status = -ECANCELED;
list_del(&packet->list);
- ath6kl_dbg(ATH6KL_DBG_TRC,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"flushing tx pkt:0x%p, len:%d, ep:%d tag:0x%X\n",
packet, packet->act_len,
packet->endpoint, packet->info.tx.tag);
@@ -844,7 +844,7 @@ void ath6kl_htc_indicate_activity_change(struct htc_target *target,
endpoint->cred_dist.txq_depth =
get_queue_depth(&endpoint->txq);
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
target->cred_dist_cntxt, &target->cred_dist_list);
ath6k_credit_distribute(target->cred_dist_cntxt,
@@ -924,7 +924,7 @@ static int ath6kl_htc_rx_packet(struct htc_target *target,
return -ENOMEM;
}
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"dev_rx_pkt (0x%p : hdr:0x%X) padded len: %d mbox:0x%X (mode:%s)\n",
packet, packet->info.rx.exp_hdr,
padded_len, dev->ar->mbox_info.htc_addr, "sync");
@@ -1137,7 +1137,7 @@ static int ath6kl_htc_rx_alloc(struct htc_target *target,
}
endpoint->ep_st.rx_bundle_from_hdr += 1;
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc hdr indicates :%d msg can be fetched as a bundle\n",
n_msg);
} else
@@ -1209,7 +1209,7 @@ static void htc_proc_cred_rpt(struct htc_target *target,
int tot_credits = 0, i;
bool dist = false;
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc_proc_cred_rpt, credit report entries:%d\n", n_entries);
spin_lock_bh(&target->tx_lock);
@@ -1223,7 +1223,7 @@ static void htc_proc_cred_rpt(struct htc_target *target,
endpoint = &target->endpoint[rpt->eid];
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, " ep %d got %d credits\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, " ep %d got %d credits\n",
rpt->eid, rpt->credits);
endpoint->ep_st.tx_cred_rpt += 1;
@@ -1264,7 +1264,7 @@ static void htc_proc_cred_rpt(struct htc_target *target,
tot_credits += rpt->credits;
}
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"report indicated %d credits to distribute\n",
tot_credits);
@@ -1273,7 +1273,7 @@ static void htc_proc_cred_rpt(struct htc_target *target,
* This was a credit return based on a completed send
* operations note, this is done with the lock held
*/
- ath6kl_dbg(ATH6KL_DBG_HTC_SEND, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
target->cred_dist_cntxt, &target->cred_dist_list);
ath6k_credit_distribute(target->cred_dist_cntxt,
@@ -1320,7 +1320,7 @@ static int htc_parse_trailer(struct htc_target *target,
if ((lk_ahd->pre_valid == ((~lk_ahd->post_valid) & 0xFF))
&& next_lk_ahds) {
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"lk_ahd report found (pre valid:0x%X, post valid:0x%X)\n",
lk_ahd->pre_valid, lk_ahd->post_valid);
@@ -1378,7 +1378,7 @@ static int htc_proc_trailer(struct htc_target *target,
u8 *record_buf;
u8 *orig_buf;
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV, "+htc_proc_trailer (len:%d)\n", len);
+ ath6kl_dbg(ATH6KL_DBG_HTC, "+htc_proc_trailer (len:%d)\n", len);
ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Recv Trailer", "",
buf, len);
@@ -1534,7 +1534,7 @@ fail_rx:
static void ath6kl_htc_rx_complete(struct htc_endpoint *endpoint,
struct htc_packet *packet)
{
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc calling ep %d recv callback on packet 0x%p\n",
endpoint->eid, packet);
endpoint->ep_cb.rx(endpoint->target, packet);
@@ -1571,7 +1571,7 @@ static int ath6kl_htc_rx_bundle(struct htc_target *target,
len = 0;
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"%s(): (numpackets: %d , actual : %d)\n",
__func__, get_queue_depth(rxq), n_scat_pkt);
@@ -1897,7 +1897,7 @@ static struct htc_packet *htc_wait_for_ctrl_msg(struct htc_target *target)
HTC_TARGET_RESPONSE_TIMEOUT))
return NULL;
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc_wait_for_ctrl_msg: look_ahead : 0x%X\n", look_ahead);
htc_hdr = (struct htc_frame_hdr *)&look_ahead;
@@ -1962,7 +1962,7 @@ int ath6kl_htc_add_rxbuf_multiple(struct htc_target *target,
depth = get_queue_depth(pkt_queue);
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc_add_rxbuf_multiple: ep id: %d, cnt:%d, len: %d\n",
first_pkt->endpoint, depth, first_pkt->buf_len);
@@ -1988,7 +1988,7 @@ int ath6kl_htc_add_rxbuf_multiple(struct htc_target *target,
/* check if we are blocked waiting for a new buffer */
if (target->rx_st_flags & HTC_RECV_WAIT_BUFFERS) {
if (target->ep_waiting == first_pkt->endpoint) {
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"receiver was blocked on ep:%d, unblocking.\n",
target->ep_waiting);
target->rx_st_flags &= ~HTC_RECV_WAIT_BUFFERS;
@@ -2023,7 +2023,7 @@ void ath6kl_htc_flush_rx_buf(struct htc_target *target)
&endpoint->rx_bufq, list) {
list_del(&packet->list);
spin_unlock_bh(&target->rx_lock);
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"flushing rx pkt:0x%p, len:%d, ep:%d\n",
packet, packet->buf_len,
packet->endpoint);
@@ -2047,7 +2047,7 @@ int ath6kl_htc_conn_service(struct htc_target *target,
unsigned int max_msg_sz = 0;
int status = 0;
- ath6kl_dbg(ATH6KL_DBG_TRC,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc_conn_service, target:0x%p service id:0x%X\n",
target, conn_req->svc_id);
@@ -2220,7 +2220,7 @@ static void htc_setup_msg_bndl(struct htc_target *target)
target->msg_per_bndl_max = min(target->max_scat_entries,
target->msg_per_bndl_max);
- ath6kl_dbg(ATH6KL_DBG_TRC,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"htc bundling allowed. max msg per htc bundle: %d\n",
target->msg_per_bndl_max);
@@ -2230,7 +2230,7 @@ static void htc_setup_msg_bndl(struct htc_target *target)
target->max_tx_bndl_sz = min(HIF_MBOX0_EXT_WIDTH,
target->max_xfer_szper_scatreq);
- ath6kl_dbg(ATH6KL_DBG_ANY, "max recv: %d max send: %d\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "max recv: %d max send: %d\n",
target->max_rx_bndl_sz, target->max_tx_bndl_sz);
if (target->max_tx_bndl_sz)
@@ -2284,7 +2284,7 @@ int ath6kl_htc_wait_target(struct htc_target *target)
target->tgt_creds = le16_to_cpu(rdy_msg->ver2_0_info.cred_cnt);
target->tgt_cred_sz = le16_to_cpu(rdy_msg->ver2_0_info.cred_sz);
- ath6kl_dbg(ATH6KL_DBG_HTC_RECV,
+ ath6kl_dbg(ATH6KL_DBG_HTC,
"target ready: credits: %d credit size: %d\n",
target->tgt_creds, target->tgt_cred_sz);
@@ -2299,7 +2299,7 @@ int ath6kl_htc_wait_target(struct htc_target *target)
target->msg_per_bndl_max = 0;
}
- ath6kl_dbg(ATH6KL_DBG_TRC, "using htc protocol version : %s (%d)\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "using htc protocol version : %s (%d)\n",
(target->htc_tgt_ver == HTC_VERSION_2P0) ? "2.0" : ">= 2.1",
target->htc_tgt_ver);
^ permalink raw reply related
* [PATCH 2/4] ath6kl: cleanup htc debug messages
From: Kalle Valo @ 2011-10-13 12:21 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless
In-Reply-To: <20111013122115.30551.94.stgit@localhost6.localdomain6>
Unify debug message format and other minor changes.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/htc.c | 138 ++++++++++++++++-----------------
1 files changed, 67 insertions(+), 71 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c
index 241a7ce..840f1b3 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.c
+++ b/drivers/net/wireless/ath/ath6kl/htc.c
@@ -102,7 +102,7 @@ static void htc_tx_comp_update(struct htc_target *target,
packet->info.tx.cred_used;
endpoint->cred_dist.txq_depth = get_queue_depth(&endpoint->txq);
- ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc tx ctxt 0x%p dist 0x%p\n",
target->cred_dist_cntxt, &target->cred_dist_list);
ath6k_credit_distribute(target->cred_dist_cntxt,
@@ -119,7 +119,7 @@ static void htc_tx_complete(struct htc_endpoint *endpoint,
return;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "send complete ep %d, (%d pkts)\n",
+ "htc tx complete ep %d pkts %d\n",
endpoint->eid, get_queue_depth(txq));
ath6kl_tx_complete(endpoint->target->dev->ar, txq);
@@ -149,7 +149,7 @@ static void htc_async_tx_scat_complete(struct htc_target *target,
INIT_LIST_HEAD(&tx_compq);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc_async_tx_scat_complete total len: %d entries: %d\n",
+ "htc tx scat complete len %d entries %d\n",
scat_req->len, scat_req->scat_entries);
if (scat_req->status)
@@ -190,16 +190,13 @@ static int ath6kl_htc_tx_issue(struct htc_target *target,
send_len = packet->act_len + HTC_HDR_LENGTH;
- ath6kl_dbg(ATH6KL_DBG_HTC, "%s: transmit len : %d (%s)\n",
- __func__, send_len, sync ? "sync" : "async");
-
padded_len = CALC_TXRX_PADDED_LEN(target, send_len);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "DevSendPacket, padded len: %d mbox:0x%X (mode:%s)\n",
- padded_len,
- target->dev->ar->mbox_info.htc_addr,
- sync ? "sync" : "async");
+ "htc tx issue len %d padded_len %d mbox 0x%X %s\n",
+ send_len, padded_len,
+ target->dev->ar->mbox_info.htc_addr,
+ sync ? "sync" : "async");
if (sync) {
status = hif_read_write_sync(target->dev->ar,
@@ -227,7 +224,7 @@ static int htc_check_credits(struct htc_target *target,
*req_cred = (len > target->tgt_cred_sz) ?
DIV_ROUND_UP(len, target->tgt_cred_sz) : 1;
- ath6kl_dbg(ATH6KL_DBG_HTC, "creds required:%d got:%d\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc creds required %d got %d\n",
*req_cred, ep->cred_dist.credits);
if (ep->cred_dist.credits < *req_cred) {
@@ -237,7 +234,7 @@ static int htc_check_credits(struct htc_target *target,
/* Seek more credits */
ep->cred_dist.seek_cred = *req_cred - ep->cred_dist.credits;
- ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc creds ctxt 0x%p dist 0x%p\n",
target->cred_dist_cntxt, &ep->cred_dist);
ath6k_seek_credits(target->cred_dist_cntxt, &ep->cred_dist);
@@ -246,7 +243,7 @@ static int htc_check_credits(struct htc_target *target,
if (ep->cred_dist.credits < *req_cred) {
ath6kl_dbg(ATH6KL_DBG_HTC,
- "not enough credits for ep %d - leaving packet in queue\n",
+ "htc creds not enough credits for ep %d\n",
eid);
return -EINVAL;
}
@@ -260,7 +257,7 @@ static int htc_check_credits(struct htc_target *target,
ep->cred_dist.seek_cred =
ep->cred_dist.cred_per_msg - ep->cred_dist.credits;
- ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc creds ctxt 0x%p dist 0x%p\n",
target->cred_dist_cntxt, &ep->cred_dist);
ath6k_seek_credits(target->cred_dist_cntxt, &ep->cred_dist);
@@ -270,7 +267,7 @@ static int htc_check_credits(struct htc_target *target,
/* tell the target we need credits ASAP! */
*flags |= HTC_FLAGS_NEED_CREDIT_UPDATE;
ep->ep_st.cred_low_indicate += 1;
- ath6kl_dbg(ATH6KL_DBG_HTC, "host needs credits\n");
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc creds host needs credits\n");
}
}
@@ -296,7 +293,7 @@ static void ath6kl_htc_tx_pkts_get(struct htc_target *target,
list);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "got head pkt:0x%p , queue depth: %d\n",
+ "htc tx got packet 0x%p queue depth %d\n",
packet, get_queue_depth(&endpoint->txq));
len = CALC_TXRX_PADDED_LEN(target,
@@ -405,7 +402,7 @@ static int ath6kl_htc_tx_setup_scat_list(struct htc_target *target,
scat_req->len += len;
scat_req->scat_entries++;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "%d, adding pkt : 0x%p len:%d (remaining space:%d)\n",
+ "htc tx adding (%d) pkt 0x%p len %d remaining %d\n",
i, packet, len, rem_scat);
}
@@ -456,11 +453,11 @@ static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
if (!scat_req) {
/* no scatter resources */
ath6kl_dbg(ATH6KL_DBG_HTC,
- "no more scatter resources\n");
+ "htc tx no more scatter resources\n");
break;
}
- ath6kl_dbg(ATH6KL_DBG_HTC, "pkts to scatter: %d\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc tx pkts to scatter: %d\n",
n_scat);
scat_req->len = 0;
@@ -480,7 +477,7 @@ static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
tot_pkts_bundle += scat_req->scat_entries;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "send scatter total bytes: %d , entries: %d\n",
+ "htc tx scatter bytes %d entries %d\n",
scat_req->len, scat_req->scat_entries);
ath6kl_hif_submit_scat_req(target->dev, scat_req, false);
@@ -490,8 +487,8 @@ static void ath6kl_htc_tx_bundle(struct htc_endpoint *endpoint,
*sent_bundle = n_sent_bundle;
*n_bundle_pkts = tot_pkts_bundle;
- ath6kl_dbg(ATH6KL_DBG_HTC, "%s (sent:%d)\n",
- __func__, n_sent_bundle);
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc tx bundle sent %d pkts\n",
+ n_sent_bundle);
return;
}
@@ -510,7 +507,7 @@ static void ath6kl_htc_tx_from_queue(struct htc_target *target,
if (endpoint->tx_proc_cnt > 1) {
endpoint->tx_proc_cnt--;
spin_unlock_bh(&target->tx_lock);
- ath6kl_dbg(ATH6KL_DBG_HTC, "htc_try_send (busy)\n");
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc tx busy\n");
return;
}
@@ -589,14 +586,11 @@ static bool ath6kl_htc_tx_try(struct htc_target *target,
if (overflow)
ath6kl_dbg(ATH6KL_DBG_HTC,
- "ep %d, tx queue will overflow :%d , tx depth:%d, max:%d\n",
- endpoint->eid, overflow, txq_depth,
+ "htc tx overflow ep %d depth %d max %d\n",
+ endpoint->eid, txq_depth,
endpoint->max_txq_depth);
if (overflow && ep_cb.tx_full) {
- ath6kl_dbg(ATH6KL_DBG_HTC,
- "indicating overflowed tx packet: 0x%p\n", tx_pkt);
-
if (ep_cb.tx_full(endpoint->target, tx_pkt) ==
HTC_SEND_FULL_DROP) {
endpoint->ep_st.tx_dropped += 1;
@@ -630,7 +624,7 @@ static void htc_chk_ep_txq(struct htc_target *target)
spin_lock_bh(&target->tx_lock);
if (!list_empty(&endpoint->txq)) {
ath6kl_dbg(ATH6KL_DBG_HTC,
- "ep %d has %d credits and %d packets in tx queue\n",
+ "htc creds ep %d credits %d pkts %d\n",
cred_dist->endpoint,
endpoint->cred_dist.credits,
get_queue_depth(&endpoint->txq));
@@ -737,7 +731,7 @@ int ath6kl_htc_tx(struct htc_target *target, struct htc_packet *packet)
struct list_head queue;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc_tx: ep id: %d, buf: 0x%p, len: %d\n",
+ "htc tx ep id %d buf 0x%p len %d\n",
packet->endpoint, packet->buf, packet->act_len);
if (packet->endpoint >= ENDPOINT_MAX) {
@@ -788,7 +782,7 @@ void ath6kl_htc_flush_txep(struct htc_target *target,
packet->status = -ECANCELED;
list_del(&packet->list);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "flushing tx pkt:0x%p, len:%d, ep:%d tag:0x%X\n",
+ "htc tx flushing pkt 0x%p len %d ep %d tag 0x%x\n",
packet, packet->act_len,
packet->endpoint, packet->info.tx.tag);
@@ -844,7 +838,8 @@ void ath6kl_htc_indicate_activity_change(struct htc_target *target,
endpoint->cred_dist.txq_depth =
get_queue_depth(&endpoint->txq);
- ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC,
+ "htc tx activity ctxt 0x%p dist 0x%p\n",
target->cred_dist_cntxt, &target->cred_dist_list);
ath6k_credit_distribute(target->cred_dist_cntxt,
@@ -919,15 +914,15 @@ static int ath6kl_htc_rx_packet(struct htc_target *target,
padded_len = CALC_TXRX_PADDED_LEN(target, rx_len);
if (padded_len > packet->buf_len) {
- ath6kl_err("not enough receive space for packet - padlen:%d recvlen:%d bufferlen:%d\n",
+ ath6kl_err("not enough receive space for packet - padlen %d recvlen %d bufferlen %d\n",
padded_len, rx_len, packet->buf_len);
return -ENOMEM;
}
ath6kl_dbg(ATH6KL_DBG_HTC,
- "dev_rx_pkt (0x%p : hdr:0x%X) padded len: %d mbox:0x%X (mode:%s)\n",
+ "htc rx 0x%p hdr x%x len %d mbox 0x%x\n",
packet, packet->info.rx.exp_hdr,
- padded_len, dev->ar->mbox_info.htc_addr, "sync");
+ padded_len, dev->ar->mbox_info.htc_addr);
status = hif_read_write_sync(dev->ar,
dev->ar->mbox_info.htc_addr,
@@ -1138,7 +1133,7 @@ static int ath6kl_htc_rx_alloc(struct htc_target *target,
endpoint->ep_st.rx_bundle_from_hdr += 1;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc hdr indicates :%d msg can be fetched as a bundle\n",
+ "htc rx bundle pkts %d\n",
n_msg);
} else
/* HTC header only indicates 1 message to fetch */
@@ -1191,8 +1186,8 @@ static void htc_ctrl_rx(struct htc_target *context, struct htc_packet *packets)
ath6kl_err("htc_ctrl_rx, got message with len:%zu\n",
packets->act_len + HTC_HDR_LENGTH);
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES,
- "Unexpected ENDPOINT 0 Message", "",
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC,
+ "htc rx unexpected endpoint 0 message", "",
packets->buf - HTC_HDR_LENGTH,
packets->act_len + HTC_HDR_LENGTH);
}
@@ -1210,7 +1205,7 @@ static void htc_proc_cred_rpt(struct htc_target *target,
bool dist = false;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc_proc_cred_rpt, credit report entries:%d\n", n_entries);
+ "htc creds report entries %d\n", n_entries);
spin_lock_bh(&target->tx_lock);
@@ -1223,8 +1218,9 @@ static void htc_proc_cred_rpt(struct htc_target *target,
endpoint = &target->endpoint[rpt->eid];
- ath6kl_dbg(ATH6KL_DBG_HTC, " ep %d got %d credits\n",
- rpt->eid, rpt->credits);
+ ath6kl_dbg(ATH6KL_DBG_HTC,
+ "htc creds report ep %d credits %d\n",
+ rpt->eid, rpt->credits);
endpoint->ep_st.tx_cred_rpt += 1;
endpoint->ep_st.cred_retnd += rpt->credits;
@@ -1265,7 +1261,7 @@ static void htc_proc_cred_rpt(struct htc_target *target,
}
ath6kl_dbg(ATH6KL_DBG_HTC,
- "report indicated %d credits to distribute\n",
+ "htc creds report tot_credits %d\n",
tot_credits);
if (dist) {
@@ -1273,7 +1269,7 @@ static void htc_proc_cred_rpt(struct htc_target *target,
* This was a credit return based on a completed send
* operations note, this is done with the lock held
*/
- ath6kl_dbg(ATH6KL_DBG_HTC, "ctxt:0x%p dist:0x%p\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc creds ctxt 0x%p dist 0x%p\n",
target->cred_dist_cntxt, &target->cred_dist_list);
ath6k_credit_distribute(target->cred_dist_cntxt,
@@ -1321,13 +1317,14 @@ static int htc_parse_trailer(struct htc_target *target,
&& next_lk_ahds) {
ath6kl_dbg(ATH6KL_DBG_HTC,
- "lk_ahd report found (pre valid:0x%X, post valid:0x%X)\n",
+ "htc rx lk_ahd found pre_valid 0x%x post_valid 0x%x\n",
lk_ahd->pre_valid, lk_ahd->post_valid);
/* look ahead bytes are valid, copy them over */
memcpy((u8 *)&next_lk_ahds[0], lk_ahd->lk_ahd, 4);
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Next Look Ahead",
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC,
+ "htc rx next look ahead",
"", next_lk_ahds, 4);
*n_lk_ahds = 1;
@@ -1346,7 +1343,7 @@ static int htc_parse_trailer(struct htc_target *target,
bundle_lkahd_rpt =
(struct htc_bundle_lkahd_rpt *) record_buf;
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Bundle lk_ahd",
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx bundle lk_ahd",
"", record_buf, record->len);
for (i = 0; i < len; i++) {
@@ -1378,10 +1375,8 @@ static int htc_proc_trailer(struct htc_target *target,
u8 *record_buf;
u8 *orig_buf;
- ath6kl_dbg(ATH6KL_DBG_HTC, "+htc_proc_trailer (len:%d)\n", len);
-
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Recv Trailer", "",
- buf, len);
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc rx trailer len %d\n", len);
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC, NULL, "", buf, len);
orig_buf = buf;
orig_len = len;
@@ -1418,7 +1413,7 @@ static int htc_proc_trailer(struct htc_target *target,
}
if (status)
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "BAD Recv Trailer",
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx bad trailer",
"", orig_buf, orig_len);
return status;
@@ -1436,7 +1431,8 @@ static int ath6kl_htc_rx_process_hdr(struct htc_target *target,
if (n_lkahds != NULL)
*n_lkahds = 0;
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "HTC Recv PKT", "htc ",
+ /* FIXME: is this needed? */
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx", "htc rx",
packet->buf, packet->act_len);
/*
@@ -1480,9 +1476,9 @@ static int ath6kl_htc_rx_process_hdr(struct htc_target *target,
if (lk_ahd != packet->info.rx.exp_hdr) {
ath6kl_err("%s(): lk_ahd mismatch! (pPkt:0x%p flags:0x%X)\n",
__func__, packet, packet->info.rx.rx_flags);
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Expected Message lk_ahd",
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx expected lk_ahd",
"", &packet->info.rx.exp_hdr, 4);
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "Current Frame Header",
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx current header",
"", (u8 *)&lk_ahd, sizeof(lk_ahd));
status = -ENOMEM;
goto fail_rx;
@@ -1518,13 +1514,13 @@ static int ath6kl_htc_rx_process_hdr(struct htc_target *target,
fail_rx:
if (status)
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES, "BAD HTC Recv PKT",
- "", packet->buf,
- packet->act_len < 256 ? packet->act_len : 256);
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx bad packet",
+ "", packet->buf, packet->act_len);
else {
+ /* FIXME: is this needed? */
if (packet->act_len > 0)
- ath6kl_dbg_dump(ATH6KL_DBG_RAW_BYTES,
- "HTC - Application Msg", "",
+ ath6kl_dbg_dump(ATH6KL_DBG_HTC,
+ "htc rx application message", "",
packet->buf, packet->act_len);
}
@@ -1535,7 +1531,7 @@ static void ath6kl_htc_rx_complete(struct htc_endpoint *endpoint,
struct htc_packet *packet)
{
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc calling ep %d recv callback on packet 0x%p\n",
+ "htc rx complete ep %d packet 0x%p\n",
endpoint->eid, packet);
endpoint->ep_cb.rx(endpoint->target, packet);
}
@@ -1572,8 +1568,8 @@ static int ath6kl_htc_rx_bundle(struct htc_target *target,
len = 0;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "%s(): (numpackets: %d , actual : %d)\n",
- __func__, get_queue_depth(rxq), n_scat_pkt);
+ "htc rx bundle depth %d pkts %d\n",
+ get_queue_depth(rxq), n_scat_pkt);
scat_req = hif_scatter_req_get(target->dev->ar);
@@ -1898,7 +1894,7 @@ static struct htc_packet *htc_wait_for_ctrl_msg(struct htc_target *target)
return NULL;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc_wait_for_ctrl_msg: look_ahead : 0x%X\n", look_ahead);
+ "htc rx wait ctrl look_ahead 0x%X\n", look_ahead);
htc_hdr = (struct htc_frame_hdr *)&look_ahead;
@@ -1963,7 +1959,7 @@ int ath6kl_htc_add_rxbuf_multiple(struct htc_target *target,
depth = get_queue_depth(pkt_queue);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc_add_rxbuf_multiple: ep id: %d, cnt:%d, len: %d\n",
+ "htc rx add multiple ep id %d cnt %d len %d\n",
first_pkt->endpoint, depth, first_pkt->buf_len);
endpoint = &target->endpoint[first_pkt->endpoint];
@@ -1989,7 +1985,7 @@ int ath6kl_htc_add_rxbuf_multiple(struct htc_target *target,
if (target->rx_st_flags & HTC_RECV_WAIT_BUFFERS) {
if (target->ep_waiting == first_pkt->endpoint) {
ath6kl_dbg(ATH6KL_DBG_HTC,
- "receiver was blocked on ep:%d, unblocking.\n",
+ "htc rx blocked on ep %d, unblocking\n",
target->ep_waiting);
target->rx_st_flags &= ~HTC_RECV_WAIT_BUFFERS;
target->ep_waiting = ENDPOINT_MAX;
@@ -2024,7 +2020,7 @@ void ath6kl_htc_flush_rx_buf(struct htc_target *target)
list_del(&packet->list);
spin_unlock_bh(&target->rx_lock);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "flushing rx pkt:0x%p, len:%d, ep:%d\n",
+ "htc rx flush pkt 0x%p len %d ep %d\n",
packet, packet->buf_len,
packet->endpoint);
dev_kfree_skb(packet->pkt_cntxt);
@@ -2048,7 +2044,7 @@ int ath6kl_htc_conn_service(struct htc_target *target,
int status = 0;
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc_conn_service, target:0x%p service id:0x%X\n",
+ "htc connect service target 0x%p service id 0x%x\n",
target, conn_req->svc_id);
if (conn_req->svc_id == HTC_CTRL_RSVD_SVC) {
@@ -2221,7 +2217,7 @@ static void htc_setup_msg_bndl(struct htc_target *target)
target->msg_per_bndl_max);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "htc bundling allowed. max msg per htc bundle: %d\n",
+ "htc bundling allowed msg_per_bndl_max %d\n",
target->msg_per_bndl_max);
/* Max rx bundle size is limited by the max tx bundle size */
@@ -2230,7 +2226,7 @@ static void htc_setup_msg_bndl(struct htc_target *target)
target->max_tx_bndl_sz = min(HIF_MBOX0_EXT_WIDTH,
target->max_xfer_szper_scatreq);
- ath6kl_dbg(ATH6KL_DBG_HTC, "max recv: %d max send: %d\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc max_rx_bndl_sz %d max_tx_bndl_sz %d\n",
target->max_rx_bndl_sz, target->max_tx_bndl_sz);
if (target->max_tx_bndl_sz)
@@ -2285,7 +2281,7 @@ int ath6kl_htc_wait_target(struct htc_target *target)
target->tgt_cred_sz = le16_to_cpu(rdy_msg->ver2_0_info.cred_sz);
ath6kl_dbg(ATH6KL_DBG_HTC,
- "target ready: credits: %d credit size: %d\n",
+ "htc target ready credits %d size %d\n",
target->tgt_creds, target->tgt_cred_sz);
/* check if this is an extended ready message */
@@ -2299,7 +2295,7 @@ int ath6kl_htc_wait_target(struct htc_target *target)
target->msg_per_bndl_max = 0;
}
- ath6kl_dbg(ATH6KL_DBG_HTC, "using htc protocol version : %s (%d)\n",
+ ath6kl_dbg(ATH6KL_DBG_HTC, "htc using protocol %s (%d)\n",
(target->htc_tgt_ver == HTC_VERSION_2P0) ? "2.0" : ">= 2.1",
target->htc_tgt_ver);
^ permalink raw reply related
* [PATCH 3/4] ath6kl: don't dump full htc packets
From: Kalle Valo @ 2011-10-13 12:21 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless
In-Reply-To: <20111013122115.30551.94.stgit@localhost6.localdomain6>
It's currently possible to dump full sdio packets, so dumping htc packets
is not strictly needed. So remove it, we can always add it back if
there ever comes a need for that.
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/htc.c | 11 -----------
1 files changed, 0 insertions(+), 11 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/htc.c b/drivers/net/wireless/ath/ath6kl/htc.c
index 840f1b3..3cd3ef5 100644
--- a/drivers/net/wireless/ath/ath6kl/htc.c
+++ b/drivers/net/wireless/ath/ath6kl/htc.c
@@ -1431,10 +1431,6 @@ static int ath6kl_htc_rx_process_hdr(struct htc_target *target,
if (n_lkahds != NULL)
*n_lkahds = 0;
- /* FIXME: is this needed? */
- ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx", "htc rx",
- packet->buf, packet->act_len);
-
/*
* NOTE: we cannot assume the alignment of buf, so we use the safe
* macros to retrieve 16 bit fields.
@@ -1516,13 +1512,6 @@ fail_rx:
if (status)
ath6kl_dbg_dump(ATH6KL_DBG_HTC, "htc rx bad packet",
"", packet->buf, packet->act_len);
- else {
- /* FIXME: is this needed? */
- if (packet->act_len > 0)
- ath6kl_dbg_dump(ATH6KL_DBG_HTC,
- "htc rx application message", "",
- packet->buf, packet->act_len);
- }
return status;
}
^ permalink raw reply related
* [PATCH 4/4] ath6kl: add debug level for hif
From: Kalle Valo @ 2011-10-13 12:21 UTC (permalink / raw)
To: kvalo; +Cc: linux-wireless
In-Reply-To: <20111013122115.30551.94.stgit@localhost6.localdomain6>
That way we htc level debug messages can be removed from hif files. Also
add few new messages and remove useless debug message about using
synchrous irq processing (we don't support anything else).
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath6kl/debug.h | 2 +-
drivers/net/wireless/ath/ath6kl/hif-ops.h | 18 ++++++++++++++++++
drivers/net/wireless/ath/ath6kl/hif.c | 17 ++++++++---------
3 files changed, 27 insertions(+), 10 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/debug.h b/drivers/net/wireless/ath/ath6kl/debug.h
index 01f4015..cbabc25 100644
--- a/drivers/net/wireless/ath/ath6kl/debug.h
+++ b/drivers/net/wireless/ath/ath6kl/debug.h
@@ -26,7 +26,7 @@ enum ATH6K_DEBUG_MASK {
ATH6KL_DBG_WLAN_RX = BIT(3), /* wlan rx */
ATH6KL_DBG_BMI = BIT(4), /* bmi tracing */
ATH6KL_DBG_HTC = BIT(5),
- /* hole */
+ ATH6KL_DBG_HIF = BIT(6),
ATH6KL_DBG_IRQ = BIT(7), /* interrupt processing */
ATH6KL_DBG_PM = BIT(8), /* power management */
ATH6KL_DBG_WLAN_NODE = BIT(9), /* general wlan node tracing */
diff --git a/drivers/net/wireless/ath/ath6kl/hif-ops.h b/drivers/net/wireless/ath/ath6kl/hif-ops.h
index 21b1575..95e7303 100644
--- a/drivers/net/wireless/ath/ath6kl/hif-ops.h
+++ b/drivers/net/wireless/ath/ath6kl/hif-ops.h
@@ -18,10 +18,16 @@
#define HIF_OPS_H
#include "hif.h"
+#include "debug.h"
static inline int hif_read_write_sync(struct ath6kl *ar, u32 addr, u8 *buf,
u32 len, u32 request)
{
+ ath6kl_dbg(ATH6KL_DBG_HIF,
+ "hif %s sync addr 0x%x buf 0x%p len %d request 0x%x\n",
+ (request & HIF_WRITE) ? "write" : "read",
+ addr, buf, len, request);
+
return ar->hif_ops->read_write_sync(ar, addr, buf, len, request);
}
@@ -29,16 +35,24 @@ static inline int hif_write_async(struct ath6kl *ar, u32 address, u8 *buffer,
u32 length, u32 request,
struct htc_packet *packet)
{
+ ath6kl_dbg(ATH6KL_DBG_HIF,
+ "hif write async addr 0x%x buf 0x%p len %d request 0x%x\n",
+ address, buffer, length, request);
+
return ar->hif_ops->write_async(ar, address, buffer, length,
request, packet);
}
static inline void ath6kl_hif_irq_enable(struct ath6kl *ar)
{
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif irq enable\n");
+
return ar->hif_ops->irq_enable(ar);
}
static inline void ath6kl_hif_irq_disable(struct ath6kl *ar)
{
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif irq disable\n");
+
return ar->hif_ops->irq_disable(ar);
}
@@ -71,11 +85,15 @@ static inline void ath6kl_hif_cleanup_scatter(struct ath6kl *ar)
static inline int ath6kl_hif_suspend(struct ath6kl *ar)
{
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif suspend\n");
+
return ar->hif_ops->suspend(ar);
}
static inline int ath6kl_hif_resume(struct ath6kl *ar)
{
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif resume\n");
+
return ar->hif_ops->resume(ar);
}
#endif
diff --git a/drivers/net/wireless/ath/ath6kl/hif.c b/drivers/net/wireless/ath/ath6kl/hif.c
index 7cc6cec..e2d8088 100644
--- a/drivers/net/wireless/ath/ath6kl/hif.c
+++ b/drivers/net/wireless/ath/ath6kl/hif.c
@@ -51,8 +51,7 @@ int ath6kl_hif_rw_comp_handler(void *context, int status)
{
struct htc_packet *packet = context;
- ath6kl_dbg(ATH6KL_DBG_HTC,
- "ath6kl_hif_rw_comp_handler (pkt:0x%p , status: %d\n",
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif rw completion pkt 0x%p status %d\n",
packet, status);
packet->status = status;
@@ -119,7 +118,7 @@ int ath6kl_hif_poll_mboxmsg_rx(struct ath6kl_device *dev, u32 *lk_ahd,
/* delay a little */
mdelay(ATH6KL_TIME_QUANTUM);
- ath6kl_dbg(ATH6KL_DBG_HTC, "retry mbox poll : %d\n", i);
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif retry mbox poll try %d\n", i);
}
if (i == 0) {
@@ -147,6 +146,9 @@ int ath6kl_hif_rx_control(struct ath6kl_device *dev, bool enable_rx)
struct ath6kl_irq_enable_reg regs;
int status = 0;
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif rx %s\n",
+ enable_rx ? "enable" : "disable");
+
/* take the lock to protect interrupt enable shadows */
spin_lock_bh(&dev->lock);
@@ -186,8 +188,8 @@ int ath6kl_hif_submit_scat_req(struct ath6kl_device *dev,
dev->ar->mbox_info.htc_addr;
}
- ath6kl_dbg(ATH6KL_DBG_HTC,
- "ath6kl_hif_submit_scat_req, entries: %d, total len: %d mbox:0x%X (mode: %s : %s)\n",
+ ath6kl_dbg(ATH6KL_DBG_HIF,
+ "hif submit scatter request entries %d len %d mbox 0x%x %s %s\n",
scat_req->scat_entries, scat_req->len,
scat_req->addr, !read ? "async" : "sync",
(read) ? "rd" : "wr");
@@ -629,12 +631,9 @@ int ath6kl_hif_setup(struct ath6kl_device *dev)
/* assemble mask, used for padding to a block */
dev->htc_cnxt->block_mask = dev->htc_cnxt->block_sz - 1;
- ath6kl_dbg(ATH6KL_DBG_TRC, "block size: %d, mbox addr:0x%X\n",
+ ath6kl_dbg(ATH6KL_DBG_HIF, "hif block size %d mbox addr 0x%x\n",
dev->htc_cnxt->block_sz, dev->ar->mbox_info.htc_addr);
- ath6kl_dbg(ATH6KL_DBG_TRC,
- "hif interrupt processing is sync only\n");
-
status = ath6kl_hif_disable_intrs(dev);
fail_setup:
^ permalink raw reply related
* [PATCH] compat-wireless: adapt moving brcm80211 to main area
From: Hauke Mehrtens @ 2011-10-13 14:16 UTC (permalink / raw)
To: mcgrof, mcgrof; +Cc: linux-wireless, Hauke Mehrtens
brcm80211 is no staging driver any more and can be found in the main
area where all the other wireless drivers are now. There where some
changes needed for the move.
And BRCMFMAC does not depend on WEXT any more so remove that from
config.
BRCMFMAC does not build with kernel < 2.6.29, because
ndev->netdev_ops = NULL and ndev->netdev_ops == &brcmf_netdev_ops_pri
are not supported by the backport code for netdev_ops.
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
Makefile | 1 -
config.mk | 12 +--------
patches/25-multicast-list_head.patch | 32 +++++++++++++-------------
patches/29-sdio_no_suspend.patch | 18 +++++++-------
patches/35-fix-makefile-includes.patch | 26 ++++++++++----------
scripts/admin-update.sh | 8 +++++-
scripts/driver-select | 39 +++++++++++++++++++++----------
7 files changed, 73 insertions(+), 63 deletions(-)
diff --git a/Makefile b/Makefile
index 6fe77b8..d3a9d93 100644
--- a/Makefile
+++ b/Makefile
@@ -37,7 +37,6 @@ obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/bcma/
obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/misc/eeprom/
ifeq ($(CONFIG_STAGING_EXCLUDE_BUILD),)
-obj-$(CONFIG_COMPAT_STAGING) += drivers/staging/brcm80211/
endif
endif
diff --git a/config.mk b/config.mk
index 3463f83..a71de4e 100644
--- a/config.mk
+++ b/config.mk
@@ -396,9 +396,7 @@ CONFIG_RTL8192CE=m
CONFIG_RTL8192SE=m
CONFIG_RTL8192DE=m
-ifdef CONFIG_COMPAT_STAGING
CONFIG_BRCMSMAC=m
-endif #CONFIG_COMPAT_STAGING
endif #CONFIG_PCI
## end of PCI
@@ -572,13 +570,9 @@ CONFIG_ATH6KL=m
# CONFIG_ATH6KL_DEBUG=y
endif #CONFIG_COMPAT_KERNEL_2_6_27
-ifdef CONFIG_COMPAT_STAGING
-ifdef CONFIG_WIRELESS_EXT
-
+ifndef CONFIG_COMPAT_KERNEL_2_6_29
CONFIG_BRCMFMAC=m
-
-endif #CONFIG_WIRELESS_EXT
-endif #CONFIG_COMPAT_STAGING
+endif #CONFIG_COMPAT_KERNEL_2_6_29
endif #CONFIG_MMC
@@ -614,10 +608,8 @@ endif #CONFIG_MAC80211_LEDS
CONFIG_ATH_COMMON=m
# CONFIG_ATH_DEBUG=y
-ifdef CONFIG_COMPAT_STAGING
CONFIG_BRCMUTIL=m
# CONFIG_BRCMDBG=y
-endif #CONFIG_COMPAT_STAGING
ifdef CONFIG_CRC7
CONFIG_WL1251=m
diff --git a/patches/25-multicast-list_head.patch b/patches/25-multicast-list_head.patch
index e3e99e6..25fa450 100644
--- a/patches/25-multicast-list_head.patch
+++ b/patches/25-multicast-list_head.patch
@@ -83,7 +83,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
}
--- a/drivers/net/wireless/adm8211.c
+++ b/drivers/net/wireless/adm8211.c
-@@ -1319,19 +1319,37 @@ static void adm8211_bss_info_changed(str
+@@ -1320,19 +1320,37 @@ static void adm8211_bss_info_changed(str
}
static u64 adm8211_prepare_multicast(struct ieee80211_hw *hw,
@@ -217,7 +217,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
}
--- a/drivers/net/wireless/libertas/main.c
+++ b/drivers/net/wireless/libertas/main.c
-@@ -311,18 +311,34 @@ static int lbs_add_mcast_addrs(struct cm
+@@ -313,18 +313,34 @@ static int lbs_add_mcast_addrs(struct cm
netif_addr_lock_bh(dev);
cnt = netdev_mc_count(dev);
netdev_for_each_mc_addr(ha, dev) {
@@ -254,7 +254,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
}
--- a/drivers/net/wireless/libertas_tf/main.c
+++ b/drivers/net/wireless/libertas_tf/main.c
-@@ -418,20 +418,36 @@ static int lbtf_op_config(struct ieee802
+@@ -419,20 +419,36 @@ static int lbtf_op_config(struct ieee802
}
static u64 lbtf_op_prepare_multicast(struct ieee80211_hw *hw,
@@ -435,7 +435,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
size_t fw_name_len, u32 *hw_ver);
--- a/drivers/net/wireless/p54/main.c
+++ b/drivers/net/wireless/p54/main.c
-@@ -359,11 +359,18 @@ out:
+@@ -360,11 +360,18 @@ out:
return ret;
}
@@ -454,7 +454,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
int i;
BUILD_BUG_ON(ARRAY_SIZE(priv->mc_maclist) !=
-@@ -373,12 +380,23 @@ static u64 p54_prepare_multicast(struct
+@@ -374,12 +381,23 @@ static u64 p54_prepare_multicast(struct
* Otherwise the firmware will drop it and ARP will no longer work.
*/
i = 1;
@@ -494,7 +494,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
--- a/drivers/net/wireless/rtl818x/rtl8180/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180/dev.c
-@@ -813,10 +813,19 @@ static void rtl8180_bss_info_changed(str
+@@ -814,10 +814,19 @@ static void rtl8180_bss_info_changed(str
}
}
@@ -516,7 +516,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
static void rtl8180_configure_filter(struct ieee80211_hw *dev,
--- a/drivers/net/wireless/rtl818x/rtl8187/dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8187/dev.c
-@@ -1204,9 +1204,17 @@ static void rtl8187_bss_info_changed(str
+@@ -1205,9 +1205,17 @@ static void rtl8187_bss_info_changed(str
}
static u64 rtl8187_prepare_multicast(struct ieee80211_hw *dev,
@@ -536,7 +536,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
static void rtl8187_configure_filter(struct ieee80211_hw *dev,
--- a/drivers/net/wireless/wl12xx/main.c
+++ b/drivers/net/wireless/wl12xx/main.c
-@@ -2467,11 +2467,20 @@ struct wl1271_filter_params {
+@@ -2464,11 +2464,20 @@ struct wl1271_filter_params {
u8 mc_list[ACX_MC_ADDRESS_GROUP_MAX][ETH_ALEN];
};
@@ -557,7 +557,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
struct wl1271 *wl = hw->priv;
if (unlikely(wl->state == WL1271_STATE_OFF))
-@@ -2484,16 +2493,40 @@ static u64 wl1271_op_prepare_multicast(s
+@@ -2481,16 +2490,40 @@ static u64 wl1271_op_prepare_multicast(s
}
/* update multicast filtering parameters */
@@ -635,10 +635,10 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
}
return hash.low | ((u64)hash.high << 32);
---- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
-+++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
-@@ -213,7 +213,11 @@ static void _brcmf_set_multicast_list(st
- netdev_for_each_mc_addr(ha, dev) {
+--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
++++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+@@ -172,7 +172,11 @@ static void _brcmf_set_multicast_list(st
+ netdev_for_each_mc_addr(ha, ndev) {
if (!cnt)
break;
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
@@ -651,7 +651,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
}
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
-@@ -1960,7 +1960,11 @@ struct ieee80211_ops {
+@@ -2112,7 +2112,11 @@ struct ieee80211_ops {
enum ieee80211_tx_sync_type type);
u64 (*prepare_multicast)(struct ieee80211_hw *hw,
@@ -712,7 +712,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
-@@ -776,7 +776,12 @@ struct ieee80211_local {
+@@ -780,7 +780,12 @@ struct ieee80211_local {
struct work_struct recalc_smps;
/* aggregated multicast list */
@@ -768,7 +768,7 @@ This also backport commit 2f787b0b76bf5de2eaa3ca3a29d89123ae03c856
spin_unlock_bh(&local->filter_lock);
/* be a bit nasty */
-@@ -616,9 +620,11 @@ struct ieee80211_hw *ieee80211_alloc_hw(
+@@ -630,9 +634,11 @@ struct ieee80211_hw *ieee80211_alloc_hw(
local->uapsd_max_sp_len = IEEE80211_DEFAULT_MAX_SP_LEN;
INIT_LIST_HEAD(&local->interfaces);
diff --git a/patches/29-sdio_no_suspend.patch b/patches/29-sdio_no_suspend.patch
index 1d09d34..934eb94 100644
--- a/patches/29-sdio_no_suspend.patch
+++ b/patches/29-sdio_no_suspend.patch
@@ -96,7 +96,7 @@ suspend and resume that are not backported.
/*******************************************************************/
--- a/drivers/net/wireless/mwifiex/sdio.c
+++ b/drivers/net/wireless/mwifiex/sdio.c
-@@ -126,8 +126,10 @@ mwifiex_sdio_remove(struct sdio_func *fu
+@@ -127,8 +127,10 @@ mwifiex_sdio_remove(struct sdio_func *fu
return;
if (user_rmmod) {
@@ -107,7 +107,7 @@ suspend and resume that are not backported.
for (i = 0; i < adapter->priv_num; i++)
if ((GET_BSS_ROLE(adapter->priv[i]) ==
-@@ -147,6 +149,7 @@ mwifiex_sdio_remove(struct sdio_func *fu
+@@ -148,6 +150,7 @@ mwifiex_sdio_remove(struct sdio_func *fu
kfree(card);
}
@@ -115,7 +115,7 @@ suspend and resume that are not backported.
/*
* SDIO suspend.
*
-@@ -254,6 +257,7 @@ static int mwifiex_sdio_resume(struct de
+@@ -255,6 +258,7 @@ static int mwifiex_sdio_resume(struct de
return 0;
}
@@ -123,7 +123,7 @@ suspend and resume that are not backported.
/* Device ID for SD8787 */
#define SDIO_DEVICE_ID_MARVELL_8787 (0x9119)
-@@ -266,10 +270,12 @@ static const struct sdio_device_id mwifi
+@@ -267,10 +271,12 @@ static const struct sdio_device_id mwifi
MODULE_DEVICE_TABLE(sdio, mwifiex_ids);
@@ -136,7 +136,7 @@ suspend and resume that are not backported.
static struct sdio_driver mwifiex_sdio = {
.name = "mwifiex_sdio",
-@@ -278,7 +284,9 @@ static struct sdio_driver mwifiex_sdio =
+@@ -279,7 +285,9 @@ static struct sdio_driver mwifiex_sdio =
.remove = mwifiex_sdio_remove,
.drv = {
.owner = THIS_MODULE,
@@ -146,8 +146,8 @@ suspend and resume that are not backported.
}
};
---- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
-+++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
+--- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
++++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
@@ -55,7 +55,7 @@ static bool
brcmf_pm_resume_error(struct brcmf_sdio_dev *sdiodev)
{
@@ -166,7 +166,7 @@ suspend and resume that are not backported.
int retry = 0;
while (atomic_read(&sdiodev->suspend) && retry++ != 30)
wait_event_timeout(*wq, false, HZ/100);
-@@ -564,7 +564,7 @@ static void brcmf_ops_sdio_remove(struct
+@@ -550,7 +550,7 @@ static void brcmf_ops_sdio_remove(struct
}
}
@@ -175,7 +175,7 @@ suspend and resume that are not backported.
static int brcmf_sdio_suspend(struct device *dev)
{
mmc_pm_flag_t sdio_flags;
-@@ -617,7 +617,7 @@ static struct sdio_driver brcmf_sdmmc_dr
+@@ -603,7 +603,7 @@ static struct sdio_driver brcmf_sdmmc_dr
.remove = brcmf_ops_sdio_remove,
.name = "brcmfmac",
.id_table = brcmf_sdmmc_ids,
diff --git a/patches/35-fix-makefile-includes.patch b/patches/35-fix-makefile-includes.patch
index c9f8eb1..3207ab0 100644
--- a/patches/35-fix-makefile-includes.patch
+++ b/patches/35-fix-makefile-includes.patch
@@ -18,42 +18,42 @@ path the make process will search in the kernel tree for the headers.
-ccflags-y += -Idrivers/net/wireless/rtl818x
+ccflags-y += -I$(obj)/..
---- a/drivers/staging/brcm80211/brcmfmac/Makefile
-+++ b/drivers/staging/brcm80211/brcmfmac/Makefile
+--- a/drivers/net/wireless/brcm80211/brcmfmac/Makefile
++++ b/drivers/net/wireless/brcm80211/brcmfmac/Makefile
@@ -16,8 +16,8 @@
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
ccflags-y += \
-- -Idrivers/staging/brcm80211/brcmfmac \
-- -Idrivers/staging/brcm80211/include
+- -Idrivers/net/wireless/brcm80211/brcmfmac \
+- -Idrivers/net/wireless/brcm80211/include
+ -I$(obj) \
+ -I$(obj)/../include
DHDOFILES = \
wl_cfg80211.o \
---- a/drivers/staging/brcm80211/brcmsmac/Makefile
-+++ b/drivers/staging/brcm80211/brcmsmac/Makefile
+--- a/drivers/net/wireless/brcm80211/brcmsmac/Makefile
++++ b/drivers/net/wireless/brcm80211/brcmsmac/Makefile
@@ -17,9 +17,9 @@
ccflags-y := \
-D__CHECK_ENDIAN__ \
-- -Idrivers/staging/brcm80211/brcmsmac \
-- -Idrivers/staging/brcm80211/brcmsmac/phy \
-- -Idrivers/staging/brcm80211/include
+- -Idrivers/net/wireless/brcm80211/brcmsmac \
+- -Idrivers/net/wireless/brcm80211/brcmsmac/phy \
+- -Idrivers/net/wireless/brcm80211/include
+ -I$(obj) \
+ -I$(obj)/phy \
+ -I$(obj)/../include
BRCMSMAC_OFILES := \
mac80211_if.o \
---- a/drivers/staging/brcm80211/brcmutil/Makefile
-+++ b/drivers/staging/brcm80211/brcmutil/Makefile
+--- a/drivers/net/wireless/brcm80211/brcmutil/Makefile
++++ b/drivers/net/wireless/brcm80211/brcmutil/Makefile
@@ -16,8 +16,8 @@
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
ccflags-y := \
-- -Idrivers/staging/brcm80211/brcmutil \
-- -Idrivers/staging/brcm80211/include
+- -Idrivers/net/wireless/brcm80211/brcmutil \
+- -Idrivers/net/wireless/brcm80211/include
+ -I$(obj) \
+ -I$(obj)/../include
diff --git a/scripts/admin-update.sh b/scripts/admin-update.sh
index 061748c..3e63e51 100755
--- a/scripts/admin-update.sh
+++ b/scripts/admin-update.sh
@@ -224,6 +224,12 @@ DRIVERS="$DRIVERS drivers/ssb"
DRIVERS="$DRIVERS drivers/bcma"
DRIVERS="$DRIVERS drivers/net/wireless/b43"
DRIVERS="$DRIVERS drivers/net/wireless/b43legacy"
+DRIVERS="$DRIVERS drivers/net/wireless/brcm80211"
+DRIVERS="$DRIVERS drivers/net/wireless/brcm80211/brcmfmac"
+DRIVERS="$DRIVERS drivers/net/wireless/brcm80211/brcmsmac"
+DRIVERS="$DRIVERS drivers/net/wireless/brcm80211/brcmsmac/phy"
+DRIVERS="$DRIVERS drivers/net/wireless/brcm80211/brcmutil"
+DRIVERS="$DRIVERS drivers/net/wireless/brcm80211/include"
DRIVERS="$DRIVERS drivers/net/wireless/iwlegacy"
DRIVERS="$DRIVERS drivers/net/wireless/iwlwifi"
DRIVERS="$DRIVERS drivers/net/wireless/rt2x00"
@@ -248,7 +254,7 @@ DRIVERS="$DRIVERS drivers/net/wireless/orinoco"
DRIVERS="$DRIVERS drivers/net/wireless/mwifiex"
# Staging drivers
-STAGING_DRIVERS="drivers/staging/brcm80211"
+STAGING_DRIVERS=""
# Ethernet drivers
DRIVERS="$DRIVERS drivers/net/ethernet/atheros"
diff --git a/scripts/driver-select b/scripts/driver-select
index f571519..3619541 100755
--- a/scripts/driver-select
+++ b/scripts/driver-select
@@ -7,6 +7,7 @@
DRIVERS_MAKEFILE="drivers/net/wireless/Makefile"
ATH_MAKEFILE="drivers/net/wireless/ath/Makefile"
ATH9K_MAKEFILE="drivers/net/wireless/ath/ath9k/Makefile"
+BRCM80211_MAKEFILE="drivers/net/wireless/brcm80211/Makefile"
RT2X00_MAKEFILE="drivers/net/wireless/rt2x00/Makefile"
NET_WIRELESS_MAKEFILE="net/wireless/Makefile"
EEPROM_MAKEFILE="drivers/misc/eeprom/Makefile"
@@ -32,11 +33,7 @@ PURPLE="\033[35m"
CYAN="\033[36m"
UNDERLINE="\033[02m"
-SUPPORTED_80211_DRIVERS="ath5k ath9k ath9k_htc carl9170 ath6kl b43 zd1211rw rt2x00 wl1251 wl12xx"
-
-if [ -d drivers/staging/brcm80211 ]; then
- SUPPORTED_80211_DRIVERS="$SUPPORTED_80211_DRIVERS brcm80211"
-fi
+SUPPORTED_80211_DRIVERS="ath5k ath9k ath9k_htc carl9170 ath6kl b43 zd1211rw rt2x00 wl1251 wl12xx brcmsmac brcmfmac"
# b43 needs some more work for driver-select, the SSB stuff, plus
# what if you update b44 but not b43? It will bust.
@@ -55,6 +52,7 @@ function usage {
echo -e "\nSupported group drivers:"
echo -e "\t${CYAN}atheros${NORMAL} < ${PURPLE} ath5k ath9k carl9170 zd1211rw ath6kl ${NORMAL}>"
echo -e "\t${CYAN}ath${NORMAL} < ${PURPLE} ath5k ath9k carl9170 ath6kl ${NORMAL}>"
+ echo -e "\t${CYAN}brcm80211${NORMAL} < ${PURPLE} brcmsmac brcmfmac ${NORMAL}>"
echo -e "\t${CYAN}iwlagn${NORMAL} < ${PURPLE} iwlagn ${NORMAL}>"
echo -e "\t${CYAN}rtl818x${NORMAL} < ${PURPLE} rtl8180 rtl8187 ${NORMAL}>"
echo -e "\t${CYAN}rtlwifi${NORMAL} < ${PURPLE} rtl8192ce ${NORMAL}>"
@@ -220,11 +218,6 @@ function disable_staging {
perl -i -ne 'print if ! /CONFIG_COMPAT_STAGING/ ' Makefile
}
-function disable_brcm80211 {
- backup_file Makefile
- perl -i -ne 'print if ! /brcm80211/ ' Makefile
-}
-
function disable_update-initramfs
{
backup_file Makefile
@@ -244,6 +237,12 @@ function select_ath9k_driver
# In the future here we'll add stuff to disable ath9k_htc
}
+function select_brcm80211_driver
+{
+ backup_file $BRCM80211_MAKEFILE
+ perl -i -ne 'print if /'$1'/ || /CONFIG_BRCMUTIL/ ' $BRCM80211_MAKEFILE
+}
+
function restore_file {
#ORIG=$(shell ${1%%.${BACKUP_EXT}})
ORIG=${1%%.bk}
@@ -306,7 +305,6 @@ case $1 in
;;
ath)
disable_bt_usb_ethernet_var
- disable_brcm80211
select_drivers CONFIG_ATH_COMMON
disable_var_01
;;
@@ -347,6 +345,13 @@ case $1 in
disable_staging
disable_var_01
;;
+ brcm80211)
+ disable_staging
+ disable_bt_usb_ethernet_var
+ select_drivers CONFIG_BRCMUTIL \
+ CONFIG_BRCMFMAC \
+ CONFIG_BRCMSMAC
+ ;;
# Singular modules
ath5k)
disable_staging
@@ -379,9 +384,17 @@ case $1 in
select_driver CONFIG_ATH_COMMON
select_ath_driver CONFIG_ATH6KL
;;
- brcm80211)
+ brcmsmac)
+ disable_staging
+ disable_bt_usb_ethernet_var
+ select_drivers CONFIG_BRCMUTIL CONFIG_BRCMFMAC
+ select_brcm80211_driver CONFIG_BRCMSMAC
+ ;;
+ brcmfmac)
+ disable_staging
disable_bt_usb_ethernet_var
- select_driver CONFIG_NOTHING
+ select_drivers CONFIG_BRCMUTIL CONFIG_BRCMFMAC
+ select_brcm80211_driver CONFIG_BRCMFMAC
;;
zd1211rw)
select_driver CONFIG_COMPAT_ZD1211RW
--
1.7.4.1
^ 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