Linux wireless drivers development
 help / color / mirror / Atom feed
* [PATCH 3.11] mac80211: add missing channel context release
From: Johannes Berg @ 2013-08-21 10:04 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

IBSS needs to release the channel context when leaving
but I evidently missed that. Fix it.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/ibss.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index ea7b9c2..5e8bb3b 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -1138,6 +1138,7 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
 	clear_bit(SDATA_STATE_OFFCHANNEL_BEACON_STOPPED, &sdata->state);
 	ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED |
 						BSS_CHANGED_IBSS);
+	ieee80211_vif_release_channel(sdata);
 	synchronize_rcu();
 	kfree(presp);
 
-- 
1.8.4.rc2


^ permalink raw reply related

* [PATCH v2 3.11] mac80211: add missing channel context release
From: Johannes Berg @ 2013-08-21 10:04 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

IBSS needs to release the channel context when leaving
but I evidently missed that. Fix it.

Cc: stable@vger.kernel.org
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/ibss.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index ea7b9c2..5e8bb3b 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -1138,6 +1138,7 @@ int ieee80211_ibss_leave(struct ieee80211_sub_if_data *sdata)
 	clear_bit(SDATA_STATE_OFFCHANNEL_BEACON_STOPPED, &sdata->state);
 	ieee80211_bss_info_change_notify(sdata, BSS_CHANGED_BEACON_ENABLED |
 						BSS_CHANGED_IBSS);
+	ieee80211_vif_release_channel(sdata);
 	synchronize_rcu();
 	kfree(presp);
 
-- 
1.8.4.rc2


^ permalink raw reply related

* Re: [PATCH 09/16] wcn36xx: Add smd.c
From: Joe Perches @ 2013-08-21 11:20 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Eugene Krasnikov, linux-wireless, wcn36xx
In-Reply-To: <1377072922.15268.4.camel@jlt4.sipsolutions.net>

On Wed, 2013-08-21 at 10:15 +0200, Johannes Berg wrote:
> It should really be u8* instead of void*, since void* pointer arithmetic
> isn't really defined I think?

Well, it is for gcc and void * arithmetic is
widely used throughout the kernel.



^ permalink raw reply

* [PATCH] mac80211: fix ignored channel parameter
From: Simon Wunderlich @ 2013-08-21 11:40 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, Mathias Kretschmer, Simon Wunderlich

my earlier patch "mac80211: change IBSS channel state to chandef"
created a regression by ignoring the channel parameter in
__ieee80211_sta_join_ibss, which breaks IBSS channel selection. This
patch fixes this situation by using the right channel and adopting the
selected bandwidth mode.

Cc: stable@vger.kernel.org
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
---
 net/mac80211/ibss.c |   19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index 74de0f1..2669595 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -201,7 +201,7 @@ error:
 
 static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 				      const u8 *bssid, const int beacon_int,
-				      struct ieee80211_channel *chan,
+				      struct cfg80211_chan_def *req_chandef,
 				      const u32 basic_rates,
 				      const u16 capability, u64 tsf,
 				      bool creator)
@@ -213,6 +213,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 	struct cfg80211_bss *bss;
 	u32 bss_change;
 	struct cfg80211_chan_def chandef;
+	struct ieee80211_channel *chan;
 	struct beacon_data *presp;
 	enum nl80211_bss_scan_width scan_width;
 	bool have_higher_than_11mbit;
@@ -244,7 +245,9 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 
 	sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0;
 
-	chandef = ifibss->chandef;
+	/* make a copy of the chandef, it could be modified below. */
+	chandef = *req_chandef;
+	chan = chandef.chan;
 	if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef)) {
 		if (chandef.width == NL80211_CHAN_WIDTH_5 ||
 		    chandef.width == NL80211_CHAN_WIDTH_10 ||
@@ -339,6 +342,7 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 	struct cfg80211_bss *cbss =
 		container_of((void *)bss, struct cfg80211_bss, priv);
 	struct ieee80211_supported_band *sband;
+	struct cfg80211_chan_def chandef;
 	u32 basic_rates;
 	int i, j;
 	u16 beacon_int = cbss->beacon_interval;
@@ -352,6 +356,13 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 	if (beacon_int < 10)
 		beacon_int = 10;
 
+	chandef.chan = cbss->channel;
+	chandef.width = sdata->u.ibss.chandef.width;
+	chandef.center_freq1 = chandef.chan->center_freq +
+			       sdata->u.ibss.chandef.center_freq1 -
+			       sdata->u.ibss.chandef.chan->center_freq;
+	chandef.center_freq2 = 0;
+
 	sband = sdata->local->hw.wiphy->bands[cbss->channel->band];
 	rate_flags = ieee80211_chandef_rate_flags(&sdata->u.ibss.chandef);
 	shift = ieee80211_vif_get_shift(&sdata->vif);
@@ -385,7 +396,7 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 
 	__ieee80211_sta_join_ibss(sdata, cbss->bssid,
 				  beacon_int,
-				  cbss->channel,
+				  &chandef,
 				  basic_rates,
 				  cbss->capability,
 				  tsf, false);
@@ -867,7 +878,7 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
 		sdata->drop_unencrypted = 0;
 
 	__ieee80211_sta_join_ibss(sdata, bssid, sdata->vif.bss_conf.beacon_int,
-				  ifibss->chandef.chan, ifibss->basic_rates,
+				  &ifibss->chandef, ifibss->basic_rates,
 				  capability, 0, true);
 }
 
-- 
1.7.10.4


^ permalink raw reply related

* Re: [REGRESSION] 3.10.{6,7} crashes on network activity
From: Josh Boyer @ 2013-08-21 12:38 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Felix Fietkau, Greg Kroah-Hartman, Tom Gundersen,
	stable@vger.kernel.org, Linux Wireless List, LKML, Johannes Berg
In-Reply-To: <52147FD2.9020401@broadcom.com>

On Wed, Aug 21, 2013 at 4:52 AM, Arend van Spriel <arend@broadcom.com> wrote:
>>> Hi Felix,
>>>
>>> I have been diving into root causing why brcmsmac can not handle cck
>>> fallback rates, because it should. Maybe it is better to flag no cck
>>> support
>>> and only change brcmsmac.
>>
>>
>> We have a number of users hitting this in Fedora 18 and 19 now.  We're
>> tracking it with https://bugzilla.redhat.com/show_bug.cgi?id=998080
>> and I'm sure we can find people to test easily.
>
>
> There is already another one (possibly) dealing with the same issue:
>
> https://bugzilla.redhat.com/show_bug.cgi?id=989269
>
> One of them should probably be flagged as duplicate.
>
>
>> If you have a patch disabling cck in brcmsmac, I'd be happy to build a
>> kernel for people.  If that's going to be some time coming, perhaps
>> it's better to grab Felix's patch on a temporary basis?
>
>
> I think it is better to grab Felix's patch because as we both observed there
> is stuff missing in brcmsmac to deal with CCK rates and A-MPDU packet
> aggregation.

OK, thanks.

Felix, are you going to send that upstream?

josh

^ permalink raw reply

* Re: [PATCH v2 3.11] mac80211: add missing channel context release
From: Johannes Berg @ 2013-08-21 13:04 UTC (permalink / raw)
  To: linux-wireless
In-Reply-To: <1377079496-27797-1-git-send-email-johannes@sipsolutions.net>

On Wed, 2013-08-21 at 12:04 +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> IBSS needs to release the channel context when leaving
> but I evidently missed that. Fix it.

Tested & applied.

johannes


^ permalink raw reply

* [PATCH-mac8011] mac80211: fix ignored channel parameter
From: Simon Wunderlich @ 2013-08-21 13:30 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg, Mathias Kretschmer, Simon Wunderlich

my earlier patch "mac80211: change IBSS channel state to chandef"
created a regression by ignoring the channel parameter in
__ieee80211_sta_join_ibss, which breaks IBSS channel selection. This
patch fixes this situation by using the right channel and adopting the
selected bandwidth mode.

Cc: stable@vger.kernel.org
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
---
This version is based on mac80211.git for fixes, and the bandwidth
handling was changed in ieee80211_sta_join_ibss to more readable.
---
 net/mac80211/ibss.c |   33 +++++++++++++++++++++++++++++----
 1 file changed, 29 insertions(+), 4 deletions(-)

diff --git a/net/mac80211/ibss.c b/net/mac80211/ibss.c
index ea7b9c2..f292e8f 100644
--- a/net/mac80211/ibss.c
+++ b/net/mac80211/ibss.c
@@ -36,7 +36,7 @@
 
 static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 				      const u8 *bssid, const int beacon_int,
-				      struct ieee80211_channel *chan,
+				      struct cfg80211_chan_def *req_chandef,
 				      const u32 basic_rates,
 				      const u16 capability, u64 tsf,
 				      bool creator)
@@ -51,6 +51,7 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 	u32 bss_change;
 	u8 supp_rates[IEEE80211_MAX_SUPP_RATES];
 	struct cfg80211_chan_def chandef;
+	struct ieee80211_channel *chan;
 	struct beacon_data *presp;
 	int frame_len;
 
@@ -81,7 +82,9 @@ static void __ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 
 	sdata->drop_unencrypted = capability & WLAN_CAPABILITY_PRIVACY ? 1 : 0;
 
-	chandef = ifibss->chandef;
+	/* make a copy of the chandef, it could be modified below. */
+	chandef = *req_chandef;
+	chan = chandef.chan;
 	if (!cfg80211_reg_can_beacon(local->hw.wiphy, &chandef)) {
 		chandef.width = NL80211_CHAN_WIDTH_20;
 		chandef.center_freq1 = chan->center_freq;
@@ -259,10 +262,12 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 	struct cfg80211_bss *cbss =
 		container_of((void *)bss, struct cfg80211_bss, priv);
 	struct ieee80211_supported_band *sband;
+	struct cfg80211_chan_def chandef;
 	u32 basic_rates;
 	int i, j;
 	u16 beacon_int = cbss->beacon_interval;
 	const struct cfg80211_bss_ies *ies;
+	enum nl80211_channel_type chan_type;
 	u64 tsf;
 
 	sdata_assert_lock(sdata);
@@ -270,6 +275,26 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 	if (beacon_int < 10)
 		beacon_int = 10;
 
+	switch (sdata->u.ibss.chandef.width) {
+	case NL80211_CHAN_WIDTH_20_NOHT:
+	case NL80211_CHAN_WIDTH_20:
+	case NL80211_CHAN_WIDTH_40:
+		chan_type = cfg80211_get_chandef_type(&sdata->u.ibss.chandef);
+		cfg80211_chandef_create(&chandef, cbss->channel, chan_type);
+		break;
+	case NL80211_CHAN_WIDTH_5:
+	case NL80211_CHAN_WIDTH_10:
+		cfg80211_chandef_create(&chandef, cbss->channel,
+					NL80211_CHAN_WIDTH_20_NOHT);
+		chandef.width = sdata->u.ibss.chandef.width;
+		break;
+	default:
+		/* fall back to 20 MHz for unsupported modes */
+		cfg80211_chandef_create(&chandef, cbss->channel,
+					NL80211_CHAN_WIDTH_20_NOHT);
+		break;
+	}
+
 	sband = sdata->local->hw.wiphy->bands[cbss->channel->band];
 
 	basic_rates = 0;
@@ -294,7 +319,7 @@ static void ieee80211_sta_join_ibss(struct ieee80211_sub_if_data *sdata,
 
 	__ieee80211_sta_join_ibss(sdata, cbss->bssid,
 				  beacon_int,
-				  cbss->channel,
+				  &chandef,
 				  basic_rates,
 				  cbss->capability,
 				  tsf, false);
@@ -736,7 +761,7 @@ static void ieee80211_sta_create_ibss(struct ieee80211_sub_if_data *sdata)
 		sdata->drop_unencrypted = 0;
 
 	__ieee80211_sta_join_ibss(sdata, bssid, sdata->vif.bss_conf.beacon_int,
-				  ifibss->chandef.chan, ifibss->basic_rates,
+				  &ifibss->chandef, ifibss->basic_rates,
 				  capability, 0, true);
 }
 
-- 
1.7.10.4


^ permalink raw reply related

* Re: [PATCH-mac8011] mac80211: fix ignored channel parameter
From: Johannes Berg @ 2013-08-21 13:41 UTC (permalink / raw)
  To: Simon Wunderlich; +Cc: linux-wireless, Mathias Kretschmer, Simon Wunderlich
In-Reply-To: <1377091825-30564-1-git-send-email-siwu@hrz.tu-chemnitz.de>

On Wed, 2013-08-21 at 15:30 +0200, Simon Wunderlich wrote:
> my earlier patch "mac80211: change IBSS channel state to chandef"
> created a regression by ignoring the channel parameter in
> __ieee80211_sta_join_ibss, which breaks IBSS channel selection. This
> patch fixes this situation by using the right channel and adopting the
> selected bandwidth mode.

Tested & applied.

johannes


^ permalink raw reply

* pull-request: mac80211 2013-08-21
From: Johannes Berg @ 2013-08-21 13:44 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless

[-- Attachment #1: Type: text/plain, Size: 1421 bytes --]

John,

I have three more patches for the 3.11 stream: Felix's fix for the
fairly visible brcmsmac crash, a fix from Simon for an IBSS join bug I
found and a fix for a channel context bug in IBSS I'd introduced.

Let me know if there's any problem.

Thanks,
johannes

The following changes since commit dee8a9732e713480075adbbca8eb220c5b8d1216:

  cfg80211: don't request disconnect if not connected (2013-08-14 14:00:19 +0200)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/jberg/mac80211.git for-john

for you to fetch changes up to 75a423f493ffdf741acae27bf179cd560f7813d7:

  mac80211: ibss: fix ignored channel parameter (2013-08-21 15:33:08 +0200)

----------------------------------------------------------------
Felix Fietkau (1):
      mac80211: add a flag to indicate CCK support for HT clients

Johannes Berg (1):
      mac80211: add missing channel context release

Simon Wunderlich (1):
      mac80211: ibss: fix ignored channel parameter

 drivers/net/wireless/ath/ath9k/init.c    |  3 ++-
 drivers/net/wireless/ath/carl9170/main.c |  3 ++-
 drivers/net/wireless/rt2x00/rt2800lib.c  |  3 ++-
 include/net/mac80211.h                   |  1 +
 net/mac80211/ibss.c                      | 34 ++++++++++++++++++++++++++++----
 net/mac80211/rc80211_minstrel_ht.c       |  3 +++
 6 files changed, 40 insertions(+), 7 deletions(-)


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

^ permalink raw reply

* Re: [REGRESSION] 3.10.{6,7} crashes on network activity
From: Arend van Spriel @ 2013-08-21 14:27 UTC (permalink / raw)
  To: Josh Boyer
  Cc: Felix Fietkau, Greg Kroah-Hartman, Tom Gundersen,
	stable@vger.kernel.org, Linux Wireless List, LKML, Johannes Berg
In-Reply-To: <CA+5PVA5Wi=Xjrsb_Rh53A4NkWHe3h-gfs89dO6Zfb+6uh+G=dQ@mail.gmail.com>

On 08/21/13 14:38, Josh Boyer wrote:
> On Wed, Aug 21, 2013 at 4:52 AM, Arend van Spriel<arend@broadcom.com>  wrote:
>>>> Hi Felix,
>>>>
>>>> I have been diving into root causing why brcmsmac can not handle cck
>>>> fallback rates, because it should. Maybe it is better to flag no cck
>>>> support
>>>> and only change brcmsmac.
>>>
>>>
>>> We have a number of users hitting this in Fedora 18 and 19 now.  We're
>>> tracking it with https://bugzilla.redhat.com/show_bug.cgi?id=998080
>>> and I'm sure we can find people to test easily.
>>
>>
>> There is already another one (possibly) dealing with the same issue:
>>
>> https://bugzilla.redhat.com/show_bug.cgi?id=989269
>>
>> One of them should probably be flagged as duplicate.
>>
>>
>>> If you have a patch disabling cck in brcmsmac, I'd be happy to build a
>>> kernel for people.  If that's going to be some time coming, perhaps
>>> it's better to grab Felix's patch on a temporary basis?
>>
>>
>> I think it is better to grab Felix's patch because as we both observed there
>> is stuff missing in brcmsmac to deal with CCK rates and A-MPDU packet
>> aggregation.
>
> OK, thanks.
>
> Felix, are you going to send that upstream?

It already has been sent: 
http://mid.gmane.org/1377020634-27064-1-git-send-email-nbd@openwrt.org

Johannes has submitted it to John so it is getting there soon(ish).

> josh

Regards,
Arend




^ permalink raw reply

* Re: [REGRESSION] 3.10.{6,7} crashes on network activity
From: Josh Boyer @ 2013-08-21 14:45 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: Felix Fietkau, Greg Kroah-Hartman, Tom Gundersen,
	stable@vger.kernel.org, Linux Wireless List, LKML, Johannes Berg
In-Reply-To: <5214CE5F.5010009@broadcom.com>

On Wed, Aug 21, 2013 at 10:27 AM, Arend van Spriel <arend@broadcom.com> wrote:
> On 08/21/13 14:38, Josh Boyer wrote:
>>
>> On Wed, Aug 21, 2013 at 4:52 AM, Arend van Spriel<arend@broadcom.com>
>> wrote:
>>>>>
>>>>> Hi Felix,
>>>>>
>>>>> I have been diving into root causing why brcmsmac can not handle cck
>>>>> fallback rates, because it should. Maybe it is better to flag no cck
>>>>> support
>>>>> and only change brcmsmac.
>>>>
>>>>
>>>>
>>>> We have a number of users hitting this in Fedora 18 and 19 now.  We're
>>>> tracking it with https://bugzilla.redhat.com/show_bug.cgi?id=998080
>>>> and I'm sure we can find people to test easily.
>>>
>>>
>>>
>>> There is already another one (possibly) dealing with the same issue:
>>>
>>> https://bugzilla.redhat.com/show_bug.cgi?id=989269
>>>
>>> One of them should probably be flagged as duplicate.
>>>
>>>
>>>> If you have a patch disabling cck in brcmsmac, I'd be happy to build a
>>>> kernel for people.  If that's going to be some time coming, perhaps
>>>> it's better to grab Felix's patch on a temporary basis?
>>>
>>>
>>>
>>> I think it is better to grab Felix's patch because as we both observed
>>> there
>>> is stuff missing in brcmsmac to deal with CCK rates and A-MPDU packet
>>> aggregation.
>>
>>
>> OK, thanks.
>>
>> Felix, are you going to send that upstream?
>
>
> It already has been sent:
> http://mid.gmane.org/1377020634-27064-1-git-send-email-nbd@openwrt.org
>
> Johannes has submitted it to John so it is getting there soon(ish).

Ah, wonderful.  Thanks!

josh

^ permalink raw reply

* pull request: bluetooth-next 2013-08-21
From: Gustavo Padovan @ 2013-08-21 16:12 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, linux-bluetooth, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 3411 bytes --]

Hi John,

Patches to 3.12, here we have:

* implementation of a proper tty_port for RFCOMM devices, this fixes some
issues people were seeing lately in the kernel.
* Add voice_setting option for SCO, it is used for SCO Codec selection
* bugfixes, small improvements and clean ups

Please pull, Thanks.

	Gustavo

--
The following changes since commit 72bb2f2678878dd4a758e628957f29ce28000d88:

  bgmac: make bgmac depend on bcm47xx (2013-07-24 11:05:19 -0400)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next master

for you to fetch changes up to 2dea632f9acad076370fe871d4ccc93868621403:

  Bluetooth: Add SCO connection fallback (2013-08-21 16:47:13 +0200)

----------------------------------------------------------------
Andy Shevchenko (1):
      Bluetooth: use DIV_ROUND_UP in suitable places in btmrvl_sdio

Benjamin Tissoires (2):
      Bluetooth: hidp: implement hidinput_input_event callback
      Bluetooth: hidp: remove wrong send_report at init

Frédéric Dalleau (10):
      Bluetooth: Use hci_connect_sco directly
      Bluetooth: Remove unused mask parameter in sco_conn_defer_accept
      Bluetooth: Add Bluetooth socket voice option
      Bluetooth: Add constants for SCO airmode
      Bluetooth: Use voice setting in deferred SCO connection request
      Bluetooth: Parameters for outgoing SCO connections
      Bluetooth: Add constants and macro declaration for transparent data
      Bluetooth: Prevent transparent SCO on older devices
      Bluetooth: Handle specific error for SCO connection fallback
      Bluetooth: Add SCO connection fallback

Gianluca Anzolin (6):
      Bluetooth: Take proper tty_struct references
      Bluetooth: Remove the device from the list in the destructor
      Bluetooth: Move the tty initialization and cleanup out of open/close
      Bluetooth: Implement .activate, .shutdown and .carrier_raised methods
      Bluetooth: Fix the reference counting of tty_port
      Bluetooth: Purge the dlc->tx_queue to avoid circular dependency

Gustavo Padovan (1):
      Bluetooth: Add missing braces to an "else if"

Jingoo Han (1):
      Bluetooth: replace strict_strtol() with kstrtol()

Johan Hedberg (1):
      Bluetooth: Fix getting SCO socket options in deferred state

Marcel Holtmann (2):
      Bluetooth: Fix simple whitespace vs tab style issue
      Bluetooth: Set different event mask for LE-only controllers

Mikel Astiz (3):
      Bluetooth: Add HCI authentication capabilities macros
      Bluetooth: Use defines in in hci_get_auth_req()
      Bluetooth: Use defines instead of integer literals

 drivers/bluetooth/btmrvl_debugfs.c |   6 +-
 drivers/bluetooth/btmrvl_sdio.c    |   4 +-
 include/net/bluetooth/bluetooth.h  |   8 ++
 include/net/bluetooth/hci.h        |   7 +
 include/net/bluetooth/hci_core.h   |  10 +-
 include/net/bluetooth/sco.h        |   1 +
 net/bluetooth/hci_conn.c           |  62 +++++++--
 net/bluetooth/hci_core.c           |  14 +-
 net/bluetooth/hci_event.c          |  29 +++--
 net/bluetooth/hidp/core.c          |  40 ++++--
 net/bluetooth/l2cap_core.c         |   3 +-
 net/bluetooth/rfcomm/tty.c         | 271 ++++++++++++++++++---------------------
 net/bluetooth/sco.c                |  85 +++++++++---
 13 files changed, 334 insertions(+), 206 deletions(-)



[-- Attachment #2: Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* [PATCH] ath10k: Fix mutex unlock balance
From: Mohammed Shafi Shajakhan @ 2013-08-21 16:26 UTC (permalink / raw)
  To: linux-wireless; +Cc: Kalle Valo, Mohammed Shafi Shajakhan

From: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>

ath10k_debug_read_target_stats is properly
protected by data_lock (spinlock). Remove
the unwanted mutex_unlock(&ar->conf_mutex)

[ BUG: bad unlock balance detected! ]
-------------------------------------
kworker/u4:0/12459 is trying to release lock
(&ar->conf_mutex) at:
[<c16a170d>] mutex_unlock+0xd/0x10
but there are no more locks to release!

 Call Trace:
  [<c16a170d>] ? mutex_unlock+0xd/0x10
  [<c10b697d>] __lock_release+0x4d/0xe0
  [<f88ca0fc>] ? ath10k_debug_read_target_stats+0xac/0x290

  [<c16a170d>] ? mutex_unlock+0xd/0x10
  [<c10b6a5b>] lock_release+0x4b/0x150
  [<c16a1580>] __mutex_unlock_slowpath+0x70/0x150
  [<f88ca0fc>] ? ath10k_debug_read_target_stats+0xac/0x290

  [<c10b456b>] ? trace_hardirqs_on+0xb/0x10
  [<c16a170d>] mutex_unlock+0xd/0x10
  [<f88ca107>] ath10k_debug_read_target_stats+0xb7/0x290

  [<f88d337a>] ath10k_wmi_event_process+0x3fa/0x6e0

  [<c10b456b>] ? trace_hardirqs_on+0xb/0x10
  [<f88d36e1>] ath10k_wmi_event_work+0x21/0x40
               [ath10k_core]

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath10k/debug.c |    1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/debug.c b/drivers/net/wireless/ath/ath10k/debug.c
index 3d65594..fcb40cc 100644
--- a/drivers/net/wireless/ath/ath10k/debug.c
+++ b/drivers/net/wireless/ath/ath10k/debug.c
@@ -260,7 +260,6 @@ void ath10k_debug_read_target_stats(struct ath10k *ar,
 	}
 
 	spin_unlock_bh(&ar->data_lock);
-	mutex_unlock(&ar->conf_mutex);
 	complete(&ar->debug.event_stats_compl);
 }
 
-- 
1.7.9.5


^ permalink raw reply related

* Re: [RFT 00/13] brcmsmac: bcm4313 iPA related patches
From: Maximilian Engelhardt @ 2013-08-21 16:17 UTC (permalink / raw)
  To: Arend van Spriel; +Cc: linux-wireless
In-Reply-To: <1376424220-10765-1-git-send-email-arend@broadcom.com>

[-- Attachment #1: Type: text/plain, Size: 1965 bytes --]

On Tuesday 13 August 2013 22:03:27 Arend van Spriel wrote:
> This series replaces the patch "[PATCH 12/12] brcmsmac: support 4313iPA"
> with Message-ID: <1376130450-29746-13-git-send-email-arend@broadcom.com>.
> 
> It has been split up into individual patches. Please test this series
> especially if you had issues with the original commit b6fc28a that was
> reverted.
> 
> Cc: Jonas Gorski <jogo@openwrt.org>
> Cc: David Herrmann <dh.herrmann@gmail.com>
> Cc: Maximilian Engelhardt <maxi@daemonizer.de>
> Cc: David Costa <david@zarel.net>
> 
> Arend van Spriel (13):
>   brcmsmac: cosmetic change in phy_lcn.c
>   brcmsmac: change pa_gain for bcm4313 iPA
>   brcmsmac: use ARRAY_SIZE in phytbl_lcn.c
>   brcmsmac: add switch control table for BCM4313 iPA BT-combo cards
>   brcmsmac: add debug info message providing phy and radio info
>   brcmsmac: update transmit gain table for lcn phy
>   brcmsmac: change lcnphy receive i/q calibration routine
>   brcmsmac: fix TSSI idle estimation
>   brcmsmac: avoid calling set_txpwr_by_index() twice
>   brcmsmac: rework switch control table init including iPA BT-combo
>   brcmsmac: correct phy registers for TSSI-based power control
>   brcmsmac: reinitialize TSSI power control upon channel switch
>   brcmsmac: add support for BCM4313 iPA variant
> 
>  drivers/net/wireless/brcm80211/brcmsmac/main.c     |    4 +-
>  .../net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c  |  397
> +++++++++++-------- .../wireless/brcm80211/brcmsmac/phy/phytbl_lcn.c   | 
> 405 +++++++++++--------- .../wireless/brcm80211/brcmsmac/phy/phytbl_lcn.h  
> |    1 +
>  4 files changed, 475 insertions(+), 332 deletions(-)

Hello Arend,

I finally had some time to test your patches.

On my hardware I couldn't find any regressions with these patches. I also 
verified that the reception problems I had with my card are fixed by these 
patches.

I did test the patches on top of 3.10.5 as they did apply without any 
problems.

Greetings,
Maxi

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply

* Re: [PATCH v2 3/6] rt2x00: rt2800: serialize shared memory access
From: Gabor Juhos @ 2013-08-21 16:42 UTC (permalink / raw)
  To: Helmut Schaa; +Cc: John W. Linville, linux-wireless, rt2x00 Users List
In-Reply-To: <CAGXE3d-q3-HNtdp5jq94nCcLzCW1-oO+HTt+=yOFEE+fL8kbtA@mail.gmail.com>

Hi Helmut,

> On Mon, Aug 19, 2013 at 3:11 PM, Gabor Juhos <juhosg@openwrt.org> wrote:
>> The shared memory of the rt2800 devices is accessible
>> through the register offset range between 0x4000 and
>> 0x8000. The size of this range is 16KB only and on
>> devices which have more than 16KB of shared memory either
>> the low or the high part of the memory is accessible at a
>> time.
>>
> 
>> Serialize all accesses to the shared memory by a mutex,
>> in order to avoid concurrent use of that.
>>
>> Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
>> ---
> 
> [...]
> 
> 
>> @@ -993,8 +1001,11 @@ void rt2800_write_beacon(struct queue_entry *entry, struct txentry_desc *txdesc)
>>         }
>>
>>         beacon_base = HW_BEACON_BASE(entry->entry_idx);
>> +
>> +       rt2800_shared_mem_lock(rt2x00dev);
>>         rt2800_register_multiwrite(rt2x00dev, beacon_base, entry->skb->data,
>>                                    entry->skb->len + padding_len);
>> +       rt2800_shared_mem_unlock(rt2x00dev);
>>
>>         /*
>>          * Enable beaconing again.
> 
> Beacons on PCI devices are updated from pre_tbtt or beacon_done tasklet.
> Looks like this will fail for pci then ...

Hm, you are right:

BUG: sleeping function called from invalid context at kernel/mutex.c:619
in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper
INFO: lockdep is turned off.
CPU: 0 PID: 0 Comm: swapper Tainted: G           O 3.11.0-rc6-wl #627
Stack : 00000000 00000000 80745dbe 00000045 00000000 80439ca0 803f097c 80723a50
        8043da78 8043d7c7 001f0640 80439ca0 83dfee20 803f0000 00000006 8035c3dc
        00000000 80031558 80745dbc 00000000 803f42b8 80439b9c 80439b9c 803f097c
        c01ba400 00000000 00000000 00000000 00000000 00000000 00000000 00000000
        00000000 00000000 00000000 00000000 00000000 00000000 00000000 80439b30
          ...
Call Trace:
[<8000d328>] show_stack+0x64/0x7c
[<80361ca0>] mutex_lock_nested+0x4c/0x484
[<c01ba458>] rt2800_write_beacon+0x300/0x460 [rt2800lib]
[<c016dc24>] rt2x00queue_update_beacon_locked+0xc0/0xe4 [rt2x00lib]
[<8033fa30>] ieee80211_iterate_active_interfaces_atomic+0x180/0x188
[<c01cbb18>] 0xc01cbb18


In an early version of the patch, I have used a spinlock but that was not
suitable for USB devices. I have to rethink that how can I resolve this.

Thank you for the review!

-Gabor

^ permalink raw reply

* Re: Tunneable mesh channels
From: Francisco Cuesta @ 2013-08-21 19:00 UTC (permalink / raw)
  To: linux-wireless
In-Reply-To: <CANMvdA-SDgbL7p0xbXfOoWpgjf9viVKYwErHd8K-VBGZotLA1A@mail.gmail.com>

Hello,

 I was wondering a question concerning to channel selection on mesh
networks, in my previous version of compat-wirelessI disabled some
channels, but now in the new version(2013-06-27) they're back again.
So I would like to ensure that whether the channel is listed by iw phy
phyo info that channel can be used by the kernel when setting up the
mesh node or not; since as far as I know, if it does not show up after
issuing the command then that channel for sure cannot be used at all.

 Am I mistaken?

 Thanks in advance,

 Regards!

^ permalink raw reply

* Re: [RFT 00/13] brcmsmac: bcm4313 iPA related patches
From: Arend van Spriel @ 2013-08-21 19:00 UTC (permalink / raw)
  To: Maximilian Engelhardt; +Cc: linux-wireless
In-Reply-To: <7288564.kdgq91zD8T@eisbaer>

On 08/21/13 18:17, Maximilian Engelhardt wrote:
> On Tuesday 13 August 2013 22:03:27 Arend van Spriel wrote:
>> This series replaces the patch "[PATCH 12/12] brcmsmac: support 4313iPA"
>> with Message-ID:<1376130450-29746-13-git-send-email-arend@broadcom.com>.
>>
>> It has been split up into individual patches. Please test this series
>> especially if you had issues with the original commit b6fc28a that was
>> reverted.
>>
>> Cc: Jonas Gorski<jogo@openwrt.org>
>> Cc: David Herrmann<dh.herrmann@gmail.com>
>> Cc: Maximilian Engelhardt<maxi@daemonizer.de>
>> Cc: David Costa<david@zarel.net>
>>
>> Arend van Spriel (13):
>>    brcmsmac: cosmetic change in phy_lcn.c
>>    brcmsmac: change pa_gain for bcm4313 iPA
>>    brcmsmac: use ARRAY_SIZE in phytbl_lcn.c
>>    brcmsmac: add switch control table for BCM4313 iPA BT-combo cards
>>    brcmsmac: add debug info message providing phy and radio info
>>    brcmsmac: update transmit gain table for lcn phy
>>    brcmsmac: change lcnphy receive i/q calibration routine
>>    brcmsmac: fix TSSI idle estimation
>>    brcmsmac: avoid calling set_txpwr_by_index() twice
>>    brcmsmac: rework switch control table init including iPA BT-combo
>>    brcmsmac: correct phy registers for TSSI-based power control
>>    brcmsmac: reinitialize TSSI power control upon channel switch
>>    brcmsmac: add support for BCM4313 iPA variant
>>
>>   drivers/net/wireless/brcm80211/brcmsmac/main.c     |    4 +-
>>   .../net/wireless/brcm80211/brcmsmac/phy/phy_lcn.c  |  397
>> +++++++++++-------- .../wireless/brcm80211/brcmsmac/phy/phytbl_lcn.c   |
>> 405 +++++++++++--------- .../wireless/brcm80211/brcmsmac/phy/phytbl_lcn.h
>> |    1 +
>>   4 files changed, 475 insertions(+), 332 deletions(-)
>
> Hello Arend,
>
> I finally had some time to test your patches.
>
> On my hardware I couldn't find any regressions with these patches. I also
> verified that the reception problems I had with my card are fixed by these
> patches.
>
> I did test the patches on top of 3.10.5 as they did apply without any
> problems.

Appreciated. I did send the patches for wireless-next already, ie. for 
v3.12 kernel. Good to know that they apply to 3.10 as is.

Regards,
Arend


^ permalink raw reply

* Re: [RFT V2 02/13] brcmsmac: change pa_gain for bcm4313 iPA
From: Hauke Mehrtens @ 2013-08-21 19:18 UTC (permalink / raw)
  To: Arend van Spriel
  Cc: linux-wireless, Jonas Gorski, David Herrmann,
	Maximilian Engelhardt, David Costa
In-Reply-To: <1376424220-10765-3-git-send-email-arend@broadcom.com>

Hi Arend,

when you send a new patch please fix this typo.

Hauke

On 08/13/2013 10:03 PM, Arend van Spriel wrote:
> The function wlc_lcnphy_load_tx_gain_table() has a target PA
> gain specified for the iPA variant of the bcm4313. This gain
> value is reduced to avoid PA distortion. The if-statement is
> removed because it was rather redundant in the first place.
> Please not that this patch does not provide full iPA support.
         ^^^
         note



^ permalink raw reply

* [RFC] mac80211: fix locking with ieee80211_resume_disconnect()
From: Johannes Berg @ 2013-08-21 20:35 UTC (permalink / raw)
  To: linux-wireless; +Cc: Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

If it is needed to disconnect multiple virtual interfaces after
(WoWLAN-) suspend, the most obvious approach would be to iterate
all interfaces by calling ieee80211_iterate_active_interfaces()
and then call ieee80211_resume_disconnect() for each one. This
is what the iwlmvm driver does.

Unfortunately, this causes a locking dependency from mac80211's
iflist_mtx to the key_mtx. This is problematic as the former is
intentionally never held while calling any driver operation to
allow drivers to iterate with their own locks held. The key_mtx
is held while installing a key into the driver though, so this
new lock dependency means drivers implementing the logic above
can no longer hold their own lock while iterating.

To fix this, modify the ieee80211_resume_disconnect() API to do
the iteration in there (using RCU) while holding the key_mtx so
there's no new lock dependency, and let the driver device which
interface should be disconnected by passing a decision function
that returns true/false.

This also adjusts users accordingly, the iwldvm one introduces
a behavioural change (previously only a single interface would
have been disconnected) but this is acceptable since it only
supports a single one for WoWLAN, so the other one would have
been disconnected by the AP while sleeping anyway. For iwlmvm
this fixes the bug described above.

The decision-making callback would therefore not be necessary
right now, but I'm working on a future patch to keep a single
connection in iwlmvm open, at which point that one should not
be disconnected, though all other ones should, so the API is
prepared for that change already.

Change-Id: I9b578c7dacefbb818b4113da12770aec9d0b06c4
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 drivers/net/wireless/iwlwifi/dvm/mac80211.c |  2 +-
 drivers/net/wireless/iwlwifi/mvm/d3.c       | 12 +----------
 include/net/mac80211.h                      | 24 ++++++++++++++--------
 net/mac80211/util.c                         | 31 ++++++++++++++++-------------
 4 files changed, 35 insertions(+), 34 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/dvm/mac80211.c b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
index 4bd2ca9..1810b23 100644
--- a/drivers/net/wireless/iwlwifi/dvm/mac80211.c
+++ b/drivers/net/wireless/iwlwifi/dvm/mac80211.c
@@ -571,7 +571,7 @@ static int iwlagn_mac_resume(struct ieee80211_hw *hw)
 	mutex_unlock(&priv->mutex);
 	IWL_DEBUG_MAC80211(priv, "leave\n");
 
-	ieee80211_resume_disconnect(vif);
+	ieee80211_resume_disconnect(priv->hw, NULL, NULL);
 
 	return 1;
 }
diff --git a/drivers/net/wireless/iwlwifi/mvm/d3.c b/drivers/net/wireless/iwlwifi/mvm/d3.c
index 5585538..29a7192 100644
--- a/drivers/net/wireless/iwlwifi/mvm/d3.c
+++ b/drivers/net/wireless/iwlwifi/mvm/d3.c
@@ -1362,13 +1362,6 @@ static void iwl_mvm_read_d3_sram(struct iwl_mvm *mvm)
 #endif
 }
 
-static void iwl_mvm_d3_disconnect_iter(void *data, u8 *mac,
-				       struct ieee80211_vif *vif)
-{
-	if (vif->type == NL80211_IFTYPE_STATION)
-		ieee80211_resume_disconnect(vif);
-}
-
 static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)
 {
 	struct iwl_d3_iter_data resume_iter_data = {
@@ -1411,10 +1404,7 @@ static int __iwl_mvm_resume(struct iwl_mvm *mvm, bool test)
 
  out:
 	if (!test)
-		ieee80211_iterate_active_interfaces(mvm->hw,
-						    IEEE80211_IFACE_ITER_NORMAL,
-						    iwl_mvm_d3_disconnect_iter,
-						    NULL);
+		ieee80211_resume_disconnect(mvm->hw, NULL, NULL);
 
 	/* return 1 to reconfigure the device */
 	set_bit(IWL_MVM_STATUS_IN_HW_RESTART, &mvm->status);
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index cb5eba8..194efe7 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -4104,13 +4104,18 @@ void ieee80211_connection_loss(struct ieee80211_vif *vif);
 /**
  * ieee80211_resume_disconnect - disconnect from AP after resume
  *
- * @vif: &struct ieee80211_vif pointer from the add_interface callback.
- *
- * Instructs mac80211 to disconnect from the AP after resume.
- * Drivers can use this after WoWLAN if they know that the
- * connection cannot be kept up, for example because keys were
- * used while the device was asleep but the replay counters or
- * similar cannot be retrieved from the device during resume.
+ * @hw: pointer obtained from ieee80211_alloc_hw().
+ * @decision: decision function, return %true if the interface should be
+ *	disconnected, only interfaces of type %NL80211_IFTYPE_STATION
+ *	(P2P and non-P2P) will be passed for decision-making. May be %NULL
+ *	which is equivalent to always returning %true.
+ *
+ * Instructs mac80211 to disconnect from the AP after resume for those
+ * interfaces where the decision-making function returned %true. Drivers
+ * can use this after WoWLAN if they know that the connection cannot be
+ * kept up, for example because keys were used while the device was asleep
+ * but the replay counters or similar cannot be retrieved from the device
+ * during resume.
  *
  * Note that due to implementation issues, if the driver uses
  * the reconfiguration functionality during resume the interface
@@ -4122,7 +4127,10 @@ void ieee80211_connection_loss(struct ieee80211_vif *vif);
  * calls this function, or at least not any locks it needs in the
  * key configuration paths (if it supports HW crypto).
  */
-void ieee80211_resume_disconnect(struct ieee80211_vif *vif);
+void ieee80211_resume_disconnect(struct ieee80211_hw *hw,
+				 bool (*decision)(struct ieee80211_vif *vif,
+						  void *data),
+				 void *decision_data);
 
 /**
  * ieee80211_cqm_rssi_notify - inform a configured connection quality monitoring
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index d23c5a7..ba85533 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -1753,29 +1753,32 @@ int ieee80211_reconfig(struct ieee80211_local *local)
 	return 0;
 }
 
-void ieee80211_resume_disconnect(struct ieee80211_vif *vif)
+void ieee80211_resume_disconnect(struct ieee80211_hw *hw,
+				 bool (*decision)(struct ieee80211_vif *vif,
+						  void *data),
+				 void *decision_data)
 {
+	struct ieee80211_local *local = hw_to_local(hw);
 	struct ieee80211_sub_if_data *sdata;
-	struct ieee80211_local *local;
 	struct ieee80211_key *key;
 
-	if (WARN_ON(!vif))
-		return;
-
-	sdata = vif_to_sdata(vif);
-	local = sdata->local;
-
 	if (WARN_ON(!local->resuming))
 		return;
 
-	if (WARN_ON(vif->type != NL80211_IFTYPE_STATION))
-		return;
+	mutex_lock(&local->key_mtx);
+	rcu_read_lock();
 
-	sdata->flags |= IEEE80211_SDATA_DISCONNECT_RESUME;
+	list_for_each_entry_rcu(sdata, &local->interfaces, list) {
+		if (sdata->vif.type != NL80211_IFTYPE_STATION)
+			continue;
+		if (decision && !decision(&sdata->vif, decision_data))
+			continue;
+		sdata->flags |= IEEE80211_SDATA_DISCONNECT_RESUME;
+		list_for_each_entry(key, &sdata->key_list, list)
+			key->flags |= KEY_FLAG_TAINTED;
+	}
 
-	mutex_lock(&local->key_mtx);
-	list_for_each_entry(key, &sdata->key_list, list)
-		key->flags |= KEY_FLAG_TAINTED;
+	rcu_read_unlock();
 	mutex_unlock(&local->key_mtx);
 }
 EXPORT_SYMBOL_GPL(ieee80211_resume_disconnect);
-- 
1.8.4.rc2


^ permalink raw reply related

* [PATCH 1/2] staging: vt6656: rxtx.c s_uGetDataDuration return endian corrected u16.
From: Malcolm Priestley @ 2013-08-21 20:58 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless

The return always be u16 endian corrected. For the
large part this is missing.

Fix uGetDataDuration to return u16 endian corrected.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/rxtx.c | 36 ++++++++++++++++++------------------
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 05e82ec..1d0611e 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -132,7 +132,7 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType,
 	void *pvRTS, u32 cbFrameLength, int bNeedAck, int bDisCRC,
 	struct ethhdr *psEthHeader, u16 wCurrentRate, u8 byFBOption);
 
-static u32 s_uGetDataDuration(struct vnt_private *pDevice, u8 byDurType,
+static u16 s_uGetDataDuration(struct vnt_private *pDevice, u8 byDurType,
 	u8 byPktType, int bNeedAck);
 
 static u16 s_uGetRTSCTSDuration(struct vnt_private *pDevice,
@@ -383,7 +383,7 @@ static u32 s_uGetRTSCTSRsvTime(struct vnt_private *pDevice,
 }
 
 //byFreqType 0: 5GHz, 1:2.4Ghz
-static u32 s_uGetDataDuration(struct vnt_private *pDevice, u8 byDurType,
+static u16 s_uGetDataDuration(struct vnt_private *pDevice, u8 byDurType,
 	u8 byPktType, int bNeedAck)
 {
 	u32 uAckTime = 0;
@@ -395,7 +395,7 @@ static u32 s_uGetDataDuration(struct vnt_private *pDevice, u8 byDurType,
 		else
 			uAckTime = BBuGetFrameTime(pDevice->byPreambleType,
 				byPktType, 14, pDevice->byTopOFDMBasicRate);
-		return pDevice->uSIFS + uAckTime;
+		return cpu_to_le16((u16)(pDevice->uSIFS + uAckTime));
 	}
 
 	return 0;
@@ -507,9 +507,9 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice,
 		BBvCalculateParameter(pDevice, cbFrameLength,
 			pDevice->byTopCCKBasicRate, PK_TYPE_11B, &pBuf->b);
                 //Get Duration and TimeStamp
-		pBuf->wDuration_a = (u16)s_uGetDataDuration(pDevice, DATADUR_A,
+		pBuf->wDuration_a = s_uGetDataDuration(pDevice, DATADUR_A,
 							byPktType, bNeedAck);
-		pBuf->wDuration_b = (u16)s_uGetDataDuration(pDevice, DATADUR_B,
+		pBuf->wDuration_b = s_uGetDataDuration(pDevice, DATADUR_B,
 							PK_TYPE_11B, bNeedAck);
 
                 pBuf->wTimeStampOff_a = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE];
@@ -525,13 +525,13 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice,
 		BBvCalculateParameter(pDevice, cbFrameLength,
 			pDevice->byTopCCKBasicRate, PK_TYPE_11B, &pBuf->b);
                 //Get Duration and TimeStamp
-		pBuf->wDuration_a = (u16)s_uGetDataDuration(pDevice, DATADUR_A,
+		pBuf->wDuration_a = s_uGetDataDuration(pDevice, DATADUR_A,
 							byPktType, bNeedAck);
-		pBuf->wDuration_b = (u16)s_uGetDataDuration(pDevice, DATADUR_B,
+		pBuf->wDuration_b = s_uGetDataDuration(pDevice, DATADUR_B,
 							PK_TYPE_11B, bNeedAck);
-		pBuf->wDuration_a_f0 = (u16)s_uGetDataDuration(pDevice,
+		pBuf->wDuration_a_f0 = s_uGetDataDuration(pDevice,
 					DATADUR_A_F0, byPktType, bNeedAck);
-		pBuf->wDuration_a_f1 = (u16)s_uGetDataDuration(pDevice,
+		pBuf->wDuration_a_f1 = s_uGetDataDuration(pDevice,
 					DATADUR_A_F1, byPktType, bNeedAck);
                 pBuf->wTimeStampOff_a = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE];
                 pBuf->wTimeStampOff_b = wTimeStampOff[pDevice->byPreambleType%2][pDevice->byTopCCKBasicRate%MAX_RATE];
@@ -546,11 +546,11 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice,
 		BBvCalculateParameter(pDevice, cbFrameLength, wCurrentRate,
 			byPktType, &pBuf->a);
             //Get Duration and TimeStampOff
-		pBuf->wDuration = (u16)s_uGetDataDuration(pDevice, DATADUR_A,
+		pBuf->wDuration = s_uGetDataDuration(pDevice, DATADUR_A,
 					byPktType, bNeedAck);
-		pBuf->wDuration_f0 = (u16)s_uGetDataDuration(pDevice,
+		pBuf->wDuration_f0 = s_uGetDataDuration(pDevice,
 				DATADUR_A_F0, byPktType, bNeedAck);
-		pBuf->wDuration_f1 = (u16)s_uGetDataDuration(pDevice,
+		pBuf->wDuration_f1 = s_uGetDataDuration(pDevice,
 				DATADUR_A_F1, byPktType, bNeedAck);
                 pBuf->wTimeStampOff = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE];
             return (pBuf->wDuration);
@@ -561,7 +561,7 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice,
 		BBvCalculateParameter(pDevice, cbFrameLength, wCurrentRate,
 			byPktType, &pBuf->ab);
             //Get Duration and TimeStampOff
-		pBuf->wDuration = (u16)s_uGetDataDuration(pDevice, DATADUR_A,
+		pBuf->wDuration = s_uGetDataDuration(pDevice, DATADUR_A,
 				byPktType, bNeedAck);
                 pBuf->wTimeStampOff = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE];
 
@@ -575,7 +575,7 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice,
 		BBvCalculateParameter(pDevice, cbFrameLength, wCurrentRate,
 			byPktType, &pBuf->ab);
             //Get Duration and TimeStampOff
-		pBuf->wDuration = (u16)s_uGetDataDuration(pDevice, DATADUR_B,
+		pBuf->wDuration = s_uGetDataDuration(pDevice, DATADUR_B,
 				byPktType, bNeedAck);
                 pBuf->wTimeStampOff = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE];
 
@@ -1805,8 +1805,8 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice,
 	BBvCalculateParameter(pDevice, cbFrameSize, wCurrentRate, PK_TYPE_11A,
 							&pTxDataHead->ab);
         //Get Duration and TimeStampOff
-	pTxDataHead->wDuration = cpu_to_le16((u16)s_uGetDataDuration(pDevice,
-				DATADUR_A, PK_TYPE_11A, false));
+	pTxDataHead->wDuration = s_uGetDataDuration(pDevice,
+					DATADUR_A, PK_TYPE_11A, false);
         pTxDataHead->wTimeStampOff = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE];
 	cbHeaderSize = wTxBufSize + sizeof(struct vnt_tx_datahead_ab);
     } else {
@@ -1818,8 +1818,8 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice,
 	BBvCalculateParameter(pDevice, cbFrameSize, wCurrentRate, PK_TYPE_11B,
 							&pTxDataHead->ab);
         //Get Duration and TimeStampOff
-	pTxDataHead->wDuration = cpu_to_le16((u16)s_uGetDataDuration(pDevice,
-				DATADUR_B, PK_TYPE_11B, false));
+	pTxDataHead->wDuration = s_uGetDataDuration(pDevice,
+					DATADUR_B, PK_TYPE_11B, false);
         pTxDataHead->wTimeStampOff = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE];
 	cbHeaderSize = wTxBufSize + sizeof(struct vnt_tx_datahead_ab);
     }
-- 
1.8.1.2



^ permalink raw reply related

* Re: [PATCH] mac80211: move setting WIPHY_FLAG_SUPPORTS_SCHED_SCAN into drivers
From: Luciano Coelho @ 2013-08-21 20:57 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Johannes Berg
In-Reply-To: <1377077275-19429-1-git-send-email-johannes@sipsolutions.net>

On Wed, 2013-08-21 at 11:27 +0200, Johannes Berg wrote:
> From: Johannes Berg <johannes.berg@intel.com>
> 
> mac80211 currently sets WIPHY_FLAG_SUPPORTS_SCHED_SCAN based on whether
> the start_sched_scan operation is supported or not, but that will not
> be correct for all drivers, we're adding scheduled scan to the iwlmvm
> driver but it depends on firmware support.
> 
> Therefore, move setting WIPHY_FLAG_SUPPORTS_SCHED_SCAN into the drivers
> so that they can control it regardless of implementing the operation.
> 
> This currently only affects the TI drivers since they're the only ones
> implementing scheduled scan (in a mac80211 driver.)
> 
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>
> ---

For the wlcore part:

Acked-by: Luciano Coelho <luca@coelho.fi>


^ permalink raw reply

* [PATCH 2/2] staging: vt6656: rxtx.c: s_uGetDataDuration  Drop argument byDurType.
From: Malcolm Priestley @ 2013-08-21 21:16 UTC (permalink / raw)
  To: gregkh; +Cc: linux-wireless

When byDurType == DATADUR_B then byPktType == PK_TYPE_11B

Drop argument byDurType and filter on byPktType == PK_TYPE_11B.

Signed-off-by: Malcolm Priestley <tvboxspy@gmail.com>
---
 drivers/staging/vt6656/rxtx.c | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/drivers/staging/vt6656/rxtx.c b/drivers/staging/vt6656/rxtx.c
index 1d0611e..d4b9b60 100644
--- a/drivers/staging/vt6656/rxtx.c
+++ b/drivers/staging/vt6656/rxtx.c
@@ -132,7 +132,7 @@ static void s_vFillRTSHead(struct vnt_private *pDevice, u8 byPktType,
 	void *pvRTS, u32 cbFrameLength, int bNeedAck, int bDisCRC,
 	struct ethhdr *psEthHeader, u16 wCurrentRate, u8 byFBOption);
 
-static u16 s_uGetDataDuration(struct vnt_private *pDevice, u8 byDurType,
+static u16 s_uGetDataDuration(struct vnt_private *pDevice,
 	u8 byPktType, int bNeedAck);
 
 static u16 s_uGetRTSCTSDuration(struct vnt_private *pDevice,
@@ -383,13 +383,13 @@ static u32 s_uGetRTSCTSRsvTime(struct vnt_private *pDevice,
 }
 
 //byFreqType 0: 5GHz, 1:2.4Ghz
-static u16 s_uGetDataDuration(struct vnt_private *pDevice, u8 byDurType,
-	u8 byPktType, int bNeedAck)
+static u16 s_uGetDataDuration(struct vnt_private *pDevice,
+					u8 byPktType, int bNeedAck)
 {
 	u32 uAckTime = 0;
 
 	if (bNeedAck) {
-		if (byDurType == DATADUR_B)
+		if (byPktType == PK_TYPE_11B)
 			uAckTime = BBuGetFrameTime(pDevice->byPreambleType,
 				byPktType, 14, pDevice->byTopCCKBasicRate);
 		else
@@ -507,9 +507,9 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice,
 		BBvCalculateParameter(pDevice, cbFrameLength,
 			pDevice->byTopCCKBasicRate, PK_TYPE_11B, &pBuf->b);
                 //Get Duration and TimeStamp
-		pBuf->wDuration_a = s_uGetDataDuration(pDevice, DATADUR_A,
+		pBuf->wDuration_a = s_uGetDataDuration(pDevice,
 							byPktType, bNeedAck);
-		pBuf->wDuration_b = s_uGetDataDuration(pDevice, DATADUR_B,
+		pBuf->wDuration_b = s_uGetDataDuration(pDevice,
 							PK_TYPE_11B, bNeedAck);
 
                 pBuf->wTimeStampOff_a = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE];
@@ -525,14 +525,14 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice,
 		BBvCalculateParameter(pDevice, cbFrameLength,
 			pDevice->byTopCCKBasicRate, PK_TYPE_11B, &pBuf->b);
                 //Get Duration and TimeStamp
-		pBuf->wDuration_a = s_uGetDataDuration(pDevice, DATADUR_A,
+		pBuf->wDuration_a = s_uGetDataDuration(pDevice,
 							byPktType, bNeedAck);
-		pBuf->wDuration_b = s_uGetDataDuration(pDevice, DATADUR_B,
+		pBuf->wDuration_b = s_uGetDataDuration(pDevice,
 							PK_TYPE_11B, bNeedAck);
 		pBuf->wDuration_a_f0 = s_uGetDataDuration(pDevice,
-					DATADUR_A_F0, byPktType, bNeedAck);
+							byPktType, bNeedAck);
 		pBuf->wDuration_a_f1 = s_uGetDataDuration(pDevice,
-					DATADUR_A_F1, byPktType, bNeedAck);
+							byPktType, bNeedAck);
                 pBuf->wTimeStampOff_a = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE];
                 pBuf->wTimeStampOff_b = wTimeStampOff[pDevice->byPreambleType%2][pDevice->byTopCCKBasicRate%MAX_RATE];
                 return (pBuf->wDuration_a);
@@ -546,12 +546,12 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice,
 		BBvCalculateParameter(pDevice, cbFrameLength, wCurrentRate,
 			byPktType, &pBuf->a);
             //Get Duration and TimeStampOff
-		pBuf->wDuration = s_uGetDataDuration(pDevice, DATADUR_A,
+		pBuf->wDuration = s_uGetDataDuration(pDevice,
 					byPktType, bNeedAck);
 		pBuf->wDuration_f0 = s_uGetDataDuration(pDevice,
-				DATADUR_A_F0, byPktType, bNeedAck);
+					byPktType, bNeedAck);
 		pBuf->wDuration_f1 = s_uGetDataDuration(pDevice,
-				DATADUR_A_F1, byPktType, bNeedAck);
+							byPktType, bNeedAck);
                 pBuf->wTimeStampOff = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE];
             return (pBuf->wDuration);
         } else {
@@ -561,7 +561,7 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice,
 		BBvCalculateParameter(pDevice, cbFrameLength, wCurrentRate,
 			byPktType, &pBuf->ab);
             //Get Duration and TimeStampOff
-		pBuf->wDuration = s_uGetDataDuration(pDevice, DATADUR_A,
+		pBuf->wDuration = s_uGetDataDuration(pDevice,
 				byPktType, bNeedAck);
                 pBuf->wTimeStampOff = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE];
 
@@ -575,7 +575,7 @@ static u32 s_uFillDataHead(struct vnt_private *pDevice,
 		BBvCalculateParameter(pDevice, cbFrameLength, wCurrentRate,
 			byPktType, &pBuf->ab);
             //Get Duration and TimeStampOff
-		pBuf->wDuration = s_uGetDataDuration(pDevice, DATADUR_B,
+		pBuf->wDuration = s_uGetDataDuration(pDevice,
 				byPktType, bNeedAck);
                 pBuf->wTimeStampOff = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE];
 
@@ -1806,7 +1806,7 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice,
 							&pTxDataHead->ab);
         //Get Duration and TimeStampOff
 	pTxDataHead->wDuration = s_uGetDataDuration(pDevice,
-					DATADUR_A, PK_TYPE_11A, false);
+						PK_TYPE_11A, false);
         pTxDataHead->wTimeStampOff = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE];
 	cbHeaderSize = wTxBufSize + sizeof(struct vnt_tx_datahead_ab);
     } else {
@@ -1819,7 +1819,7 @@ CMD_STATUS csBeacon_xmit(struct vnt_private *pDevice,
 							&pTxDataHead->ab);
         //Get Duration and TimeStampOff
 	pTxDataHead->wDuration = s_uGetDataDuration(pDevice,
-					DATADUR_B, PK_TYPE_11B, false);
+						PK_TYPE_11B, false);
         pTxDataHead->wTimeStampOff = wTimeStampOff[pDevice->byPreambleType%2][wCurrentRate%MAX_RATE];
 	cbHeaderSize = wTxBufSize + sizeof(struct vnt_tx_datahead_ab);
     }
-- 
1.8.1.2



^ permalink raw reply related

* [PATCH V3] cfg80211: vlan priority handling in WMM
From: cedric.voncken @ 2013-08-21 13:48 UTC (permalink / raw)
  To: johannes, linux-wireless; +Cc: cedric Voncken

From: cedric Voncken <cedric.voncken@acksys.fr>

If the VLAN tci is set in skb->vlan_tci use the priority field to determine the WMM priority.

Signed-off-by: cedric Voncken <cedric.voncken@acksys.fr>
---
 net/wireless/util.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

V2 modifications:
	Fix indentation
	Use symbolic constant
	include the header linux/if_vlan.h

V3 modifications:
	Check the vlan_tci validity with macro vlan_tx_tag_present
	Get the vlan_tci field value with macro vlan_tx_tag_get
	Request to netdev mailling list to know if the VLAN priority value 0 must be treated as no priority request. I add the Ben Hutchings reply below:
	IEEE 802.1q refers to the definition in 802.1d:

	> The user_priority parameter is the priority requested by the
	> originating service user. The value of this parameter is in the range
	> 0 through 7.
	>
	> NOTE -- The default user_priority value is 0. Values 1 through 7 form an
	> ordered sequence of user_priorities, with 1 being the lowest value and
	> 7 the highest. See 7.7.3 and Annex G (informative) for further
	> explanation of the use of user_priority values.

	So a value of 0 should be treated as no priority request, same as for an untagged frame.

diff --git a/net/wireless/util.c b/net/wireless/util.c
index ce090c1..9e4cac2 100644
--- a/net/wireless/util.c
+++ b/net/wireless/util.c
@@ -10,6 +10,7 @@
 #include <net/cfg80211.h>
 #include <net/ip.h>
 #include <net/dsfield.h>
+#include <linux/if_vlan.h>
 #include "core.h"
 #include "rdev-ops.h"
 
@@ -691,6 +692,7 @@ EXPORT_SYMBOL(ieee80211_amsdu_to_8023s);
 unsigned int cfg80211_classify8021d(struct sk_buff *skb)
 {
 	unsigned int dscp;
+	unsigned char vlan_priority;
 
 	/* skb->priority values from 256->263 are magic values to
 	 * directly indicate a specific 802.1d priority.  This is used
@@ -700,6 +702,12 @@ unsigned int cfg80211_classify8021d(struct sk_buff *skb)
 	if (skb->priority >= 256 && skb->priority <= 263)
 		return skb->priority - 256;
 
+	if(vlan_tx_tag_present(skb)) {
+		vlan_priority = (vlan_tx_tag_get(skb) & VLAN_PRIO_MASK) >> VLAN_PRIO_SHIFT;
+		if (vlan_priority > 0)
+			return vlan_priority;
+	}
+
 	switch (skb->protocol) {
 	case htons(ETH_P_IP):
 		dscp = ipv4_get_dsfield(ip_hdr(skb)) & 0xfc;
-- 
1.7.2.5


^ permalink raw reply related

* [PATCH] mac80211: minstrel_ht: don't use control.flags in TX status path
From: Johannes Berg @ 2013-08-22  6:39 UTC (permalink / raw)
  To: linux-wireless; +Cc: Sujith Manoharan, Johannes Berg

From: Johannes Berg <johannes.berg@intel.com>

Sujith reports that my commit af61a165187bb94b1dc7628ef815c23d0eacf40b
("mac80211: add control port protocol TX control flag") broke ath9k
(aggregation). The reason is that I made minstrel_ht use the flag in
the TX status path, where it can have been overwritten by the driver.
Since we have no more space in info->flags, revert that part of the
change for now, until we can reshuffle the flags or so.

Reported-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
 net/mac80211/rc80211_minstrel_ht.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/net/mac80211/rc80211_minstrel_ht.c b/net/mac80211/rc80211_minstrel_ht.c
index 9eff382..c397ff5 100644
--- a/net/mac80211/rc80211_minstrel_ht.c
+++ b/net/mac80211/rc80211_minstrel_ht.c
@@ -439,13 +439,12 @@ minstrel_aggr_check(struct ieee80211_sta *pubsta, struct sk_buff *skb)
 {
 	struct ieee80211_hdr *hdr = (struct ieee80211_hdr *) skb->data;
 	struct sta_info *sta = container_of(pubsta, struct sta_info, sta);
-	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(skb);
 	u16 tid;
 
 	if (unlikely(!ieee80211_is_data_qos(hdr->frame_control)))
 		return;
 
-	if (unlikely(info->control.flags & IEEE80211_TX_CTRL_PORT_CTRL_PROTO))
+	if (unlikely(skb->protocol == cpu_to_be16(ETH_P_PAE)))
 		return;
 
 	tid = *ieee80211_get_qos_ctl(hdr) & IEEE80211_QOS_CTL_TID_MASK;
-- 
1.8.4.rc2


^ permalink raw reply related

* Re: [RFT V2 02/13] brcmsmac: change pa_gain for bcm4313 iPA
From: Arend van Spriel @ 2013-08-22  8:08 UTC (permalink / raw)
  To: Hauke Mehrtens
  Cc: linux-wireless, Jonas Gorski, David Herrmann,
	Maximilian Engelhardt, David Costa
In-Reply-To: <52151297.5010706@hauke-m.de>

On 08/21/2013 09:18 PM, Hauke Mehrtens wrote:
> Hi Arend,
>
> when you send a new patch please fix this typo.

Got it covered already:

http://mid.gmane.org/1377007246-9957-3-git-send-email-arend@broadcom.com

Regards,
Arend

> Hauke
>
> On 08/13/2013 10:03 PM, Arend van Spriel wrote:
>> The function wlc_lcnphy_load_tx_gain_table() has a target PA
>> gain specified for the iPA variant of the bcm4313. This gain
>> value is reduced to avoid PA distortion. The if-statement is
>> removed because it was rather redundant in the first place.
>> Please not that this patch does not provide full iPA support.
>           ^^^
>           note
>
>
>



^ 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