* Re: [PATCH 09/12] ath9k: always clear ps filter bit on new assoc
From: Felix Fietkau @ 2013-08-06 9:49 UTC (permalink / raw)
To: Sujith Manoharan; +Cc: linux-wireless, linville
In-Reply-To: <20992.44003.432490.369935@gargle.gargle.HOWL>
On 2013-08-06 9:55 AM, Sujith Manoharan wrote:
> Felix Fietkau wrote:
>> Otherwise in some cases, EAPOL frames might be filtered during the
>> initial handshake, causing delays and assoc failures.
>
> I think this is a stable candidate.
Okay, will add Cc:stable in v2.
- Felix
^ permalink raw reply
* Re: [PATCH 07/12] ath9k: prepare queueing code for handling unaggregated traffic
From: Felix Fietkau @ 2013-08-06 9:47 UTC (permalink / raw)
To: Sujith Manoharan; +Cc: linux-wireless, linville
In-Reply-To: <20992.43399.220167.743676@gargle.gargle.HOWL>
On 2013-08-06 9:45 AM, Sujith Manoharan wrote:
> Felix Fietkau wrote:
>> + tx_info = IEEE80211_SKB_CB(skb);
>> + tx_info->flags &= ~IEEE80211_TX_CTL_CLEAR_PS_FILT;
> Why is the PS filter flag cleared here ?
Because the previous value doesn't matter here. With software
scheduling, clearing the ps filter is triggered via
tid->ac->clear_ps_filter, and that is used to set the flag when a frame
is put into the hardware queue.
The IEEE80211_TX_CTL_CLEAR_PS_FILT is checked whenever a frame enters
the tid queue, and if it's set, tid->ac->clear_ps_filter gets set.
That way it doesn't have to loop the entire tid traffic up to the new
frame through the hw queue as filtered until the destination index gets
cleared.
>> - txtid->paused = true;
>> + txtid->paused = false;
>
> Why change this ?
When going from aggregated to un-aggregated, the TID still needs to be
scheduled, and txtid->paused == true would prevent that.
- Felix
^ permalink raw reply
* Re: [PATCH 01/12] ath9k: add utility functions for accessing tid queues
From: Felix Fietkau @ 2013-08-06 9:40 UTC (permalink / raw)
To: Sujith Manoharan; +Cc: linux-wireless, linville
In-Reply-To: <20992.41970.702140.69564@gargle.gargle.HOWL>
On 2013-08-06 9:21 AM, Sujith Manoharan wrote:
> Felix Fietkau wrote:
>> - if (skb_queue_empty(&tid->buf_q))
>> + if (ath_tid_has_buffered(tid))
>
> Shouldn't this be !ath_tid_has_buffered(tid) ?
Right, thanks.
- Felix
^ permalink raw reply
* Re: [PATCH 10/12] ath9k: use software queues for un-aggregated data packets
From: Felix Fietkau @ 2013-08-06 9:38 UTC (permalink / raw)
To: Sujith Manoharan; +Cc: linux-wireless, linville
In-Reply-To: <20992.46948.427492.675142@gargle.gargle.HOWL>
On 2013-08-06 10:44 AM, Sujith Manoharan wrote:
> Felix Fietkau wrote:
>> + aggr = !!(tx_info->flags & IEEE80211_TX_CTL_AMPDU);
>> + if ((aggr && txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH) ||
>> + (!aggr && txq->axq_depth >= ATH_NON_AGGR_MIN_QDEPTH))
>> + break;
>> +
>> + ath_set_rates(tid->an->vif, tid->an->sta, bf);
>> + if (aggr)
>> + last = ath_tx_form_aggr(sc, txq, tid, &bf_q, bf,
>> + tid_q, &aggr_len);
>> + else
>> + ath_tx_form_burst(sc, txq, tid, &bf_q, bf, tid_q);
>> +
>> + if (list_empty(&bf_q))
>> + return;
>
> Handling non-AMPDU and AMPDU packets in the same path makes the code hard
> to follow. Since a TID can either have aggregated or unaggregated packets,
> why not separate the logic early, maybe in the schedule() function ?
When aggregation is enabled on a TID, it can still hold some
non-aggregated packets that need to be sent out first until it starts
forming A-MPDUs. I think separating this early doesn't work.
- Felix
^ permalink raw reply
* Re: [systemd-devel] [PATCH] Change CONFIG_FW_LOADER_USER_HELPER to default n and don't select it
From: Tom Gundersen @ 2013-08-06 9:17 UTC (permalink / raw)
To: Maarten Lankhorst
Cc: Andy Lutomirski, systemd-devel, linux-hotplug,
Linux Wireless List, linux-kernel, Intel Linux Wireless,
Kay Sievers, Johannes Berg
In-Reply-To: <CAG-2HqXEj06JbUOWee=NfuRXxL75uRf=55FZcXRLHroDzYUthQ@mail.gmail.com>
On Tue, Aug 6, 2013 at 11:11 AM, Tom Gundersen <teg@jklm.no> wrote:
> On Tue, Aug 6, 2013 at 10:20 AM, Maarten Lankhorst
> <m.b.lankhorst@gmail.com> wrote:
>> Op 05-08-13 18:29, Andy Lutomirski schreef:
>>> The systemd commit below can delay firmware loading by multiple
>>> minutes if CONFIG_FW_LOADER_USER_HELPER=y. Unfortunately no one
>>> noticed that the systemd-udev change would break new kernels as well
>>> as old kernels.
>>>
>>> Since the kernel apparently can't count on reasonable userspace
>>> support, turn this thing off by default.
>>>
>>> commit a3bd8447be4ea2ce230eb8ae0e815c04d85fa15a
>>> Author: Tom Gundersen <teg@jklm.no>
>>> Date: Mon Mar 18 15:12:18 2013 +0100
>>>
>>> udev: make firmware loading optional and disable by default
>>>
>>> Distros that whish to support old kernels should set
>>> --with-firmware-dirs="/usr/lib/firmware/updates:/usr/lib/firmware"
>>> to retain the old behaviour.
>>>
>> methinks this patch should be reverted then,
>
> Well, all the code is still there, so it can be enabled if anyone wants it.
>
>> or a stub should be added to udev to always fail firmware loading so timeouts don't occur.
>
> I think the only use (if any) of a userspace firmware loader would be
> for anyone who wants a custom one (i.e., not udev), so we shouldn't
> just fail the loading from udev unconditionally.
>
> How about we just improve the udev documentation a bit, similar to
> Andy's kernel patch?
Sorry, I should first have checked. We already document this in the README:
> Userspace firmware loading is deprecated, will go away, and
> sometimes causes problems:
> CONFIG_FW_LOADER_USER_HELPER=n
-t
^ permalink raw reply
* [PATCH] brcmfmac: use CFG80211_TESTMODE_CMD
From: Johannes Berg @ 2013-08-06 9:13 UTC (permalink / raw)
To: linux-wireless; +Cc: Johannes Berg
From: Johannes Berg <johannes.berg@intel.com>
This is essentially the same, but written shorter.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index b7d8850..f393828 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -4163,9 +4163,7 @@ static struct cfg80211_ops wl_cfg80211_ops = {
.stop_p2p_device = brcmf_p2p_stop_device,
.crit_proto_start = brcmf_cfg80211_crit_proto_start,
.crit_proto_stop = brcmf_cfg80211_crit_proto_stop,
-#ifdef CONFIG_NL80211_TESTMODE
- .testmode_cmd = brcmf_cfg80211_testmode
-#endif
+ CFG80211_TESTMODE_CMD(brcmf_cfg80211_testmode)
};
static s32 brcmf_nl80211_iftype_to_mode(enum nl80211_iftype type)
--
1.8.0
^ permalink raw reply related
* [PATCH 1/2] cfg80211: add wdev to testmode cmd
From: Johannes Berg @ 2013-08-06 9:12 UTC (permalink / raw)
To: linux-wireless; +Cc: David Spinadel
From: David Spinadel <david.spinadel@intel.com>
To allow drivers to implement per-interface testmode operations
more easily, pass a wdev pointer if any identification for one
was given from userspace. Clean up the code a bit while at it.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/ath/ath6kl/testmode.c | 3 ++-
drivers/net/wireless/ath/ath6kl/testmode.h | 7 +++++--
.../net/wireless/brcm80211/brcmfmac/wl_cfg80211.c | 4 +++-
include/net/cfg80211.h | 5 +++--
net/mac80211/cfg.c | 4 +++-
net/wireless/nl80211.c | 23 ++++++++++++++++------
net/wireless/rdev-ops.h | 5 +++--
net/wireless/trace.h | 8 +++++---
8 files changed, 41 insertions(+), 18 deletions(-)
diff --git a/drivers/net/wireless/ath/ath6kl/testmode.c b/drivers/net/wireless/ath/ath6kl/testmode.c
index acc9aa8..d67170e 100644
--- a/drivers/net/wireless/ath/ath6kl/testmode.c
+++ b/drivers/net/wireless/ath/ath6kl/testmode.c
@@ -66,7 +66,8 @@ nla_put_failure:
ath6kl_warn("nla_put failed on testmode rx skb!\n");
}
-int ath6kl_tm_cmd(struct wiphy *wiphy, void *data, int len)
+int ath6kl_tm_cmd(struct wiphy *wiphy, struct wireless_dev *wdev,
+ void *data, int len)
{
struct ath6kl *ar = wiphy_priv(wiphy);
struct nlattr *tb[ATH6KL_TM_ATTR_MAX + 1];
diff --git a/drivers/net/wireless/ath/ath6kl/testmode.h b/drivers/net/wireless/ath/ath6kl/testmode.h
index fe651d6..9fbcdec3 100644
--- a/drivers/net/wireless/ath/ath6kl/testmode.h
+++ b/drivers/net/wireless/ath/ath6kl/testmode.h
@@ -20,7 +20,8 @@
#ifdef CONFIG_NL80211_TESTMODE
void ath6kl_tm_rx_event(struct ath6kl *ar, void *buf, size_t buf_len);
-int ath6kl_tm_cmd(struct wiphy *wiphy, void *data, int len);
+int ath6kl_tm_cmd(struct wiphy *wiphy, struct wireless_dev *wdev,
+ void *data, int len);
#else
@@ -29,7 +30,9 @@ static inline void ath6kl_tm_rx_event(struct ath6kl *ar, void *buf,
{
}
-static inline int ath6kl_tm_cmd(struct wiphy *wiphy, void *data, int len)
+static inline int ath6kl_tm_cmd(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ void *data, int len)
{
return 0;
}
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
index 277b37a..b7d8850 100644
--- a/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
+++ b/drivers/net/wireless/brcm80211/brcmfmac/wl_cfg80211.c
@@ -3152,7 +3152,9 @@ static int brcmf_cfg80211_sched_scan_stop(struct wiphy *wiphy,
}
#ifdef CONFIG_NL80211_TESTMODE
-static int brcmf_cfg80211_testmode(struct wiphy *wiphy, void *data, int len)
+static int brcmf_cfg80211_testmode(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ void *data, int len)
{
struct brcmf_cfg80211_info *cfg = wiphy_to_cfg(wiphy);
struct net_device *ndev = cfg_to_ndev(cfg);
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index b7495c7..9ab7a06 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2081,7 +2081,7 @@ struct cfg80211_update_ft_ies_params {
* @mgmt_tx_cancel_wait: Cancel the wait time from transmitting a management
* frame on another channel
*
- * @testmode_cmd: run a test mode command
+ * @testmode_cmd: run a test mode command; @wdev may be %NULL
* @testmode_dump: Implement a test mode dump. The cb->args[2] and up may be
* used by the function, but 0 and 1 must not be touched. Additionally,
* return error codes other than -ENOBUFS and -ENOENT will terminate the
@@ -2290,7 +2290,8 @@ struct cfg80211_ops {
void (*rfkill_poll)(struct wiphy *wiphy);
#ifdef CONFIG_NL80211_TESTMODE
- int (*testmode_cmd)(struct wiphy *wiphy, void *data, int len);
+ int (*testmode_cmd)(struct wiphy *wiphy, struct wireless_dev *wdev,
+ void *data, int len);
int (*testmode_dump)(struct wiphy *wiphy, struct sk_buff *skb,
struct netlink_callback *cb,
void *data, int len);
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 44449ce..c77916f 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2300,7 +2300,9 @@ static void ieee80211_rfkill_poll(struct wiphy *wiphy)
}
#ifdef CONFIG_NL80211_TESTMODE
-static int ieee80211_testmode_cmd(struct wiphy *wiphy, void *data, int len)
+static int ieee80211_testmode_cmd(struct wiphy *wiphy,
+ struct wireless_dev *wdev,
+ void *data, int len)
{
struct ieee80211_local *local = wiphy_priv(wiphy);
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index f7cb121..7e2c389 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -6591,19 +6591,30 @@ static struct genl_multicast_group nl80211_testmode_mcgrp = {
static int nl80211_testmode_do(struct sk_buff *skb, struct genl_info *info)
{
struct cfg80211_registered_device *rdev = info->user_ptr[0];
+ struct wireless_dev *wdev =
+ __cfg80211_wdev_from_attrs(genl_info_net(info), info->attrs);
int err;
+ if (!rdev->ops->testmode_cmd)
+ return -EOPNOTSUPP;
+
+ if (IS_ERR(wdev)) {
+ err = PTR_ERR(wdev);
+ if (err != -EINVAL)
+ return err;
+ wdev = NULL;
+ } else if (wdev->wiphy != &rdev->wiphy) {
+ return -EINVAL;
+ }
+
if (!info->attrs[NL80211_ATTR_TESTDATA])
return -EINVAL;
- err = -EOPNOTSUPP;
- if (rdev->ops->testmode_cmd) {
- rdev->testmode_info = info;
- err = rdev_testmode_cmd(rdev,
+ rdev->testmode_info = info;
+ err = rdev_testmode_cmd(rdev, wdev,
nla_data(info->attrs[NL80211_ATTR_TESTDATA]),
nla_len(info->attrs[NL80211_ATTR_TESTDATA]));
- rdev->testmode_info = NULL;
- }
+ rdev->testmode_info = NULL;
return err;
}
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index de870d4..37ce9fd 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -516,11 +516,12 @@ static inline void rdev_rfkill_poll(struct cfg80211_registered_device *rdev)
#ifdef CONFIG_NL80211_TESTMODE
static inline int rdev_testmode_cmd(struct cfg80211_registered_device *rdev,
+ struct wireless_dev *wdev,
void *data, int len)
{
int ret;
- trace_rdev_testmode_cmd(&rdev->wiphy);
- ret = rdev->ops->testmode_cmd(&rdev->wiphy, data, len);
+ trace_rdev_testmode_cmd(&rdev->wiphy, wdev);
+ ret = rdev->ops->testmode_cmd(&rdev->wiphy, wdev, data, len);
trace_rdev_return_int(&rdev->wiphy, ret);
return ret;
}
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index f0ebdcd..ba5f0d6 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -1293,15 +1293,17 @@ TRACE_EVENT(rdev_return_int_int,
#ifdef CONFIG_NL80211_TESTMODE
TRACE_EVENT(rdev_testmode_cmd,
- TP_PROTO(struct wiphy *wiphy),
- TP_ARGS(wiphy),
+ TP_PROTO(struct wiphy *wiphy, struct wireless_dev *wdev),
+ TP_ARGS(wiphy, wdev),
TP_STRUCT__entry(
WIPHY_ENTRY
+ WDEV_ENTRY
),
TP_fast_assign(
WIPHY_ASSIGN;
+ WDEV_ASSIGN;
),
- TP_printk(WIPHY_PR_FMT, WIPHY_PR_ARG)
+ TP_printk(WIPHY_PR_FMT WDEV_PR_FMT, WIPHY_PR_ARG, WDEV_PR_ARG)
);
TRACE_EVENT(rdev_testmode_dump,
--
1.8.0
^ permalink raw reply related
* [PATCH 2/2] mac80211: add vif to testmode cmd
From: Johannes Berg @ 2013-08-06 9:12 UTC (permalink / raw)
To: linux-wireless; +Cc: David Spinadel
In-Reply-To: <1375780347-1062-1-git-send-email-johannes@sipsolutions.net>
From: David Spinadel <david.spinadel@intel.com>
Pass the wdev from cfg80211 on to the driver as the vif
if given and it's valid for the driver.
Signed-off-by: David Spinadel <david.spinadel@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
drivers/net/wireless/mac80211_hwsim.c | 1 +
drivers/net/wireless/ti/wlcore/testmode.c | 3 ++-
drivers/net/wireless/ti/wlcore/testmode.h | 3 ++-
include/net/mac80211.h | 7 ++++---
net/mac80211/cfg.c | 11 ++++++++++-
5 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 7b2a622..a0d2aac 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -1364,6 +1364,7 @@ static const struct nla_policy hwsim_testmode_policy[HWSIM_TM_ATTR_MAX + 1] = {
static int hwsim_fops_ps_write(void *dat, u64 val);
static int mac80211_hwsim_testmode_cmd(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif,
void *data, int len)
{
struct mac80211_hwsim_data *hwsim = hw->priv;
diff --git a/drivers/net/wireless/ti/wlcore/testmode.c b/drivers/net/wireless/ti/wlcore/testmode.c
index f344276..527590f 100644
--- a/drivers/net/wireless/ti/wlcore/testmode.c
+++ b/drivers/net/wireless/ti/wlcore/testmode.c
@@ -356,7 +356,8 @@ out:
return ret;
}
-int wl1271_tm_cmd(struct ieee80211_hw *hw, void *data, int len)
+int wl1271_tm_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ void *data, int len)
{
struct wl1271 *wl = hw->priv;
struct nlattr *tb[WL1271_TM_ATTR_MAX + 1];
diff --git a/drivers/net/wireless/ti/wlcore/testmode.h b/drivers/net/wireless/ti/wlcore/testmode.h
index 8071654..61d8434 100644
--- a/drivers/net/wireless/ti/wlcore/testmode.h
+++ b/drivers/net/wireless/ti/wlcore/testmode.h
@@ -26,6 +26,7 @@
#include <net/mac80211.h>
-int wl1271_tm_cmd(struct ieee80211_hw *hw, void *data, int len);
+int wl1271_tm_cmd(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ void *data, int len);
#endif /* __WL1271_TESTMODE_H__ */
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index 9cda372..839991a 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -2503,8 +2503,8 @@ enum ieee80211_roc_type {
* in IEEE 802.11-2007 section 17.3.8.6 and modify ACK timeout
* accordingly. This callback is not required and may sleep.
*
- * @testmode_cmd: Implement a cfg80211 test mode command.
- * The callback can sleep.
+ * @testmode_cmd: Implement a cfg80211 test mode command. The passed @vif may
+ * be %NULL. The callback can sleep.
* @testmode_dump: Implement a cfg80211 test mode dump. The callback can sleep.
*
* @flush: Flush all pending frames from the hardware queue, making sure
@@ -2765,7 +2765,8 @@ struct ieee80211_ops {
void (*rfkill_poll)(struct ieee80211_hw *hw);
void (*set_coverage_class)(struct ieee80211_hw *hw, u8 coverage_class);
#ifdef CONFIG_NL80211_TESTMODE
- int (*testmode_cmd)(struct ieee80211_hw *hw, void *data, int len);
+ int (*testmode_cmd)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
+ void *data, int len);
int (*testmode_dump)(struct ieee80211_hw *hw, struct sk_buff *skb,
struct netlink_callback *cb,
void *data, int len);
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index c77916f..7aa38ce 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2305,11 +2305,20 @@ static int ieee80211_testmode_cmd(struct wiphy *wiphy,
void *data, int len)
{
struct ieee80211_local *local = wiphy_priv(wiphy);
+ struct ieee80211_vif *vif = NULL;
if (!local->ops->testmode_cmd)
return -EOPNOTSUPP;
- return local->ops->testmode_cmd(&local->hw, data, len);
+ if (wdev) {
+ struct ieee80211_sub_if_data *sdata;
+
+ sdata = IEEE80211_WDEV_TO_SUB_IF(wdev);
+ if (sdata->flags & IEEE80211_SDATA_IN_DRIVER)
+ vif = &sdata->vif;
+ }
+
+ return local->ops->testmode_cmd(&local->hw, vif, data, len);
}
static int ieee80211_testmode_dump(struct wiphy *wiphy,
--
1.8.0
^ permalink raw reply related
* Re: [systemd-devel] [PATCH] Change CONFIG_FW_LOADER_USER_HELPER to default n and don't select it
From: Tom Gundersen @ 2013-08-06 9:11 UTC (permalink / raw)
To: Maarten Lankhorst
Cc: Andy Lutomirski, systemd-devel, linux-hotplug,
Linux Wireless List, linux-kernel, Intel Linux Wireless,
Kay Sievers, Johannes Berg
In-Reply-To: <5200B1BD.7030307@gmail.com>
On Tue, Aug 6, 2013 at 10:20 AM, Maarten Lankhorst
<m.b.lankhorst@gmail.com> wrote:
> Op 05-08-13 18:29, Andy Lutomirski schreef:
>> The systemd commit below can delay firmware loading by multiple
>> minutes if CONFIG_FW_LOADER_USER_HELPER=y. Unfortunately no one
>> noticed that the systemd-udev change would break new kernels as well
>> as old kernels.
>>
>> Since the kernel apparently can't count on reasonable userspace
>> support, turn this thing off by default.
>>
>> commit a3bd8447be4ea2ce230eb8ae0e815c04d85fa15a
>> Author: Tom Gundersen <teg@jklm.no>
>> Date: Mon Mar 18 15:12:18 2013 +0100
>>
>> udev: make firmware loading optional and disable by default
>>
>> Distros that whish to support old kernels should set
>> --with-firmware-dirs="/usr/lib/firmware/updates:/usr/lib/firmware"
>> to retain the old behaviour.
>>
> methinks this patch should be reverted then,
Well, all the code is still there, so it can be enabled if anyone wants it.
> or a stub should be added to udev to always fail firmware loading so timeouts don't occur.
I think the only use (if any) of a userspace firmware loader would be
for anyone who wants a custom one (i.e., not udev), so we shouldn't
just fail the loading from udev unconditionally.
How about we just improve the udev documentation a bit, similar to
Andy's kernel patch?
Cheers,
Tom
^ permalink raw reply
* Re: [PATCH] wireless: make TU conversion macros available
From: Johannes Berg @ 2013-08-06 9:00 UTC (permalink / raw)
To: linux-wireless
In-Reply-To: <1375362444-7630-1-git-send-email-johannes@sipsolutions.net>
On Thu, 2013-08-01 at 15:07 +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
>
> A few places in the code (mac80211 and iwlmvm) use the same
> TU_TO_JIFFIES() macro and could use TU_TO_EXP_TIME() that
> mac80211 has. Make these available to everyone and use them.
Applied.
johannes
^ permalink raw reply
* ath9k AR9380 packets take long to be sent
From: Michael Braun @ 2013-08-06 8:52 UTC (permalink / raw)
To: linux-wireless, ath9k-devel; +Cc: projekt-wlan
Hi,
I've upgraded my OpenWRT based AP firmware from kernel 3.8 to kernel
3.10.5 with compat-wireless 2013-06-27.
Since then I started to notice that some packets take very long to be
actually sent from AP to STA.
Setting:
The AP serves multiple BSSID which each have one of OPEN/WPA-PSK/WPA-EAP
configured. In the WPA-BSSIDs, stations get split into VLANs and the
VLAN interfaces get bridged into a VPN tap device.
During this test, there were two stations connected to this AP and two
APs served the ESSID locally on different frequencies, although the STA
did not roam. 802.11n was disabled for this test, although the problem
seem to be present with 802.11n too.
Observation:
The client sends a SYN. This is immediately forwarded to the destination
by the AP and a SYN ACK can be seen on the wifi interface on the AP.
Then the client sends another SYN to the same destination. This is also
immediately forwarded and ACKed by the server and the SYN ACK is seen on
the wifi interface on the AP. Now the STA receives both SYN ACKs. Now
the server resends the second ACK which is received by the STA
immediately.
Expected result:
The client receives the first SYN ACK in a timely manner so that neither
the STA nor the Server need to resend.
Output:
tcpdump on the AP wifi vlan interface:
10:30:39.068205 4c:0b:3a:84:06:73 > 00:1b:0d:62:b0:00, ethertype IPv4
(0x0800), length 74: 141.24.44.59.57314 > 141.24.52.243.80: Flags [S],
seq 365111110, win 29200, options [mss 1460,sackOK,TS val 8811670 ecr
0,nop,wscale 6], length 0
10:30:39.069654 00:1b:0d:62:b0:00 > 4c:0b:3a:84:06:73, ethertype IPv4
(0x0800), length 74: 141.24.52.243.80 > 141.24.44.59.57314: Flags [S.],
seq 2849317894, ack 365111111, win 14480, options [mss 1409,sackOK,TS
val 20154381 ecr 8811670,nop,wscale 2], length 0
10:30:39.148863 4c:0b:3a:84:06:73 > 00:1b:0d:62:b0:00, ethertype IPv4
(0x0800), length 74: 141.24.44.59.57315 > 141.24.52.243.80: Flags [S],
seq 614845630, win 29200, options [mss 1460,sackOK,TS val 8811678 ecr
0,nop,wscale 6], length 0
10:30:39.150213 00:1b:0d:62:b0:00 > 4c:0b:3a:84:06:73, ethertype IPv4
(0x0800), length 74: 141.24.52.243.80 > 141.24.44.59.57315: Flags [S.],
seq 1428894719, ack 614845631, win 14480, options [mss 1409,sackOK,TS
val 20154401 ecr 8811678,nop,wscale 2], length 0
10:30:40.666887 00:1b:0d:62:b0:00 > 4c:0b:3a:84:06:73, ethertype IPv4
(0x0800), length 74: 141.24.52.243.80 > 141.24.44.59.57315: Flags [S.],
seq 1428894719, ack 614845631, win 14480, options [mss 1409,sackOK,TS
val 20154781 ecr 8811695,nop,wscale 2], length 0
wireshark sniffing wifi.
No. Time Source Destination
Protocol Length Info
64740 10:30:39.069004000 141.24.44.59 141.24.52.243
TCP 130 57314 > 80 [SYN] Seq=0 Win=29200 Len=0 MSS=1460
SACK_PERM=1 TSval=8811670 TSecr=0 WS=64
64757 10:30:39.149760000 141.24.44.59 141.24.52.243
TCP 130 57315 > 80 [SYN] Seq=0 Win=29200 Len=0 MSS=1460
SACK_PERM=1 TSval=8811678 TSecr=0 WS=64
64780 10:30:39.280128000 141.24.52.243 141.24.44.59
TCP 130 80 > 57314 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0
MSS=1409 SACK_PERM=1 TSval=20154381 TSecr=8811670 WS=4
64781 10:30:39.280636000 141.24.52.243 141.24.44.59
TCP 130 80 > 57315 [SYN, ACK] Seq=0 Ack=1 Win=14480 Len=0
MSS=1409 SACK_PERM=1 TSval=20154401 TSecr=8811678 WS=4
65083 10:30:40.668228000 141.24.52.243 141.24.44.59
TCP 130 [TCP Retransmission] 80 > 57315 [SYN, ACK] Seq=0 Ack=1
Win=14480 Len=0 MSS=1409 SACK_PERM=1 TSval=20154781 TSecr=8811695 WS=4
Does anybody have a clue?
Regards,
M. Braun
^ permalink raw reply
* Re: [PATCH 11/12] ath9k: improve tx scheduling fairness
From: Sujith Manoharan @ 2013-08-06 8:48 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, linville
In-Reply-To: <1375732583-39001-11-git-send-email-nbd@openwrt.org>
Felix Fietkau wrote:
> Instead of trying to schedule the same TID multiple times in a loop,
> iterate over other TIDs/stations first.
The txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH check in the beginning
of txq_schedule() is not really correct after this, no ?
Sujith
^ permalink raw reply
* Re: [PATCH 10/12] ath9k: use software queues for un-aggregated data packets
From: Sujith Manoharan @ 2013-08-06 8:44 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, linville
In-Reply-To: <1375732583-39001-10-git-send-email-nbd@openwrt.org>
Felix Fietkau wrote:
> + aggr = !!(tx_info->flags & IEEE80211_TX_CTL_AMPDU);
> + if ((aggr && txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH) ||
> + (!aggr && txq->axq_depth >= ATH_NON_AGGR_MIN_QDEPTH))
> + break;
> +
> + ath_set_rates(tid->an->vif, tid->an->sta, bf);
> + if (aggr)
> + last = ath_tx_form_aggr(sc, txq, tid, &bf_q, bf,
> + tid_q, &aggr_len);
> + else
> + ath_tx_form_burst(sc, txq, tid, &bf_q, bf, tid_q);
> +
> + if (list_empty(&bf_q))
> + return;
Handling non-AMPDU and AMPDU packets in the same path makes the code hard
to follow. Since a TID can either have aggregated or unaggregated packets,
why not separate the logic early, maybe in the schedule() function ?
Sujith
^ permalink raw reply
* Re: [PATCH 09/12] ath9k: always clear ps filter bit on new assoc
From: Sujith Manoharan @ 2013-08-06 7:55 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, linville
In-Reply-To: <1375732583-39001-9-git-send-email-nbd@openwrt.org>
Felix Fietkau wrote:
> Otherwise in some cases, EAPOL frames might be filtered during the
> initial handshake, causing delays and assoc failures.
I think this is a stable candidate.
Sujith
^ permalink raw reply
* Re: [PATCH 07/12] ath9k: prepare queueing code for handling unaggregated traffic
From: Sujith Manoharan @ 2013-08-06 7:45 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, linville
In-Reply-To: <1375732583-39001-7-git-send-email-nbd@openwrt.org>
Felix Fietkau wrote:
> + tx_info = IEEE80211_SKB_CB(skb);
> + tx_info->flags &= ~IEEE80211_TX_CTL_CLEAR_PS_FILT;
Why is the PS filter flag cleared here ?
> - txtid->paused = true;
> + txtid->paused = false;
Why change this ?
Sujith
^ permalink raw reply
* Re: [PATCH 01/12] ath9k: add utility functions for accessing tid queues
From: Sujith Manoharan @ 2013-08-06 7:21 UTC (permalink / raw)
To: Felix Fietkau; +Cc: linux-wireless, linville
In-Reply-To: <1375732583-39001-1-git-send-email-nbd@openwrt.org>
Felix Fietkau wrote:
> - if (skb_queue_empty(&tid->buf_q))
> + if (ath_tid_has_buffered(tid))
Shouldn't this be !ath_tid_has_buffered(tid) ?
Sujith
^ permalink raw reply
* pull-request: mac80211-next 2013-08-06
From: Johannes Berg @ 2013-08-06 8:56 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 2588 bytes --]
Hi John,
And one more for mac80211-next (and I have nothing for mac80211 today).
Here I have an IBSS improvement, interworking (11u) definitions, a
change to make the LED blinking nicer, more VHT (11ac) definitions, VHT
radiotap TX status, channel switch support in cfg80211 and mac80211 as
well as a small new debugfs file showing driver-buffered data for
sleeping clients.
Let me know if there's any problem.
Thanks,
johannes
The following changes since commit c82b5a74cc739385db6e4275fe504a0e9469bf01:
mac80211: make active monitor injection work w/ HW queue (2013-07-16 09:58:19 +0300)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211-next.git for-john
for you to fetch changes up to 73da7d5bab79ad7e16ff44d67c3fe8b9c0b33e5b:
mac80211: add channel switch command and beacon callbacks (2013-08-01 18:30:33 +0200)
----------------------------------------------------------------
Antonio Quartulli (1):
mac80211: ibss - remove not authorized station earlier
Avinash Patil (1):
ieee80211: add definition for interworking support
Fabio Baltieri (1):
mac80211: use oneshot blink API for LED triggers
Fred Zhou (1):
ieee80211: add definition for 802.11ac information elements
Johannes Berg (1):
mac80211: add debugfs for driver-buffered TID bitmap
Karl Beldan (1):
mac80211: report some VHT radiotap infos for tx status
Simon Wunderlich (2):
nl80211/cfg80211: add channel switch command
mac80211: add channel switch command and beacon callbacks
include/linux/ieee80211.h | 9 +++
include/net/cfg80211.h | 33 ++++++++
include/net/mac80211.h | 37 +++++++++
include/uapi/linux/nl80211.h | 30 +++++++
net/mac80211/cfg.c | 187 ++++++++++++++++++++++++++++++++++++++++++-
net/mac80211/chan.c | 58 ++++++++++++++
net/mac80211/debugfs_sta.c | 9 +++
net/mac80211/driver-ops.h | 13 +++
net/mac80211/ibss.c | 30 ++++++-
net/mac80211/ieee80211_i.h | 18 ++++-
net/mac80211/iface.c | 9 +++
net/mac80211/led.c | 19 ++---
net/mac80211/led.h | 4 +-
net/mac80211/status.c | 78 ++++++++++++++----
net/mac80211/trace.h | 26 ++++++
net/mac80211/tx.c | 79 +++++++++++++++++-
net/wireless/nl80211.c | 122 +++++++++++++++++++++++++++-
net/wireless/rdev-ops.h | 12 +++
net/wireless/trace.h | 33 ++++++++
19 files changed, 772 insertions(+), 34 deletions(-)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* pull-request: iwlwifi-next 2013-08-06
From: Johannes Berg @ 2013-08-06 8:52 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 2491 bytes --]
Hi John,
And a few more things for the -next stream for iwlwifi. The signal
strength reporting fix is the reason I'd originally tried to ask you to
not pull before :-)
This time I have a signal strength reporting fix from Avri, some
cleanups from Eliad, Eyal and myself and a new debugfs file from Matti.
Please let me know if there's any problem.
Thanks,
johannes
The following changes since commit 147fc9be81d10e6e863323c0b54e140b42fd1ed6:
iwlwifi: mvm: advertise support for DYNAMIC / STATIC SMPS (2013-07-31 11:05:08 +0200)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-next.git for-john
for you to fetch changes up to ef4394b9477f9078d78ae3e8359eae094c9b19d8:
iwlwifi: mvm: use designated initialization for some arrays (2013-08-06 10:35:04 +0200)
----------------------------------------------------------------
Avri Altman (1):
iwlwifi: mvm: fix signal reporting for < 3 antennas
Eliad Peller (4):
iwlwifi: fix some documentation typos
iwlwifi: pcie: some little cleanups
iwlwifi: mvm: add some missing cleanups in iwl_mvm_mac_add_interface
iwlwifi: mvm: use designated initialization for some arrays
Eyal Shapira (1):
iwlwifi: mvm: remove traffic load monitoring in rs
Johannes Berg (3):
iwlwifi: pcie: fix resume when no opmode is present
iwlwifi: mvm: small cleanups in quota management code
iwlwifi: remove transport suspend/resume indirection
Matti Gottlieb (1):
iwlwifi: mvm: Add RX statistics debugfs entry
drivers/net/wireless/iwlwifi/iwl-op-mode.h | 4 +-
drivers/net/wireless/iwlwifi/iwl-trans.h | 25 +----
drivers/net/wireless/iwlwifi/mvm/debugfs.c | 138 +++++++++++++++++++++++
drivers/net/wireless/iwlwifi/mvm/mac80211.c | 17 ++-
drivers/net/wireless/iwlwifi/mvm/mvm.h | 2 +
drivers/net/wireless/iwlwifi/mvm/ops.c | 2 +
drivers/net/wireless/iwlwifi/mvm/quota.c | 11 +-
drivers/net/wireless/iwlwifi/mvm/rs.c | 164 +++++++---------------------
drivers/net/wireless/iwlwifi/mvm/rs.h | 12 --
drivers/net/wireless/iwlwifi/mvm/rx.c | 31 +++++-
drivers/net/wireless/iwlwifi/mvm/tx.c | 2 +-
drivers/net/wireless/iwlwifi/pcie/drv.c | 18 ++-
drivers/net/wireless/iwlwifi/pcie/trans.c | 23 ----
drivers/net/wireless/iwlwifi/pcie/tx.c | 17 ++-
14 files changed, 247 insertions(+), 219 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-08-06
From: Johannes Berg @ 2013-08-06 8:50 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1622 bytes --]
John,
I have a few more fixes for iwlwifi.
We revert an rfkill bugfix that unfortunately caused more bugs, shuffle
some code to avoid touching the PCIe device before it's enabled and
disconnect if firmware fails to do our bidding. I also have Stanislaw's
fix to not crash in some channel switch scenarios.
Let me know if there's any problem.
Thanks,
johannes
The following changes since commit a53ee0a308b16e392e0219c585b10f329345766b:
iwlwifi: pcie: clear RFKILL interrupt in AMPG (2013-07-26 10:07:10 +0200)
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 057397943eee0bf3bc01a58ee52a9a6f1810258e:
iwlwifi: mvm: disconnect if time event scheduling fails (2013-08-06 10:35:19 +0200)
----------------------------------------------------------------
Emmanuel Grumbach (1):
iwlwifi: pcie: disable L1 Active after pci_enable_device
Guy Cohen (1):
Revert "iwlwifi: pcie: clear RFKILL interrupt in AMPG"
Johannes Berg (1):
iwlwifi: mvm: disconnect if time event scheduling fails
Stanislaw Gruszka (1):
iwlwifi: dvm: fix calling ieee80211_chswitch_done() with NULL
drivers/net/wireless/iwlwifi/dvm/mac80211.c | 5 +++-
drivers/net/wireless/iwlwifi/iwl-prph.h | 2 --
drivers/net/wireless/iwlwifi/mvm/time-event.c | 33 +++++++++++++++++++--------
drivers/net/wireless/iwlwifi/pcie/rx.c | 8 -------
drivers/net/wireless/iwlwifi/pcie/trans.c | 10 ++++----
5 files changed, 32 insertions(+), 26 deletions(-)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* [PATCH 3/3] net: wireless: rt2x00: Staticize rt2x00queue_pause_queue_nocheck()
From: Jingoo Han @ 2013-08-06 8:36 UTC (permalink / raw)
To: 'David S. Miller'
Cc: netdev, linux-wireless, 'Ivo van Doorn',
'Gertjan van Wingerde', 'Helmut Schaa',
Jingoo Han
rt2x00queue_pause_queue_nocheck()is used only in this file.
Fix the following sparse warning:
drivers/net/wireless/rt2x00/rt2x00queue.c:939:6: warning: symbol 'rt2x00queue_pause_queue_nocheck' was not declared. Should it be
static?
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/net/wireless/rt2x00/rt2x00queue.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.c b/drivers/net/wireless/rt2x00/rt2x00queue.c
index aa95c6c..6c8a33b 100644
--- a/drivers/net/wireless/rt2x00/rt2x00queue.c
+++ b/drivers/net/wireless/rt2x00/rt2x00queue.c
@@ -936,7 +936,7 @@ void rt2x00queue_index_inc(struct queue_entry *entry, enum queue_index index)
spin_unlock_irqrestore(&queue->index_lock, irqflags);
}
-void rt2x00queue_pause_queue_nocheck(struct data_queue *queue)
+static void rt2x00queue_pause_queue_nocheck(struct data_queue *queue)
{
switch (queue->qid) {
case QID_AC_VO:
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH] Change CONFIG_FW_LOADER_USER_HELPER to default n and don't select it
From: Maarten Lankhorst @ 2013-08-06 8:20 UTC (permalink / raw)
To: Andy Lutomirski
Cc: linux-kernel, Kay Sievers, Zbigniew Jędrzejewski-Szmek,
systemd-devel, Linux Wireless List, linux-hotplug,
Intel Linux Wireless, Johannes Berg
In-Reply-To: <325b19bb936d7ebae11edad86aac8f0931e8abd9.1375719828.git.luto@amacapital.net>
Op 05-08-13 18:29, Andy Lutomirski schreef:
> The systemd commit below can delay firmware loading by multiple
> minutes if CONFIG_FW_LOADER_USER_HELPER=y. Unfortunately no one
> noticed that the systemd-udev change would break new kernels as well
> as old kernels.
>
> Since the kernel apparently can't count on reasonable userspace
> support, turn this thing off by default.
>
> commit a3bd8447be4ea2ce230eb8ae0e815c04d85fa15a
> Author: Tom Gundersen <teg@jklm.no>
> Date: Mon Mar 18 15:12:18 2013 +0100
>
> udev: make firmware loading optional and disable by default
>
> Distros that whish to support old kernels should set
> --with-firmware-dirs="/usr/lib/firmware/updates:/usr/lib/firmware"
> to retain the old behaviour.
>
methinks this patch should be reverted then, or a stub should be added to udev to always fail firmware loading so timeouts don't occur.
~Maarten
^ permalink raw reply
* Re: b43: DMA errors with BCM4331 on BCM4706
From: Hauke Mehrtens @ 2013-08-05 16:27 UTC (permalink / raw)
To: Larry Finger
Cc: Michael Büsch, b43-dev, linux-wireless@vger.kernel.org,
Rafał Miłecki
In-Reply-To: <51FD4274.3010108@lwfinger.net>
On 08/03/2013 07:48 PM, Larry Finger wrote:
> On 08/03/2013 11:55 AM, Michael Büsch wrote:
>> On Sat, 03 Aug 2013 17:28:14 +0200
>> Hauke Mehrtens <hauke@hauke-m.de> wrote:
>>
>>> I used wireshark to see what actually happens and the device send out
>>> beacons and answers to probe requests without problems. I see the
>>> Authentication, Association Request and Association Response frames and
>>
>> That suggests DMA works for some packets and then fails?
>>
>>> Does anybody have any thought on this topic?
>>
>> You should print out more of the DMA values.
>
> Could it possibly work with short packets, but fail on longer ones?
>
> Larry
Hi,
Thanks for the hints, in fact it was the size and I got my BCM4331 in
the Access Point connected to a BCM4706 working. The problem was that
the the PCIe controller used a PCIe max request size of 128, we try to
change it in driver_pci_host.c, see "MRRS 512", but that does not get
applied to the hardware, when reading it back it is not set, the Max
payload size is changed. The BCM4331 uses a max request size of 512 by
default and that causes problems. I solved the problem by setting the
max request size to 128 for the BCM4331, pcie_set_readrq(bus->host_pci,
128) and then it worked.
The patch is currently just in OpenWrt [0], I will send the patches to
the mailing list in the next days.
@Rafał If you haven't found a BCM4331, now you can use the one in your
Access Point. ;-)
Hauke
[0]: https://dev.openwrt.org/changeset/37709
^ permalink raw reply
* [PATCH] ath9k: Fix build failure
From: Sujith Manoharan @ 2013-08-06 7:14 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
From: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Make sure that CONFIG_ATH9K_BTCOEX_SUPPORT is used for
the WLAN/BT RX diversity hooks.
Reported by the kernel build testing backend.
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
drivers/net/wireless/ath/ath9k/ar9002_phy.c | 9 ++++++++-
drivers/net/wireless/ath/ath9k/ar9003_phy.c | 9 ++++++++-
drivers/net/wireless/ath/ath9k/debug.c | 8 ++++++--
drivers/net/wireless/ath/ath9k/hw-ops.h | 4 ++++
drivers/net/wireless/ath/ath9k/hw.h | 5 ++++-
5 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/drivers/net/wireless/ath/ath9k/ar9002_phy.c b/drivers/net/wireless/ath/ath9k/ar9002_phy.c
index 456d8b9..1fc1fa9 100644
--- a/drivers/net/wireless/ath/ath9k/ar9002_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9002_phy.c
@@ -555,6 +555,8 @@ static void ar9002_hw_antdiv_comb_conf_set(struct ath_hw *ah,
REG_WRITE(ah, AR_PHY_MULTICHAIN_GAIN_CTL, regval);
}
+#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
+
static void ar9002_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
{
struct ath_btcoex_hw *btcoex = &ah->btcoex_hw;
@@ -614,6 +616,8 @@ static void ar9002_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
REG_WRITE(ah, AR_PHY_CCK_DETECT, regval);
}
+#endif
+
static void ar9002_hw_spectral_scan_config(struct ath_hw *ah,
struct ath_spec_scan *param)
{
@@ -689,10 +693,13 @@ void ar9002_hw_attach_phy_ops(struct ath_hw *ah)
ops->antdiv_comb_conf_get = ar9002_hw_antdiv_comb_conf_get;
ops->antdiv_comb_conf_set = ar9002_hw_antdiv_comb_conf_set;
- ops->set_bt_ant_diversity = ar9002_hw_set_bt_ant_diversity;
ops->spectral_scan_config = ar9002_hw_spectral_scan_config;
ops->spectral_scan_trigger = ar9002_hw_spectral_scan_trigger;
ops->spectral_scan_wait = ar9002_hw_spectral_scan_wait;
+#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
+ ops->set_bt_ant_diversity = ar9002_hw_set_bt_ant_diversity;
+#endif
+
ar9002_hw_set_nf_limits(ah);
}
diff --git a/drivers/net/wireless/ath/ath9k/ar9003_phy.c b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
index 4898829..39c3730 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
@@ -1412,6 +1412,8 @@ static void ar9003_hw_antdiv_comb_conf_set(struct ath_hw *ah,
REG_WRITE(ah, AR_PHY_MC_GAIN_CTRL, regval);
}
+#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
+
static void ar9003_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
{
struct ath9k_hw_capabilities *pCap = &ah->caps;
@@ -1513,6 +1515,8 @@ static void ar9003_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
}
}
+#endif
+
static int ar9003_hw_fast_chan_change(struct ath_hw *ah,
struct ath9k_channel *chan,
u8 *ini_reloaded)
@@ -1688,11 +1692,14 @@ void ar9003_hw_attach_phy_ops(struct ath_hw *ah)
ops->antdiv_comb_conf_get = ar9003_hw_antdiv_comb_conf_get;
ops->antdiv_comb_conf_set = ar9003_hw_antdiv_comb_conf_set;
- ops->set_bt_ant_diversity = ar9003_hw_set_bt_ant_diversity;
ops->spectral_scan_config = ar9003_hw_spectral_scan_config;
ops->spectral_scan_trigger = ar9003_hw_spectral_scan_trigger;
ops->spectral_scan_wait = ar9003_hw_spectral_scan_wait;
+#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
+ ops->set_bt_ant_diversity = ar9003_hw_set_bt_ant_diversity;
+#endif
+
ar9003_hw_set_nf_limits(ah);
ar9003_hw_set_radar_conf(ah);
memcpy(ah->nf_regs, ar9300_cca_regs, sizeof(ah->nf_regs));
diff --git a/drivers/net/wireless/ath/ath9k/debug.c b/drivers/net/wireless/ath/ath9k/debug.c
index a155190..414584e 100644
--- a/drivers/net/wireless/ath/ath9k/debug.c
+++ b/drivers/net/wireless/ath/ath9k/debug.c
@@ -270,6 +270,8 @@ static const struct file_operations fops_ani = {
.llseek = default_llseek,
};
+#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
+
static ssize_t read_file_bt_ant_diversity(struct file *file,
char __user *user_buf,
size_t count, loff_t *ppos)
@@ -323,6 +325,8 @@ static const struct file_operations fops_bt_ant_diversity = {
.llseek = default_llseek,
};
+#endif
+
void ath9k_debug_stat_ant(struct ath_softc *sc,
struct ath_hw_antcomb_conf *div_ant_conf,
int main_rssi_avg, int alt_rssi_avg)
@@ -1935,11 +1939,11 @@ int ath9k_init_debug(struct ath_hw *ah)
sc->debug.debugfs_phy, &sc->sc_ah->gpio_mask);
debugfs_create_u32("gpio_val", S_IRUSR | S_IWUSR,
sc->debug.debugfs_phy, &sc->sc_ah->gpio_val);
- debugfs_create_file("bt_ant_diversity", S_IRUSR | S_IWUSR,
- sc->debug.debugfs_phy, sc, &fops_bt_ant_diversity);
debugfs_create_file("antenna_diversity", S_IRUSR,
sc->debug.debugfs_phy, sc, &fops_antenna_diversity);
#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
+ debugfs_create_file("bt_ant_diversity", S_IRUSR | S_IWUSR,
+ sc->debug.debugfs_phy, sc, &fops_bt_ant_diversity);
debugfs_create_file("btcoex", S_IRUSR, sc->debug.debugfs_phy, sc,
&fops_btcoex);
#endif
diff --git a/drivers/net/wireless/ath/ath9k/hw-ops.h b/drivers/net/wireless/ath/ath9k/hw-ops.h
index a78d48c..83f4927 100644
--- a/drivers/net/wireless/ath/ath9k/hw-ops.h
+++ b/drivers/net/wireless/ath/ath9k/hw-ops.h
@@ -78,12 +78,16 @@ static inline void ath9k_hw_antdiv_comb_conf_set(struct ath_hw *ah,
ath9k_hw_ops(ah)->antdiv_comb_conf_set(ah, antconf);
}
+#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
+
static inline void ath9k_hw_set_bt_ant_diversity(struct ath_hw *ah, bool enable)
{
if (ath9k_hw_ops(ah)->set_bt_ant_diversity)
ath9k_hw_ops(ah)->set_bt_ant_diversity(ah, enable);
}
+#endif
+
/* Private hardware call ops */
/* PHY ops */
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 38f461c..64ff8e6 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -719,11 +719,14 @@ struct ath_hw_ops {
struct ath_hw_antcomb_conf *antconf);
void (*antdiv_comb_conf_set)(struct ath_hw *ah,
struct ath_hw_antcomb_conf *antconf);
- void (*set_bt_ant_diversity)(struct ath_hw *hw, bool enable);
void (*spectral_scan_config)(struct ath_hw *ah,
struct ath_spec_scan *param);
void (*spectral_scan_trigger)(struct ath_hw *ah);
void (*spectral_scan_wait)(struct ath_hw *ah);
+
+#ifdef CONFIG_ATH9K_BTCOEX_SUPPORT
+ void (*set_bt_ant_diversity)(struct ath_hw *hw, bool enable);
+#endif
};
struct ath_nf_limits {
--
1.8.3.4
^ permalink raw reply related
* Re: [PATCH v2] ath10k: add SoC power save option to PCI features map
From: Kalle Valo @ 2013-08-06 7:03 UTC (permalink / raw)
To: Michal Kazior; +Cc: Bartosz Markowski, linux-wireless, ath10k
In-Reply-To: <CA+BoTQkCQMZaicJpcrJGk+vz7kwMgcQcLS6PUn_4c65PJ4gRTA@mail.gmail.com>
Michal Kazior <michal.kazior@tieto.com> writes:
> On 5 August 2013 18:40, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
>
>> But this doesn't prevent taking this patch as the race has existed since
>> the beginning, right?
>
> I don't have anything against it.
That's what I assumed as well, just wanted to be sure before I commit
the patch.
> I just noticed the race and thought it's good to point out the issue.
Yes, that was a very good find. Please continue finding more races in
the code :)
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH v2] ath10k: add SoC power save option to PCI features map
From: Michal Kazior @ 2013-08-06 6:57 UTC (permalink / raw)
To: Kalle Valo; +Cc: Bartosz Markowski, linux-wireless, ath10k
In-Reply-To: <87iozkf5w0.fsf@kamboji.qca.qualcomm.com>
On 5 August 2013 18:40, Kalle Valo <kvalo@qca.qualcomm.com> wrote:
> Michal Kazior <michal.kazior@tieto.com> writes:
>
>> On 2 August 2013 09:58, Bartosz Markowski <bartosz.markowski@tieto.com> wrote:
>>> Unify the PCI options location.
>>>
>>> By default the SoC PS option is disabled to boost the
>>> performance and due to poor stability on early HW revisions.
>>> In future we can remove the module parameter and turn on/off
>>> the PS for given hardware.
>>>
>>> This change also makes the pci module parameter for SoC PS static.
>>>
>>> Signed-off-by: Bartosz Markowski <bartosz.markowski@tieto.com>
>>
>> Hmm.. I'm worried about pci wake/sleep locking:
>>
>> (a) pci_wake() (awake count =1)
>> (a) do something
>> Now, if pci_sleep() and pci_wake() happen simultaneously/are
>> preempted splitting primitive operations to:
>> (a) pci_sleep(): decrease awake count (=0)
>> (b) pci_wake(): increase awake count (=1), iowrite, wait for awake, return
>> (a) pci_sleep(): iowrite(). return
>> The flow in (b) now thinks the device is awake, but it's not
>> guaranteed to be anymore because it has been put to sleep by (a).
>
> Yeah, there's a race alright. I wonder if I have ever seen a proper use
> of a atomic variable in a wireless driver :)
>
> But this doesn't prevent taking this patch as the race has existed since
> the beginning, right?
I don't have anything against it. I just noticed the race and thought
it's good to point out the issue.
Pozdrawiam / Best regards,
Michał Kazior.
^ 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