Linux wireless drivers development
 help / color / mirror / Atom feed
* [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

* Re: [PATCH] mwifiex: Add module parameter for regdomain
From: Paul Stewart @ 2013-06-13 17:35 UTC (permalink / raw)
  To: John W. Linville
  Cc: Bing Zhao, Ben Greear, Kalle Valo, linux-wireless@vger.kernel.org,
	Amitkumar Karwar, Avinash Patil, Yogesh Powar, Nishant Sarmukadam,
	Frank Huang
In-Reply-To: <CAMcMvsgVHMzVY4fnW7n+vgdWKKVgvF+fJ93xvRkkfZUjxt-bBQ@mail.gmail.com>

On Thu, Jun 13, 2013 at 10:33 AM, Paul Stewart <pstew@chromium.org> wrote:
> On Thu, Jun 13, 2013 at 10:30 AM, John W. Linville
> <linville@tuxdriver.com> 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?
>
>
> The only (slightly) cleaner thing I could think of is a module
> parameter to cfg80211 so all drivers in the system would be made aware
> of the boot-time regulatory domain.

Oh, wait.  That exists in the 'ieee80211_regdom' parameter to
cfg80211.  You should use that. :-)

>>
>>
>> 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: [PATCH] mwifiex: Add module parameter for regdomain
From: Paul Stewart @ 2013-06-13 17:33 UTC (permalink / raw)
  To: John W. Linville
  Cc: Bing Zhao, Ben Greear, Kalle Valo, linux-wireless@vger.kernel.org,
	Amitkumar Karwar, Avinash Patil, Yogesh Powar, Nishant Sarmukadam,
	Frank Huang
In-Reply-To: <20130613173002.GC3246@tuxdriver.com>

On Thu, Jun 13, 2013 at 10:30 AM, John W. Linville
<linville@tuxdriver.com> 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?


The only (slightly) cleaner thing I could think of is a module
parameter to cfg80211 so all drivers in the system would be made aware
of the boot-time regulatory domain.

>
>
> 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: [PATCH] mwifiex: Add module parameter for regdomain
From: John W. Linville @ 2013-06-13 17:30 UTC (permalink / raw)
  To: Bing Zhao
  Cc: Ben Greear, Kalle Valo, linux-wireless@vger.kernel.org,
	Amitkumar Karwar, Avinash Patil, Yogesh Powar, Nishant Sarmukadam,
	Frank Huang, Paul Stewart
In-Reply-To: <477F20668A386D41ADCC57781B1F70430EA268B4A3@SC-VEXCH1.marvell.com>

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?

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: bluetooth 2013-06-13
From: John W. Linville @ 2013-06-13 17:17 UTC (permalink / raw)
  To: Gustavo Padovan, linux-wireless, linux-bluetooth, linux-kernel
In-Reply-To: <20130613112228.GB17870@joana>

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.

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

* Question on rcu_access_pointer, rcu_assign_pointer and locking.
From: Ben Greear @ 2013-06-13 17:24 UTC (permalink / raw)
  To: Linux Kernel Mailing List; +Cc: linux-wireless@vger.kernel.org

Hello!

I'm trying to better understand some code in net/mac80211/scan.c in order
to track down some memory leaks reported by kmemleak.

My question boils down to this.  Assume we have code similar to this:

spin_lock_bh(&dev->bss_lock);
old = rcu_access_pointer(found->pub.beacon_ies);
rcu_assign_pointer(found->pub.beacon_ies, tmp->pub.beacon_ies);
if (old)
	kfree_rcu((struct cfg80211_bss_ies *)old, rcu_head);
spin_unlock_bh(&dev->bss_lock);

Would it be possible to somehow leak what is assigned to found->pub.beacon_ies,
perhaps because two threads managed to go through this
code within a single RCU period?

I think that if the rcu_assign_pointer logic wasn't 'published'
before a second thread came through this logic it could cause
this leakage?

The actual code I'm curious about is in net/mac80211/scan.c, in
the cfg80211_bss_update method.

Thanks,
Ben

-- 
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


^ permalink raw reply

* [PATCH v2] ath9k: Add custom parameters for CUS198
From: Sujith Manoharan @ 2013-06-13 17:21 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, jkp, gfmichaud

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

CUS198 is a card based on AR9485. There are differences
between the base reference design HB125 and CUS198.
Identify such cards based on the PCI subsystem IDs and
set HW parameters appropriately.

Addresses this bug - https://bugzilla.kernel.org/show_bug.cgi?id=49201

Cc: jkp@iki.fi
Cc: gfmichaud@gmail.com
Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 18 +++++++++++++---
 drivers/net/wireless/ath/ath9k/ath9k.h         |  3 +++
 drivers/net/wireless/ath/ath9k/hw.h            |  4 ++++
 drivers/net/wireless/ath/ath9k/init.c          | 21 +++++++++++++++++++
 drivers/net/wireless/ath/ath9k/pci.c           | 29 ++++++++++++++++++++++++++
 5 files changed, 72 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 25b8bbb..9a00bc0 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3563,16 +3563,22 @@ static void ar9003_hw_ant_ctrl_apply(struct ath_hw *ah, bool is2ghz)
 {
 	struct ath9k_hw_capabilities *pCap = &ah->caps;
 	int chain;
-	u32 regval, value;
+	u32 regval, value, gpio;
 	static const u32 switch_chain_reg[AR9300_MAX_CHAINS] = {
 			AR_PHY_SWITCH_CHAIN_0,
 			AR_PHY_SWITCH_CHAIN_1,
 			AR_PHY_SWITCH_CHAIN_2,
 	};
 
-	if (AR_SREV_9485(ah) && (ar9003_hw_get_rx_gain_idx(ah) == 0))
+	if (AR_SREV_9485(ah) && (ar9003_hw_get_rx_gain_idx(ah) == 0)) {
+		if (ah->config.xlna_gpio)
+			gpio = ah->config.xlna_gpio;
+		else
+			gpio = AR9300_EXT_LNA_CTL_GPIO_AR9485;
+
 		ath9k_hw_cfg_output(ah, AR9300_EXT_LNA_CTL_GPIO_AR9485,
 				    AR_GPIO_OUTPUT_MUX_AS_PCIE_ATTENTION_LED);
+	}
 
 	value = ar9003_hw_ant_ctrl_common_get(ah, is2ghz);
 
@@ -3800,7 +3806,13 @@ static void ar9003_hw_atten_apply(struct ath_hw *ah, struct ath9k_channel *chan)
 			REG_RMW_FIELD(ah, ext_atten_reg[i],
 				      AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB, value);
 
-			value = ar9003_hw_atten_chain_get_margin(ah, i, chan);
+			if (AR_SREV_9485(ah) &&
+			    (ar9003_hw_get_rx_gain_idx(ah) == 0) &&
+			    ah->config.xatten_margin_cfg)
+				value = 5;
+			else
+				value = ar9003_hw_atten_chain_get_margin(ah, i, chan);
+
 			REG_RMW_FIELD(ah, ext_atten_reg[i],
 				      AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN,
 				      value);
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index a6e666b..74965ee 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -631,6 +631,8 @@ void ath_ant_comb_update(struct ath_softc *sc);
 /* Main driver core */
 /********************/
 
+#define ATH9K_PCI_CUS198 0x0001
+
 /*
  * Default cache line size, in bytes.
  * Used when PCI device not fully initialized by bootrom/BIOS
@@ -715,6 +717,7 @@ struct ath_softc {
 
 	unsigned int hw_busy_count;
 	unsigned long sc_flags;
+	unsigned long driver_data;
 
 	u32 intrstatus;
 	u16 ps_flags; /* PS_* */
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 7d259b7..ed7d4fc 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -307,6 +307,10 @@ struct ath9k_ops_config {
 	u16 spurchans[AR_EEPROM_MODAL_SPURS][2];
 	u8 max_txtrig_level;
 	u16 ani_poll_interval; /* ANI poll interval in ms */
+
+	/* Platform specific config */
+	u32 xlna_gpio;
+	bool xatten_margin_cfg;
 };
 
 enum ath9k_int {
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 818f22d..7c2ed1c 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -513,6 +513,22 @@ static void ath9k_init_misc(struct ath_softc *sc)
 	sc->spec_config.fft_period = 0xF;
 }
 
+static void ath9k_init_platform(struct ath_softc *sc)
+{
+	struct ath_hw *ah = sc->sc_ah;
+	struct ath_common *common = ath9k_hw_common(ah);
+
+	if (common->bus_ops->ath_bus_type != ATH_PCI)
+		return;
+
+	if (sc->driver_data & ATH9K_PCI_CUS198) {
+		ah->config.xlna_gpio = 9;
+		ah->config.xatten_margin_cfg = true;
+
+		ath_info(common, "Set parameters for CUS198\n");
+	}
+}
+
 static void ath9k_eeprom_request_cb(const struct firmware *eeprom_blob,
 				    void *ctx)
 {
@@ -605,6 +621,11 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
 	common->disable_ani = false;
 
 	/*
+	 * Platform quirks.
+	 */
+	ath9k_init_platform(sc);
+
+	/*
 	 * Enable Antenna diversity only when BTCOEX is disabled
 	 * and the user manually requests the feature.
 	 */
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 0e0d395..4ac00b4 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -34,6 +34,34 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {
 	{ PCI_VDEVICE(ATHEROS, 0x002D) }, /* PCI   */
 	{ PCI_VDEVICE(ATHEROS, 0x002E) }, /* PCI-E */
 	{ PCI_VDEVICE(ATHEROS, 0x0030) }, /* PCI-E  AR9300 */
+
+	/* PCI-E CUS198 */
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x2086),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x1237),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x2126),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x2152),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_FOXCONN,
+			 0xE075),
+	  .driver_data = ATH9K_PCI_CUS198 },
+
 	{ PCI_VDEVICE(ATHEROS, 0x0032) }, /* PCI-E  AR9485 */
 	{ PCI_VDEVICE(ATHEROS, 0x0033) }, /* PCI-E  AR9580 */
 	{ PCI_VDEVICE(ATHEROS, 0x0034) }, /* PCI-E  AR9462 */
@@ -221,6 +249,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	sc->hw = hw;
 	sc->dev = &pdev->dev;
 	sc->mem = pcim_iomap_table(pdev)[0];
+	sc->driver_data = id->driver_data;
 
 	/* Will be cleared in ath9k_start() */
 	set_bit(SC_OP_INVALID, &sc->sc_flags);
-- 
1.8.3.1


^ permalink raw reply related

* [PATCH] ath9k: Add custom parameters for CUS198
From: Sujith Manoharan @ 2013-06-13 17:20 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

CUS198 is a card based on AR9485. There are differences
between the base reference design HB125 and CUS198.
Identify such cards based on the PCI subsystem IDs and
set HW parameters appropriately.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/ar9003_eeprom.c | 18 +++++++++++++---
 drivers/net/wireless/ath/ath9k/ath9k.h         |  3 +++
 drivers/net/wireless/ath/ath9k/hw.h            |  4 ++++
 drivers/net/wireless/ath/ath9k/init.c          | 21 +++++++++++++++++++
 drivers/net/wireless/ath/ath9k/pci.c           | 29 ++++++++++++++++++++++++++
 5 files changed, 72 insertions(+), 3 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
index 25b8bbb..9a00bc0 100644
--- a/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
+++ b/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
@@ -3563,16 +3563,22 @@ static void ar9003_hw_ant_ctrl_apply(struct ath_hw *ah, bool is2ghz)
 {
 	struct ath9k_hw_capabilities *pCap = &ah->caps;
 	int chain;
-	u32 regval, value;
+	u32 regval, value, gpio;
 	static const u32 switch_chain_reg[AR9300_MAX_CHAINS] = {
 			AR_PHY_SWITCH_CHAIN_0,
 			AR_PHY_SWITCH_CHAIN_1,
 			AR_PHY_SWITCH_CHAIN_2,
 	};
 
-	if (AR_SREV_9485(ah) && (ar9003_hw_get_rx_gain_idx(ah) == 0))
+	if (AR_SREV_9485(ah) && (ar9003_hw_get_rx_gain_idx(ah) == 0)) {
+		if (ah->config.xlna_gpio)
+			gpio = ah->config.xlna_gpio;
+		else
+			gpio = AR9300_EXT_LNA_CTL_GPIO_AR9485;
+
 		ath9k_hw_cfg_output(ah, AR9300_EXT_LNA_CTL_GPIO_AR9485,
 				    AR_GPIO_OUTPUT_MUX_AS_PCIE_ATTENTION_LED);
+	}
 
 	value = ar9003_hw_ant_ctrl_common_get(ah, is2ghz);
 
@@ -3800,7 +3806,13 @@ static void ar9003_hw_atten_apply(struct ath_hw *ah, struct ath9k_channel *chan)
 			REG_RMW_FIELD(ah, ext_atten_reg[i],
 				      AR_PHY_EXT_ATTEN_CTL_XATTEN1_DB, value);
 
-			value = ar9003_hw_atten_chain_get_margin(ah, i, chan);
+			if (AR_SREV_9485(ah) &&
+			    (ar9003_hw_get_rx_gain_idx(ah) == 0) &&
+			    ah->config.xatten_margin_cfg)
+				value = 5;
+			else
+				value = ar9003_hw_atten_chain_get_margin(ah, i, chan);
+
 			REG_RMW_FIELD(ah, ext_atten_reg[i],
 				      AR_PHY_EXT_ATTEN_CTL_XATTEN1_MARGIN,
 				      value);
diff --git a/drivers/net/wireless/ath/ath9k/ath9k.h b/drivers/net/wireless/ath/ath9k/ath9k.h
index a6e666b..74965ee 100644
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
@@ -631,6 +631,8 @@ void ath_ant_comb_update(struct ath_softc *sc);
 /* Main driver core */
 /********************/
 
+#define ATH9K_PCI_CUS198 0x0001
+
 /*
  * Default cache line size, in bytes.
  * Used when PCI device not fully initialized by bootrom/BIOS
@@ -715,6 +717,7 @@ struct ath_softc {
 
 	unsigned int hw_busy_count;
 	unsigned long sc_flags;
+	unsigned long driver_data;
 
 	u32 intrstatus;
 	u16 ps_flags; /* PS_* */
diff --git a/drivers/net/wireless/ath/ath9k/hw.h b/drivers/net/wireless/ath/ath9k/hw.h
index 7d259b7..ed7d4fc 100644
--- a/drivers/net/wireless/ath/ath9k/hw.h
+++ b/drivers/net/wireless/ath/ath9k/hw.h
@@ -307,6 +307,10 @@ struct ath9k_ops_config {
 	u16 spurchans[AR_EEPROM_MODAL_SPURS][2];
 	u8 max_txtrig_level;
 	u16 ani_poll_interval; /* ANI poll interval in ms */
+
+	/* Platform specific config */
+	u32 xlna_gpio;
+	bool xatten_margin_cfg;
 };
 
 enum ath9k_int {
diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 818f22d..7c2ed1c 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -513,6 +513,22 @@ static void ath9k_init_misc(struct ath_softc *sc)
 	sc->spec_config.fft_period = 0xF;
 }
 
+static void ath9k_init_platform(struct ath_softc *sc)
+{
+	struct ath_hw *ah = sc->sc_ah;
+	struct ath_common *common = ath9k_hw_common(ah);
+
+	if (common->bus_ops->ath_bus_type != ATH_PCI)
+		return;
+
+	if (sc->driver_data & ATH9K_PCI_CUS198) {
+		ah->config.xlna_gpio = 9;
+		ah->config.xatten_margin_cfg = true;
+
+		ath_info(common, "Set parameters for CUS198\n");
+	}
+}
+
 static void ath9k_eeprom_request_cb(const struct firmware *eeprom_blob,
 				    void *ctx)
 {
@@ -605,6 +621,11 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
 	common->disable_ani = false;
 
 	/*
+	 * Platform quirks.
+	 */
+	ath9k_init_platform(sc);
+
+	/*
 	 * Enable Antenna diversity only when BTCOEX is disabled
 	 * and the user manually requests the feature.
 	 */
diff --git a/drivers/net/wireless/ath/ath9k/pci.c b/drivers/net/wireless/ath/ath9k/pci.c
index 0e0d395..4ac00b4 100644
--- a/drivers/net/wireless/ath/ath9k/pci.c
+++ b/drivers/net/wireless/ath/ath9k/pci.c
@@ -34,6 +34,34 @@ static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {
 	{ PCI_VDEVICE(ATHEROS, 0x002D) }, /* PCI   */
 	{ PCI_VDEVICE(ATHEROS, 0x002E) }, /* PCI-E */
 	{ PCI_VDEVICE(ATHEROS, 0x0030) }, /* PCI-E  AR9300 */
+
+	/* PCI-E CUS198 */
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x2086),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x1237),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x2126),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_AZWAVE,
+			 0x2152),
+	  .driver_data = ATH9K_PCI_CUS198 },
+	{ PCI_DEVICE_SUB(PCI_VENDOR_ID_ATHEROS,
+			 0x0032,
+			 PCI_VENDOR_ID_FOXCONN,
+			 0xE075),
+	  .driver_data = ATH9K_PCI_CUS198 },
+
 	{ PCI_VDEVICE(ATHEROS, 0x0032) }, /* PCI-E  AR9485 */
 	{ PCI_VDEVICE(ATHEROS, 0x0033) }, /* PCI-E  AR9580 */
 	{ PCI_VDEVICE(ATHEROS, 0x0034) }, /* PCI-E  AR9462 */
@@ -221,6 +249,7 @@ static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	sc->hw = hw;
 	sc->dev = &pdev->dev;
 	sc->mem = pcim_iomap_table(pdev)[0];
+	sc->driver_data = id->driver_data;
 
 	/* Will be cleared in ath9k_start() */
 	set_bit(SC_OP_INVALID, &sc->sc_flags);
-- 
1.8.3.1


^ permalink raw reply related

* Re: [PATCH 3/3] skbuff: Added new helper function skb_cow_clone_head.
From: Ben Hutchings @ 2013-06-13 16:53 UTC (permalink / raw)
  To: Dave Wiltshire
  Cc: davem, netdev, linux-kernel, nsujir, mchan, rmody, jcliburn,
	chris.snook, jeffrey.t.kirsher, bruce.w.allan, alexander.h.duyck,
	cooldavid, linux-driver, linux-wimax, wimax, linux-wireless, viro,
	eparis, edumazet, dev, jhs
In-Reply-To: <1371040811-8319-2-git-send-email-david.wiltshire@gmx.com>

On Wed, 2013-06-12 at 22:40 +1000, Dave Wiltshire wrote:
> In a few different drivers there is a check of (skb_cloned &&
> !skb_clone_writable) before then using pskb_expand_head to copy the skb
> if that is required. There are already some skb_cow_* functions for
> other conditions, so added this one and changed the call sites.
> 
> Signed-off-by: Dave Wiltshire <david.wiltshire@gmx.com>
> ---
>  include/linux/skbuff.h    |   14 ++++++++++++++
>  net/core/dev.c            |    8 ++------
>  net/openvswitch/actions.c |   22 +++++++---------------
>  net/sched/act_csum.c      |    8 ++------
>  net/sched/act_nat.c       |   18 +++++-------------
>  5 files changed, 30 insertions(+), 40 deletions(-)
> 
> diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
> index a7393ad..7d18541 100644
> --- a/include/linux/skbuff.h
> +++ b/include/linux/skbuff.h
> @@ -2154,6 +2154,20 @@ static inline int skb_cow_head(struct sk_buff *skb, unsigned int headroom)
>  }
>  
>  /**
> + * skb_cow_clone_head

This is a missing a short description after the name.

Ben.

> + * @skb: buffer to cow
> + * @len: length up to which to write
> + *
> + * This function is identical to skb_cow and sb_cow_head except that we
> + * replace the skb_cloned check by skb_cloned && !skb_clone_writable.
> + *
> + */
> +static inline int skb_cow_clone_head(struct sk_buff *skb, unsigned int len)
> +{
> +	return __skb_cow(skb, 0, skb_cloned(skb) && !skb_clone_writable(skb, len));
> +}
[...]

-- 
Ben Hutchings, Staff Engineer, Solarflare
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.


^ permalink raw reply

* Re: [GIT] [3.10] NFC fixes
From: John W. Linville @ 2013-06-13 15:18 UTC (permalink / raw)
  To: Samuel Ortiz; +Cc: Linux Wireless, Linux NFC
In-Reply-To: <20130613090209.GA7998@zurbaran>

On Thu, Jun 13, 2013 at 11:02:09AM +0200, Samuel Ortiz wrote:
> Hi John,
> 
> On Wed, Jun 12, 2013 at 02:22:38PM -0400, John W. Linville wrote:
> > Given recent events, I'm not sure that this is really acceptable as
> > a fix request.  The service bit and endianness in particular don't
> > sound like they are addressing big problems, and the other two don't
> > sound like they are really fixing any regressions either.
> > 
> > Can these wait for 3.11?
> I guess so, although they really are fixes.

I don't doubt that they are fixes, but I think that Dave is trying
to clamp down to only 'important' fixes -- data loss, crashes, etc.

> I'll queue them in nfc-next and will send you a pull request.
> Btw, are you going to merge wireless into wireless-next soon ?

I merged the wireless tree into wireless-next yesterday.

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: [PATCH] mac80211: Use RCU protection in ieee80211_get_tx_rates()
From: Calvin Owens @ 2013-06-13 15:27 UTC (permalink / raw)
  To: Felix Fietkau
  Cc: Johannes Berg, Luis R. Rodriguez, John W. Linville,
	linux-wireless, linux-kernel, ath9k-devel, netdev, jcalvinowens
In-Reply-To: <51B843C9.9090500@openwrt.org>

On Wednesday 06/12 at 11:47 +0200, Felix Fietkau wrote:
> On 2013-06-12 10:00 AM, Calvin Owens wrote:
> > Copying the rate table should be done in an RCU read-side critical
> > section.
> I think this approach is wrong. The sta entry is also under RCU
> protection (no locking for read access in that part of the code.
> In a normal driver tx path, no extra rcu_read_lock/rcu_read_unlock is
> needed. Only if the driver does some scheduling outside of the tx
> function (which ath9k does), this RCU warning appears.
> 
> How about this change instead:
> ---
> --- a/drivers/net/wireless/ath/ath9k/xmit.c
> +++ b/drivers/net/wireless/ath/ath9k/xmit.c
> @@ -1570,6 +1570,8 @@ void ath_txq_schedule(struct ath_softc *
>  	    txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
>  		return;
>  
> +	rcu_read_lock();
> +
>  	ac = list_first_entry(&txq->axq_acq, struct ath_atx_ac, list);
>  	last_ac = list_entry(txq->axq_acq.prev, struct ath_atx_ac, list);
>  
> @@ -1608,8 +1610,10 @@ void ath_txq_schedule(struct ath_softc *
>  
>  		if (ac == last_ac ||
>  		    txq->axq_ampdu_depth >= ATH_AGGR_MIN_QDEPTH)
> -			return;
> +			break;
>  	}
> +
> +	rcu_read_unlock();
>  }
>  
>  /***********/
>

Yep, that stops the RCU warning for me.

Tested-by: Calvin Owens <jcalvinowens@gmail.com>

^ permalink raw reply

* Re: [PATCH v2 1/2] mac80211: move tx_control_flag into flags2 within ieee80211_tx_info
From: Thomas Hühn @ 2013-06-13 12:44 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linville, linux-wireless, nbd
In-Reply-To: <1371117219.8335.9.camel@jlt4.sipsolutions.net>

Hi Johannes,
> 
> I'm sure some drivers use it in their status path. Have you audited them
> all?
> 
> No, you clearly haven't. carl9170 is *obviously* broken by this change,
> others may not so obvious.

You are right, carl9170 could access this flag from any context so tx_info->control.flags2 can be invalid.
Sorry for that mistake.

> 
>> 		} else if ((txinfo->flags & IEEE80211_TX_STAT_ACK) &&
>> -			   !(txinfo->flags & IEEE80211_TX_CTL_REQ_TX_STATUS)) {
>> +			   !(txinfo->control.flags2 & IEEE80211_TX_CTL2_REQ_TX_STATUS)) {
> 
> I bet you did some sort of automatic replace, but these lines look far
> too long.
> 
> Also, if you're doing hugely invasive patches like this then I think you
> should move more flags and be done with it.

Ok. I will go through all possible flags to check wether I can move them to flags2 and send a v3.

> 
>> @@ -1561,7 +1561,7 @@ void ieee80211_send_auth(struct ieee80211_sub_if_data *sdata,
>> 			 u16 transaction, u16 auth_alg, u16 status,
>> 			 const u8 *extra, size_t extra_len, const u8 *bssid,
>> 			 const u8 *da, const u8 *key, u8 key_len, u8 key_idx,
>> -			 u32 tx_flags);
>> +			 u32 tx_flags, u16 tx_flags2);
> 
> This function already has far too many arguments, I'm not taking a patch
> adding yet another one.

This should be obsolete as the flag in question would break carl9170 and I will skip that one.


Greetings Thomas


^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox