* Re: where is ath9k debugfs?
From: George Nychis @ 2013-06-14 18:21 UTC (permalink / raw)
To: Pat Erley; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <51B7A9FB.9020706@erley.org>
Hi Pat,
You're correct on this. I always seem to forget about the distinction
between ath9k and ath_htc. Thanks a bunch!
- George
On Tue, Jun 11, 2013 at 6:51 PM, Pat Erley <pat-lkml@erley.org> wrote:
> On 06/11/2013 12:40 PM, George Nychis wrote:
>>
>> I have configured my kernel to use ath9k debugfs:
>> $ grep ATH9K_DEBUGFS /boot/config-`uname -r`
>> CONFIG_ATH9K_DEBUGFS=y
>>
>> The location of these debugfs files should be in
>> /sys/kernel/debug/ath9k according to:
>>
>> http://wireless.kernel.org/en/users/Drivers/ath9k/debug#Debugfs_files_for_ath9k
>>
>> However, when I load the modules and plug in an ath9k device, I do not
>> get any ath9k debugfs files:
>> root@parallels:/sys# find /sys -name ath9k
>> root@parallels:/sys# find /sys -name rx_chainmask
>> root@parallels:/sys# find /sys -name disable_ani
>> root@parallels:/sys#
>>
>> I do get the ieee80211 debug, though:
>> # ls -l /sys/kernel/debug/ieee80211/
>> total 0
>> drwxr-xr-x 6 root root 0 Jun 11 12:30 phy0
>>
>> Do I need to pass some parameter to the kernel module on load to get
>> the ath9k debugfs? Am I missing something else?
>>
>> Thanks!
>> George
>
>
> Hi George,
>
> When you say 'plug in an ath9k device' I assume you mean you plug it in
> before you boot? There aren't any ath9k devices that I know of that use
> USB. I believe they're all handled by ath9k_htc.
>
> Aside from that, you found the right spot (/sys/kernel/debug/ieee80211/phyN)
> for it to live. What does dmesg say when you plug in/boot with the device?
>
> Pat
^ permalink raw reply
* Re: [GIT] [3.11] NFC updates
From: John W. Linville @ 2013-06-14 17:35 UTC (permalink / raw)
To: Samuel Ortiz; +Cc: Linux Wireless, Linux NFC
In-Reply-To: <20130614115038.GI7998@zurbaran>
On Fri, Jun 14, 2013 at 01:50:38PM +0200, Samuel Ortiz wrote:
> Hi John,
>
> This is the NFC pull request for 3.11. See below for all the details,
> thanks in advance for pulling them in.
>
> The following changes since commit b70727e8a61a8e6b4d818519b03fce2937d0ef40:
>
> Merge branch 'for-linville-ath10k' of git://github.com/kvalo/ath6kl (2013-06-13 13:54:21 -0400)
>
> are available in the git repository at:
>
>
> git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next.git tags/nfc-next-3.11-1
>
> for you to fetch changes up to bda7eb27635c4d7414fb05a5f55501b71f436cc0:
>
> NFC: mei_phy: Clean up file (2013-06-14 13:45:11 +0200)
Pulling now...
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: pull-request: iwlwifi-next 2013-06-14
From: John W. Linville @ 2013-06-14 17:32 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1371206930.8278.8.camel@jlt4.sipsolutions.net>
On Fri, Jun 14, 2013 at 12:48:50PM +0200, Johannes Berg wrote:
> John,
>
> Here are some more things for -next. I will have another pull request
> some time next week because we're preparing to release the firmware for
> the 7000 series devices, and unfortunately that will require an API
> bump.
>
> This time I have a number of cleanups, a small fix from Emmanuel and two
> performance improvements that combined reduce our driver's CPU
> utilisation as much as 75% in high TX-throughput scenarios.
>
> johannes
>
>
> The following changes since commit 8eb3871076875f247483f4a1fe6713e6d440c53e:
>
> iwlwifi: mvm: Update the supported interface combinations (2013-06-11 20:17:06 +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 adaf69186c24100d34c2fb107dacd33546cad3c5:
>
> iwlwifi: mvm: remove obsolete comment (2013-06-13 16:43:16 +0200)
Pulling now...
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: pull-request: iwlwifi-fixes 2013-06-14
From: John W. Linville @ 2013-06-14 17:34 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1371206567.8278.3.camel@jlt4.sipsolutions.net>
On Fri, Jun 14, 2013 at 12:42:47PM +0200, Johannes Berg wrote:
> John,
>
> I have two more fixes that I think would be worthwhile for 3.10 but
> admittedly the scenario is somewhat unlikely, so if you want to hold
> them for 3.11 I can live with that. In that case, I can put them into my
> -next tree, or you can pull this into -next (but if you don't pull
> wireless.git first you'd get some more fixes you already have.)
>
> These two patches fix two issues with using rfkill randomly during
> traffic, which would then cause our driver to stop working and not be
> able to recover at all.
>
> johannes
>
>
> The following changes since commit 622ebe994f6866b8d46ee5d3bcc329ed65d3722d:
>
> iwlwifi: fix rate control regression (2013-06-12 14:13:39 +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 8a487b1a7432b20ff3f82387a8ce7555a964b44e:
>
> iwlwifi: pcie: wake the queue if stopped when being unmapped (2013-06-13 16:44:04 +0200)
>
> ----------------------------------------------------------------
> Emmanuel Grumbach (2):
> iwlwifi: pcie: fix race in queue unmapping
> iwlwifi: pcie: wake the queue if stopped when being unmapped
>
> drivers/net/wireless/iwlwifi/pcie/tx.c | 13 +++++++++++++
> 1 file changed, 13 insertions(+)
It isn't obvious to me that these need to be included in 3.10. I can
pull this into wireless-next once the current stuff in wireless makes
it to davem's tree.
If you decide that these really need to go, please provide some more
information on how likely users are to hit the bugs, or how serious
the effects of that would be.
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: Power saving features for iwl4965
From: Stanislaw Gruszka @ 2013-06-14 13:18 UTC (permalink / raw)
To: Pedro Francisco; +Cc: Tino Keitel, ML linux-wireless
In-Reply-To: <CAJZjf_zOF=qGEE=pWDRe0YDpAYophm93cVM8pfuL0sTRGq56EA@mail.gmail.com>
On Fri, Jun 14, 2013 at 01:50:58PM +0100, Pedro Francisco wrote:
> >> >> Could you try this experimental patch? (...)
> >> >
> >> > I am trying the iwlegacy powersave patch along with CPU scheduler BFS
> >> > and IO scheduler BFQ.
> >> >
> >> > I've got this today: (...)
> >> >
> >> > (...)
> >> I also got a SYSASSERT:
> >> (...)
> >>
> >> I disabled powersave (but kept running the same kernel) and none of
> >> the errors appeared again.
> >
> > Yes, this seems to be iwlegacy PS issue and has to be fixed before
> > this patch could be applied.
>
> But is it a driver-only issue? I had assumed it was some sort of
> fireware+driver issue...
Looks like driver issue or firmware issue that can be workaround in
the driver.
> Will running with debug on help? Or is it easily reproducible on any
> iwl3945 / iwl4465 ?
>
> Because in my case (iwl3945) it happens after boot, no prior suspend
> to RAM is required to trigger the issues.
I can reproduce microcode error on iwl4965 by reloading modules. Looks
like we put device in sleep mode and it can not be properly booted when
driver initalize. I did not yet test patch on iwl3945. When I'll do
this, I think I'll be able to reproduce problems you discovered. If not
I'll ask for more debug info.
Thanks
Stanislaw
^ permalink raw reply
* Re: Power saving features for iwl4965
From: Pedro Francisco @ 2013-06-14 12:50 UTC (permalink / raw)
To: Stanislaw Gruszka; +Cc: Tino Keitel, ML linux-wireless
In-Reply-To: <20130611161924.GB1696@redhat.com>
On Tue, Jun 11, 2013 at 5:19 PM, Stanislaw Gruszka <sgruszka@redhat.com> wrote:
> On Mon, Jun 10, 2013 at 08:31:33PM +0100, Pedro Francisco wrote:
>> On Sun, Jun 9, 2013 at 1:28 AM, Pedro Francisco
>> <pedrogfrancisco@gmail.com> wrote:
>> > On Mon, Jun 3, 2013 at 3:18 PM, Stanislaw Gruszka <sgruszka@redhat.com> wrote:
>> >> On Mon, Jun 03, 2013 at 10:52:39AM +0200, Tino Keitel wrote:
>> >>> (...)
>> >>> It would be really nice to have proper power management in a current
>> >>> kernel, as the laptop gets noticeably hotter with the current iwlegacy
>> >>> driver. That's why I still use a 3.1.10 kernel with an old
>> >>> forward-ported iwlagn driver.
>> >>
>> >> Could you try this experimental patch? (...)
>> >
>> > I am trying the iwlegacy powersave patch along with CPU scheduler BFS
>> > and IO scheduler BFQ.
>> >
>> > I've got this today: (...)
>> >
>> > (...)
>> I also got a SYSASSERT:
>> (...)
>>
>> I disabled powersave (but kept running the same kernel) and none of
>> the errors appeared again.
>
> Yes, this seems to be iwlegacy PS issue and has to be fixed before
> this patch could be applied.
But is it a driver-only issue? I had assumed it was some sort of
fireware+driver issue...
Will running with debug on help? Or is it easily reproducible on any
iwl3945 / iwl4465 ?
Because in my case (iwl3945) it happens after boot, no prior suspend
to RAM is required to trigger the issues.
P.S.: the demise of bugzilla.intellinuxwireless.org it's very
difficult to find useful info about this. It would appear 4465 is just
affected after suspend, believing the patch which disabled PS in 2009.
^ permalink raw reply
* [PATCHv2 5/5] ath9k: enable CSA functionality in ath9k
From: Simon Wunderlich @ 2013-06-14 12:15 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Simon Wunderlich, Mathias Kretschmer
In-Reply-To: <1371212124-26264-1-git-send-email-siwu@hrz.tu-chemnitz.de>
CSA is only enabled for one interface, but the same limitation applies
for mac80211 too. It checks whether the beacon has been sent (different
approaches for non-EDMA-enabled and EDMA-enabled devices), and completes
the channel switch after that.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
Changes to PATCHv1:
* complete channel switch after the last beacon has been sent
---
drivers/net/wireless/ath/ath9k/ath9k.h | 2 ++
drivers/net/wireless/ath/ath9k/beacon.c | 21 +++++++++++++++++++++
drivers/net/wireless/ath/ath9k/main.c | 17 +++++++++++++++++
drivers/net/wireless/ath/ath9k/xmit.c | 2 ++
4 files changed, 42 insertions(+)
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index 579ed9c..3745487 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -424,6 +424,7 @@ void ath9k_beacon_assign_slot(struct ath_softc *sc, struct ieee80211_vif *vif);
void ath9k_beacon_remove_slot(struct ath_softc *sc, struct ieee80211_vif *vif);
void ath9k_set_tsfadjust(struct ath_softc *sc, struct ieee80211_vif *vif);
void ath9k_set_beacon(struct ath_softc *sc);
+bool ath9k_csa_is_finished(struct ath_softc *sc);
/*******************/
/* Link Monitoring */
@@ -751,6 +752,7 @@ struct ath_softc {
#endif
struct ath_descdma txsdma;
+ struct ieee80211_vif *csa_vif;
struct ath_ant_comb ant_comb;
u8 ant_tx, ant_rx;
diff --git a/drivers/net/wireless/ath/ath9k/beacon.c b/drivers/net/wireless/ath/ath9k/beacon.c
index fd1eeba..e400151 100644
--- a/drivers/net/wireless/ath/ath9k/beacon.c
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
@@ -310,6 +310,23 @@ void ath9k_set_tsfadjust(struct ath_softc *sc, struct ieee80211_vif *vif)
(unsigned long long)tsfadjust, avp->av_bslot);
}
+bool ath9k_csa_is_finished(struct ath_softc *sc)
+{
+ struct ieee80211_vif *vif;
+
+ vif = sc->csa_vif;
+ if (!vif || !vif->csa_active)
+ return false;
+
+ if (!ieee80211_csa_is_complete(vif))
+ return false;
+
+ ieee80211_csa_finish(vif);
+ vif->csa_active = 0;
+ sc->csa_vif = NULL;
+ return true;
+}
+
void ath9k_beacon_tasklet(unsigned long data)
{
struct ath_softc *sc = (struct ath_softc *)data;
@@ -355,6 +372,10 @@ void ath9k_beacon_tasklet(unsigned long data)
return;
}
+ /* EDMA devices check that in the tx completion function. */
+ if (!edma && ath9k_csa_is_finished(sc))
+ return;
+
slot = ath9k_beacon_choose_slot(sc);
vif = sc->beacon.bslot[slot];
diff --git a/drivers/net/wireless/ath/ath9k/main.c b/drivers/net/wireless/ath/ath9k/main.c
index cc5a98b..57d0642 100644
--- a/drivers/net/wireless/ath/ath9k/main.c
+++ b/drivers/net/wireless/ath/ath9k/main.c
@@ -1026,6 +1026,9 @@ static void ath9k_remove_interface(struct ieee80211_hw *hw,
if (ath9k_uses_beacons(vif->type))
ath9k_beacon_remove_slot(sc, vif);
+ if (sc->csa_vif == vif)
+ sc->csa_vif = NULL;
+
ath9k_ps_wakeup(sc);
ath9k_calculate_summary_state(hw, NULL);
ath9k_ps_restore(sc);
@@ -2319,6 +2322,19 @@ static void ath9k_sw_scan_complete(struct ieee80211_hw *hw)
clear_bit(SC_OP_SCANNING, &sc->sc_flags);
}
+static void ath9k_channel_switch_beacon(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif)
+{
+ struct ath_softc *sc = hw->priv;
+
+ /* mac80211 does not support CSA in multi-if cases (yet) */
+ if (WARN_ON(sc->csa_vif))
+ return;
+
+ vif->csa_active = 1;
+ sc->csa_vif = vif;
+}
+
struct ieee80211_ops ath9k_ops = {
.tx = ath9k_tx,
.start = ath9k_start,
@@ -2366,4 +2382,5 @@ struct ieee80211_ops ath9k_ops = {
#endif
.sw_scan_start = ath9k_sw_scan_start,
.sw_scan_complete = ath9k_sw_scan_complete,
+ .channel_switch_beacon = ath9k_channel_switch_beacon,
};
diff --git a/drivers/net/wireless/ath/ath9k/xmit.c b/drivers/net/wireless/ath/ath9k/xmit.c
index eab0fcb..cec670d 100644
--- a/drivers/net/wireless/ath/ath9k/xmit.c
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
@@ -2282,6 +2282,8 @@ void ath_tx_edma_tasklet(struct ath_softc *sc)
if (ts.qid == sc->beacon.beaconq) {
sc->beacon.tx_processed = true;
sc->beacon.tx_last = !(ts.ts_status & ATH9K_TXERR_MASK);
+
+ ath9k_csa_is_finished(sc);
continue;
}
--
1.7.10.4
^ permalink raw reply related
* [PATCHv2 4/5] mac80211: add channel switch command and beacon callbacks
From: Simon Wunderlich @ 2013-06-14 12:15 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Simon Wunderlich, Mathias Kretschmer
In-Reply-To: <1371212124-26264-1-git-send-email-siwu@hrz.tu-chemnitz.de>
The count field in CSA must be decremented with each beacon
transmitted. This patch implements the functionality for drivers
using ieee80211_beacon_get(). Other drivers must call back manually
after reaching count == 0.
This patch also contains the handling and finish worker for the channel
switch command.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
Changes to PATCHv1:
* don't switch when CAC is active
* add hw to parameters for driver
Changes to RFCv1:
* use beacons as supplied from nl80211 without generating/parsing them
* update beacons using offsets
* report back by calling the channel switch event in cfg80211
---
include/net/mac80211.h | 33 ++++++++++++++
net/mac80211/cfg.c | 109 +++++++++++++++++++++++++++++++++++++++++++-
net/mac80211/driver-ops.h | 11 +++++
net/mac80211/ieee80211_i.h | 11 +++++
net/mac80211/iface.c | 2 +
net/mac80211/trace.h | 20 ++++++++
net/mac80211/tx.c | 68 +++++++++++++++++++++++++++
7 files changed, 252 insertions(+), 2 deletions(-)
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index a405a7a..f0592cd 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1078,6 +1078,7 @@ enum ieee80211_vif_flags {
* @addr: address of this interface
* @p2p: indicates whether this AP or STA interface is a p2p
* interface, i.e. a GO or p2p-sta respectively
+ * @csa_active: marks whether a channel switch is going on
* @driver_flags: flags/capabilities the driver has for this interface,
* these need to be set (or cleared) when the interface is added
* or, if supported by the driver, the interface type is changed
@@ -1100,6 +1101,7 @@ struct ieee80211_vif {
struct ieee80211_bss_conf bss_conf;
u8 addr[ETH_ALEN];
bool p2p;
+ bool csa_active;
u8 cab_queue;
u8 hw_queue[IEEE80211_NUM_ACS];
@@ -2631,6 +2633,16 @@ enum ieee80211_roc_type {
* @ipv6_addr_change: IPv6 address assignment on the given interface changed.
* Currently, this is only called for managed or P2P client interfaces.
* This callback is optional; it must not sleep.
+ *
+ * @channel_switch_beacon: Starts a channel switch for the to a new channel.
+ * Beacons are modified to include CSA or ECSA IEs before calling this
+ * function. The corresponding count fields in these IEs must be
+ * decremented, and when they reach zero the driver must call
+ * ieee80211_csa_finish(). Drivers which use ieee80211_beacon_get()
+ * get the csa counter decremented by mac80211, but must check if it is
+ * zero using ieee80211_csa_is_complete() and then call
+ * ieee80211_csa_finish().
+ *
*/
struct ieee80211_ops {
void (*tx)(struct ieee80211_hw *hw,
@@ -2818,6 +2830,8 @@ struct ieee80211_ops {
struct ieee80211_vif *vif,
struct inet6_dev *idev);
#endif
+ void (*channel_switch_beacon)(struct ieee80211_hw *hw,
+ struct ieee80211_vif *vif);
};
/**
@@ -3313,6 +3327,25 @@ static inline struct sk_buff *ieee80211_beacon_get(struct ieee80211_hw *hw,
}
/**
+ * ieee80211_csa_finish - notify mac80211 about channel switch
+ * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ *
+ * After a channel switch announcement was scheduled and the counter in this
+ * announcement hit zero, this function must be called by the driver to
+ * notify mac80211 that the channel can be changed.
+ */
+void ieee80211_csa_finish(struct ieee80211_vif *vif);
+
+/**
+ * ieee80211_csa_is_complete - find out if counters reached zero
+ * @vif: &struct ieee80211_vif pointer from the add_interface callback.
+ *
+ * This function checks the registered beacon if the counters reached zero.
+ */
+int ieee80211_csa_is_complete(struct ieee80211_vif *vif);
+
+
+/**
* ieee80211_proberesp_get - retrieve a Probe Response template
* @hw: pointer obtained from ieee80211_alloc_hw().
* @vif: &struct ieee80211_vif pointer from the add_interface callback.
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 5ffc7d9..e468465 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -854,8 +854,8 @@ static int ieee80211_set_probe_resp(struct ieee80211_sub_if_data *sdata,
return 0;
}
-static int ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
- struct cfg80211_beacon_data *params)
+int ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
+ struct cfg80211_beacon_data *params)
{
struct beacon_data *new, *old;
int new_head_len, new_tail_len;
@@ -2854,6 +2854,110 @@ error:
return NULL;
}
+void ieee80211_csa_finalize_work(struct work_struct *work)
+{
+ struct ieee80211_sub_if_data *sdata =
+ container_of(work, struct ieee80211_sub_if_data,
+ csa_finalize_work);
+ struct ieee80211_local *local = sdata->local;
+ int err;
+
+ if (!ieee80211_sdata_running(sdata))
+ return;
+
+ if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_AP))
+ return;
+
+ netif_carrier_off(sdata->dev);
+ err = ieee80211_vif_use_channel(sdata, &local->csa_chandef,
+ IEEE80211_CHANCTX_SHARED);
+ netif_carrier_on(sdata->dev);
+ if (WARN_ON(err < 0))
+ return;
+ netif_carrier_on(sdata->dev);
+
+ err = ieee80211_assign_beacon(sdata, sdata->u.ap.next_beacon);
+ cfg80211_beacon_free(sdata->u.ap.next_beacon);
+ sdata->u.ap.next_beacon = NULL;
+
+ ieee80211_wake_queues_by_reason(&sdata->local->hw,
+ IEEE80211_MAX_QUEUE_MAP,
+ IEEE80211_QUEUE_STOP_REASON_CSA);
+
+ ieee80211_bss_info_change_notify(sdata, err);
+
+ cfg80211_ch_switch_notify(sdata->dev, &local->csa_chandef);
+}
+
+static int ieee80211_channel_switch(struct wiphy *wiphy, struct net_device *dev,
+ struct cfg80211_csa_settings *params)
+{
+ struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ struct ieee80211_local *local = sdata->local;
+ struct ieee80211_chanctx_conf *chanctx_conf;
+ struct ieee80211_chanctx *chanctx;
+ int err;
+
+ if (!list_empty(&local->roc_list) || local->scanning)
+ return -EBUSY;
+
+ if (sdata->wdev.cac_started)
+ return -EBUSY;
+
+ /* don't handle if chanctx is used */
+ if (local->use_chanctx)
+ return -EBUSY;
+
+ rcu_read_lock();
+ mutex_lock(&local->chanctx_mtx);
+ chanctx_conf = rcu_dereference(sdata->vif.chanctx_conf);
+ if (!chanctx_conf) {
+ mutex_unlock(&local->chanctx_mtx);
+ rcu_read_unlock();
+ return -EBUSY;
+ }
+
+ /* don't handle for multi-VIF cases */
+ chanctx = container_of(chanctx_conf, struct ieee80211_chanctx, conf);
+ if (chanctx->refcount > 1) {
+ mutex_unlock(&local->chanctx_mtx);
+ rcu_read_unlock();
+ return -EBUSY;
+ }
+ mutex_unlock(&local->chanctx_mtx);
+ rcu_read_unlock();
+
+ /* only handle AP for now. */
+ switch (sdata->vif.type) {
+ case NL80211_IFTYPE_AP:
+ break;
+ default:
+ return -EOPNOTSUPP;
+ }
+
+ sdata->csa_counter_offset_beacon = params->counter_offset_beacon;
+ sdata->csa_counter_offset_presp = params->counter_offset_presp;
+ sdata->u.ap.next_beacon = cfg80211_beacon_dup(¶ms->beacon_after);
+ if (!sdata->u.ap.next_beacon)
+ return -ENOMEM;
+
+ if (params->block_tx)
+ ieee80211_stop_queues_by_reason(&local->hw,
+ IEEE80211_MAX_QUEUE_MAP,
+ IEEE80211_QUEUE_STOP_REASON_CSA);
+
+ err = ieee80211_assign_beacon(sdata, ¶ms->beacon_csa);
+ if (err < 0)
+ return err;
+
+ local->csa_chandef = params->chandef;
+
+ ieee80211_bss_info_change_notify(sdata, err);
+ drv_channel_switch_beacon(sdata);
+
+ return 0;
+}
+
static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
struct ieee80211_channel *chan, bool offchan,
unsigned int wait, const u8 *buf, size_t len,
@@ -3581,4 +3685,5 @@ struct cfg80211_ops mac80211_config_ops = {
.get_et_strings = ieee80211_get_et_strings,
.get_channel = ieee80211_cfg_get_channel,
.start_radar_detection = ieee80211_start_radar_detection,
+ .channel_switch = ieee80211_channel_switch,
};
diff --git a/net/mac80211/driver-ops.h b/net/mac80211/driver-ops.h
index b931c96..a8952f6 100644
--- a/net/mac80211/driver-ops.h
+++ b/net/mac80211/driver-ops.h
@@ -1072,4 +1072,15 @@ static inline void drv_ipv6_addr_change(struct ieee80211_local *local,
}
#endif
+static inline void
+drv_channel_switch_beacon(struct ieee80211_sub_if_data *sdata)
+{
+ struct ieee80211_local *local = sdata->local;
+ if (local->ops->channel_switch_beacon) {
+ trace_drv_channel_switch_beacon(sdata);
+ local->ops->channel_switch_beacon(&local->hw, &sdata->vif);
+ }
+}
+
+
#endif /* __MAC80211_DRIVER_OPS */
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 7a6f1a0..d34d816 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -258,6 +258,8 @@ struct ieee80211_if_ap {
struct beacon_data __rcu *beacon;
struct probe_resp __rcu *probe_resp;
+ /* to be used after channel switch. */
+ struct cfg80211_beacon_data *next_beacon;
struct list_head vlans;
struct ps_data ps;
@@ -713,6 +715,10 @@ struct ieee80211_sub_if_data {
struct ieee80211_tx_queue_params tx_conf[IEEE80211_NUM_ACS];
+ struct work_struct csa_finalize_work;
+ int csa_counter_offset_beacon;
+ int csa_counter_offset_presp;
+
/* used to reconfigure hardware SM PS */
struct work_struct recalc_smps;
@@ -1340,6 +1346,8 @@ void ieee80211_roc_purge(struct ieee80211_local *local,
void ieee80211_roc_notify_destroy(struct ieee80211_roc_work *roc, bool free);
void ieee80211_sw_roc_work(struct work_struct *work);
void ieee80211_handle_roc_started(struct ieee80211_roc_work *roc);
+/* channel switch handling */
+void ieee80211_csa_finalize_work(struct work_struct *work);
/* interface handling */
int ieee80211_iface_init(void);
@@ -1362,6 +1370,9 @@ void ieee80211_del_virtual_monitor(struct ieee80211_local *local);
bool __ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata);
void ieee80211_recalc_txpower(struct ieee80211_sub_if_data *sdata);
+int ieee80211_assign_beacon(struct ieee80211_sub_if_data *sdata,
+ struct cfg80211_beacon_data *params);
+
static inline bool ieee80211_sdata_running(struct ieee80211_sub_if_data *sdata)
{
diff --git a/net/mac80211/iface.c b/net/mac80211/iface.c
index 7cabaf2..d17692d 100644
--- a/net/mac80211/iface.c
+++ b/net/mac80211/iface.c
@@ -800,6 +800,7 @@ static void ieee80211_do_stop(struct ieee80211_sub_if_data *sdata,
cancel_work_sync(&local->dynamic_ps_enable_work);
cancel_work_sync(&sdata->recalc_smps);
+ cancel_work_sync(&sdata->csa_finalize_work);
cancel_delayed_work_sync(&sdata->dfs_cac_timer_work);
@@ -1263,6 +1264,7 @@ static void ieee80211_setup_sdata(struct ieee80211_sub_if_data *sdata,
skb_queue_head_init(&sdata->skb_queue);
INIT_WORK(&sdata->work, ieee80211_iface_work);
INIT_WORK(&sdata->recalc_smps, ieee80211_recalc_smps_work);
+ INIT_WORK(&sdata->csa_finalize_work, ieee80211_csa_finalize_work);
switch (type) {
case NL80211_IFTYPE_P2P_GO:
diff --git a/net/mac80211/trace.h b/net/mac80211/trace.h
index c215fafd7..6b2af54 100644
--- a/net/mac80211/trace.h
+++ b/net/mac80211/trace.h
@@ -1906,6 +1906,26 @@ TRACE_EVENT(api_radar_detected,
)
);
+TRACE_EVENT(drv_channel_switch_beacon,
+ TP_PROTO(struct ieee80211_sub_if_data *sdata),
+
+ TP_ARGS(sdata),
+
+ TP_STRUCT__entry(
+ VIF_ENTRY
+ ),
+
+ TP_fast_assign(
+ VIF_ASSIGN;
+ ),
+
+ TP_printk(
+ VIF_PR_FMT " channel switch",
+ VIF_PR_ARG
+ )
+);
+
+
#ifdef CONFIG_MAC80211_MESSAGE_TRACING
#undef TRACE_SYSTEM
#define TRACE_SYSTEM mac80211_msg
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 4105d0c..97751e4 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -2320,6 +2320,71 @@ static int ieee80211_beacon_add_tim(struct ieee80211_sub_if_data *sdata,
return 0;
}
+void ieee80211_csa_finish(struct ieee80211_vif *vif)
+{
+ struct ieee80211_sub_if_data *sdata = NULL;
+ sdata = vif_to_sdata(vif);
+
+ vif->csa_active = 0;
+ ieee80211_queue_work(&sdata->local->hw,
+ &sdata->csa_finalize_work);
+}
+EXPORT_SYMBOL(ieee80211_csa_finish);
+
+static void ieee80211_update_csa(struct ieee80211_sub_if_data *sdata,
+ struct beacon_data *beacon)
+{
+ struct probe_resp *resp;
+ int counter_beacon = sdata->csa_counter_offset_beacon;
+ int counter_presp = sdata->csa_counter_offset_presp;
+
+ if (WARN_ON(counter_beacon > beacon->tail_len))
+ return;
+
+ if (WARN_ON(((u8 *)beacon->tail)[counter_beacon] == 0))
+ return;
+
+ ((u8 *)beacon->tail)[counter_beacon]--;
+
+ if (counter_presp && sdata->vif.type == NL80211_IFTYPE_AP) {
+ resp = rcu_dereference(sdata->u.ap.probe_resp);
+ if (WARN_ON(!resp))
+ return;
+ if (WARN_ON(counter_presp > resp->len))
+ return;
+
+ ((u8 *)resp->data)[counter_presp]--;
+ }
+}
+
+int ieee80211_csa_is_complete(struct ieee80211_vif *vif)
+{
+ struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ struct beacon_data *beacon = NULL;
+ int counter_beacon = sdata->csa_counter_offset_beacon;
+
+ if (!sdata || !ieee80211_sdata_running(sdata))
+ return 0;
+
+ if (vif->type == NL80211_IFTYPE_AP) {
+ struct ieee80211_if_ap *ap = &sdata->u.ap;
+ beacon = rcu_dereference(ap->beacon);
+
+ } else {
+ WARN_ON(1);
+ return 0;
+ }
+
+ if (WARN_ON(counter_beacon > beacon->tail_len))
+ return 0;
+
+ if (((u8 *)beacon->tail)[counter_beacon] == 0)
+ return 1;
+
+ return 0;
+}
+EXPORT_SYMBOL(ieee80211_csa_is_complete);
+
struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
struct ieee80211_vif *vif,
u16 *tim_offset, u16 *tim_length)
@@ -2350,6 +2415,9 @@ struct sk_buff *ieee80211_beacon_get_tim(struct ieee80211_hw *hw,
struct beacon_data *beacon = rcu_dereference(ap->beacon);
if (beacon) {
+ if (sdata->vif.csa_active)
+ ieee80211_update_csa(sdata, beacon);
+
/*
* headroom, head length,
* tail length and maximum TIM length
--
1.7.10.4
^ permalink raw reply related
* [PATCHv2 3/5] mac80211: add functions to duplicate a cfg80211_beacon
From: Simon Wunderlich @ 2013-06-14 12:15 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Simon Wunderlich, Mathias Kretschmer
In-Reply-To: <1371212124-26264-1-git-send-email-siwu@hrz.tu-chemnitz.de>
For the channel switch announcement, it is required to set a new beacon
after the driver arrived on the new channel. The new beacon will be set
by nl80211, but is required to duplicate the beacon as the original
memory within the netlink message will be gone. Add functions to
duplicate and free these cfg80211 beacons.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
net/mac80211/cfg.c | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 76 insertions(+)
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 64cf294..5ffc7d9 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -2778,6 +2778,82 @@ static int ieee80211_start_radar_detection(struct wiphy *wiphy,
return 0;
}
+static void cfg80211_beacon_free(struct cfg80211_beacon_data *beacon)
+{
+ kfree(beacon->head);
+ kfree(beacon->tail);
+ kfree(beacon->beacon_ies);
+ kfree(beacon->proberesp_ies);
+ kfree(beacon->assocresp_ies);
+ kfree(beacon->probe_resp);
+ kfree(beacon);
+}
+
+static struct cfg80211_beacon_data *
+cfg80211_beacon_dup(struct cfg80211_beacon_data *beacon)
+{
+ struct cfg80211_beacon_data *new_beacon;
+ new_beacon = kzalloc(sizeof(*new_beacon), GFP_KERNEL);
+ if (!beacon)
+ return NULL;
+
+ if (beacon->head_len) {
+ new_beacon->head = kmalloc(beacon->head_len, GFP_KERNEL);
+ new_beacon->head_len = beacon->head_len;
+ if (!new_beacon->head)
+ goto error;
+ memcpy((u8 *)new_beacon->head, beacon->head, beacon->head_len);
+ }
+ if (beacon->tail_len) {
+ new_beacon->tail = kmalloc(beacon->tail_len, GFP_KERNEL);
+ new_beacon->tail_len = beacon->tail_len;
+ if (!new_beacon->tail)
+ goto error;
+ memcpy((u8 *)new_beacon->tail, beacon->tail, beacon->tail_len);
+ }
+ if (beacon->beacon_ies_len) {
+ new_beacon->beacon_ies = kmalloc(beacon->beacon_ies_len,
+ GFP_KERNEL);
+ new_beacon->beacon_ies_len = beacon->beacon_ies_len;
+ if (!new_beacon->beacon_ies)
+ goto error;
+ memcpy((u8 *)new_beacon->beacon_ies, beacon->beacon_ies,
+ beacon->beacon_ies_len);
+ }
+ if (beacon->proberesp_ies_len) {
+ new_beacon->proberesp_ies = kmalloc(beacon->proberesp_ies_len,
+ GFP_KERNEL);
+ new_beacon->proberesp_ies_len = beacon->proberesp_ies_len;
+ if (!new_beacon->proberesp_ies)
+ goto error;
+ memcpy((u8 *)new_beacon->proberesp_ies, beacon->proberesp_ies,
+ beacon->proberesp_ies_len);
+ }
+ if (beacon->assocresp_ies_len) {
+ new_beacon->assocresp_ies = kmalloc(beacon->assocresp_ies_len,
+ GFP_KERNEL);
+ new_beacon->assocresp_ies_len = beacon->assocresp_ies_len;
+ if (!new_beacon->assocresp_ies)
+ goto error;
+ memcpy((u8 *)new_beacon->assocresp_ies, beacon->assocresp_ies,
+ beacon->assocresp_ies_len);
+ }
+ if (beacon->probe_resp_len) {
+ new_beacon->probe_resp = kmalloc(beacon->probe_resp_len,
+ GFP_KERNEL);
+ new_beacon->probe_resp_len = beacon->probe_resp_len;
+ if (!new_beacon->probe_resp)
+ goto error;
+ memcpy((u8 *)new_beacon->probe_resp, beacon->probe_resp,
+ beacon->probe_resp_len);
+ }
+
+ return new_beacon;
+error:
+ cfg80211_beacon_free(new_beacon);
+ return NULL;
+}
+
static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct wireless_dev *wdev,
struct ieee80211_channel *chan, bool offchan,
unsigned int wait, const u8 *buf, size_t len,
--
1.7.10.4
^ permalink raw reply related
* [PATCHv2 1/5] nl80211: use attributes to parse beacons
From: Simon Wunderlich @ 2013-06-14 12:15 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Simon Wunderlich, Mathias Kretschmer
In-Reply-To: <1371212124-26264-1-git-send-email-siwu@hrz.tu-chemnitz.de>
only the attributes are required and not the whole netlink info, as the
function accesses the attributes only anyway. This makes it easier to
parse nested beacon IEs later.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
net/wireless/nl80211.c | 53 +++++++++++++++++++++++-------------------------
1 file changed, 25 insertions(+), 28 deletions(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index e402819..1c4f7da 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -2882,61 +2882,58 @@ static int nl80211_set_mac_acl(struct sk_buff *skb, struct genl_info *info)
return err;
}
-static int nl80211_parse_beacon(struct genl_info *info,
+static int nl80211_parse_beacon(struct nlattr *attrs[],
struct cfg80211_beacon_data *bcn)
{
bool haveinfo = false;
- if (!is_valid_ie_attr(info->attrs[NL80211_ATTR_BEACON_TAIL]) ||
- !is_valid_ie_attr(info->attrs[NL80211_ATTR_IE]) ||
- !is_valid_ie_attr(info->attrs[NL80211_ATTR_IE_PROBE_RESP]) ||
- !is_valid_ie_attr(info->attrs[NL80211_ATTR_IE_ASSOC_RESP]))
+ if (!is_valid_ie_attr(attrs[NL80211_ATTR_BEACON_TAIL]) ||
+ !is_valid_ie_attr(attrs[NL80211_ATTR_IE]) ||
+ !is_valid_ie_attr(attrs[NL80211_ATTR_IE_PROBE_RESP]) ||
+ !is_valid_ie_attr(attrs[NL80211_ATTR_IE_ASSOC_RESP]))
return -EINVAL;
memset(bcn, 0, sizeof(*bcn));
- if (info->attrs[NL80211_ATTR_BEACON_HEAD]) {
- bcn->head = nla_data(info->attrs[NL80211_ATTR_BEACON_HEAD]);
- bcn->head_len = nla_len(info->attrs[NL80211_ATTR_BEACON_HEAD]);
+ if (attrs[NL80211_ATTR_BEACON_HEAD]) {
+ bcn->head = nla_data(attrs[NL80211_ATTR_BEACON_HEAD]);
+ bcn->head_len = nla_len(attrs[NL80211_ATTR_BEACON_HEAD]);
if (!bcn->head_len)
return -EINVAL;
haveinfo = true;
}
- if (info->attrs[NL80211_ATTR_BEACON_TAIL]) {
- bcn->tail = nla_data(info->attrs[NL80211_ATTR_BEACON_TAIL]);
- bcn->tail_len =
- nla_len(info->attrs[NL80211_ATTR_BEACON_TAIL]);
+ if (attrs[NL80211_ATTR_BEACON_TAIL]) {
+ bcn->tail = nla_data(attrs[NL80211_ATTR_BEACON_TAIL]);
+ bcn->tail_len = nla_len(attrs[NL80211_ATTR_BEACON_TAIL]);
haveinfo = true;
}
if (!haveinfo)
return -EINVAL;
- if (info->attrs[NL80211_ATTR_IE]) {
- bcn->beacon_ies = nla_data(info->attrs[NL80211_ATTR_IE]);
- bcn->beacon_ies_len = nla_len(info->attrs[NL80211_ATTR_IE]);
+ if (attrs[NL80211_ATTR_IE]) {
+ bcn->beacon_ies = nla_data(attrs[NL80211_ATTR_IE]);
+ bcn->beacon_ies_len = nla_len(attrs[NL80211_ATTR_IE]);
}
- if (info->attrs[NL80211_ATTR_IE_PROBE_RESP]) {
+ if (attrs[NL80211_ATTR_IE_PROBE_RESP]) {
bcn->proberesp_ies =
- nla_data(info->attrs[NL80211_ATTR_IE_PROBE_RESP]);
+ nla_data(attrs[NL80211_ATTR_IE_PROBE_RESP]);
bcn->proberesp_ies_len =
- nla_len(info->attrs[NL80211_ATTR_IE_PROBE_RESP]);
+ nla_len(attrs[NL80211_ATTR_IE_PROBE_RESP]);
}
- if (info->attrs[NL80211_ATTR_IE_ASSOC_RESP]) {
+ if (attrs[NL80211_ATTR_IE_ASSOC_RESP]) {
bcn->assocresp_ies =
- nla_data(info->attrs[NL80211_ATTR_IE_ASSOC_RESP]);
+ nla_data(attrs[NL80211_ATTR_IE_ASSOC_RESP]);
bcn->assocresp_ies_len =
- nla_len(info->attrs[NL80211_ATTR_IE_ASSOC_RESP]);
+ nla_len(attrs[NL80211_ATTR_IE_ASSOC_RESP]);
}
- if (info->attrs[NL80211_ATTR_PROBE_RESP]) {
- bcn->probe_resp =
- nla_data(info->attrs[NL80211_ATTR_PROBE_RESP]);
- bcn->probe_resp_len =
- nla_len(info->attrs[NL80211_ATTR_PROBE_RESP]);
+ if (attrs[NL80211_ATTR_PROBE_RESP]) {
+ bcn->probe_resp = nla_data(attrs[NL80211_ATTR_PROBE_RESP]);
+ bcn->probe_resp_len = nla_len(attrs[NL80211_ATTR_PROBE_RESP]);
}
return 0;
@@ -3015,7 +3012,7 @@ static int nl80211_start_ap(struct sk_buff *skb, struct genl_info *info)
!info->attrs[NL80211_ATTR_BEACON_HEAD])
return -EINVAL;
- err = nl80211_parse_beacon(info, ¶ms.beacon);
+ err = nl80211_parse_beacon(info->attrs, ¶ms.beacon);
if (err)
return err;
@@ -3167,7 +3164,7 @@ static int nl80211_set_beacon(struct sk_buff *skb, struct genl_info *info)
if (!wdev->beacon_interval)
return -EINVAL;
- err = nl80211_parse_beacon(info, ¶ms);
+ err = nl80211_parse_beacon(info->attrs, ¶ms);
if (err)
return err;
--
1.7.10.4
^ permalink raw reply related
* [PATCHv2 2/5] nl80211/cfg80211: add channel switch command
From: Simon Wunderlich @ 2013-06-14 12:15 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Simon Wunderlich, Mathias Kretschmer
In-Reply-To: <1371212124-26264-1-git-send-email-siwu@hrz.tu-chemnitz.de>
To allow channel switch announcements within beacons, add
the channel switch command to nl80211/cfg80211. This is
implementation is intended for AP and (later) IBSS mode.
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Mathias Kretschmer <mathias.kretschmer@fokus.fraunhofer.de>
---
Changes to RFCv1:
* accept and pass CSA IEs and after-change IEs
* use parameter structure instead of individual parameters
---
include/net/cfg80211.h | 26 ++++++++++
include/uapi/linux/nl80211.h | 29 +++++++++++
net/wireless/nl80211.c | 118 +++++++++++++++++++++++++++++++++++++++++-
3 files changed, 172 insertions(+), 1 deletion(-)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index 3c3a563..0de5384 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -610,6 +610,29 @@ struct cfg80211_ap_settings {
bool radar_required;
};
+/* struct cfg80211_csa_settings - channel switch settings
+ *
+ * Used for channel switch
+ *
+ * @chandef: defines the channel to use after the switch
+ * @beacon_csa: beacon data while performing the switch
+ * @counter_offset_beacon: offset for the counter within the beacon (tail)
+ * @counter_offset_presp: offset for the counter within the probe response
+ * @beacon_after: beacon data to be used on the new channel
+ * @radar_required: whether radar detection is required on the new channel
+ * @block_tx: whether transmissions should be blocked while changing
+ * @count: number of beacons until switch
+ */
+struct cfg80211_csa_settings {
+ struct cfg80211_chan_def chandef;
+ struct cfg80211_beacon_data beacon_csa;
+ u16 counter_offset_beacon, counter_offset_presp;
+ struct cfg80211_beacon_data beacon_after;
+ bool radar_required;
+ bool block_tx;
+ u8 count;
+};
+
/**
* enum station_parameters_apply_mask - station parameter values to apply
* @STATION_PARAM_APPLY_UAPSD: apply new uAPSD parameters (uapsd_queues, max_sp)
@@ -2278,6 +2301,9 @@ struct cfg80211_ops {
u16 duration);
void (*crit_proto_stop)(struct wiphy *wiphy,
struct wireless_dev *wdev);
+ int (*channel_switch)(struct wiphy *wiphy,
+ struct net_device *dev,
+ struct cfg80211_csa_settings *params);
};
/*
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index ca6facf..ddf3b9e 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -648,6 +648,16 @@
* @NL80211_CMD_CRIT_PROTOCOL_STOP: Indicates the connection reliability can
* return back to normal.
*
+ * @NL80211_CMD_CHANNEL_SWITCH: Perform a channel switch by announcing the
+ * the new channel information (Channel Switch Announcement - CSA)
+ * in the beacon for some time (as defined in the
+ * %NL80211_ATTR_CH_SWITCH_COUNT parameter) and then change to the
+ * new channel. Userspace provides the new channel information (using
+ * %NL80211_ATTR_WIPHY_FREQ and the attributes determining channel
+ * width). %NL80211_ATTR_CH_SWITCH_BLOCK_TX may be supplied to inform
+ * other station that transmission must be blocked until the channel
+ * switch is complete.
+ *
* @NL80211_CMD_MAX: highest used command number
* @__NL80211_CMD_AFTER_LAST: internal use
*/
@@ -810,6 +820,7 @@ enum nl80211_commands {
NL80211_CMD_CRIT_PROTOCOL_START,
NL80211_CMD_CRIT_PROTOCOL_STOP,
+ NL80211_CMD_CHANNEL_SWITCH,
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@@ -1436,6 +1447,18 @@ enum nl80211_commands {
* allowed to be used with the first @NL80211_CMD_SET_STATION command to
* update a TDLS peer STA entry.
*
+ * @NL80211_ATTR_CH_SWITCH_COUNT: u32 attribute specifying the number of TBTT's
+ * until the channel switch event.
+ * @NL80211_ATTR_CH_SWITCH_BLOCK_TX: flag attribute specifying that transmission
+ * must be blocked on the current channel (before the channel switch
+ * operation).
+ * @NL80211_ATTR_CSA_IES: Nested set of attributes containing the IE information
+ * for the time while performing a channel switch.
+ * @NL80211_ATTR_CSA_C_OFF_BEACON: Offset of the channel switch counter
+ * field in the beacons tail (%NL80211_ATTR_BEACON_TAIL).
+ * @NL80211_ATTR_CSA_C_OFF_PRESP: Offset of the channel switch counter
+ * field in the probe response (%NL80211_ATTR_PROBE_RESP).
+ *
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
*/
@@ -1736,6 +1759,12 @@ enum nl80211_attrs {
NL80211_ATTR_PEER_AID,
+ NL80211_ATTR_CH_SWITCH_COUNT,
+ NL80211_ATTR_CH_SWITCH_BLOCK_TX,
+ NL80211_ATTR_CSA_IES,
+ NL80211_ATTR_CSA_C_OFF_BEACON,
+ NL80211_ATTR_CSA_C_OFF_PRESP,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 1c4f7da..d48a00d 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -349,6 +349,11 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
[NL80211_ATTR_IE_RIC] = { .type = NLA_BINARY,
.len = IEEE80211_MAX_DATA_LEN },
[NL80211_ATTR_PEER_AID] = { .type = NLA_U16 },
+ [NL80211_ATTR_CH_SWITCH_COUNT] = { .type = NLA_U32 },
+ [NL80211_ATTR_CH_SWITCH_BLOCK_TX] = { .type = NLA_FLAG },
+ [NL80211_ATTR_CSA_IES] = { .type = NLA_NESTED },
+ [NL80211_ATTR_CSA_C_OFF_BEACON] = { .type = NLA_U16 },
+ [NL80211_ATTR_CSA_C_OFF_PRESP] = { .type = NLA_U16 },
};
/* policy for the key attributes */
@@ -5540,6 +5545,109 @@ static int nl80211_start_radar_detection(struct sk_buff *skb,
return err;
}
+static int nl80211_channel_switch(struct sk_buff *skb,
+ struct genl_info *info)
+{
+ struct cfg80211_registered_device *rdev = info->user_ptr[0];
+ struct net_device *dev = info->user_ptr[1];
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_csa_settings params;
+ struct nlattr *csa_ies[NL80211_ATTR_MAX+1];
+ u8 radar_detect_width = 0;
+ int err;
+
+ if (!rdev->ops->channel_switch)
+ return -EOPNOTSUPP;
+
+ /* may add IBSS support later */
+ if (dev->ieee80211_ptr->iftype != NL80211_IFTYPE_AP &&
+ dev->ieee80211_ptr->iftype != NL80211_IFTYPE_P2P_GO)
+ return -EOPNOTSUPP;
+
+ memset(¶ms, 0, sizeof(params));
+
+ if (!info->attrs[NL80211_ATTR_WIPHY_FREQ] ||
+ !info->attrs[NL80211_ATTR_CH_SWITCH_COUNT])
+ return -EINVAL;
+
+ /* only important for AP, IBSS and mesh create IEs internally */
+ if (!info->attrs[NL80211_ATTR_CSA_IES] ||
+ !info->attrs[NL80211_ATTR_CSA_C_OFF_BEACON])
+ return -EINVAL;
+
+ /* useless if AP is not running */
+ if (!wdev->beacon_interval)
+ return -EINVAL;
+
+ params.count = nla_get_u32(info->attrs[NL80211_ATTR_CH_SWITCH_COUNT]);
+
+ err = nl80211_parse_beacon(info->attrs, ¶ms.beacon_after);
+ if (err)
+ return err;
+
+ err = nla_parse_nested(csa_ies, NL80211_ATTR_MAX,
+ info->attrs[NL80211_ATTR_CSA_IES],
+ nl80211_policy);
+ if (err)
+ return err;
+
+ err = nl80211_parse_beacon(csa_ies, ¶ms.beacon_csa);
+ if (err)
+ return err;
+
+ params.counter_offset_beacon =
+ nla_get_u16(info->attrs[NL80211_ATTR_CSA_C_OFF_BEACON]);
+ if (params.counter_offset_beacon > params.beacon_csa.tail_len)
+ return -EINVAL;
+
+ /* sanity check - counter should be the same this should be the same */
+ if (params.beacon_csa.tail[params.counter_offset_beacon] !=
+ params.count)
+ return -EINVAL;
+
+ if (info->attrs[NL80211_ATTR_CSA_C_OFF_PRESP]) {
+ params.counter_offset_presp =
+ nla_get_u16(info->attrs[NL80211_ATTR_CSA_C_OFF_PRESP]);
+ if (params.counter_offset_presp >
+ params.beacon_csa.probe_resp_len)
+ return -EINVAL;
+
+ if (params.beacon_csa.probe_resp[params.counter_offset_presp] !=
+ params.count)
+ return -EINVAL;
+ }
+
+ err = nl80211_parse_chandef(rdev, info, ¶ms.chandef);
+ if (err)
+ return err;
+
+ if (!cfg80211_reg_can_beacon(&rdev->wiphy, ¶ms.chandef))
+ return -EINVAL;
+
+ err = cfg80211_chandef_dfs_required(wdev->wiphy, ¶ms.chandef);
+ if (err < 0)
+ return err;
+
+ if (err)
+ radar_detect_width = BIT(params.chandef.width);
+ else
+ radar_detect_width = 0;
+
+ err = cfg80211_can_use_iftype_chan(rdev, wdev, wdev->iftype,
+ params.chandef.chan,
+ CHAN_MODE_SHARED,
+ radar_detect_width);
+ if (err)
+ return err;
+
+ if (info->attrs[NL80211_ATTR_CH_SWITCH_BLOCK_TX])
+ params.block_tx = true;
+
+ err = rdev->ops->channel_switch(&rdev->wiphy, dev, ¶ms);
+
+ return err;
+}
+
static int nl80211_send_bss(struct sk_buff *msg, struct netlink_callback *cb,
u32 seq, int flags,
struct cfg80211_registered_device *rdev,
@@ -8995,7 +9103,15 @@ static struct genl_ops nl80211_ops[] = {
.flags = GENL_ADMIN_PERM,
.internal_flags = NL80211_FLAG_NEED_WDEV_UP |
NL80211_FLAG_NEED_RTNL,
- }
+ },
+ {
+ .cmd = NL80211_CMD_CHANNEL_SWITCH,
+ .doit = nl80211_channel_switch,
+ .policy = nl80211_policy,
+ .flags = GENL_ADMIN_PERM,
+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
+ NL80211_FLAG_NEED_RTNL,
+ },
};
static struct genl_multicast_group nl80211_mlme_mcgrp = {
--
1.7.10.4
^ permalink raw reply related
* [PATCHv2 0/5] add master channel switch announcement support
From: Simon Wunderlich @ 2013-06-14 12:15 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Simon Wunderlich
This is a follow up from PATCHv1 last week. This patchset adds generic
channel switch support for AP. This is required for DFS operation
(e.g. Wi-Fi Alliance requires this for 802.11h certification). This will also
be required for IBSS-DFS later.
Changes from PATCHv1:
* integrate Felix suggestion to perform the channel switch after the beacon send
has been completed. This required a few minor design changes (i.e. split into
functions for decrementation and check for csa completion in mac80211)
* few minor changes (e.g. check for CSA in mac80211, documentation)
The rough design is:
* userspace asks kernel to switch a channel using the new NL80211_CMD_CHANNEL_SWITCH
command. It supplies IE information for the time while staying on the old channel and
announcing the switch, and IE information for after the switch to the new channel.
* IE information contains the beacon and optionally probe responses, which should
include (E)CSA IEs for the CSA case. Furthermore an offset is provided (for beacon
and probe response) to point to the counter field within the channel switch IEs.
* The driver gets the new beacons passed and must set them, and decrement the
counter field. When it reaches 0, the channel is changed and userspace notified.
Discussion points:
* Assembling all these IE information is a little bit tedious but doable (I've
patched hostapd).
* Other future users like IBSS/MESH will not get the beacon/probe response IEs, as they
generate these beacons themselves. Therefore they need the COUNT attribute, which
is kind of duplicate right now.
* Userspace must generate/handle all IEs, which lifts the previous limitations of
the RFC (e.g. no change of band allowed, no operation mode change allowed).
* it currently works for me [TM] on my ath9k based machine
As always, any comments are appreciated.
Cheers,
Simon
Simon Wunderlich (5):
nl80211: use attributes to parse beacons
nl80211/cfg80211: add channel switch command
mac80211: add functions to duplicate a cfg80211_beacon
mac80211: add channel switch command and beacon callbacks
ath9k: enable CSA functionality in ath9k
drivers/net/wireless/ath/ath9k/ath9k.h | 2 +
drivers/net/wireless/ath/ath9k/beacon.c | 21 ++++
drivers/net/wireless/ath/ath9k/main.c | 17 +++
drivers/net/wireless/ath/ath9k/xmit.c | 2 +
include/net/cfg80211.h | 26 +++++
include/net/mac80211.h | 33 ++++++
include/uapi/linux/nl80211.h | 29 +++++
net/mac80211/cfg.c | 185 ++++++++++++++++++++++++++++++-
net/mac80211/driver-ops.h | 11 ++
net/mac80211/ieee80211_i.h | 11 ++
net/mac80211/iface.c | 2 +
net/mac80211/trace.h | 20 ++++
net/mac80211/tx.c | 68 ++++++++++++
net/wireless/nl80211.c | 171 +++++++++++++++++++++++-----
14 files changed, 567 insertions(+), 31 deletions(-)
--
1.7.10.4
^ permalink raw reply
* [GIT] [3.11] NFC updates
From: Samuel Ortiz @ 2013-06-14 11:50 UTC (permalink / raw)
To: John W. Linville; +Cc: Linux Wireless, Linux NFC
Hi John,
This is the NFC pull request for 3.11. See below for all the details,
thanks in advance for pulling them in.
The following changes since commit b70727e8a61a8e6b4d818519b03fce2937d0ef40:
Merge branch 'for-linville-ath10k' of git://github.com/kvalo/ath6kl (2013-06-13 13:54:21 -0400)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/sameo/nfc-next.git tags/nfc-next-3.11-1
for you to fetch changes up to bda7eb27635c4d7414fb05a5f55501b71f436cc0:
NFC: mei_phy: Clean up file (2013-06-14 13:45:11 +0200)
----------------------------------------------------------------
These are the pending NFC patches for the 3.11 merge window.
It contains the pending fixes that were on nfc-fixes (nfc-fixes-3.10-2),
along with a few more for the pn544 and pn533 drivers, the LLCP
disconnection path and an LLCP memory leak.
Highlights for this one are:
- An initial secure element API. NFC chipsets can carry an embedded
secure element or get access to the SIM one. In both cases they
control the secure elements and this API provides a way to discover,
enable and disable the available SEs. It also exports that to
userspace in order for SE focused middleware to actually do something
with them (e.g. payments).
- NCI over SPI support. SPI is the most complex NCI specified transport
layer and we now have support for it in the kernel. The next step will
be to implement drivers for NCI chipsets using this transport like
e.g. bcm2079x.
- NFC p2p hardware simulation driver. We now have an nfcsim driver that
is mostly a loopback device between 2 NFC interfaces. It also
implements the rest of the NFC core API like polling and target
detection. This driver, with neard running on top of it, allows us to
completely test the LLCP, SNEP and Handover implementation without
physical hardware.
- A Firmware update netlink API. Most (All ?) HCI chipsets have a
special firmware update mode where applications can push a new
firmware that will be flashed. We now have a netlink API for providing
that mode to e.g. nfctool.
----------------------------------------------------------------
Arron Wang (2):
NFC: pn544: Identify Type F NFC-DEP through NFCID2
NFC: pn544: Remove Felica and Jewel device presence check
Eric Lapuyade (2):
NFC: Add firmware upload netlink command
NFC: HCI: Implement fw_upload ops
Frederic Danis (4):
NFC: NCI: Fix skb->dev usage
NFC: Add basic NCI over SPI
NFC: Add NCI over SPI send
NFC: Add NCI over SPI receive
Olivier Guiter (1):
NFC: pn533: Fix ACR122 related debug output
Samuel Ortiz (14):
NFC: HCI: Follow a positive code path in the HCI ops implementations
NFC: pn533: Use 0x3 for SENSF_REQ Time Slot Number (TSN)
NFC: pn533: Copy NFCID2 through ATR_REQ
NFC: Remove the static supported_se field
NFC: Extend and fix the internal secure element API
NFC: Add secure elements addition and removal API
NFC: Send netlink events for secure elements additions and removals
NFC: Remove and free all SEs when releasing an NFC device
NFC: Add secure element enablement internal API
NFC: Add secure element enablement netlink API
NFC: llcp: Fix non blocking sockets connections
NFC: llcp: Do not send pending Tx frames when the remote is not ready
NFC: llcp: Set the LLC Link Management well known service bit
NFC: llcp: Fix the well known services endianness
Thierry Escande (4):
NFC: Rename nfc_llcp_disconnect() to nfc_llcp_send_disconnect()
NFC: Keep socket alive until the DISC PDU is actually sent
NFC: Fix a potential memory leak
NFC: Add a nfc hardware simulation driver
Valentin Ilie (1):
NFC: mei_phy: Clean up file
Wei Yongjun (1):
NFC: pn533: Fix error return code in pn533_probe()
drivers/nfc/Kconfig | 10 +
drivers/nfc/Makefile | 1 +
drivers/nfc/mei_phy.c | 6 +-
drivers/nfc/microread/microread.c | 6 +-
drivers/nfc/nfcsim.c | 541 +++++++++++++++++++++++++++++++++++++
drivers/nfc/nfcwilink.c | 18 +-
drivers/nfc/pn533.c | 31 ++-
drivers/nfc/pn544/pn544.c | 40 +--
include/net/nfc/hci.h | 7 +-
include/net/nfc/nci_core.h | 58 +++-
include/net/nfc/nfc.h | 35 ++-
include/uapi/linux/nfc.h | 18 +-
net/nfc/core.c | 224 ++++++++++++++-
net/nfc/hci/core.c | 75 +++--
net/nfc/llcp.h | 3 +-
net/nfc/llcp_commands.c | 22 +-
net/nfc/llcp_core.c | 16 +-
net/nfc/llcp_sock.c | 19 +-
net/nfc/nci/Kconfig | 10 +
net/nfc/nci/Makefile | 4 +-
net/nfc/nci/core.c | 37 ++-
net/nfc/nci/data.c | 2 -
net/nfc/nci/spi.c | 378 ++++++++++++++++++++++++++
net/nfc/netlink.c | 183 ++++++++++++-
net/nfc/nfc.h | 11 +
25 files changed, 1629 insertions(+), 126 deletions(-)
create mode 100644 drivers/nfc/nfcsim.c
create mode 100644 net/nfc/nci/spi.c
--
Intel Open Source Technology Centre
http://oss.intel.com/
^ permalink raw reply
* pull-request: iwlwifi-next 2013-06-14
From: Johannes Berg @ 2013-06-14 10:48 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 2408 bytes --]
John,
Here are some more things for -next. I will have another pull request
some time next week because we're preparing to release the firmware for
the 7000 series devices, and unfortunately that will require an API
bump.
This time I have a number of cleanups, a small fix from Emmanuel and two
performance improvements that combined reduce our driver's CPU
utilisation as much as 75% in high TX-throughput scenarios.
johannes
The following changes since commit 8eb3871076875f247483f4a1fe6713e6d440c53e:
iwlwifi: mvm: Update the supported interface combinations (2013-06-11 20:17:06 +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 adaf69186c24100d34c2fb107dacd33546cad3c5:
iwlwifi: mvm: remove obsolete comment (2013-06-13 16:43:16 +0200)
----------------------------------------------------------------
David Spinadel (1):
iwlwifi: remove calib channel section from PHY DB
Emmanuel Grumbach (2):
iwlwifi: mvm: take the seqno from packet if transmit failed
iwlwifi: mvm: remove obsolete comment
Johannes Berg (5):
iwlwifi: make TX seqno validation more efficient
iwlwifi: pcie: don't read INTA register in ICT IRQ handler
iwlwifi: reduce debug ifdefs using the optimiser
iwlwifi: mvm: mark scratch area in TX command
iwlwifi: create opmode/device dependencies
Oren Givon (1):
iwlwifi: mvm: removed an unused parameter from a function
drivers/net/wireless/iwlwifi/Makefile | 6 ++--
drivers/net/wireless/iwlwifi/dvm/main.c | 7 -----
drivers/net/wireless/iwlwifi/iwl-config.h | 4 +++
drivers/net/wireless/iwlwifi/iwl-debug.h | 4 +++
drivers/net/wireless/iwlwifi/iwl-modparams.h | 2 ++
drivers/net/wireless/iwlwifi/iwl-phy-db.c | 36 ++---------------------
drivers/net/wireless/iwlwifi/mvm/d3.c | 15 +++++-----
drivers/net/wireless/iwlwifi/mvm/fw-api-tx.h | 9 +++---
drivers/net/wireless/iwlwifi/mvm/tx.c | 5 ++--
drivers/net/wireless/iwlwifi/pcie/drv.c | 4 +++
drivers/net/wireless/iwlwifi/pcie/internal.h | 2 ++
drivers/net/wireless/iwlwifi/pcie/rx.c | 44 ++++++++++------------------
drivers/net/wireless/iwlwifi/pcie/tx.c | 10 +++----
13 files changed, 58 insertions(+), 90 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-06-14
From: Johannes Berg @ 2013-06-14 10:42 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
[-- Attachment #1: Type: text/plain, Size: 1293 bytes --]
John,
I have two more fixes that I think would be worthwhile for 3.10 but
admittedly the scenario is somewhat unlikely, so if you want to hold
them for 3.11 I can live with that. In that case, I can put them into my
-next tree, or you can pull this into -next (but if you don't pull
wireless.git first you'd get some more fixes you already have.)
These two patches fix two issues with using rfkill randomly during
traffic, which would then cause our driver to stop working and not be
able to recover at all.
johannes
The following changes since commit 622ebe994f6866b8d46ee5d3bcc329ed65d3722d:
iwlwifi: fix rate control regression (2013-06-12 14:13:39 +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 8a487b1a7432b20ff3f82387a8ce7555a964b44e:
iwlwifi: pcie: wake the queue if stopped when being unmapped (2013-06-13 16:44:04 +0200)
----------------------------------------------------------------
Emmanuel Grumbach (2):
iwlwifi: pcie: fix race in queue unmapping
iwlwifi: pcie: wake the queue if stopped when being unmapped
drivers/net/wireless/iwlwifi/pcie/tx.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]
^ permalink raw reply
* [PATCH v3] mac80211: update mesh beacon on workqueue
From: Thomas Pedersen @ 2013-06-13 22:54 UTC (permalink / raw)
To: Johannes Berg; +Cc: open80211s, linux-wireless, Thomas Pedersen
Instead of updating the mesh beacon immediately when
requested (which would require the sdata_lock()), defer it
to the mac80211 workqueue.
Fixes yet another deadlock on calling sta_info_flush()
with the sdata_lock() held from ieee80211_stop_mesh(). We
could just drop the sdata_lock() around the
mesh_sta_cleanup() call, but this path is also taken from
several non-locked error paths.
Signed-off-by: Thomas Pedersen <thomas@cozybit.com>
---
v3:
cast u32 as unsigned long endianess (Johannes)
clear mesh work flags on stop (Johannes)
test_and_clear_bit() returns a bool
{set,clear}_bit() takes the bit _number_
net/mac80211/ieee80211_i.h | 1 +
net/mac80211/mesh.c | 53 ++++++++++++++++++++++++++++++++++----------
net/mac80211/mesh.h | 2 ++
3 files changed, 44 insertions(+), 12 deletions(-)
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 7a6f1a0..f79156d 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -543,6 +543,7 @@ struct ieee80211_if_mesh {
struct timer_list mesh_path_root_timer;
unsigned long wrkq_flags;
+ unsigned long mbss_changed;
u8 mesh_id[IEEE80211_MAX_MESH_ID_LEN];
size_t mesh_id_len;
diff --git a/net/mac80211/mesh.c b/net/mac80211/mesh.c
index 6c33af4..d5dea94 100644
--- a/net/mac80211/mesh.c
+++ b/net/mac80211/mesh.c
@@ -161,11 +161,8 @@ void mesh_sta_cleanup(struct sta_info *sta)
del_timer_sync(&sta->plink_timer);
}
- if (changed) {
- sdata_lock(sdata);
+ if (changed)
ieee80211_mbss_info_change_notify(sdata, changed);
- sdata_unlock(sdata);
- }
}
int mesh_rmc_init(struct ieee80211_sub_if_data *sdata)
@@ -719,14 +716,18 @@ ieee80211_mesh_rebuild_beacon(struct ieee80211_sub_if_data *sdata)
void ieee80211_mbss_info_change_notify(struct ieee80211_sub_if_data *sdata,
u32 changed)
{
- if (sdata->vif.bss_conf.enable_beacon &&
- (changed & (BSS_CHANGED_BEACON |
- BSS_CHANGED_HT |
- BSS_CHANGED_BASIC_RATES |
- BSS_CHANGED_BEACON_INT)))
- if (ieee80211_mesh_rebuild_beacon(sdata))
- return;
- ieee80211_bss_info_change_notify(sdata, changed);
+ struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ unsigned long bits = changed;
+ u32 bit;
+
+ if (!bits)
+ return;
+
+ /* if we race with running work, worst case this work becomes a noop */
+ for_each_set_bit(bit, &bits, sizeof(changed) * BITS_PER_BYTE)
+ set_bit(bit, &ifmsh->mbss_changed);
+ set_bit(MESH_WORK_MBSS_CHANGED, &ifmsh->wrkq_flags);
+ ieee80211_queue_work(&sdata->local->hw, &sdata->work);
}
int ieee80211_start_mesh(struct ieee80211_sub_if_data *sdata)
@@ -799,6 +800,10 @@ void ieee80211_stop_mesh(struct ieee80211_sub_if_data *sdata)
del_timer_sync(&sdata->u.mesh.mesh_path_root_timer);
del_timer_sync(&sdata->u.mesh.mesh_path_timer);
+ /* clear any mesh work (for next join) we may have accrued */
+ ifmsh->wrkq_flags = 0;
+ ifmsh->mbss_changed = 0;
+
local->fif_other_bss--;
atomic_dec(&local->iff_allmultis);
ieee80211_configure_filter(local);
@@ -965,6 +970,28 @@ out:
sdata_unlock(sdata);
}
+static void mesh_bss_info_changed(struct ieee80211_sub_if_data *sdata)
+{
+ struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
+ u32 bit, changed = 0;
+
+ for_each_set_bit(bit, &ifmsh->mbss_changed,
+ sizeof(changed) * BITS_PER_BYTE) {
+ clear_bit(bit, &ifmsh->mbss_changed);
+ changed |= BIT(bit);
+ }
+
+ if (sdata->vif.bss_conf.enable_beacon &&
+ (changed & (BSS_CHANGED_BEACON |
+ BSS_CHANGED_HT |
+ BSS_CHANGED_BASIC_RATES |
+ BSS_CHANGED_BEACON_INT)))
+ if (ieee80211_mesh_rebuild_beacon(sdata))
+ return;
+
+ ieee80211_bss_info_change_notify(sdata, changed);
+}
+
void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata)
{
struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
@@ -995,6 +1022,8 @@ void ieee80211_mesh_work(struct ieee80211_sub_if_data *sdata)
if (test_and_clear_bit(MESH_WORK_DRIFT_ADJUST, &ifmsh->wrkq_flags))
mesh_sync_adjust_tbtt(sdata);
+ if (test_and_clear_bit(MESH_WORK_MBSS_CHANGED, &ifmsh->wrkq_flags))
+ mesh_bss_info_changed(sdata);
out:
sdata_unlock(sdata);
}
diff --git a/net/mac80211/mesh.h b/net/mac80211/mesh.h
index 01a28bc..53bd870 100644
--- a/net/mac80211/mesh.h
+++ b/net/mac80211/mesh.h
@@ -57,6 +57,7 @@ enum mesh_path_flags {
* grow
* @MESH_WORK_ROOT: the mesh root station needs to send a frame
* @MESH_WORK_DRIFT_ADJUST: time to compensate for clock drift relative to other
+ * @MESH_WORK_MBSS_CHANGED: rebuild beacon and notify driver of BSS changes
* mesh nodes
*/
enum mesh_deferred_task_flags {
@@ -65,6 +66,7 @@ enum mesh_deferred_task_flags {
MESH_WORK_GROW_MPP_TABLE,
MESH_WORK_ROOT,
MESH_WORK_DRIFT_ADJUST,
+ MESH_WORK_MBSS_CHANGED,
};
/**
--
1.7.10.4
^ permalink raw reply related
* Re: [PATCH] orinoco_usb: fix memory leak in ezusb_access_ltv() when device disconnected
From: Dave Kilroy @ 2013-06-13 22:12 UTC (permalink / raw)
To: Alexey Khoroshilov
Cc: John W. Linville, linux-wireless, netdev, linux-kernel,
ldv-project
In-Reply-To: <1371155171-15398-1-git-send-email-khoroshilov@ispras.ru>
On 13/06/2013 21:26, Alexey Khoroshilov wrote:
> If "device is disconnected" check occurs to be true in ezusb_access_ltv(),
> it just return -ENODEV. But that means request_context is leaked since
> there are no any references to it anymore.
> The patch adds a call to ezusb_request_context_put() before return.
>
> Found by Linux Driver Verification project (linuxtesting.org).
>
> Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
> ---
> drivers/net/wireless/orinoco/orinoco_usb.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/orinoco/orinoco_usb.c b/drivers/net/wireless/orinoco/orinoco_usb.c
> index 1f9cb55..bdfe637 100644
> --- a/drivers/net/wireless/orinoco/orinoco_usb.c
> +++ b/drivers/net/wireless/orinoco/orinoco_usb.c
> @@ -881,7 +881,8 @@ static int ezusb_access_ltv(struct ezusb_priv *upriv,
>
> if (!upriv->udev) {
> dbg("Device disconnected");
> - return -ENODEV;
> + retval = -ENODEV;
> + goto exit;
> }
>
> if (upriv->read_urb->status != -EINPROGRESS)
It looks like there is also loss of a request_context in
ezusb_xmit after orinoco_process_xmit_skb fails. Something like
the following should resolve it.
The remaining request_context allocations look ok to me.
Dave.
---
Apologies, this is cut+paste from an old tree and mangled to be
diff-like. Untested. Uncompiled.
diff a/drivers/net/wireless/orinoco/orinoco_usb.c
b/drivers/net/wireless/orinoco/orinoco_usb.c
--- a/drivers/net/wireless/orinoco/orinoco_usb.c
+++ b/drivers/net/wireless/orinoco/orinoco_usb.c
@@ -1194,8 +1194,10 @@ static netdev_tx_t ezusb_xmit(struct sk_buff
*skb, struct net_device *dev)
err = orinoco_process_xmit_skb(skb, dev, priv, &tx_control,
&mic[0]);
- if (err)
+ if (err) {
+ ezusb_request_context_put(ctx);
goto drop;
+ }
{
__le16 *tx_cntl = (__le16 *)buf;
^ permalink raw reply
* [PATCH] orinoco_usb: fix memory leak in ezusb_access_ltv() when device disconnected
From: Alexey Khoroshilov @ 2013-06-13 20:26 UTC (permalink / raw)
To: John W. Linville
Cc: Alexey Khoroshilov, linux-wireless, netdev, linux-kernel,
ldv-project
If "device is disconnected" check occurs to be true in ezusb_access_ltv(),
it just return -ENODEV. But that means request_context is leaked since
there are no any references to it anymore.
The patch adds a call to ezusb_request_context_put() before return.
Found by Linux Driver Verification project (linuxtesting.org).
Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru>
---
drivers/net/wireless/orinoco/orinoco_usb.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/orinoco/orinoco_usb.c b/drivers/net/wireless/orinoco/orinoco_usb.c
index 1f9cb55..bdfe637 100644
--- a/drivers/net/wireless/orinoco/orinoco_usb.c
+++ b/drivers/net/wireless/orinoco/orinoco_usb.c
@@ -881,7 +881,8 @@ static int ezusb_access_ltv(struct ezusb_priv *upriv,
if (!upriv->udev) {
dbg("Device disconnected");
- return -ENODEV;
+ retval = -ENODEV;
+ goto exit;
}
if (upriv->read_urb->status != -EINPROGRESS)
--
1.8.1.2
^ permalink raw reply related
* [PATCH] backports: rename compat file descriptions
From: Luis R. Rodriguez @ 2013-06-13 20:13 UTC (permalink / raw)
To: backports; +Cc: linux-wireless, Luis R. Rodriguez
From: "Luis R. Rodriguez" <mcgrof@do-not-panic.com>
Make these descriptions generic.
Signed-off-by: Luis R. Rodriguez <mcgrof@do-not-panic.com>
---
backport/compat/backport-3.11.c | 2 +-
backport/compat/compat-2.6.25.c | 2 +-
backport/compat/compat-2.6.26.c | 2 +-
backport/compat/compat-2.6.27.c | 2 +-
backport/compat/compat-2.6.28.c | 2 +-
backport/compat/compat-2.6.29.c | 2 +-
backport/compat/compat-2.6.32.c | 2 +-
backport/compat/compat-2.6.33.c | 2 +-
backport/compat/compat-2.6.34.c | 2 +-
backport/compat/compat-2.6.35.c | 2 +-
backport/compat/compat-2.6.36.c | 2 +-
backport/compat/compat-2.6.37.c | 2 +-
backport/compat/compat-2.6.39.c | 2 +-
backport/compat/compat-3.0.c | 2 +-
backport/compat/compat-3.1.c | 2 +-
backport/compat/compat-3.3.c | 2 +-
backport/compat/compat-3.4.c | 2 +-
backport/compat/compat-3.5.c | 2 +-
backport/compat/compat-3.7.c | 2 +-
backport/compat/compat-3.8.c | 2 +-
backport/compat/compat-3.9.c | 2 +-
backport/compat/user_namespace.c | 3 +--
22 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/backport/compat/backport-3.11.c b/backport/compat/backport-3.11.c
index 72e0800..dc9073e 100644
--- a/backport/compat/backport-3.11.c
+++ b/backport/compat/backport-3.11.c
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2013 Hauke Mehrtens <hauke@hauke-m.de>
*
- * Compatibility file for Linux wireless for kernels 3.11.
+ * Backport functionality introduced in Linux 3.11.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
diff --git a/backport/compat/compat-2.6.25.c b/backport/compat/compat-2.6.25.c
index 20cc3db..b1459f1 100644
--- a/backport/compat/compat-2.6.25.c
+++ b/backport/compat/compat-2.6.25.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 2.6.25.
+ * Backport functionality introduced in Linux 2.6.25.
*/
#include <linux/miscdevice.h>
diff --git a/backport/compat/compat-2.6.26.c b/backport/compat/compat-2.6.26.c
index 9063a6a..f80058a 100644
--- a/backport/compat/compat-2.6.26.c
+++ b/backport/compat/compat-2.6.26.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 2.6.26.
+ * Backport functionality introduced in Linux 2.6.26.
*
* Copyright holders from ported work:
*
diff --git a/backport/compat/compat-2.6.27.c b/backport/compat/compat-2.6.27.c
index 79bbed5..cda98e8 100644
--- a/backport/compat/compat-2.6.27.c
+++ b/backport/compat/compat-2.6.27.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 2.6.27
+ * Backport functionality introduced in Linux 2.6.27
*/
#include <linux/debugfs.h>
#include <linux/compat.h>
diff --git a/backport/compat/compat-2.6.28.c b/backport/compat/compat-2.6.28.c
index 451e614..e47626b 100644
--- a/backport/compat/compat-2.6.28.c
+++ b/backport/compat/compat-2.6.28.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 2.6.28.
+ * Backport functionality introduced in Linux 2.6.28.
*/
#include <linux/compat.h>
diff --git a/backport/compat/compat-2.6.29.c b/backport/compat/compat-2.6.29.c
index 1beb718..d216407 100644
--- a/backport/compat/compat-2.6.29.c
+++ b/backport/compat/compat-2.6.29.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 2.6.29.
+ * Backport functionality introduced in Linux 2.6.29.
*/
#include <linux/compat.h>
diff --git a/backport/compat/compat-2.6.32.c b/backport/compat/compat-2.6.32.c
index 68ab03e..7d76b40 100644
--- a/backport/compat/compat-2.6.32.c
+++ b/backport/compat/compat-2.6.32.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 2.6.32.
+ * Backport functionality introduced in Linux 2.6.32.
*/
#include <linux/compat.h>
diff --git a/backport/compat/compat-2.6.33.c b/backport/compat/compat-2.6.33.c
index 565836c..b6115ba 100644
--- a/backport/compat/compat-2.6.33.c
+++ b/backport/compat/compat-2.6.33.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 2.6.33.
+ * Backport functionality introduced in Linux 2.6.33.
*/
#include <linux/compat.h>
diff --git a/backport/compat/compat-2.6.34.c b/backport/compat/compat-2.6.34.c
index 863be64..b257df1 100644
--- a/backport/compat/compat-2.6.34.c
+++ b/backport/compat/compat-2.6.34.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 2.6.34.
+ * Backport functionality introduced in Linux 2.6.34.
*/
#include <linux/mmc/sdio_func.h>
diff --git a/backport/compat/compat-2.6.35.c b/backport/compat/compat-2.6.35.c
index f6e2672..86ea557 100644
--- a/backport/compat/compat-2.6.35.c
+++ b/backport/compat/compat-2.6.35.c
@@ -6,7 +6,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 2.6.35.
+ * Backport functionality introduced in Linux 2.6.35.
*/
#include <linux/compat.h>
diff --git a/backport/compat/compat-2.6.36.c b/backport/compat/compat-2.6.36.c
index 92ef827..ea6443d 100644
--- a/backport/compat/compat-2.6.36.c
+++ b/backport/compat/compat-2.6.36.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 2.6.36.
+ * Backport functionality introduced in Linux 2.6.36.
*/
#include <linux/compat.h>
diff --git a/backport/compat/compat-2.6.37.c b/backport/compat/compat-2.6.37.c
index 3ef2909..5c6cc7b 100644
--- a/backport/compat/compat-2.6.37.c
+++ b/backport/compat/compat-2.6.37.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 2.6.37.
+ * Backport functionality introduced in Linux 2.6.37.
*/
#include <linux/compat.h>
diff --git a/backport/compat/compat-2.6.39.c b/backport/compat/compat-2.6.39.c
index 0e36da8..62d8a66 100644
--- a/backport/compat/compat-2.6.39.c
+++ b/backport/compat/compat-2.6.39.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 2.6.39.
+ * Backport functionality introduced in Linux 2.6.39.
*/
#include <linux/compat.h>
diff --git a/backport/compat/compat-3.0.c b/backport/compat/compat-3.0.c
index f52392c..0a993d7 100644
--- a/backport/compat/compat-3.0.c
+++ b/backport/compat/compat-3.0.c
@@ -6,7 +6,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 3.0.
+ * Backport functionality introduced in Linux 3.0.
*/
#include <linux/compat.h>
diff --git a/backport/compat/compat-3.1.c b/backport/compat/compat-3.1.c
index cb5d596..b876329 100644
--- a/backport/compat/compat-3.1.c
+++ b/backport/compat/compat-3.1.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 3.1.
+ * Backport functionality introduced in Linux 3.1.
*/
#include <linux/idr.h>
diff --git a/backport/compat/compat-3.3.c b/backport/compat/compat-3.3.c
index 8489344..a44f59d 100644
--- a/backport/compat/compat-3.3.c
+++ b/backport/compat/compat-3.3.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 3.3.
+ * Backport functionality introduced in Linux 3.3.
*/
#include <linux/kernel.h>
diff --git a/backport/compat/compat-3.4.c b/backport/compat/compat-3.4.c
index 1718cd2..b72c69c 100644
--- a/backport/compat/compat-3.4.c
+++ b/backport/compat/compat-3.4.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 3.4.
+ * Backport functionality introduced in Linux 3.4.
*/
#include <linux/fs.h>
diff --git a/backport/compat/compat-3.5.c b/backport/compat/compat-3.5.c
index 0355ed1..7068cfb 100644
--- a/backport/compat/compat-3.5.c
+++ b/backport/compat/compat-3.5.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 3.5.
+ * Backport functionality introduced in Linux 3.5.
*/
#include <linux/module.h>
diff --git a/backport/compat/compat-3.7.c b/backport/compat/compat-3.7.c
index 284e8dc..0f2d332 100644
--- a/backport/compat/compat-3.7.c
+++ b/backport/compat/compat-3.7.c
@@ -5,7 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels 3.7.
+ * Backport functionality introduced in Linux 3.7.
*/
#include <linux/workqueue.h>
diff --git a/backport/compat/compat-3.8.c b/backport/compat/compat-3.8.c
index 5b1ead9..2884323 100644
--- a/backport/compat/compat-3.8.c
+++ b/backport/compat/compat-3.8.c
@@ -5,7 +5,7 @@
* Copyright (c) 2006-2012 Jiri Kosina
* Copyright (c) 2012 Luis R. Rodriguez <mcgrof@do-not-panic.com>
*
- * Compatibility file for Linux wireless for kernels 3.8.
+ * Backport functionality introduced in Linux 3.8.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
diff --git a/backport/compat/compat-3.9.c b/backport/compat/compat-3.9.c
index f81fe79..03f3af8 100644
--- a/backport/compat/compat-3.9.c
+++ b/backport/compat/compat-3.9.c
@@ -1,7 +1,7 @@
/*
* Copyright (c) 2013 Luis R. Rodriguez <mcgrof@do-not-panic.com>
*
- * Compatibility file for Linux wireless for kernels 3.9.
+ * Backport functionality introduced in Linux 3.9.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
diff --git a/backport/compat/user_namespace.c b/backport/compat/user_namespace.c
index 288efc0..6d01404 100644
--- a/backport/compat/user_namespace.c
+++ b/backport/compat/user_namespace.c
@@ -5,8 +5,7 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Compatibility file for Linux wireless for kernels backporting
- * user_namespace.c
+ * Backport functionality introduced in Linux user_namespace.c
*/
#include <linux/module.h>
--
1.7.10.4
^ permalink raw reply related
* Re: pull request: bluetooth 2013-06-13
From: Gustavo Padovan @ 2013-06-13 17:48 UTC (permalink / raw)
To: John W. Linville; +Cc: linux-wireless, linux-bluetooth, linux-kernel
In-Reply-To: <20130613171711.GB3246@tuxdriver.com>
Hi John,
* John W. Linville <linville@tuxdriver.com> [2013-06-13 13:17:12 -0400]:
> On Thu, Jun 13, 2013 at 12:22:28PM +0100, Gustavo Padovan wrote:
> > Hi John,
> >
> > A few important fixes to 3.10. The first one is a crash fix and talks by itself.
> > Then we have the support for a device id, it should be fine if you want to
> > remove this. Next there are two btmrvl fixes, one for a potential race
> > condition that could make its main thread never stop and the other to fix the
> > return code when a memory allocation fails. It was returning 0 instead of
> > -ENOMEM. Last is a fix to an issue that affects at least some Thinkpad X60,
> > Initialization on those laptops were failing due by unsupported cmd we were
> > sending to the device. The patch fixes this by checking if the cmd is
> > supported first.
> >
> > Please pull or let me know of any concerns you may have.
> >
> > Gustavo
> >
> > ---
> > The following changes since commit d90b9e29ec5fe7a08eb7965386ebb47615306584:
> >
> > Merge branch 'for-john' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes (2013-06-12 14:28:21 -0400)
> >
> > are available in the git repository at:
> >
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth master
> >
> > for you to fetch changes up to 0e1aba9361bf292fbdca781d419dca67d6b9911f:
> >
> > Bluetooth: btmrvl: fix thread stopping race (2013-06-13 11:48:38 +0100)
> >
> > ----------------------------------------------------------------
>
> I applied these manually to the wireless tree:
>
> > Anderson Lizardo (1):
> > Bluetooth: Fix crash in l2cap_build_cmd() with small MTU
> >
> > Daniel Drake (1):
> > Bluetooth: btmrvl: fix thread stopping race
> >
> > Johan Hedberg (1):
> > Bluetooth: Fix conditions for HCI_Delete_Stored_Link_Key
>
> These I will manually apply to wireless-next:
>
> > Cho, Yu-Chen (1):
> > Bluetooth: Add support for Mediatek Bluetooth device [0e8d:763f]
> >
> > Wei Yongjun (1):
> > Bluetooth: btmrvl: fix error return code in btmrvl_sdio_card_to_host()
>
> The device ID one might be OK, but it can wait for now. The error
> return code patch fixes the return code for a function whose return
> code isn't actually checked, so it doesn't seem to need a quick fix.
Oh, I missed that when applied this patch! Thanks a lot for pushing the
patches, I'll update the bluetooth trees accordingly.
Gustavo
^ permalink raw reply
* RE: [PATCH] mwifiex: Add module parameter for regdomain
From: Bing Zhao @ 2013-06-13 17:46 UTC (permalink / raw)
To: Paul Stewart, John W. Linville
Cc: Ben Greear, Kalle Valo, linux-wireless@vger.kernel.org,
Amitkumar Karwar, Avinash Patil, Yogesh Powar, Nishant Sarmukadam,
Frank Huang
In-Reply-To: <CAMcMvsjT_MB4k_yDnuOozAXLY++OJ-EYx0REtEa2PphVOJbcJQ@mail.gmail.com>
> Oh, wait. That exists in the 'ieee80211_regdom' parameter to
> cfg80211. You should use that. :-)
'ieee80211_regdom' parameter is also a user regulatory hint.
/*
* Finally, if the user set the module parameter treat it
* as a user hint.
*/
if (!is_world_regdom(ieee80211_regdom))
regulatory_hint_user(ieee80211_regdom,
NL80211_USER_REG_HINT_USER);
Regards,
Bing
^ permalink raw reply
* Re: Regression in 9390ace brcmfmac: free net device when registration fails
From: John W. Linville @ 2013-06-13 17:32 UTC (permalink / raw)
To: Arend van Spriel
Cc: Stephen Warren, Hante Meuleman,
'linux-wireless@vger.kernel.org',
linux-next@vger.kernel.org
In-Reply-To: <51B97E56.4030701@broadcom.com>
On Thu, Jun 13, 2013 at 10:09:58AM +0200, Arend van Spriel wrote:
> On 06/12/2013 11:19 PM, Stephen Warren wrote:
> >On 06/06/2013 03:36 PM, Stephen Warren wrote:
> >>On 06/06/2013 03:10 PM, Arend van Spriel wrote:
> >>>On 06/04/13 14:58, Arend van Spriel wrote:
> >>>>On 06/04/2013 12:56 AM, Stephen Warren wrote:
> >>>>>(John, note that this commit is part of the pull request you sent to
> >>>>>Dave today)
> >>>>>
> >>>>>Arend,
> >>>>>
> >>>>>Commit 9390ace "brcmfmac: free net device when registration fails"
> >>>>>causes a regression.
> >>>>>
> >>>>>I had the BCM4330 firmware present in my root fs, whereas my HW is a
> >>>>>BCM4329. With this patch applied, I get a kernel panic on boot. With it
> >>>>>reverted, I see that no issues of that nature. This is true in
> >>>>>next-20130531 (and also 5/30 and 6/1 but not earlier). A bisect of
> >>>>>Linus's tree followed by a merge of John's wireless pull request from
> >>>>>today pointed at this same commit.
> >>>>
> >>>>Thanks, Stephen
> >>>>
> >>>>I will look into this.
> >>>
> >>>Hi Stephen,
> >>>
> >>>Can you try the attached patch? If it does not solve the issue, could
> >>>you provide a log.
> >>
> >>Yes, that works great, thanks.
> >>
> >>Tested-by: Stephen Warren <swarren@nvidia.com>
> >
> >Did this patch get applied anywhere? I was hoping it'd go into 3.10-rc*
> >given it's a user-triggerable backtrace introduced in 3.10-rc*.
>
> Hi Stephen,
>
> The patch went into the wireless-next tree. Given recent events with
> our patch series I am a bit more carsful to tag patches for 3.10.
> Your issue is user-triggerable but the scenario to get there can be
> avoided. But you are right it was introduced in the 3.10-rc cycle. I
> leave it to John to decide.
>
> Regards,
> Arend
I've just applied it to the wireless tree. I doubt if it will make
-rc6, but it might make the final 3.10.
John
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: Pull request: ath6kl 20130612
From: John W. Linville @ 2013-06-13 17:34 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless, ath6kl-devel
In-Reply-To: <87d2rrqin8.fsf@kamboji.qca.qualcomm.com>
On Wed, Jun 12, 2013 at 09:38:19PM +0300, Kalle Valo wrote:
> Hi John,
>
> here are few simple patches for ath6kl. We have a suspend crash fix for
> USB from Shafi, use of mac_pton(), a compiler warning fix and a fix for
> module initialisation error path.
>
> Kalle
>
> The following changes since commit 3e817f086f06069a23b797ee2279bbae638d5edc:
>
> cw1200: remove unused including <linux/version.h> (2013-05-30 14:45:25 -0400)
>
> are available in the git repository at:
>
> git://github.com/kvalo/ath6kl.git for-linville
>
> for you to fetch changes up to 37291fc61253cd34db40b7a60be4497db776db41:
>
> ath6kl: Unify sg_sz and buf_sz in ath6kl_sdio_alloc_prep_scat_req() (2013-06-01 15:16:33 +0300)
Pulling now...
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: Pull request: ath10k 20130612
From: John W. Linville @ 2013-06-13 17:37 UTC (permalink / raw)
To: Kalle Valo; +Cc: linux-wireless, ath10k-devel
In-Reply-To: <87ppvrqjom.fsf@kamboji.qca.qualcomm.com>
On Wed, Jun 12, 2013 at 09:15:53PM +0300, Kalle Valo wrote:
> Hi John,
>
> here's the pull request for ath10k. This is the same version I submitted
> June 1st for the second review, now it's just one big commit with the
> necessary changes to Makefile and Kconfig in drivers/net/wireless/ath.
>
> Please let me know if there are any problems.
>
> Kalle
>
> The following changes since commit 8b3e7be437a6b62118d0485ad971e724afe23fdf:
>
> cw1200: Fix an assorted pile of checkpatch warnings. (2013-06-11 12:48:10 -0400)
>
> are available in the git repository at:
>
> git://github.com/kvalo/ath6kl.git for-linville-ath10k
>
> for you to fetch changes up to 5e3dd157d7e70f0e3cea3f2573ed69fb156a19d5:
>
> ath10k: mac80211 driver for Qualcomm Atheros 802.11ac CQA98xx devices (2013-06-12 20:52:10 +0300)
Pulling now...
--
John W. Linville Someday the world will need a hero, and you
linville@tuxdriver.com might be all we have. Be ready.
^ permalink raw reply
* Re: [PATCH] mwifiex: Add module parameter for regdomain
From: Ben Greear @ 2013-06-13 17:36 UTC (permalink / raw)
To: John W. Linville
Cc: Bing Zhao, Kalle Valo, linux-wireless@vger.kernel.org,
Amitkumar Karwar, Avinash Patil, Yogesh Powar, Nishant Sarmukadam,
Frank Huang, Paul Stewart
In-Reply-To: <20130613173002.GC3246@tuxdriver.com>
On 06/13/2013 10:30 AM, John W. Linville wrote:
> On Wed, Jun 12, 2013 at 12:01:23PM -0700, Bing Zhao wrote:
>>
>>>>> "iw reg set XX" or "country_code=XX" in hostapd.conf is a *user* hint.
>>>>>
>>>>> What we need here is a *driver* hint. Furthermore, with a driver
>>>>> regulatory hint, the passive-scan and no-ibss flags are cleared so we
>>>>> can start AP with hostapd on 5G band.
>>>>
>>>> So it's a driver hint which is coming from user space via a module
>>>> parameter. IMHO you are abusing interfaces here. Is there any better way
>>>> to solve your problem?
>>>
>>> It would be nice to have some way to do this for ath9k and other NICs
>>> as well. Best I could come up with is a similar hack for ath9k.
>>>
>>> I think part of the problem is that this config info needs to be
>>> available very early in the module loading/init logic, so it's
>>> too late to be configured using 'iw' or similar.
>>
>> Exactly. regulatory_hint () needs to be called right after wiphy registration.
>
> It does seem a bit ugly. But if Marvell wants it, I don't see any
> "regulatory" argument to disallow something like this.
>
> Does anyone have a better suggestion for a user interface for such
> a feature?
Maybe a global over-ride module-option in cfg80211 module so that
we wouldn't have to have an individual module-option hack for
each driver?
But, then again, maybe we would still want individual driver
config options....
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ 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