Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: [RFC 00/15] mac80211 uAPSD support
From: Johannes Berg @ 2011-09-23 18:14 UTC (permalink / raw)
  To: Dmitry Tarnyagin; +Cc: linux-wireless
In-Reply-To: <CAMG6FYiiyW3Ai_G8vs9Ksxqy9-3bwp88HpCX_iDSSwb7UKO-Hg@mail.gmail.com>

Hi,

Thanks for looking.

> I think it should be like below (NL80211_ATTR_QOS_INFO and
> NL80211_ATTR_UAPSD_SUPPORTED only for backward-compatibility)

Is the change below on top of my changes? I'm not sure I understand it
completely. See inline.

> --- a/include/linux/ieee80211.h
> +++ b/include/linux/ieee80211.h
> @@ -117,6 +117,7 @@
>  #define IEEE80211_MAX_MESH_ID_LEN	32
> 
>  #define IEEE80211_QOS_CTL_LEN		2
> +#define IEEE80211_QOS_CTL_EOSP		0x0010
>  #define IEEE80211_QOS_CTL_TID_MASK	0x000F
>  #define IEEE80211_QOS_CTL_TAG1D_MASK	0x0007

This is already in the kernel for me...?

> diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
> index 2636c01..d831c15 100644
> --- a/include/linux/nl80211.h
> +++ b/include/linux/nl80211.h
> @@ -610,8 +610,6 @@ enum nl80211_commands {
>  	NL80211_CMD_SET_NOA,
>  	NL80211_CMD_SET_P2P_POWER_SAVE,
> 
> -	NL80211_ATTR_STA_WME,
> -
>  	/* add new commands above here */

How did you get the ATTR_STA_WME as part of the commands? It's not like
that in my kernel.

>  	/* used to define NL80211_CMD_MAX below */
> @@ -1216,6 +1214,10 @@ enum nl80211_attrs {
>  	NL80211_ATTR_P2P_PS_CTWINDOW,
>  	NL80211_ATTR_UAPSD,
> 
> +	NL80211_ATTR_STA_WME,
> +	NL80211_ATTR_UAPSD_SUPPORTED,	/* OBSOLETE */
> +	NL80211_ATTR_QOS_INFO,		/* OBSOLETE */

Where do you get PS_CTWINDOW? ATTR_UAPSD? I'm getting the impression
that you're using a pretty hacked up nl80211 here.

> +++ b/net/mac80211/sta_info.c
> @@ -625,7 +625,7 @@ static bool
> sta_info_cleanup_expire_buffered_ac(struct ieee80211_local *local,
>  	unsigned long flags;
>  	struct sk_buff *skb;
> 
> -	if (skb_queue_empty(&sta->ps_tx_buf))
> +	if (skb_queue_empty(&sta->ps_tx_buf[ac]))
>  		return false;

If that kind of change was necessary on top of my patches, they wouldn't
even compile, so what does this mean?


I'm confused.


johannes


^ permalink raw reply

* Re: [RFC 00/15] mac80211 uAPSD support
From: Dmitry Tarnyagin @ 2011-09-23 18:06 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <20110922154726.521122680@sipsolutions.net>

Hi Johannes,

I think it should be like below (NL80211_ATTR_QOS_INFO and
NL80211_ATTR_UAPSD_SUPPORTED only for backward-compatibility)

With best regards,
Dmitry

diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index 69cd37d..f627621 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -117,6 +117,7 @@
 #define IEEE80211_MAX_MESH_ID_LEN	32

 #define IEEE80211_QOS_CTL_LEN		2
+#define IEEE80211_QOS_CTL_EOSP		0x0010
 #define IEEE80211_QOS_CTL_TID_MASK	0x000F
 #define IEEE80211_QOS_CTL_TAG1D_MASK	0x0007

diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 2636c01..d831c15 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -610,8 +610,6 @@ enum nl80211_commands {
 	NL80211_CMD_SET_NOA,
 	NL80211_CMD_SET_P2P_POWER_SAVE,

-	NL80211_ATTR_STA_WME,
-
 	/* add new commands above here */

 	/* used to define NL80211_CMD_MAX below */
@@ -1216,6 +1214,10 @@ enum nl80211_attrs {
 	NL80211_ATTR_P2P_PS_CTWINDOW,
 	NL80211_ATTR_UAPSD,

+	NL80211_ATTR_STA_WME,
+	NL80211_ATTR_UAPSD_SUPPORTED,	/* OBSOLETE */
+	NL80211_ATTR_QOS_INFO,		/* OBSOLETE */
+
 	/* add attributes here, update the policy in nl80211.c */

 	__NL80211_ATTR_AFTER_LAST,
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 47bcfee..80ece31 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -625,7 +625,7 @@ static bool
sta_info_cleanup_expire_buffered_ac(struct ieee80211_local *local,
 	unsigned long flags;
 	struct sk_buff *skb;

-	if (skb_queue_empty(&sta->ps_tx_buf))
+	if (skb_queue_empty(&sta->ps_tx_buf[ac]))
 		return false;

 	/*
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index b98f18d..791c0e4 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -176,6 +176,7 @@ static const struct nla_policy
nl80211_policy[NL80211_ATTR_MAX+1] = {
 	[NL80211_ATTR_WOWLAN_TRIGGERS] = { .type = NLA_NESTED },
 	[NL80211_ATTR_STA_PLINK_STATE] = { .type = NLA_U8 },
 	[NL80211_ATTR_SCHED_SCAN_INTERVAL] = { .type = NLA_U32 },
+	[NL80211_ATTR_QOS_INFO] = { .type = NLA_U8 },
 	[NL80211_ATTR_P2P_PS_NOA] = { .type = NLA_BINARY,
 				      .len = 32 },
 	[NL80211_ATTR_P2P_PS_NOA_COUNT] = { .type = NLA_U8 },
@@ -952,6 +953,9 @@ static int nl80211_send_wiphy(struct sk_buff *msg,
u32 pid, u32 seq, int flags,
 	if (nl80211_put_iface_combinations(&dev->wiphy, msg))
 		goto nla_put_failure;

+	if (dev->wiphy.flags & WIPHY_FLAG_AP_UAPSD)
+		NLA_PUT_FLAG(msg, NL80211_ATTR_UAPSD_SUPPORTED);
+
 	return genlmsg_end(msg, hdr);

  nla_put_failure:

^ permalink raw reply related

* Re: 答复: 答复: 答复: 3.1-rc6+ rtl8192se issue
From: Larry Finger @ 2011-09-23 16:34 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: 李朝明, linux-wireless, 'LKML'
In-Reply-To: <20110923103339.GA26078@gere.osrc.amd.com>

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

On 09/23/2011 05:33 AM, Borislav Petkov wrote:
> On Fri, Sep 23, 2011 at 06:21:07PM +0800, 李朝明 wrote:
>> Please set ips =0 and try again..
>
> What does that mean?
>
> I can trigger the grinding-to-a-halt reliably with "ips=0" - it only
> takes a couple of hours of network traffic. Also, I don't want to try
> the driver you sent me because the version in the kernel needs fixing
> not some out-of-tree codebase.

I got a chance to review the rtl8192se part of the changes in that 08/16/2011 
version. Attached is a patch to update the kernel version.

A prerequisite is:

commit da3ba88a9996cd64c6768bed5727e02da81e2c8d
Author: Larry Finger <Larry.Finger@lwfinger.net>
Date:   Mon Sep 19 14:34:10 2011 -0500

     rtlwifi: Combine instances of RTL_HAL_IS_CCK_RATE macros.

     Three drivers, rtl8192ce, rtl8192cu and rtl8192de, use the same macro
     to check if a particular rate is in the CCK set. This common code is
     relocated to a common header file. A distinct macro used by rtl8192se
     with the same name is renamed.

     Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
     Signed-off-by: John W. Linville <linville@tuxdriver.com>

I have run the new version for a couple of hours without problems. Perhaps it 
will cure your difficulty, but I am not optimistic.

Larry

[-- Attachment #2: rtl8192se_reg_en --]
[-- Type: text/plain, Size: 9033 bytes --]

From: Chaoming Li <chaoming_li@realsil.com.cn>

This patch incorporate the differences between the 06/20/2011 and
08/16/2011 Realtek releases of the rtl8192se driver.

The changes include:

1. Fixing some typos in register usage.
2. A change in the handling of decryption status for 802.11w packets.

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
---

Index: wireless-testing-new/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
===================================================================
--- wireless-testing-new.orig/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
+++ wireless-testing-new/drivers/net/wireless/rtlwifi/rtl8192se/hw.c
@@ -1382,7 +1382,7 @@ static void _rtl92se_power_domain_init(s
 	rtl_write_byte(rtlpriv, LDOA15_CTRL, 0x34);
 
 	/* Reset MAC-IO and CPU and Core Digital BIT10/11/15 */
-	tmpu1b = rtl_read_byte(rtlpriv, SYS_FUNC_EN + 1);
+	tmpu1b = rtl_read_byte(rtlpriv, REG_SYS_FUNC_EN + 1);
 
 	/* If IPS we need to turn LED on. So we not
 	 * not disable BIT 3/7 of reg3. */
@@ -1391,7 +1391,7 @@ static void _rtl92se_power_domain_init(s
 	else
 		tmpu1b &= 0x73;
 
-	rtl_write_byte(rtlpriv, SYS_FUNC_EN + 1, tmpu1b);
+	rtl_write_byte(rtlpriv, REG_SYS_FUNC_EN + 1, tmpu1b);
 	/* wait for BIT 10/11/15 to pull high automatically!! */
 	mdelay(1);
 
@@ -1428,15 +1428,15 @@ static void _rtl92se_power_domain_init(s
 	rtl_write_byte(rtlpriv, LDOA15_CTRL, (tmpu1b | BIT(0)));
 
 	/* Set Digital Vdd to Retention isolation Path. */
-	tmpu2b = rtl_read_word(rtlpriv, SYS_ISO_CTRL);
-	rtl_write_word(rtlpriv, SYS_ISO_CTRL, (tmpu2b | BIT(11)));
+	tmpu2b = rtl_read_word(rtlpriv, REG_SYS_ISO_CTRL);
+	rtl_write_word(rtlpriv, REG_SYS_ISO_CTRL, (tmpu2b | BIT(11)));
 
 
 	/* For warm reboot NIC disappera bug. */
-	tmpu2b = rtl_read_word(rtlpriv, SYS_FUNC_EN);
-	rtl_write_word(rtlpriv, SYS_FUNC_EN, (tmpu2b | BIT(13)));
+	tmpu2b = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN);
+	rtl_write_word(rtlpriv, REG_SYS_FUNC_EN, (tmpu2b | BIT(13)));
 
-	rtl_write_byte(rtlpriv, SYS_ISO_CTRL + 1, 0x68);
+	rtl_write_byte(rtlpriv, REG_SYS_ISO_CTRL + 1, 0x68);
 
 	/* Enable AFE PLL Macro Block */
 	tmpu1b = rtl_read_byte(rtlpriv, AFE_PLL_CTRL);
@@ -1447,17 +1447,17 @@ static void _rtl92se_power_domain_init(s
 	mdelay(1);
 
 	/* Release isolation AFE PLL & MD */
-	rtl_write_byte(rtlpriv, SYS_ISO_CTRL, 0xA6);
+	rtl_write_byte(rtlpriv, REG_SYS_ISO_CTRL, 0xA6);
 
 	/* Enable MAC clock */
 	tmpu2b = rtl_read_word(rtlpriv, SYS_CLKR);
 	rtl_write_word(rtlpriv, SYS_CLKR, (tmpu2b | BIT(12) | BIT(11)));
 
 	/* Enable Core digital and enable IOREG R/W */
-	tmpu2b = rtl_read_word(rtlpriv, SYS_FUNC_EN);
-	rtl_write_word(rtlpriv, SYS_FUNC_EN, (tmpu2b | BIT(11)));
+	tmpu2b = rtl_read_word(rtlpriv, REG_SYS_FUNC_EN);
+	rtl_write_word(rtlpriv, REG_SYS_FUNC_EN, (tmpu2b | BIT(11)));
 	/* enable REG_EN */
-	rtl_write_word(rtlpriv, SYS_FUNC_EN, (tmpu2b | BIT(11) | BIT(15)));
+	rtl_write_word(rtlpriv, REG_SYS_FUNC_EN, (tmpu2b | BIT(11) | BIT(15)));
 
 	/* Switch the control path. */
 	tmpu2b = rtl_read_word(rtlpriv, SYS_CLKR);
Index: wireless-testing-new/drivers/net/wireless/rtlwifi/rtl8192se/reg.h
===================================================================
--- wireless-testing-new.orig/drivers/net/wireless/rtlwifi/rtl8192se/reg.h
+++ wireless-testing-new/drivers/net/wireless/rtlwifi/rtl8192se/reg.h
@@ -735,6 +735,7 @@
 #define	HWSET_MAX_SIZE_92S			128
 #define EFUSE_MAX_SECTION			16
 #define EFUSE_REAL_CONTENT_LEN			512
+#define EFUSE_OOB_PROTECT_BYTES			15
 
 #define RTL8190_EEPROM_ID			0x8129
 #define EEPROM_HPON				0x02
Index: wireless-testing-new/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
===================================================================
--- wireless-testing-new.orig/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
+++ wireless-testing-new/drivers/net/wireless/rtlwifi/rtl8192se/sw.c
@@ -304,6 +304,7 @@ static struct rtl_hal_cfg rtl92se_hal_cf
 	.maps[EFUSE_HWSET_MAX_SIZE] = HWSET_MAX_SIZE_92S,
 	.maps[EFUSE_MAX_SECTION_MAP] = EFUSE_MAX_SECTION,
 	.maps[EFUSE_REAL_CONTENT_SIZE] = EFUSE_REAL_CONTENT_LEN,
+	.maps[EFUSE_OOB_PROTECT_BYTES_LEN] = EFUSE_OOB_PROTECT_BYTES,
 
 	.maps[RWCAM] = REG_RWCAM,
 	.maps[WCAMI] = REG_WCAMI,
Index: wireless-testing-new/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
===================================================================
--- wireless-testing-new.orig/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
+++ wireless-testing-new/drivers/net/wireless/rtlwifi/rtl8192se/trx.c
@@ -124,18 +124,15 @@ static void _rtl92se_query_rxphystatus(s
 	u8 i, max_spatial_stream;
 	u32 rssi, total_rssi = 0;
 	bool in_powersavemode = false;
-	bool is_cck_rate;
+	bool is_cck = pstats->is_cck;
 
-	is_cck_rate = SE_RX_HAL_IS_CCK_RATE(pdesc);
 	pstats->packet_matchbssid = packet_match_bssid;
 	pstats->packet_toself = packet_toself;
-	pstats->is_cck = is_cck_rate;
 	pstats->packet_beacon = packet_beacon;
-	pstats->is_cck = is_cck_rate;
 	pstats->rx_mimo_signalquality[0] = -1;
 	pstats->rx_mimo_signalquality[1] = -1;
 
-	if (is_cck_rate) {
+	if (is_cck) {
 		u8 report, cck_highpwr;
 		cck_buf = (struct phy_sts_cck_8192s_t *)p_drvinfo;
 
@@ -246,9 +243,8 @@ static void _rtl92se_query_rxphystatus(s
 		pstats->rxpower = rx_pwr_all;
 		pstats->recvsignalpower = rx_pwr_all;
 
-		if (GET_RX_STATUS_DESC_RX_HT(pdesc) &&
-			GET_RX_STATUS_DESC_RX_MCS(pdesc) >= DESC92_RATEMCS8 &&
-		    GET_RX_STATUS_DESC_RX_MCS(pdesc) <= DESC92_RATEMCS15)
+		if (pstats->is_ht && pstats->rate >= DESC92_RATEMCS8 &&
+		    pstats->rate <= DESC92_RATEMCS15)
 			max_spatial_stream = 2;
 		else
 			max_spatial_stream = 1;
@@ -266,7 +262,7 @@ static void _rtl92se_query_rxphystatus(s
 		}
 	}
 
-	if (is_cck_rate)
+	if (is_cck)
 		pstats->signalstrength = (u8)(_rtl92se_signal_scale_mapping(hw,
 					 pwdb_all));
 	else if (rf_rx_num != 0)
@@ -518,6 +514,7 @@ bool rtl92se_rx_query_desc(struct ieee80
 {
 	struct rx_fwinfo *p_drvinfo;
 	u32 phystatus = (u32)GET_RX_STATUS_DESC_PHY_STATUS(pdesc);
+	struct ieee80211_hdr *hdr;
 
 	stats->length = (u16)GET_RX_STATUS_DESC_PKT_LEN(pdesc);
 	stats->rx_drvinfo_size = (u8)GET_RX_STATUS_DESC_DRVINFO_SIZE(pdesc) * 8;
@@ -530,8 +527,12 @@ bool rtl92se_rx_query_desc(struct ieee80
 	stats->rate = (u8)GET_RX_STATUS_DESC_RX_MCS(pdesc);
 	stats->shortpreamble = (u16)GET_RX_STATUS_DESC_SPLCP(pdesc);
 	stats->isampdu = (bool)(GET_RX_STATUS_DESC_PAGGR(pdesc) == 1);
+	stats->isfirst_ampdu = (bool) ((GET_RX_STATUS_DESC_PAGGR(pdesc) == 1)
+			       && (GET_RX_STATUS_DESC_FAGGR(pdesc) == 1));
 	stats->timestamp_low = GET_RX_STATUS_DESC_TSFL(pdesc);
 	stats->rx_is40Mhzpacket = (bool)GET_RX_STATUS_DESC_BW(pdesc);
+	stats->is_ht = (bool)GET_RX_STATUS_DESC_RX_HT(pdesc);
+	stats->is_cck = SE_RX_HAL_IS_CCK_RATE(pdesc);
 
 	if (stats->hwerror)
 		return false;
@@ -539,29 +540,39 @@ bool rtl92se_rx_query_desc(struct ieee80
 	rx_status->freq = hw->conf.channel->center_freq;
 	rx_status->band = hw->conf.channel->band;
 
-	if (GET_RX_STATUS_DESC_CRC32(pdesc))
-		rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
+	hdr = (struct ieee80211_hdr *)(skb->data + stats->rx_drvinfo_size
+	      + stats->rx_bufshift);
 
-	if (!GET_RX_STATUS_DESC_SWDEC(pdesc))
-		rx_status->flag |= RX_FLAG_DECRYPTED;
+	if (stats->crc)
+		rx_status->flag |= RX_FLAG_FAILED_FCS_CRC;
 
-	if (GET_RX_STATUS_DESC_BW(pdesc))
+	if (stats->rx_is40Mhzpacket)
 		rx_status->flag |= RX_FLAG_40MHZ;
 
-	if (GET_RX_STATUS_DESC_RX_HT(pdesc))
+	if (stats->is_ht)
 		rx_status->flag |= RX_FLAG_HT;
 
 	rx_status->flag |= RX_FLAG_MACTIME_MPDU;
 
-	if (stats->decrypted)
-		rx_status->flag |= RX_FLAG_DECRYPTED;
+	/* hw will set stats->decrypted true, if it finds the
+	 * frame is open data frame or mgmt frame,
+	 * hw will not decrypt robust managment frame
+	 * for IEEE80211w but still set stats->decrypted
+	 * true, so here we should set it back to undecrypted
+	 * for IEEE80211w frame, and mac80211 sw will help
+	 * to decrypt it */
+	if (stats->decrypted) {
+		if ((ieee80211_is_robust_mgmt_frame(hdr)) &&
+			(ieee80211_has_protected(hdr->frame_control)))
+			rx_status->flag &= ~RX_FLAG_DECRYPTED;
+		else
+			rx_status->flag |= RX_FLAG_DECRYPTED;
+	}
 
 	rx_status->rate_idx = rtlwifi_rate_mapping(hw,
-				(bool)GET_RX_STATUS_DESC_RX_HT(pdesc),
-				(u8)GET_RX_STATUS_DESC_RX_MCS(pdesc));
-
+			     stats->is_ht, stats->rate);
 
-	rx_status->mactime = GET_RX_STATUS_DESC_TSFL(pdesc);
+	rx_status->mactime = stats->timestamp_low;
 	if (phystatus) {
 		p_drvinfo = (struct rx_fwinfo *)(skb->data +
 						 stats->rx_bufshift);
Index: wireless-testing-new/drivers/net/wireless/rtlwifi/wifi.h
===================================================================
--- wireless-testing-new.orig/drivers/net/wireless/rtlwifi/wifi.h
+++ wireless-testing-new/drivers/net/wireless/rtlwifi/wifi.h
@@ -1325,6 +1325,7 @@ struct rtl_stats {
 	s8 rx_mimo_signalquality[2];
 	bool packet_matchbssid;
 	bool is_cck;
+	bool is_ht;
 	bool packet_toself;
 	bool packet_beacon;	/*for rssi */
 	char cck_adc_pwdb[4];	/*for rx path selection */

^ permalink raw reply

* [PATCH 2/2] mac80211: Send the management frame at requested rate
From: Rajkumar Manoharan @ 2011-09-23 15:12 UTC (permalink / raw)
  To: johannes; +Cc: linville, linux-wireless, Rajkumar Manoharan, Jouni Malinen
In-Reply-To: <1316790779-8955-1-git-send-email-rmanohar@qca.qualcomm.com>

Whenever the scan request or tx_mgmt is requesting not to
use CCK rate for managemet frames through
NL80211_ATTR_TX_NO_CCK_RATE attribute, then mac80211 should
select appropriate least non-CCK rate. This could help to
send P2P probes and P2P action frames at non 11b rates
without diabling 11b rates globally.

Cc: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
---
 include/net/mac80211.h     |    4 ++++
 net/mac80211/cfg.c         |    3 +++
 net/mac80211/ieee80211_i.h |    2 +-
 net/mac80211/mlme.c        |    2 +-
 net/mac80211/rate.c        |   30 +++++++++++++++++++++++++++++-
 net/mac80211/scan.c        |    3 ++-
 net/mac80211/util.c        |    8 ++++++--
 net/mac80211/work.c        |    2 +-
 8 files changed, 47 insertions(+), 7 deletions(-)

diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index c0f63fd..b8a0df6 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -363,6 +363,9 @@ struct ieee80211_bss_conf {
  * @IEEE80211_TX_INTFL_TKIP_MIC_FAILURE: Marks this packet to be used for TKIP
  *	testing. It will be sent out with incorrect Michael MIC key to allow
  *	TKIP countermeasures to be tested.
+ * @IEEE80211_TX_CTL_NO_CCK_RATE: This frame will be sent at non CCK rate.
+ *	This flag is actually used for management frame especially for P2P
+ *	frames not being sent at CCK rate in 2GHz band.
  *
  * Note: If you have to add new flags to the enumeration, then don't
  *	 forget to update %IEEE80211_TX_TEMPORARY_FLAGS when necessary.
@@ -393,6 +396,7 @@ enum mac80211_tx_control_flags {
 	IEEE80211_TX_CTL_STBC			= BIT(23) | BIT(24),
 	IEEE80211_TX_CTL_TX_OFFCHAN		= BIT(25),
 	IEEE80211_TX_INTFL_TKIP_MIC_FAILURE	= BIT(26),
+	IEEE80211_TX_CTL_NO_CCK_RATE		= BIT(27),
 };
 
 #define IEEE80211_TX_CTL_STBC_SHIFT		23
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 9cba010..56c3504 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1897,6 +1897,9 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
 		flags |= IEEE80211_TX_CTL_TX_OFFCHAN;
 	}
 
+	if (no_cck)
+		flags |= IEEE80211_TX_CTL_NO_CCK_RATE;
+
 	if (is_offchan && !offchan)
 		return -EBUSY;
 
diff --git a/net/mac80211/ieee80211_i.h b/net/mac80211/ieee80211_i.h
index 21186e2..4822d69 100644
--- a/net/mac80211/ieee80211_i.h
+++ b/net/mac80211/ieee80211_i.h
@@ -1324,7 +1324,7 @@ struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata,
 void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
 			      const u8 *ssid, size_t ssid_len,
 			      const u8 *ie, size_t ie_len,
-			      u32 ratemask, bool directed);
+			      u32 ratemask, bool directed, bool no_cck);
 
 void ieee80211_sta_def_wmm_params(struct ieee80211_sub_if_data *sdata,
 				  const size_t supp_rates_len,
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 1a59fb6..cc80d32 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -1239,7 +1239,7 @@ static void ieee80211_mgd_probe_ap_send(struct ieee80211_sub_if_data *sdata)
 	} else {
 		ssid = ieee80211_bss_get_ie(ifmgd->associated, WLAN_EID_SSID);
 		ieee80211_send_probe_req(sdata, dst, ssid + 2, ssid[1], NULL, 0,
-					 (u32) -1, true);
+					 (u32) -1, true, false);
 	}
 
 	ifmgd->probe_send_count++;
diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index 3d5a2cb..6711954 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -233,6 +233,28 @@ static void rc_send_low_broadcast(s8 *idx, u32 basic_rates,
 	/* could not find a basic rate; use original selection */
 }
 
+static inline s8
+rate_lowest_non_cck_index(struct ieee80211_supported_band *sband,
+			  struct ieee80211_sta *sta)
+{
+	int i;
+
+	for (i = 0; i < sband->n_bitrates; i++) {
+		struct ieee80211_rate *srate = &sband->bitrates[i];
+		if ((srate->bitrate == 10) || (srate->bitrate == 20) ||
+		    (srate->bitrate == 55) || (srate->bitrate == 110))
+			continue;
+
+		if ((i != sband->n_bitrates) &&
+		    rate_supported(sta, sband->band, i))
+			return i;
+	}
+
+	/* No matching rate found */
+	return 0;
+}
+
+
 bool rate_control_send_low(struct ieee80211_sta *sta,
 			   void *priv_sta,
 			   struct ieee80211_tx_rate_control *txrc)
@@ -242,7 +264,13 @@ bool rate_control_send_low(struct ieee80211_sta *sta,
 	int mcast_rate;
 
 	if (!sta || !priv_sta || rc_no_data_or_no_ack(txrc)) {
-		info->control.rates[0].idx = rate_lowest_index(txrc->sband, sta);
+		if ((sband->band != IEEE80211_BAND_2GHZ) ||
+		    !(info->flags & IEEE80211_TX_CTL_NO_CCK_RATE))
+			info->control.rates[0].idx =
+				rate_lowest_index(txrc->sband, sta);
+		else
+			info->control.rates[0].idx =
+				rate_lowest_non_cck_index(txrc->sband, sta);
 		info->control.rates[0].count =
 			(info->flags & IEEE80211_TX_CTL_NO_ACK) ?
 			1 : txrc->hw->max_rate_tries;
diff --git a/net/mac80211/scan.c b/net/mac80211/scan.c
index 6f09eca..830e60f 100644
--- a/net/mac80211/scan.c
+++ b/net/mac80211/scan.c
@@ -660,7 +660,8 @@ static void ieee80211_scan_state_send_probe(struct ieee80211_local *local,
 			local->scan_req->ssids[i].ssid,
 			local->scan_req->ssids[i].ssid_len,
 			local->scan_req->ie, local->scan_req->ie_len,
-			local->scan_req->rates[band], false);
+			local->scan_req->rates[band], false,
+			local->scan_req->no_cck);
 
 	/*
 	 * After sending probe requests, wait for probe responses
diff --git a/net/mac80211/util.c b/net/mac80211/util.c
index 4b1466d..ead345d 100644
--- a/net/mac80211/util.c
+++ b/net/mac80211/util.c
@@ -899,14 +899,18 @@ struct sk_buff *ieee80211_build_probe_req(struct ieee80211_sub_if_data *sdata,
 void ieee80211_send_probe_req(struct ieee80211_sub_if_data *sdata, u8 *dst,
 			      const u8 *ssid, size_t ssid_len,
 			      const u8 *ie, size_t ie_len,
-			      u32 ratemask, bool directed)
+			      u32 ratemask, bool directed, bool no_cck)
 {
 	struct sk_buff *skb;
 
 	skb = ieee80211_build_probe_req(sdata, dst, ratemask, ssid, ssid_len,
 					ie, ie_len, directed);
-	if (skb)
+	if (skb) {
+		if (no_cck)
+			IEEE80211_SKB_CB(skb)->flags |=
+				IEEE80211_TX_CTL_NO_CCK_RATE;
 		ieee80211_tx_skb(sdata, skb);
+	}
 }
 
 u32 ieee80211_sta_get_rates(struct ieee80211_local *local,
diff --git a/net/mac80211/work.c b/net/mac80211/work.c
index bac3439..af374fa 100644
--- a/net/mac80211/work.c
+++ b/net/mac80211/work.c
@@ -458,7 +458,7 @@ ieee80211_direct_probe(struct ieee80211_work *wk)
 	 */
 	ieee80211_send_probe_req(sdata, NULL, wk->probe_auth.ssid,
 				 wk->probe_auth.ssid_len, NULL, 0,
-				 (u32) -1, true);
+				 (u32) -1, true, false);
 
 	wk->timeout = jiffies + IEEE80211_AUTH_TIMEOUT;
 	run_again(local, wk->timeout);
-- 
1.7.6.3


^ permalink raw reply related

* [PATCH 1/2] nl80211/cfg80211: Add support to disable CCK rate for management frame
From: Rajkumar Manoharan @ 2011-09-23 15:12 UTC (permalink / raw)
  To: johannes; +Cc: linville, linux-wireless, Rajkumar Manoharan, Jouni Malinen

Add a new nl80211 attribute to specify whether to send the management
frames in CCK rate or not. As of now the wpa_supplicant is disabling
CCK rate at P2P init itself. So this patch helps to send P2P probe
request/probe response/action frames being sent at non CCK rate in 2GHz
without disabling 11b rates.

This attribute is used with NL80211_CMD_TRIGGER_SCAN and
NL80211_CMD_FRAME commands to disable CCK rate for management frame
transmission.

Cc: Jouni Malinen <jouni@qca.qualcomm.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
---
 include/linux/nl80211.h |   13 +++++++++++++
 include/net/cfg80211.h  |    5 ++++-
 net/mac80211/cfg.c      |    3 ++-
 net/wireless/core.h     |    3 ++-
 net/wireless/mlme.c     |    5 +++--
 net/wireless/nl80211.c  |    9 ++++++++-
 6 files changed, 32 insertions(+), 6 deletions(-)

diff --git a/include/linux/nl80211.h b/include/linux/nl80211.h
index 460b12a..c73582f 100644
--- a/include/linux/nl80211.h
+++ b/include/linux/nl80211.h
@@ -238,6 +238,8 @@
  *
  * @NL80211_CMD_GET_SCAN: get scan results
  * @NL80211_CMD_TRIGGER_SCAN: trigger a new scan with the given parameters
+ *	%NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the
+ *	probe requests at CCK rate or not.
  * @NL80211_CMD_NEW_SCAN_RESULTS: scan notification (as a reply to
  *	NL80211_CMD_GET_SCAN and on the "scan" multicast group)
  * @NL80211_CMD_SCAN_ABORTED: scan was aborted, for unspecified reasons,
@@ -432,6 +434,8 @@
  *	specified using %NL80211_ATTR_DURATION. When called, this operation
  *	returns a cookie (%NL80211_ATTR_COOKIE) that will be included with the
  *	TX status event pertaining to the TX request.
+ *	%NL80211_ATTR_TX_NO_CCK_RATE is used to decide whether to send the
+ *	management frames at CCK rate or not in 2GHz band.
  * @NL80211_CMD_FRAME_WAIT_CANCEL: When an off-channel TX was requested, this
  *	command may be used with the corresponding cookie to cancel the wait
  *	time if it is known that it is no longer necessary.
@@ -1078,6 +1082,13 @@ enum nl80211_commands {
  * @NL80211_ATTR_PMKSA_CANDIDATE: Nested attribute containing the PMKSA caching
  *	candidate information, see &enum nl80211_pmksa_candidate_attr.
  *
+ * @NL80211_ATTR_TX_NO_CCK_RATE: Indicates whether to use CCK rate or not
+ *	for management frames transmission. In order to avoid p2p probe/action
+ *	frames are being transmitted at CCK rate in 2GHz band, the user space
+ *	applications use this attribute.
+ *	This attribute is used with %NL80211_CMD_TRIGGER_SCAN and
+ *	%NL80211_CMD_FRAME commands.
+ *
  * @NL80211_ATTR_MAX: highest attribute number currently defined
  * @__NL80211_ATTR_AFTER_LAST: internal use
  */
@@ -1298,6 +1309,8 @@ enum nl80211_attrs {
 
 	NL80211_ATTR_PMKSA_CANDIDATE,
 
+	NL80211_ATTR_TX_NO_CCK_RATE,
+
 	/* add attributes here, update the policy in nl80211.c */
 
 	__NL80211_ATTR_AFTER_LAST,
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index ccfdf3f..c1dd56b 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -860,6 +860,7 @@ struct cfg80211_ssid {
  * @wiphy: the wiphy this was for
  * @dev: the interface
  * @aborted: (internal) scan request was notified as aborted
+ * @no_cck: used to send probe requests at non CCK rate in 2GHz band
  */
 struct cfg80211_scan_request {
 	struct cfg80211_ssid *ssids;
@@ -874,6 +875,7 @@ struct cfg80211_scan_request {
 	struct wiphy *wiphy;
 	struct net_device *dev;
 	bool aborted;
+	bool no_cck;
 
 	/* keep last */
 	struct ieee80211_channel *channels[0];
@@ -1560,7 +1562,8 @@ struct cfg80211_ops {
 			  struct ieee80211_channel *chan, bool offchan,
 			  enum nl80211_channel_type channel_type,
 			  bool channel_type_valid, unsigned int wait,
-			  const u8 *buf, size_t len, u64 *cookie);
+			  const u8 *buf, size_t len, bool no_cck,
+			  u64 *cookie);
 	int	(*mgmt_tx_cancel_wait)(struct wiphy *wiphy,
 				       struct net_device *dev,
 				       u64 cookie);
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index b57ddf9..9cba010 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1869,7 +1869,8 @@ static int ieee80211_mgmt_tx(struct wiphy *wiphy, struct net_device *dev,
 			     struct ieee80211_channel *chan, bool offchan,
 			     enum nl80211_channel_type channel_type,
 			     bool channel_type_valid, unsigned int wait,
-			     const u8 *buf, size_t len, u64 *cookie)
+			     const u8 *buf, size_t len, bool no_cck,
+			     u64 *cookie)
 {
 	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
 	struct ieee80211_local *local = sdata->local;
diff --git a/net/wireless/core.h b/net/wireless/core.h
index 796a4bd..a472d60 100644
--- a/net/wireless/core.h
+++ b/net/wireless/core.h
@@ -375,7 +375,8 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
 			  struct ieee80211_channel *chan, bool offchan,
 			  enum nl80211_channel_type channel_type,
 			  bool channel_type_valid, unsigned int wait,
-			  const u8 *buf, size_t len, u64 *cookie);
+			  const u8 *buf, size_t len, bool no_cck,
+			  u64 *cookie);
 
 /* SME */
 int __cfg80211_connect(struct cfg80211_registered_device *rdev,
diff --git a/net/wireless/mlme.c b/net/wireless/mlme.c
index 61adea5..21fc970 100644
--- a/net/wireless/mlme.c
+++ b/net/wireless/mlme.c
@@ -900,7 +900,8 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
 			  struct ieee80211_channel *chan, bool offchan,
 			  enum nl80211_channel_type channel_type,
 			  bool channel_type_valid, unsigned int wait,
-			  const u8 *buf, size_t len, u64 *cookie)
+			  const u8 *buf, size_t len, bool no_cck,
+			  u64 *cookie)
 {
 	struct wireless_dev *wdev = dev->ieee80211_ptr;
 	const struct ieee80211_mgmt *mgmt;
@@ -991,7 +992,7 @@ int cfg80211_mlme_mgmt_tx(struct cfg80211_registered_device *rdev,
 	/* Transmit the Action frame as requested by user space */
 	return rdev->ops->mgmt_tx(&rdev->wiphy, dev, chan, offchan,
 				  channel_type, channel_type_valid,
-				  wait, buf, len, cookie);
+				  wait, buf, len, no_cck, cookie);
 }
 
 bool cfg80211_rx_mgmt(struct net_device *dev, int freq, const u8 *buf,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index c26a1da..eba88c7e 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -191,6 +191,7 @@ static const struct nla_policy nl80211_policy[NL80211_ATTR_MAX+1] = {
 					 .len = IEEE80211_MAX_DATA_LEN },
 	[NL80211_ATTR_ROAM_SUPPORT] = { .type = NLA_FLAG },
 	[NL80211_ATTR_SCHED_SCAN_MATCH] = { .type = NLA_NESTED },
+	[NL80211_ATTR_TX_NO_CCK_RATE] = { .type = NLA_FLAG },
 };
 
 /* policy for the key attributes */
@@ -3620,6 +3621,9 @@ static int nl80211_trigger_scan(struct sk_buff *skb, struct genl_info *info)
 		}
 	}
 
+	request->no_cck =
+		nla_get_flag(info->attrs[NL80211_ATTR_TX_NO_CCK_RATE]);
+
 	request->dev = dev;
 	request->wiphy = &rdev->wiphy;
 
@@ -5192,6 +5196,7 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
 	struct sk_buff *msg;
 	unsigned int wait = 0;
 	bool offchan;
+	bool no_cck;
 
 	if (!info->attrs[NL80211_ATTR_FRAME] ||
 	    !info->attrs[NL80211_ATTR_WIPHY_FREQ])
@@ -5228,6 +5233,8 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
 
 	offchan = info->attrs[NL80211_ATTR_OFFCHANNEL_TX_OK];
 
+	no_cck = nla_get_flag(info->attrs[NL80211_ATTR_TX_NO_CCK_RATE]);
+
 	freq = nla_get_u32(info->attrs[NL80211_ATTR_WIPHY_FREQ]);
 	chan = rdev_freq_to_chan(rdev, freq, channel_type);
 	if (chan == NULL)
@@ -5248,7 +5255,7 @@ static int nl80211_tx_mgmt(struct sk_buff *skb, struct genl_info *info)
 				    channel_type_valid, wait,
 				    nla_data(info->attrs[NL80211_ATTR_FRAME]),
 				    nla_len(info->attrs[NL80211_ATTR_FRAME]),
-				    &cookie);
+				    no_cck, &cookie);
 	if (err)
 		goto free_msg;
 
-- 
1.7.6.3


^ permalink raw reply related

* Re: 答复: 答复: 答复: 3.1-rc6+ rtl8192se issue
From: Larry Finger @ 2011-09-23 13:50 UTC (permalink / raw)
  To: Borislav Petkov; +Cc: 李朝明, linux-wireless, 'LKML'
In-Reply-To: <20110923103339.GA26078@gere.osrc.amd.com>

On 09/23/2011 05:33 AM, Borislav Petkov wrote:
> On Fri, Sep 23, 2011 at 06:21:07PM +0800, 李朝明 wrote:
>> Please set ips =0 and try again..
>
> What does that mean?
>
> I can trigger the grinding-to-a-halt reliably with "ips=0" - it only
> takes a couple of hours of network traffic. Also, I don't want to try
> the driver you sent me because the version in the kernel needs fixing
> not some out-of-tree codebase.

Does the likelihood of the failure change when "ips=0" is used?

The Realtek group made several changes in the driver that Chaoming sent you that 
have not yet been incorporated in the kernel version. If you test that driver, 
we might learn if any of them are important to your problem. As neither of us 
can duplicate your results, it is not possible for us to do those tests.

I agree that we want to fix the kernel version. It is unfortunate that Realtek 
does not generate their improvements as patches to that kernel version, and 
publish them that way, but that is a fact of life. When they produce a new 
version, I have to look at the diff file between it and the previous version and 
test those differences with my devices. Thus far, there have been no changes 
that have any effect on my system, but who knows on yours. Please run the test 
as Chaoming asked you to do.

Thanks,

Larry

^ permalink raw reply

* pull request: wl12xx 2011-09-23
From: Luciano Coelho @ 2011-09-23 13:26 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless

Hi John,

Yet another pull request for 3.2, most likely the last (unless it takes
longer than normal for the merge window to open).  We have some fixes,
including an out-of-bounds array read and some P2P stuff, a fix in the
scanning code (where passive scans were not working properly) and some
other small things, like support for hidden SSID in AP mode.

Please pull or let me know if there's any problem. This tree is based on
wireless-next/master.

Thanks! 


The following changes since commit ed46fdfc54d2d4523fdd727708fe0b9e2be993cc:

  nfc: NFC_WILINK depends on NFC_NCI (2011-09-21 16:19:44 -0400)

are available in the git repository at:
  git://github.com/lucacoelho/wl12xx.git for-linville

Arik Nemtsov (3):
      wl12xx: AP mode - support hidden SSID
      wl12xx: correct fw_status structure for 8 sta support in AP-mode
      wl12xx: report the stop_ba event to all STAs in AP-mode

Eliad Peller (5):
      wl12xx: remove TIM ie from probe response
      wl12xx: remove P2P ie from probe response
      wl12xx: send all pending packets on channel change
      wl12xx: Use dev_hlid for auth and assoc req
      wl12xx: implement set_bitrate_mask callback

Luciano Coelho (1):
      wl12xx: fix forced passive scans

Shahar Levi (2):
      wl12xx: fix sdio_test module functionality
      wl12xx: Include OFDM rates in IBSS mode

 drivers/net/wireless/wl12xx/Makefile    |    6 +-
 drivers/net/wireless/wl12xx/cmd.c       |   43 ++++---
 drivers/net/wireless/wl12xx/conf.h      |    6 +-
 drivers/net/wireless/wl12xx/event.c     |    2 +-
 drivers/net/wireless/wl12xx/init.c      |   17 ++-
 drivers/net/wireless/wl12xx/main.c      |  201 ++++++++++++++++++++++++++-----
 drivers/net/wireless/wl12xx/scan.c      |   42 +++++--
 drivers/net/wireless/wl12xx/sdio_test.c |   15 ++-
 drivers/net/wireless/wl12xx/tx.c        |   38 +++----
 drivers/net/wireless/wl12xx/tx.h        |    5 +-
 drivers/net/wireless/wl12xx/wl12xx.h    |    5 +-
 11 files changed, 274 insertions(+), 106 deletions(-)


-- 
Cheers,
Luca.





^ permalink raw reply

* Re: [PATCH 1/2] wl12xx: correct fw_status structure for 8 sta support in AP-mode
From: Luciano Coelho @ 2011-09-23 11:58 UTC (permalink / raw)
  To: Arik Nemtsov; +Cc: linux-wireless
In-Reply-To: <1316674326-4873-1-git-send-email-arik@wizery.com>

On Thu, 2011-09-22 at 09:52 +0300, Arik Nemtsov wrote: 
> Fix an erroneous labeling of array boundaries in the fw_status structure.
> 
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Signed-off-by: Arik Nemtsov <arik@wizery.com>
> ---

Applied both.  Thanks, Arik!

-- 
Cheers,
Luca.


^ permalink raw reply

* Re: [PATCH] wl12xx: implement set_bitrate_mask callback
From: Luciano Coelho @ 2011-09-23 11:53 UTC (permalink / raw)
  To: Eliad Peller; +Cc: linux-wireless
In-Reply-To: <1316429502-2560-1-git-send-email-eliad@wizery.com>

On Mon, 2011-09-19 at 13:51 +0300, Eliad Peller wrote: 
> Save the configured bitrate, and use the min allowed rate
> as the basic rate (e.g. when scanning).
> 
> Signed-off-by: Eliad Peller <eliad@wizery.com>
> ---

Rebased and applied.  Thank you!

-- 
Cheers,
Luca.


^ permalink raw reply

* Re: [PATCH] wl12xx: AP mode - support hidden SSID
From: Luciano Coelho @ 2011-09-23 11:44 UTC (permalink / raw)
  To: Arik Nemtsov; +Cc: linux-wireless
In-Reply-To: <1315070523-31102-1-git-send-email-arik@wizery.com>

On Sat, 2011-09-03 at 20:22 +0300, Arik Nemtsov wrote: 
> If a hidden SSID is requested, generate a probe response template
> containing the real SSID.
> 
> Depends on the patch "mac80211: add ssid config to bss information
> in AP-mode".
> 
> Signed-off-by: Arik Nemtsov <arik@wizery.com>
> ---

Rebased and applied.  Thanks!

-- 
Cheers,
Luca.


^ permalink raw reply

* Re: [PATCH] wl12xx: Use dev_hlid for auth and assoc req
From: Luciano Coelho @ 2011-09-23 11:44 UTC (permalink / raw)
  To: Eliad Peller; +Cc: linux-wireless
In-Reply-To: <1316091947-8953-1-git-send-email-eliad@wizery.com>

On Thu, 2011-09-15 at 16:05 +0300, Eliad Peller wrote: 
> On roaming, the auth and assoc req are sent with the sta
> hlid. This is wrong, as the sta hlid is configured according
> to the old ap. Use the dev_hlid instead.
> 
> Move the wl1271_tx_update_filters() call into wl1271_tx_get_hlid(),
> so wl->dev_hlid will be valid.
> 
> Signed-off-by: Eliad Peller <eliad@wizery.com>
> ---

Applied, thanks!

-- 
Cheers,
Luca.


^ permalink raw reply

* Re: [PATCH] wl12xx: send all pending packets on channel change
From: Luciano Coelho @ 2011-09-23 11:44 UTC (permalink / raw)
  To: Eliad Peller; +Cc: linux-wireless
In-Reply-To: <1316080801-20803-1-git-send-email-eliad@wizery.com>

On Thu, 2011-09-15 at 13:00 +0300, Eliad Peller wrote: 
> There is a race condition between wl1271_tx_work() and the
> channel switch, so make sure all the pending packets are
> being sent before switching channel.
> 
> Signed-off-by: Eliad Peller <eliad@wizery.com>
> ---

Applied, thank you.

-- 
Cheers,
Luca.


^ permalink raw reply

* Re: [PATCH 1/2] wl12xx: remove TIM ie from probe response
From: Luciano Coelho @ 2011-09-23 11:43 UTC (permalink / raw)
  To: Eliad Peller; +Cc: linux-wireless
In-Reply-To: <1316077625-20014-1-git-send-email-eliad@wizery.com>

On Thu, 2011-09-15 at 12:07 +0300, Eliad Peller wrote: 
> wl12xx uses the beacon as the probe response template.
> However, the beacon includes a TIM ie, which shouldn't
> exist in the probe response.
> 
> Delete it from the skb before configuring the probe
> response template.
> 
> Signed-off-by: Eliad Peller <eliad@wizery.com>
> ---

Applied both patches.  Thanks!

-- 
Cheers,
Luca.


^ permalink raw reply

* Re: [PATCH] wl12xx: Includes OFDM rates in IBSS mode
From: Luciano Coelho @ 2011-09-23 11:37 UTC (permalink / raw)
  To: Shahar Levi; +Cc: linux-wireless
In-Reply-To: <1315220076-30153-1-git-send-email-shahar_levi@ti.com>

On Mon, 2011-09-05 at 13:54 +0300, Shahar Levi wrote: 
> IBSS mode includes only 11B rates.
> Includes OFDM rates in IBSS mode. Note that IBSS connection is
> without ERP protection.
> 
> Signed-off-by: Shahar Levi <shahar_levi@ti.com>
> ---

Rephrased commit log, removed one unnecessary comment and applied.
Thanks!

-- 
Cheers,
Luca.


^ permalink raw reply

* Re: [PATCH] wl12xx: Fix sdio test module functionality
From: Luciano Coelho @ 2011-09-23 11:16 UTC (permalink / raw)
  To: Shahar Levi; +Cc: linux-wireless
In-Reply-To: <1315810837-30599-1-git-send-email-shahar_levi@ti.com>

On Mon, 2011-09-12 at 10:00 +0300, Shahar Levi wrote: 
> The sdio test is broken due to changing in the io layer and FW
> macro name. Those fixes have been implemented in the wl12xx driver.
> Align the sdio test module with those fixes + small beautify
> indentation in the makefile.
> 
> Signed-off-by: Shahar Levi <shahar_levi@ti.com>
> ---

Rephrased commit log, removed the change in the FW name (since it's
already done in another patch) and applied.


-- 
Cheers,
Luca.


^ permalink raw reply

* Re: [PATCH] wl12xx: Add support for HW channel switch
From: Luciano Coelho @ 2011-09-23 10:59 UTC (permalink / raw)
  To: Shahar Levi; +Cc: linux-wireless
In-Reply-To: <1316698619.2157.628.camel@cumari>

On Thu, 2011-09-22 at 16:36 +0300, Luciano Coelho wrote: 
> On Thu, 2011-09-08 at 13:01 +0300, Shahar Levi wrote: 
> > WL12xx FW supports HW channel switch mechanism.
> > Add HW channel switch support via channel_switch ops.
> > 
> > Signed-off-by: Shahar Levi <shahar_levi@ti.com>
> > ---
> 
> [...]
> 
> > +static void wl12xx_op_channel_switch(struct ieee80211_hw *hw,
> > +				     struct ieee80211_channel_switch *ch_switch)
> > +{
> > +	struct wl1271 *wl = hw->priv;
> > +	int ret;
> > +
> > +	wl1271_debug(DEBUG_MAC80211, "mac80211 channel switch");
> > +
> > +	mutex_lock(&wl->mutex);
> > +
> > +	if (unlikely(wl->state == WL1271_STATE_OFF)) {
> > +		mutex_unlock(&wl->mutex);
> > +		ieee80211_chswitch_done(wl->vif, false);
> > +		return;
> > +	}
> > +
> > +	ret = wl1271_ps_elp_wakeup(wl);
> > +	if (ret < 0)
> > +		goto out;
> > +
> > +	/* send all pending packets */
> > +	wl1271_tx_work_locked(wl);
> 
> Is this really needed? Can anyone tell why?

I checked this a bit further and I don't see the point in sending all
packets here.  In fact, if block_tx is set, we can't even send any more
frames until the switch happens (or fails).  So we should at least check
this here.

I'm leaving this patch out for now until I understand this better.

-- 
Cheers,
Luca.


^ permalink raw reply

* [PATCH 2/2] wireless: at76c50x: use native hex_pack_byte() method
From: Andy Shevchenko @ 2011-09-23 10:47 UTC (permalink / raw)
  To: linux-kernel; +Cc: Andy Shevchenko, John W. Linville, linux-wireless, netdev
In-Reply-To: <fa146966b0ce1e7f04d59eb27cc0e968f51b22de.1316774801.git.andriy.shevchenko@linux.intel.com>

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org
Cc: netdev@vger.kernel.org
---
 drivers/net/wireless/at76c50x-usb.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/net/wireless/at76c50x-usb.c b/drivers/net/wireless/at76c50x-usb.c
index 2986014..157507a6 100644
--- a/drivers/net/wireless/at76c50x-usb.c
+++ b/drivers/net/wireless/at76c50x-usb.c
@@ -500,7 +500,6 @@ exit:
 
 #define HEX2STR_BUFFERS 4
 #define HEX2STR_MAX_LEN 64
-#define BIN2HEX(x) ((x) < 10 ? '0' + (x) : (x) + 'A' - 10)
 
 /* Convert binary data into hex string */
 static char *hex2str(void *buf, int len)
@@ -520,10 +519,8 @@ static char *hex2str(void *buf, int len)
 	}
 
 	while (len--) {
-		*obuf++ = BIN2HEX(*ibuf >> 4);
-		*obuf++ = BIN2HEX(*ibuf & 0xf);
+		obuf = hex_pack_byte(obuf, *ibuf++);
 		*obuf++ = '-';
-		ibuf++;
 	}
 	*(--obuf) = '\0';
 
-- 
1.7.6.3


^ permalink raw reply related

* Re: 答复: 答复: 答复: 3.1-rc6+ rtl8192se issue
From: Borislav Petkov @ 2011-09-23 10:33 UTC (permalink / raw)
  To: 李朝明
  Cc: 'Larry Finger', linux-wireless, 'LKML'
In-Reply-To: <6452E68488784D0EA32E4BDF1B941EFB@realsil.com.cn>

On Fri, Sep 23, 2011 at 06:21:07PM +0800, 李朝明 wrote:
> Please set ips =0 and try again..

What does that mean?

I can trigger the grinding-to-a-halt reliably with "ips=0" - it only
takes a couple of hours of network traffic. Also, I don't want to try
the driver you sent me because the version in the kernel needs fixing
not some out-of-tree codebase.

So please clarify your request.

Thanks.

-- 
Regards/Gruss,
Boris.

^ permalink raw reply

* Re: [RFC 2/2] mac80211: Send the management frame at requested rate
From: Johannes Berg @ 2011-09-23 10:23 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: linville, linux-wireless, Jouni Malinen
In-Reply-To: <1316773324.4058.2.camel@jlt3.sipsolutions.net>

On Fri, 2011-09-23 at 12:22 +0200, Johannes Berg wrote:

> > +	if (ieee80211_is_probe_req(hdr->frame_control) &&
> > +	    tx->sdata->local->scan_req &&
> > +	    tx->sdata->local->scan_req->no_cck)
> > +		info->flags |= IEEE80211_TX_CTL_NO_CCK_RATE;
> > +
> 
> I think this would make more sense in ieee80211_send_probe_req() rather
> than here where it'll be executed for every frame.

In fact, maybe ieee80211_send_probe_req() should just get an argument to
avoid all the checks.

johannes


^ permalink raw reply

* Re: [RFC 2/2] mac80211: Send the management frame at requested rate
From: Johannes Berg @ 2011-09-23 10:22 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: linville, linux-wireless, Jouni Malinen
In-Reply-To: <1316703516-24216-2-git-send-email-rmanohar@qca.qualcomm.com>

On Thu, 2011-09-22 at 20:28 +0530, Rajkumar Manoharan wrote:

> +++ b/net/mac80211/tx.c
> @@ -639,6 +639,11 @@ ieee80211_tx_h_rate_ctrl(struct ieee80211_tx_data *tx)
>  		txrc.rts = rts = true;
>  	}
>  
> +	if (ieee80211_is_probe_req(hdr->frame_control) &&
> +	    tx->sdata->local->scan_req &&
> +	    tx->sdata->local->scan_req->no_cck)
> +		info->flags |= IEEE80211_TX_CTL_NO_CCK_RATE;
> +

I think this would make more sense in ieee80211_send_probe_req() rather
than here where it'll be executed for every frame.

johannes


^ permalink raw reply

* Re: [RFC 1/2] nl80211/cfg80211: Add support to disable CCK rate for management frame
From: Johannes Berg @ 2011-09-23 10:20 UTC (permalink / raw)
  To: Rajkumar Manoharan; +Cc: linville, linux-wireless, Jouni Malinen
In-Reply-To: <1316703516-24216-1-git-send-email-rmanohar@qca.qualcomm.com>

On Thu, 2011-09-22 at 20:28 +0530, Rajkumar Manoharan wrote:

Looks fine, minor nitpick:
 
> +	request->no_cck = nla_get_flag(info->attrs
> +					[NL80211_ATTR_TX_NO_CCK_RATE]);

I think that'd be nicer as
	request->no_cck =
		nla_get_flag(...);

even if potentially that goes above 80 cols.


> +	no_cck = nla_get_flag(info->attrs[NL80211_ATTR_TX_NO_CCK_RATE]);

Or I guess it probably won't if this fits :)

Thanks!

johannes


^ permalink raw reply

* [PATCH] ath9k: Fix a dma warning/memory leak
From: Mohammed Shafi Shajakhan @ 2011-09-23  9:03 UTC (permalink / raw)
  To: John W. Linville
  Cc: Jouni Malinen, linux-wireless, Rodriguez Luis,
	Balasubramanian senthilkumar, Vasanthakumar Thiagarajan,
	Rajkumar Manoharan, Vivek Natarajan, ath9k-devel,
	Mohammed Shafi Shajakhan

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

proper dma_unmapping and freeing of skb's has to be done in the rx
cleanup for EDMA chipsets when the device is unloaded and this also
seems to address the following warning which shows up occasionally when
the device is unloaded

	Call Trace:
	[<c0148cd2>] warn_slowpath_common+0x72/0xa0
	[<c03b669c>] ? dma_debug_device_change+0x19c/0x200
	[<c03b669c>] ? dma_debug_device_change+0x19c/0x200
	[<c0148da3>] warn_slowpath_fmt+0x33/0x40
	[<c03b669c>] dma_debug_device_change+0x19c/0x200
	[<c0657f12>] notifier_call_chain+0x82/0xb0
	[<c0171370>] __blocking_notifier_call_chain+0x60/0x90
	[<c01713bf>] blocking_notifier_call_chain+0x1f/0x30
	[<c044f594>] __device_release_driver+0xa4/0xc0
	[<c044f647>] driver_detach+0x97/0xa0
	[<c044e65c>] bus_remove_driver+0x6c/0xe0
	[<c029af0b>] ? sysfs_addrm_finish+0x4b/0x60
	[<c0450109>] driver_unregister+0x49/0x80
	[<c0299f54>] ? sysfs_remove_file+0x14/0x20
	[<c03c3ab2>] pci_unregister_driver+0x32/0x80
	[<f92c2162>] ath_pci_exit+0x12/0x20 [ath9k]
	[<f92c8467>] ath9k_exit+0x17/0x36 [ath9k]
	[<c06523cd>] ? mutex_unlock+0xd/0x10
	[<c018e27f>] sys_delete_module+0x13f/0x200
	[<c02139bb>] ? sys_munmap+0x4b/0x60
	[<c06547c5>] ? restore_all+0xf/0xf
	[<c0657a20>] ? spurious_fault+0xe0/0xe0
	[<c01832f4>] ? trace_hardirqs_on_caller+0xf4/0x180
	[<c065b863>] sysenter_do_call+0x12/0x38
	 ---[ end trace 16e1c1521c06bcf9 ]---
	Mapped at:
	[<c03b7938>] debug_dma_map_page+0x48/0x120
	[<f92ba3e8>] ath_rx_init+0x3f8/0x4b0 [ath9k]
	[<f92b5ae4>] ath9k_init_device+0x4c4/0x7b0 [ath9k]
	[<f92c2813>] ath_pci_probe+0x263/0x330 [ath9k]

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/recv.c |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index bcc0b22..4984350 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -205,14 +205,22 @@ static void ath_rx_remove_buffer(struct ath_softc *sc,
 
 static void ath_rx_edma_cleanup(struct ath_softc *sc)
 {
+	struct ath_hw *ah = sc->sc_ah;
+	struct ath_common *common = ath9k_hw_common(ah);
 	struct ath_buf *bf;
 
 	ath_rx_remove_buffer(sc, ATH9K_RX_QUEUE_LP);
 	ath_rx_remove_buffer(sc, ATH9K_RX_QUEUE_HP);
 
 	list_for_each_entry(bf, &sc->rx.rxbuf, list) {
-		if (bf->bf_mpdu)
+		if (bf->bf_mpdu) {
+			dma_unmap_single(sc->dev, bf->bf_buf_addr,
+					common->rx_bufsize,
+					DMA_BIDIRECTIONAL);
 			dev_kfree_skb_any(bf->bf_mpdu);
+			bf->bf_buf_addr = 0;
+			bf->bf_mpdu = NULL;
+		}
 	}
 
 	INIT_LIST_HEAD(&sc->rx.rxbuf);
-- 
1.7.0.4


^ permalink raw reply related

* Re: [RFC 00/15] mac80211 uAPSD support
From: Johannes Berg @ 2011-09-23  8:59 UTC (permalink / raw)
  To: Luis R. Rodriguez; +Cc: linux-wireless
In-Reply-To: <CAB=NE6UzHVMOY=v4EEVojED5PY=T-uriAMvpHqehkh4Bygrn3g@mail.gmail.com>

On Thu, 2011-09-22 at 16:25 -0700, Luis R. Rodriguez wrote:

> Awesome :) I started to review this but tried applying the entire
> series [1] to several different master tags on wireless-testing but it
> doesn't apply, any chance you could rebase? I'll try to finish my
> review through though.

It seems to apply to wireless-testing for me, not sure ...

johannes


^ permalink raw reply

* Re: [PATCH V2] ath6kl: Fix disconnect event reporting
From: Kalle Valo @ 2011-09-23  7:51 UTC (permalink / raw)
  To: Vasanthakumar Thiagarajan; +Cc: linux-wireless
In-Reply-To: <1316755670-1795-1-git-send-email-vthiagar@qca.qualcomm.com>

On 09/23/2011 08:27 AM, Vasanthakumar Thiagarajan wrote:
> Driver does not report disconnect event properly when in connecting state,
> this leads to issues failures in starting reconnection. Send a disconnect
> command to target when a disconnect event is received with reason code
> other than 3 (DISCONNECT_CMD - disconnect request from host) to make the
> frimware stop trying to connect even after giving disconnect event. There
> will be one more disconnect event for this disconnect command with reason
> code DISCONNECT_CMD which will be notified to cfg80211.
> 
> Signed-off-by: Vasanthakumar Thiagarajan <vthiagar@qca.qualcomm.com>
> ---
> 
> V2 -- Add commands in code and change in commit log

Perfect, thanks. Patch applied.

Kalle

^ permalink raw reply

* Re: [PATCH] ath6kl: pass only unicast frames for aggregation
From: Kalle Valo @ 2011-09-23  7:45 UTC (permalink / raw)
  To: Kalle Valo; +Cc: linux-wireless
In-Reply-To: <20110919183844.25296.65533.stgit@localhost6.localdomain6>

On 09/19/2011 09:38 PM, Kalle Valo wrote:
> When pinging form ar6003 to the AP RTT was high even when power save was
> disabled:
> 
> 100 packets transmitted, 97 received, 3% packet loss, time 99125ms
> rtt min/avg/max/mdev = 1.875/46.733/795.506/139.181 ms
> 
> After some investigation one reason for this was that received
> multicast traffic confused the aggrecation logic and caused 400 ms
> timeouts when receiving multicast frames from AP.
> 
> A simple way to fix is to pass only unicast frames for aggregation. This
> improves RTT:
> 
> 100 packets transmitted, 99 received, 1% packet loss, time 99144ms
> rtt min/avg/max/mdev = 2.083/13.084/403.390/56.794 ms

Applied.

Kalle

^ 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