* [PATCH] wil6210: drop -Werror compiler flag
From: Vladimir Kondratiev @ 2013-07-22 9:53 UTC (permalink / raw)
To: John W . Linville
Cc: Vladimir Kondratiev, linux-wireless, Luis R . Rodriguez, wil6210
In production code, don't use -Werror,
as it causes random compilation failures due to compiler version and options used.
With every new version of gcc, it becomes stricter and report more warnings.
Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
---
drivers/net/wireless/ath/wil6210/Makefile | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/net/wireless/ath/wil6210/Makefile b/drivers/net/wireless/ath/wil6210/Makefile
index f891d51..990dd42a 100644
--- a/drivers/net/wireless/ath/wil6210/Makefile
+++ b/drivers/net/wireless/ath/wil6210/Makefile
@@ -11,9 +11,6 @@ wil6210-y += txrx.o
wil6210-y += debug.o
wil6210-$(CONFIG_WIL6210_TRACING) += trace.o
-ifeq (, $(findstring -W,$(EXTRA_CFLAGS)))
- subdir-ccflags-y += -Werror
-endif
# for tracing framework to find trace.h
CFLAGS_trace.o := -I$(src)
--
1.8.1.2
^ permalink raw reply related
* Re: [PATCH] ath: wil6210: Fix build error
From: Vladimir Kondratiev @ 2013-07-22 9:56 UTC (permalink / raw)
To: Ben Hutchings
Cc: thomas, Larry Finger, linville, linux-wireless, netdev, wil6210,
Stable
In-Reply-To: <1374457543.16248.8.camel@deadeye.wl.decadent.org.uk>
On Monday, July 22, 2013 02:45:43 AM Ben Hutchings wrote:
> > ifeq (, $(findstring -W,$(EXTRA_CFLAGS)))
> > subdir-ccflags-y += -Werror
> > endif
>
> This is a pretty weird thing to do, and you've failed to account for
> -Wextra.
>
> -Werror is generally a bad default in free software, as you have no
> control over which compiler version will be used.
>
Well, you convinced me. I'll send patch removing -Werror.
Thanks, Vladimir
^ permalink raw reply
* [PATCH for-3.11 1/2] brcmfmac: decrement pending 8021x count upon tx failure
From: Arend van Spriel @ 2013-07-22 10:46 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, Arend van Spriel
In-Reply-To: <1374489984-18250-1-git-send-email-arend@broadcom.com>
If the transmit fails because there are no hanger slots or
any other reason and the packet was an EAPOL packet the
pending coutner should be decreased although it was not
transmitted so the driver does not end up in a dead-lock.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
index f0d9f7f..29b1f24 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c
@@ -1744,13 +1744,14 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
ulong flags;
int fifo = BRCMF_FWS_FIFO_BCMC;
bool multicast = is_multicast_ether_addr(eh->h_dest);
+ bool pae = eh->h_proto == htons(ETH_P_PAE);
/* determine the priority */
if (!skb->priority)
skb->priority = cfg80211_classify8021d(skb);
drvr->tx_multicast += !!multicast;
- if (ntohs(eh->h_proto) == ETH_P_PAE)
+ if (pae)
atomic_inc(&ifp->pend_8021x_cnt);
if (!brcmf_fws_fc_active(fws)) {
@@ -1781,6 +1782,11 @@ int brcmf_fws_process_skb(struct brcmf_if *ifp, struct sk_buff *skb)
brcmf_fws_schedule_deq(fws);
} else {
brcmf_err("drop skb: no hanger slot\n");
+ if (pae) {
+ atomic_dec(&ifp->pend_8021x_cnt);
+ if (waitqueue_active(&ifp->pend_8021x_wait))
+ wake_up(&ifp->pend_8021x_wait);
+ }
brcmu_pkt_buf_free_skb(skb);
}
brcmf_fws_unlock(drvr, flags);
--
1.7.10.4
^ permalink raw reply related
* [PATCH for-3.11 0/2] brcmfmac: fixing potential driver issues
From: Arend van Spriel @ 2013-07-22 10:46 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, Arend van Spriel
Two patch that seem worth taking in 3.11. The first one could cause the
driver to lock up. This issue has been discovered reading the code. The
second issue has been observed during internal testing and resulted in
a NULL pointer access.
Arend van Spriel (2):
brcmfmac: decrement pending 8021x count upon tx failure
brcmfmac: bail out of brcmf_txflowblock_if() for non-netdev interface
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | 2 +-
drivers/net/wireless/brcm80211/brcmfmac/fwsignal.c | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
--
1.7.10.4
^ permalink raw reply
* [PATCH for-3.11 2/2] brcmfmac: bail out of brcmf_txflowblock_if() for non-netdev interface
From: Arend van Spriel @ 2013-07-22 10:46 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, Arend van Spriel
In-Reply-To: <1374489984-18250-1-git-send-email-arend@broadcom.com>
To avoid ending up in a NULL-pointer access, the function
brcmf_txflowblock_if() should only be called for interfaces
that have a netdev associated with it.
Reviewed-by: Hante Meuleman <meuleman@broadcom.com>
Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
---
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
index 8e89755..8009901 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c
@@ -242,7 +242,7 @@ void brcmf_txflowblock_if(struct brcmf_if *ifp,
{
unsigned long flags;
- if (!ifp)
+ if (!ifp || !ifp->ndev)
return;
brcmf_dbg(TRACE, "enter: idx=%d stop=0x%X reason=%d state=%d\n",
--
1.7.10.4
^ permalink raw reply related
* Re: [BUG] 3.10 regression: hang on suspend
From: Stanislaw Gruszka @ 2013-07-22 11:22 UTC (permalink / raw)
To: Ortwin Glück; +Cc: Arend van Spriel, linux-kernel, linux-wireless
In-Reply-To: <51E9899E.3080307@odi.ch>
[-- Attachment #1: Type: text/plain, Size: 1097 bytes --]
On Fri, Jul 19, 2013 at 08:46:54PM +0200, Ortwin Glück wrote:
> On 07/19/2013 02:08 PM, Stanislaw Gruszka wrote:
> >I'm attaching patch, which should prevent crash (but not fix the issue,
> >just workaround it), plese apply it. If it make suspend work, please then
> >reload iwlwifi module with debug=0x3 option, suspend/resume machine and
> >provide dmesg output after that.
>
>
> Here the requested dmesg. Please note that two different WARN_ONs
> trigger here directly after each other.
>
> To me it looks like iwlagn_mac_remove_interface() is called twice,
> but I am not familiar with the code.
We remove interface that we do not add in the driver. I think I found
reason of that - I removed below code in bad commit:
list_for_each_entry(sdata, &local->interfaces, list) {
[snip]
- switch (sdata->vif.type) {
- case NL80211_IFTYPE_AP_VLAN:
- case NL80211_IFTYPE_MONITOR:
- /* skip these */
- continue;
Attached patch should correct that. Please test if it fixes the
crash.
Thanks
Stanislaw
[-- Attachment #2: mac80211_fix_suspend_crash.patch --]
[-- Type: text/plain, Size: 663 bytes --]
diff --git a/net/mac80211/pm.c b/net/mac80211/pm.c
index 7fc5d0d..3401262 100644
--- a/net/mac80211/pm.c
+++ b/net/mac80211/pm.c
@@ -99,10 +99,13 @@ int __ieee80211_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan)
}
mutex_unlock(&local->sta_mtx);
- /* remove all interfaces */
+ /* remove all interfaces that were created in the driver */
list_for_each_entry(sdata, &local->interfaces, list) {
- if (!ieee80211_sdata_running(sdata))
+ if (!ieee80211_sdata_running(sdata) ||
+ sdata->vif.type == NL80211_IFTYPE_AP_VLAN ||
+ sdata->vif.type == NL80211_IFTYPE_MONITOR)
continue;
+
drv_remove_interface(local, sdata);
}
^ permalink raw reply related
* pull-request: 2013-07-22
From: Johannes Berg @ 2013-07-22 11:58 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1768 bytes --]
John,
Here's a pull request for 3.11 (and some fixes with cc stable), sorry
for the delay - I was travelling.
Here I have a fix for RSSI thresholds in mesh, two minstrel fixes from
Felix, an nl80211 fix from Michal and four various fixes I did myself.
Let me know if there's any problem.
johannes
The following changes since commit ad81f0545ef01ea651886dddac4bef6cec930092:
Linux 3.11-rc1 (2013-07-14 15:18:27 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git for-john
for you to fetch changes up to 5c9fc93bc9bc417418fc1b6366833ae6a07b804d:
mac80211/minstrel: fix NULL pointer dereference issue (2013-07-16 17:48:14 +0300)
----------------------------------------------------------------
Chun-Yeow Yeoh (1):
nl80211: fix the setting of RSSI threshold value for mesh
Felix Fietkau (2):
mac80211/minstrel_ht: fix cck rate sampling
mac80211/minstrel: fix NULL pointer dereference issue
Johannes Berg (4):
cfg80211: fix bugs in new SME implementation
regulatory: add missing rtnl locking
mac80211: fix ethtool stats for non-station interfaces
mac80211: fix duplicate retransmission detection
Michal Kazior (1):
nl80211: fix mgmt tx status and testmode reporting for netns
net/mac80211/cfg.c | 2 ++
net/mac80211/rc80211_minstrel.c | 3 ++-
net/mac80211/rc80211_minstrel_ht.c | 10 +++++++++-
net/mac80211/rx.c | 10 ++++++++--
net/wireless/nl80211.c | 11 +++++++----
net/wireless/reg.c | 2 ++
net/wireless/sme.c | 29 ++++++++++++++++++++++++++---
7 files changed, 56 insertions(+), 11 deletions(-)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* pull-request: iwlwifi-fixes 2013-07-22
From: Johannes Berg @ 2013-07-22 12:01 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1944 bytes --]
John,
And another one for iwlwifi.
Here I have a fix for debugfs directory creation (causing a spurious
error message), two scanning fixes from David Spinadel, an LED fix and
two patches related to a BA session problem that eventually caused
firmware crashes from Emmanuel and a small BT fix for older devices as
well as a workaround for a firmware problem with APs with very small
beacon intervals from myself.
Let me know if there's any problem.
johannes
The following changes since commit ad81f0545ef01ea651886dddac4bef6cec930092:
Linux 3.11-rc1 (2013-07-14 15:18:27 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes.git for-john
for you to fetch changes up to a590ad411891de551e6de1b51ea635c0484148d6:
iwlwifi: mvm: remove extra SSID from probe request (2013-07-16 13:55:15 +0300)
----------------------------------------------------------------
Alexander Bondar (1):
iwlwifi: mvm: Fix VIF specific debugfs directory creation
David Spinadel (2):
iwlwifi: mvm: fix bug in scan ssid
iwlwifi: mvm: remove extra SSID from probe request
Emmanuel Grumbach (3):
iwlwifi: mvm: unregister leds when registration failed
iwlwifi: mvm: fix L2P BA ressources leak
iwlwifi: mvm: track the number of Rx BA sessions
Johannes Berg (2):
iwlwifi: dvm: don't send BT_CONFIG on devices w/o Bluetooth
iwlwifi: mvm: refuse connection to APs with BI < 16
drivers/net/wireless/iwlwifi/dvm/main.c | 2 +-
drivers/net/wireless/iwlwifi/mvm/debugfs.c | 6 +++++-
drivers/net/wireless/iwlwifi/mvm/mac80211.c | 23 ++++++++++++++++++++++-
drivers/net/wireless/iwlwifi/mvm/mvm.h | 1 +
drivers/net/wireless/iwlwifi/mvm/scan.c | 10 ++++++----
drivers/net/wireless/iwlwifi/mvm/sta.c | 23 +++++++++++++++++++++--
6 files changed, 56 insertions(+), 9 deletions(-)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* Re: pull-request: *mac80211* 2013-07-22
From: Johannes Berg @ 2013-07-22 12:02 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
In-Reply-To: <1374494325.14517.4.camel@jlt4.sipsolutions.net>
Fixing subject, sorry ...
johannes
^ permalink raw reply
* Disassociation immediately after joining AP - mac80211
From: Jahnavi @ 2013-07-22 17:35 UTC (permalink / raw)
To: linux-wireless
Hi,
I am working in the station mode, using mac80211 in kernel 3.5.4. When I
am trying to connect to the AP, station sends disassociation request
with reason code 3 (deauthenticated because sending station is leaving)
immediately after receiving association response.
Initially I received some IPv6 packets from mac80211 to transmit. I then
disabled IPv6 by adding the line net.ipv6.conf.all.disable_ipv6 = 1 in
/etc/sysctl.conf file. Then no packets are received from mac80211, only
disassociation request is received.
This behaviour is persistent across channels in 2.4ghz.
The call trace when the disassociation request is received is as follows:
/// dump start ///
wlan2: RX AssocResp from 00:16:b6:d1:2c:16 (capab=0x401 status=0 aid=3)
wlan2: disassociating from 00:16:b6:d1:2c:16 by local choice (reason=3)
Call Trace:
[<f985234d>] __ieee80211_tx+0x18d/0x300 [mac80211]
[<f985423b>] ieee80211_tx+0xbb/0xf0 [mac80211]
[<f98542fc>] ieee80211_xmit+0x8c/0xf0 [mac80211]
[<f98552c1>] ieee80211_tx_skb_tid+0x51/0x60 [mac80211]
[<f9869fd1>] ieee80211_send_deauth_disassoc+0x101/0x110 [mac80211]
[<f986b54c>] ieee80211_set_disassoc+0x2cc/0x440 [mac80211]
[<c094fcbe>] ? printk+0x4d/0x4f
[<f986f530>] ieee80211_mgd_disassoc+0xd0/0x140 [mac80211]
[<f9848fde>] ieee80211_disassoc+0x2e/0x40 [mac80211]
[<f81e873f>] cfg80211_mlme_disassoc+0xaf/0xe0 [cfg80211]
[<f81db468>] nl80211_disassociate+0xc8/0xf0 [cfg80211]
[<f81dbec0>] ? nl80211_set_wiphy+0x630/0x630 [cfg80211]
[<c088c784>] genl_rcv_msg+0x1e4/0x260
[<c053d215>] ? __kmalloc_track_caller+0x185/0x1e0
[<c088c5a0>] ? genl_rcv+0x30/0x30
[<c088c01e>] netlink_rcv_skb+0x8e/0xb0
[<c088c58c>] genl_rcv+0x1c/0x30
[<c088ba54>] netlink_unicast+0x174/0x1f0
[<c088bcb8>] netlink_sendmsg+0x1e8/0x310
[<c0854e7f>] sock_sendmsg+0xff/0x120
[<c04ffad7>] ? __generic_file_aio_write+0x257/0x4d0
[<c06718e2>] ? _copy_from_user+0x42/0x60
[<c08604f4>] ? verify_iovec+0x44/0xb0
[<c08562d2>] __sys_sendmsg+0x262/0x270
[<c05ac560>] ? ext4_file_write+0xb0/0x270
[<c0545bc4>] ? do_sync_write+0xb4/0xf0
[<c057c748>] ? fsnotify+0x198/0x250
[<c08570eb>] sys_sendmsg+0x3b/0x60
[<c0857793>] sys_socketcall+0x283/0x2e0
[<c04b8484>] ? __audit_syscall_entry+0xb4/0x2b0
[<c095fc9f>] sysenter_do_call+0x12/0x28
/// dump end ///
Thanks in advance.
Regards,
Jahnavi
^ permalink raw reply
* [PATCH v4] ath10k: create debugfs interface to trigger fw crash
From: Michal Kazior @ 2013-07-22 12:08 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Michal Kazior
In-Reply-To: <878v1122id.fsf@kamboji.qca.qualcomm.com>
This can be useful for testing. To perform a
forced firmware crash write 'crash' to
'simulate_fw_crash' debugfs file. E.g.
echo crash > /sys/kernel/debug/ieee80211/phy1/ath10k/simulate_fw_crash
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
v3: return an appropriate errno instead of using ath10k_warn()
drivers/net/wireless/ath/ath10k/debug.c | 57 +++++++++++++++++++++++++++++++
1 file changed, 57 insertions(+)
diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index 65279f5..3d65594 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -445,6 +445,60 @@ static const struct file_operations fops_fw_stats = {
.llseek = default_llseek,
};
+static ssize_t ath10k_read_simulate_fw_crash(struct file *file,
+ char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ const char buf[] = "To simulate firmware crash write the keyword"
+ " `crash` to this file.\nThis will force firmware"
+ " to report a crash to the host system.\n";
+ return simple_read_from_buffer(user_buf, count, ppos, buf, strlen(buf));
+}
+
+static ssize_t ath10k_write_simulate_fw_crash(struct file *file,
+ const char __user *user_buf,
+ size_t count, loff_t *ppos)
+{
+ struct ath10k *ar = file->private_data;
+ char buf[32] = {};
+ int ret;
+
+ mutex_lock(&ar->conf_mutex);
+
+ simple_write_to_buffer(buf, sizeof(buf) - 1, ppos, user_buf, count);
+ if (strcmp(buf, "crash") && strcmp(buf, "crash\n")) {
+ ret = -EINVAL;
+ goto exit;
+ }
+
+ if (ar->state != ATH10K_STATE_ON &&
+ ar->state != ATH10K_STATE_RESTARTED) {
+ ret = -ENETDOWN;
+ goto exit;
+ }
+
+ ath10k_info("simulating firmware crash\n");
+
+ ret = ath10k_wmi_force_fw_hang(ar, WMI_FORCE_FW_HANG_ASSERT, 0);
+ if (ret)
+ ath10k_warn("failed to force fw hang (%d)\n", ret);
+
+ if (ret == 0)
+ ret = count;
+
+exit:
+ mutex_unlock(&ar->conf_mutex);
+ return ret;
+}
+
+static const struct file_operations fops_simulate_fw_crash = {
+ .read = ath10k_read_simulate_fw_crash,
+ .write = ath10k_write_simulate_fw_crash,
+ .open = simple_open,
+ .owner = THIS_MODULE,
+ .llseek = default_llseek,
+};
+
int ath10k_debug_create(struct ath10k *ar)
{
ar->debug.debugfs_phy = debugfs_create_dir("ath10k",
@@ -461,6 +515,9 @@ int ath10k_debug_create(struct ath10k *ar)
debugfs_create_file("wmi_services", S_IRUSR, ar->debug.debugfs_phy, ar,
&fops_wmi_services);
+ debugfs_create_file("simulate_fw_crash", S_IRUSR, ar->debug.debugfs_phy,
+ ar, &fops_simulate_fw_crash);
+
return 0;
}
#endif /* CONFIG_ATH10K_DEBUGFS */
--
1.7.9.5
^ permalink raw reply related
* [PATCH v2 0/4] ath10k: fixes
From: Michal Kazior @ 2013-07-22 12:13 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Michal Kazior
In-Reply-To: <1374129193-3533-1-git-send-email-michal.kazior@tieto.com>
Hi,
Here are some fixes for ath10k. The rts threshold
patch addresses my mistake in commit
9aeb6fe53d1f0d6e58658484ce9ad7b59f0ef16b which
caused rts to be always enabled causing throughput
issues in some cases.
v2: first patch is split now into two as requested
rebased on top of latest github master branch
Michal Kazior (4):
ath10k: prevent HTC from being used after stopping
ath10k: don't reset HTC endpoints unnecessarily
ath10k: fix memleak in mac setup
ath10k: fix rts/fragmentation threshold setup
drivers/net/wireless/ath/ath10k/htc.c | 28 ++++++------
drivers/net/wireless/ath/ath10k/htc.h | 4 +-
drivers/net/wireless/ath/ath10k/mac.c | 80 ++++++++++++++++++---------------
3 files changed, 58 insertions(+), 54 deletions(-)
--
1.7.9.5
^ permalink raw reply
* [PATCH v2 1/4] ath10k: prevent HTC from being used after stopping
From: Michal Kazior @ 2013-07-22 12:13 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Michal Kazior
In-Reply-To: <1374495211-20353-1-git-send-email-michal.kazior@tieto.com>
It was possible to submit new HTC commands
after/while HTC stopped. This led to memory
corruption in some rare cases.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
drivers/net/wireless/ath/ath10k/htc.c | 27 +++++++++++++--------------
drivers/net/wireless/ath/ath10k/htc.h | 4 ++--
2 files changed, 15 insertions(+), 16 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
index 72e072c..47b7752 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -254,10 +254,14 @@ int ath10k_htc_send(struct ath10k_htc *htc,
return -ENOENT;
}
- skb_push(skb, sizeof(struct ath10k_htc_hdr));
-
spin_lock_bh(&htc->tx_lock);
+ if (htc->stopped) {
+ spin_unlock_bh(&htc->tx_lock);
+ return -ESHUTDOWN;
+ }
+
__skb_queue_tail(&ep->tx_queue, skb);
+ skb_push(skb, sizeof(struct ath10k_htc_hdr));
spin_unlock_bh(&htc->tx_lock);
queue_work(htc->ar->workqueue, &ep->send_work);
@@ -270,23 +274,17 @@ static int ath10k_htc_tx_completion_handler(struct ath10k *ar,
{
struct ath10k_htc *htc = &ar->htc;
struct ath10k_htc_ep *ep = &htc->endpoint[eid];
- bool stopping;
ath10k_htc_notify_tx_completion(ep, skb);
/* the skb now belongs to the completion handler */
+ /* note: when using TX credit flow, the re-checking of queues happens
+ * when credits flow back from the target. in the non-TX credit case,
+ * we recheck after the packet completes */
spin_lock_bh(&htc->tx_lock);
- stopping = htc->stopping;
- spin_unlock_bh(&htc->tx_lock);
-
- if (!ep->tx_credit_flow_enabled && !stopping)
- /*
- * note: when using TX credit flow, the re-checking of
- * queues happens when credits flow back from the target.
- * in the non-TX credit case, we recheck after the packet
- * completes
- */
+ if (!ep->tx_credit_flow_enabled && !htc->stopped)
queue_work(ar->workqueue, &ep->send_work);
+ spin_unlock_bh(&htc->tx_lock);
return 0;
}
@@ -951,7 +949,7 @@ void ath10k_htc_stop(struct ath10k_htc *htc)
struct ath10k_htc_ep *ep;
spin_lock_bh(&htc->tx_lock);
- htc->stopping = true;
+ htc->stopped = true;
spin_unlock_bh(&htc->tx_lock);
for (i = ATH10K_HTC_EP_0; i < ATH10K_HTC_EP_COUNT; i++) {
@@ -972,6 +970,7 @@ int ath10k_htc_init(struct ath10k *ar)
spin_lock_init(&htc->tx_lock);
+ htc->stopped = false;
ath10k_htc_reset_endpoint_states(htc);
/* setup HIF layer callbacks */
diff --git a/drivers/net/wireless/ath/ath10k/htc.h b/drivers/net/wireless/ath/ath10k/htc.h
index 1606c9f..e1dd8c7 100644
--- a/drivers/net/wireless/ath/ath10k/htc.h
+++ b/drivers/net/wireless/ath/ath10k/htc.h
@@ -335,7 +335,7 @@ struct ath10k_htc {
struct ath10k *ar;
struct ath10k_htc_ep endpoint[ATH10K_HTC_EP_COUNT];
- /* protects endpoint and stopping fields */
+ /* protects endpoint and stopped fields */
spinlock_t tx_lock;
struct ath10k_htc_ops htc_ops;
@@ -349,7 +349,7 @@ struct ath10k_htc {
struct ath10k_htc_svc_tx_credits service_tx_alloc[ATH10K_HTC_EP_COUNT];
int target_credit_size;
- bool stopping;
+ bool stopped;
};
int ath10k_htc_init(struct ath10k *ar);
--
1.7.9.5
^ permalink raw reply related
* [PATCH v2 2/4] ath10k: don't reset HTC endpoints unnecessarily
From: Michal Kazior @ 2013-07-22 12:13 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Michal Kazior
In-Reply-To: <1374495211-20353-1-git-send-email-michal.kazior@tieto.com>
Endpoints are re-initialized upon HTC start anyway
so there's no need to do that twice in case of
restarting HTC (i.e. in case of hardware
recovery).
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
drivers/net/wireless/ath/ath10k/htc.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/net/wireless/ath/ath10k/htc.c b/drivers/net/wireless/ath/ath10k/htc.c
index 47b7752..ef3329e 100644
--- a/drivers/net/wireless/ath/ath10k/htc.c
+++ b/drivers/net/wireless/ath/ath10k/htc.c
@@ -958,7 +958,6 @@ void ath10k_htc_stop(struct ath10k_htc *htc)
}
ath10k_hif_stop(htc->ar);
- ath10k_htc_reset_endpoint_states(htc);
}
/* registered target arrival callback from the HIF layer */
--
1.7.9.5
^ permalink raw reply related
* [PATCH v2 3/4] ath10k: fix memleak in mac setup
From: Michal Kazior @ 2013-07-22 12:13 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Michal Kazior
In-Reply-To: <1374495211-20353-1-git-send-email-michal.kazior@tieto.com>
In some cases channel arrays were never freed.
The patch also unifies error handling in the mac
setup function.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
drivers/net/wireless/ath/ath10k/mac.c | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 07e5f7d..6144b3b 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -3225,8 +3225,10 @@ int ath10k_mac_register(struct ath10k *ar)
channels = kmemdup(ath10k_2ghz_channels,
sizeof(ath10k_2ghz_channels),
GFP_KERNEL);
- if (!channels)
- return -ENOMEM;
+ if (!channels) {
+ ret = -ENOMEM;
+ goto err_free;
+ }
band = &ar->mac.sbands[IEEE80211_BAND_2GHZ];
band->n_channels = ARRAY_SIZE(ath10k_2ghz_channels);
@@ -3245,11 +3247,8 @@ int ath10k_mac_register(struct ath10k *ar)
sizeof(ath10k_5ghz_channels),
GFP_KERNEL);
if (!channels) {
- if (ar->phy_capability & WHAL_WLAN_11G_CAPABILITY) {
- band = &ar->mac.sbands[IEEE80211_BAND_2GHZ];
- kfree(band->channels);
- }
- return -ENOMEM;
+ ret = -ENOMEM;
+ goto err_free;
}
band = &ar->mac.sbands[IEEE80211_BAND_5GHZ];
@@ -3313,25 +3312,30 @@ int ath10k_mac_register(struct ath10k *ar)
ath10k_reg_notifier);
if (ret) {
ath10k_err("Regulatory initialization failed\n");
- return ret;
+ goto err_free;
}
ret = ieee80211_register_hw(ar->hw);
if (ret) {
ath10k_err("ieee80211 registration failed: %d\n", ret);
- return ret;
+ goto err_free;
}
if (!ath_is_world_regd(&ar->ath_common.regulatory)) {
ret = regulatory_hint(ar->hw->wiphy,
ar->ath_common.regulatory.alpha2);
if (ret)
- goto exit;
+ goto err_unregister;
}
return 0;
-exit:
+
+err_unregister:
ieee80211_unregister_hw(ar->hw);
+err_free:
+ kfree(ar->mac.sbands[IEEE80211_BAND_2GHZ].channels);
+ kfree(ar->mac.sbands[IEEE80211_BAND_5GHZ].channels);
+
return ret;
}
--
1.7.9.5
^ permalink raw reply related
* [PATCH v2 4/4] ath10k: fix rts/fragmentation threshold setup
From: Michal Kazior @ 2013-07-22 12:13 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Michal Kazior
In-Reply-To: <1374495211-20353-1-git-send-email-michal.kazior@tieto.com>
If RTS and fragmentation threshold values are
0xFFFFFFFF they should be considered disabled and
no min/max limits must be applied.
This fixes some issues with throughput issues,
especially with VHT.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
drivers/net/wireless/ath/ath10k/mac.c | 54 +++++++++++++++++----------------
1 file changed, 28 insertions(+), 26 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 6144b3b..d0a7761 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -332,6 +332,29 @@ static int ath10k_peer_create(struct ath10k *ar, u32 vdev_id, const u8 *addr)
return 0;
}
+static int ath10k_mac_set_rts(struct ath10k_vif *arvif, u32 value)
+{
+ if (value != 0xFFFFFFFF)
+ value = min_t(u32, arvif->ar->hw->wiphy->rts_threshold,
+ ATH10K_RTS_MAX);
+
+ return ath10k_wmi_vdev_set_param(arvif->ar, arvif->vdev_id,
+ WMI_VDEV_PARAM_RTS_THRESHOLD,
+ value);
+}
+
+static int ath10k_mac_set_frag(struct ath10k_vif *arvif, u32 value)
+{
+ if (value != 0xFFFFFFFF)
+ value = clamp_t(u32, arvif->ar->hw->wiphy->frag_threshold,
+ ATH10K_FRAGMT_THRESHOLD_MIN,
+ ATH10K_FRAGMT_THRESHOLD_MAX);
+
+ return ath10k_wmi_vdev_set_param(arvif->ar, arvif->vdev_id,
+ WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
+ value);
+}
+
static int ath10k_peer_delete(struct ath10k *ar, u32 vdev_id, const u8 *addr)
{
int ret;
@@ -1897,7 +1920,7 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
enum wmi_sta_powersave_param param;
int ret = 0;
- u32 value, rts, frag;
+ u32 value;
int bit;
mutex_lock(&ar->conf_mutex);
@@ -2000,20 +2023,12 @@ static int ath10k_add_interface(struct ieee80211_hw *hw,
ath10k_warn("Failed to set PSPOLL count: %d\n", ret);
}
- rts = min_t(u32, ar->hw->wiphy->rts_threshold, ATH10K_RTS_MAX);
- ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
- WMI_VDEV_PARAM_RTS_THRESHOLD,
- rts);
+ ret = ath10k_mac_set_rts(arvif, ar->hw->wiphy->rts_threshold);
if (ret)
ath10k_warn("failed to set rts threshold for vdev %d (%d)\n",
arvif->vdev_id, ret);
- frag = clamp_t(u32, ar->hw->wiphy->frag_threshold,
- ATH10K_FRAGMT_THRESHOLD_MIN,
- ATH10K_FRAGMT_THRESHOLD_MAX);
- ret = ath10k_wmi_vdev_set_param(ar, arvif->vdev_id,
- WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
- frag);
+ ret = ath10k_mac_set_frag(arvif, ar->hw->wiphy->frag_threshold);
if (ret)
ath10k_warn("failed to set frag threshold for vdev %d (%d)\n",
arvif->vdev_id, ret);
@@ -2728,11 +2743,7 @@ static void ath10k_set_rts_iter(void *data, u8 *mac, struct ieee80211_vif *vif)
if (ar_iter->ar->state == ATH10K_STATE_RESTARTED)
return;
- rts = min_t(u32, rts, ATH10K_RTS_MAX);
-
- ar_iter->ret = ath10k_wmi_vdev_set_param(ar_iter->ar, arvif->vdev_id,
- WMI_VDEV_PARAM_RTS_THRESHOLD,
- rts);
+ ar_iter->ret = ath10k_mac_set_rts(arvif, rts);
if (ar_iter->ret)
ath10k_warn("Failed to set RTS threshold for VDEV: %d\n",
arvif->vdev_id);
@@ -2764,7 +2775,6 @@ static void ath10k_set_frag_iter(void *data, u8 *mac, struct ieee80211_vif *vif)
struct ath10k_generic_iter *ar_iter = data;
struct ath10k_vif *arvif = ath10k_vif_to_arvif(vif);
u32 frag = ar_iter->ar->hw->wiphy->frag_threshold;
- int ret;
lockdep_assert_held(&arvif->ar->conf_mutex);
@@ -2775,15 +2785,7 @@ static void ath10k_set_frag_iter(void *data, u8 *mac, struct ieee80211_vif *vif)
if (ar_iter->ar->state == ATH10K_STATE_RESTARTED)
return;
- frag = clamp_t(u32, frag,
- ATH10K_FRAGMT_THRESHOLD_MIN,
- ATH10K_FRAGMT_THRESHOLD_MAX);
-
- ret = ath10k_wmi_vdev_set_param(ar_iter->ar, arvif->vdev_id,
- WMI_VDEV_PARAM_FRAGMENTATION_THRESHOLD,
- frag);
-
- ar_iter->ret = ret;
+ ar_iter->ret = ath10k_mac_set_frag(arvif, frag);
if (ar_iter->ret)
ath10k_warn("Failed to set frag threshold for VDEV: %d\n",
arvif->vdev_id);
--
1.7.9.5
^ permalink raw reply related
* Re: Wake-On-Wireless and Deauthentication
From: greg.huber @ 2013-07-22 12:22 UTC (permalink / raw)
To: Arend van Spriel
Cc: Luis R. Rodriguez, linux-wireless, daniel.wagner, Dan Williams
In-Reply-To: <51EABFCA.4060307@broadcom.com>
Arend, Thank You.
I was able to disable NetworkManager and wpa_supplicant and then
restarted the supplicant manually. The system did not disconnect when
suspended, but it would not wake up on magic packet (what I set it to).
On resume it again disconnected and reconnected however.
I put a WOW compatible NIC in my laptop and will do some more
testing. I also need to verify that the wake packets are making it
onto the air.
Thank you for all your help.
Greg
On 07/20/2013 12:50 PM, Arend van Spriel wrote:
> On 07/19/13 20:06, greg.huber wrote:
>> Thank you for your reply, I'm trying this now.
>>
>> Greg
>>
>> On 07/18/2013 09:38 PM, Luis R. Rodriguez wrote:
>>> On Wed, Jul 17, 2013 at 11:11 AM, greg.huber<greg.huber@carestream.com> wrote:
>>>> I'm trying to get Wake-on-wireless working with an Atheros AR9462.
>>>> The problem I seem to be having is that there is a Deauth requested
>>>> when the system is suspended. Does anyone know how to keep the
>>>> association while suspended?? I'm using kernel 3.9.9.
>>>>
>>>> The log after waking (from keyboard)
>>>>
>>>> [ 320.117062] wlp3s0: deauthenticating from 00:24:01:12:de:7a by local choice
>>>> (reason=3)
>>> Typical managers for networking will disassociate you (and therefore
>>> deauth first) prior to kicking the system to suspend. To test WoW you
>>> need to run the supplicant manually because as far as I can tell the
>>> GUI managers don't consider if WoW was enabled or not. In such a case
>>> that WoW was enabled the GUI managers should not send the
>>> deauth/disassoc.
>
> There has been recent commit, which may affect you:
>
> commit 8125696991194aacb1173b6e8196d19098b44e17
> Author: Stanislaw Gruszka <sgruszka@redhat.com>
> Date: Thu Feb 28 10:55:25 2013 +0100
>
> cfg80211/mac80211: disconnect on suspend
>
> It is mentioning something about wowlan so I am not sure whether it does. As
> you are on 3.9.9 I guess you do not have this commit.
>
> Regards,
> Arend
>
>
^ permalink raw reply
* [PATCH] ath10k: improve tx throughput on slow machines
From: Michal Kazior @ 2013-07-22 12:25 UTC (permalink / raw)
To: ath10k; +Cc: linux-wireless, Michal Kazior
It is more efficient to move just the 802.11
header instead of the whole payload in most cases.
This has no measurable effect on modern hardware.
It should improve performance by a few percent on
hardware such as an Access Point that have a slow
CPU compared to a typical desktop CPU.
Signed-off-by: Michal Kazior <michal.kazior@tieto.com>
---
drivers/net/wireless/ath/ath10k/mac.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index 07e5f7d..6705bc8 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -1383,9 +1383,9 @@ static void ath10k_tx_h_qos_workaround(struct ieee80211_hw *hw,
return;
qos_ctl = ieee80211_get_qos_ctl(hdr);
- memmove(qos_ctl, qos_ctl + IEEE80211_QOS_CTL_LEN,
- skb->len - ieee80211_hdrlen(hdr->frame_control));
- skb_trim(skb, skb->len - IEEE80211_QOS_CTL_LEN);
+ memmove(skb->data + IEEE80211_QOS_CTL_LEN,
+ skb->data, (void *)qos_ctl - (void *)skb->data);
+ skb_pull(skb, IEEE80211_QOS_CTL_LEN);
}
static void ath10k_tx_h_update_wep_key(struct sk_buff *skb)
--
1.7.9.5
^ permalink raw reply related
* [PATCH] mac80211: add debugfs for driver-buffered TID bitmap
From: Johannes Berg @ 2013-07-22 12:35 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
Add a per-station debugfs file indicating the TIDs (as
a bitmap) that the driver has data buffered on.
Reviewed-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/mac80211/debugfs_sta.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/net/mac80211/debugfs_sta.c b/net/mac80211/debugfs_sta.c
index 44e201d..19c54a4 100644
--- a/net/mac80211/debugfs_sta.c
+++ b/net/mac80211/debugfs_sta.c
@@ -455,6 +455,15 @@ void ieee80211_sta_debugfs_add(struct sta_info *sta)
DEBUGFS_ADD_COUNTER(tx_retry_count, tx_retry_count);
DEBUGFS_ADD_COUNTER(wep_weak_iv_count, wep_weak_iv_count);
+ if (sizeof(sta->driver_buffered_tids) == sizeof(u32))
+ debugfs_create_x32("driver_buffered_tids", 0400,
+ sta->debugfs.dir,
+ (u32 *)&sta->driver_buffered_tids);
+ else
+ debugfs_create_x64("driver_buffered_tids", 0400,
+ sta->debugfs.dir,
+ (u64 *)&sta->driver_buffered_tids);
+
drv_sta_add_debugfs(local, sdata, &sta->sta, sta->debugfs.dir);
}
--
1.8.0
^ permalink raw reply related
* Re: [PATCH v2] mac80211: prevent the buffering or frame transmission to non-assoc mesh STA
From: Johannes Berg @ 2013-07-22 13:33 UTC (permalink / raw)
To: Chun-Yeow Yeoh; +Cc: linux-wireless, linville
In-Reply-To: <1374226659-2929-1-git-send-email-yeohchunyeow@gmail.com>
On Fri, 2013-07-19 at 17:37 +0800, Chun-Yeow Yeoh wrote:
> This patch is intended to avoid the buffering to non-assoc mesh STA
> and also to avoid the triggering of frame to non-assoc mesh STA which
> could cause kernel panic in specific hw.
Applied. I still find checking the station state a bit odd, but I guess
making sure the station is fine in the callers isn't possible?
johannes
^ permalink raw reply
* Any way to disable RTS/CTS in minstrel_ht?
From: Harshal Chhaya @ 2013-07-22 14:26 UTC (permalink / raw)
To: linux-wireless
On an AR9342-based AP with several AR6102 and AR6203 clients,
minstrel_ht uses RTS/CTS more often than it seems necessary.
Is there a way to disable RTS/CTS in minstrel_ht?
I found a discussion from a couple of years back that talked about
adding an option that tells minstel_ht to really, really turn off
RTS/CTS but I can't determine if that was implemented.
Thanks,
- Harshal
^ permalink raw reply
* Re: So, which IEEE<->Frequency mappings should we be all using?
From: Johannes Berg @ 2013-07-22 14:40 UTC (permalink / raw)
To: Adrian Chadd; +Cc: freebsd-wireless, linux-wireless
In-Reply-To: <CAJ-Vmo=yvHUgv6pwK42n+NhPrAu9shxc5pigRkhZE+x91W_FoA@mail.gmail.com>
On Wed, 2013-07-17 at 10:42 -0700, Adrian Chadd wrote:
> * 420MHz
> * 700MHz
> * 900MHz (which we already have, due to history);
> * 3.6GHz
> * 4.9GHz
3.6 should have been defined in the spec recently, 4.9 surely is defined
already (though the whole stack will have to support the
dot11ChannelStartingFactor)
The others are kinda non-standard extensions, and you probably won't
even be able to properly support them since they're kinda
pretend-handled like 2.4 GHz.
johannes
^ permalink raw reply
* Re: [PATCH 1/2] MAINTAINERS: add ath10k
From: Joe Perches @ 2013-07-22 14:44 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless, ath10k
In-Reply-To: <20130722093220.26562.14270.stgit@localhost6.localdomain6>
On Mon, 2013-07-22 at 12:32 +0300, Kalle Valo wrote:
> I forgot to add an entry to MAINTAINERS when submitting the driver.
[]
> diff --git a/MAINTAINERS b/MAINTAINERS
[]
> +QUALCOMM ATHEROS ATH10K WIRELESS DRIVER
It's odd to not find ATH6KL next to ATH10K.
Maybe it's time to rename all the ATH sections
to make them QUALCOMM?
^ permalink raw reply
* Re: [PATCH v3 00/20] rt2x00: add experimental support for RT3593
From: Gertjan van Wingerde @ 2013-07-22 15:48 UTC (permalink / raw)
To: Gabor Juhos
Cc: John Linville, linux-wireless@vger.kernel.org, rt2x00 Users List
In-Reply-To: <1373292515-21332-1-git-send-email-juhosg@openwrt.org>
On Mon, Jul 8, 2013 at 4:08 PM, Gabor Juhos <juhosg@openwrt.org> wrote:
> This patch-set implements experiemental support for the
> RT3593 chipset. The patches are tested on the Linksys
> AE3000 USB device only, however other USB devices which
> are using the RT3573 chips might work as well.
>
> The patch-set depends on the following series:
> 'rt2x00: rt2800lib: add support for extended EEPROM of three-chain devices'
>
> Changes since v2:
> - keep case values in aplhabetical order
>
> Changes since v1:
> - add missing patch
> - make Linksys AE3000 support optional
>
I finally found the time to look at this over the weekend. To me it
looks good enough for inclusion.
For the whole series:
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
---
Gertjan
^ permalink raw reply
* Re: [PATCH] ath: wil6210: Fix build error
From: Luis R. Rodriguez @ 2013-07-22 16:17 UTC (permalink / raw)
To: Vladimir Kondratiev
Cc: Larry Finger, linville, linux-wireless, netdev, wil6210, Stable,
Thomas Fjellstrom
In-Reply-To: <1958736.oRuXAUfNGd@lx-vladimir>
On Sun, Jul 21, 2013 at 10:06:31AM +0300, Vladimir Kondratiev wrote:
> Hmm, I have no warning for this with neither 3.10 nor 3.11 kernel version; but
> patch is correct, and here is my
> Signed-off-by: Vladimir Kondratiev <qca_vkondrat@qca.qualcomm.com>
If you agree with a patch you don't say you Sign-off-by it as well,
you say Acked-by. The Signed-off-by tag has a very specific meaning
from development to a maintainer's hands, and its definition is on
the Developer Certificate or Origin.
So in this case Acked-by is better.
Luis
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox