[PATCH] mwifiex: Fixed coding style issues

2016-02-10 Thread Ujjal Roy
Some indentation and basic style violations are fixed in this patch.

Signed-off-by: Ujjal Roy 
---
 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +-
 drivers/net/wireless/marvell/mwifiex/pcie.c | 2 +-
 drivers/net/wireless/marvell/mwifiex/uap_cmd.c  | 2 +-
 drivers/net/wireless/marvell/mwifiex/usb.c  | 4 ++--
 4 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c 
b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index e7adef7..cb0cf03 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -676,7 +676,7 @@ mwifiex_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 
changed)
}
break;

-   case MWIFIEX_BSS_ROLE_STA:
+   case MWIFIEX_BSS_ROLE_STA:
if (priv->media_connected) {
mwifiex_dbg(adapter, ERROR,
"cannot change wiphy params when 
connected");
diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c 
b/drivers/net/wireless/marvell/mwifiex/pcie.c
index 6d0dc40..4d29cce 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -1408,7 +1408,7 @@ mwifiex_pcie_send_boot_cmd(struct mwifiex_adapter 
*adapter, struct sk_buff *skb)
return -1;
}

-   if (mwifiex_map_pci_memory(adapter, skb, skb->len , PCI_DMA_TODEVICE))
+   if (mwifiex_map_pci_memory(adapter, skb, skb->len, PCI_DMA_TODEVICE))
return -1;

buf_pa = MWIFIEX_SKB_DMA_ADDR(skb);
diff --git a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c 
b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
index e791166..16d95b2 100644
--- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
+++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
@@ -192,7 +192,7 @@ mwifiex_set_ht_params(struct mwifiex_private *priv,
}
priv->ap_11n_enabled = 1;
} else {
-   memset(_cfg->ht_cap , 0, sizeof(struct ieee80211_ht_cap));
+   memset(_cfg->ht_cap, 0, sizeof(struct ieee80211_ht_cap));
bss_cfg->ht_cap.cap_info = cpu_to_le16(MWIFIEX_DEF_HT_CAP);
bss_cfg->ht_cap.ampdu_params_info = MWIFIEX_DEF_AMPDU;
}
diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c 
b/drivers/net/wireless/marvell/mwifiex/usb.c
index e43aff9..0510861 100644
--- a/drivers/net/wireless/marvell/mwifiex/usb.c
+++ b/drivers/net/wireless/marvell/mwifiex/usb.c
@@ -244,9 +244,9 @@ setup_for_next:
if (card->rx_cmd_ep == context->ep) {
mwifiex_usb_submit_rx_urb(context, size);
} else {
-   if (atomic_read(>rx_pending) <= HIGH_RX_PENDING){
+   if (atomic_read(>rx_pending) <= HIGH_RX_PENDING) {
mwifiex_usb_submit_rx_urb(context, size);
-   }else{
+   } else {
context->skb = NULL;
}
}
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] mac80211: fix wiphy supported_band access

2016-02-10 Thread Lorenzo Bianconi
Fix wiphy supported_band access in tx radiotap parsing. In particular,
info->band is always set to 0 (IEEE80211_BAND_2GHZ) since it has not
assigned yet. This cause a kernel crash on 5GHz only devices.
Move ieee80211_parse_tx_radiotap() after info->band assignment

Signed-off-by: Lorenzo Bianconi 
---
 net/mac80211/tx.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 7bb67fa..b07d037 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1892,10 +1892,6 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff 
*skb,
info->flags = IEEE80211_TX_CTL_REQ_TX_STATUS |
  IEEE80211_TX_CTL_INJECTED;
 
-   /* process and remove the injection radiotap header */
-   if (!ieee80211_parse_tx_radiotap(local, skb))
-   goto fail;
-
rcu_read_lock();
 
/*
@@ -1957,6 +1953,10 @@ netdev_tx_t ieee80211_monitor_start_xmit(struct sk_buff 
*skb,
goto fail_rcu;
 
info->band = chandef->chan->band;
+   /* process and remove the injection radiotap header */
+   if (!ieee80211_parse_tx_radiotap(local, skb))
+   goto fail_rcu;
+
ieee80211_xmit(sdata, NULL, skb);
rcu_read_unlock();
 
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: alfa awus036nhr v2 and module rtl8xxxu

2016-02-10 Thread Larry Finger

On 02/10/2016 06:01 AM, dsadsa sadsad wrote:

So do i have to patch and recompile or not?


It will not change a thing for the AWUS036NHR. It will fix a bug in 1T2R 
devices.

Larry


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 8/9] rfkill: Userspace control for airplane mode

2016-02-10 Thread Johannes Berg

On 2016-02-10 17:53, Dan Williams wrote:

Yeah, I get that now.  It's just that to me, something called
"AIRPLANE_MODE_CHANGE" seems like it should actually change airplane
mode on/off, which implies killing radios.  I wouldn't have had the
problem if it was named AIRPLANE_MODE_INDICATOR_CHANGE, which makes it
clear this is simply an indicator and has no actual effect on anything
other than a LED.


Yeah, I agree. I'm not even sure that it's a good idea to subsume this 
into the regular operations in the API, although that's obviously the 
easiest extension. I'll need to think about that a bit more with the 
code at hand though.


johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] ath10k: fix erroneous return value

2016-02-10 Thread Anton Protopopov
The ath10k_pci_hif_exchange_bmi_msg() function may return the positive
value EIO instead of -EIO in case of error.

Signed-off-by: Anton Protopopov 
---
 drivers/net/wireless/ath/ath10k/pci.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/pci.c 
b/drivers/net/wireless/ath/ath10k/pci.c
index ee925c6..526acde 100644
--- a/drivers/net/wireless/ath/ath10k/pci.c
+++ b/drivers/net/wireless/ath/ath10k/pci.c
@@ -1756,7 +1756,7 @@ static int ath10k_pci_hif_exchange_bmi_msg(struct ath10k 
*ar,
DMA_FROM_DEVICE);
ret = dma_mapping_error(ar->dev, resp_paddr);
if (ret) {
-   ret = EIO;
+   ret = -EIO;
goto err_req;
}
 
-- 
2.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] wlcore: Fix regression in wlcore_set_partition()

2016-02-10 Thread Kalle Valo
Emil Goode  writes:

> The below commit introduced a regression causing the wlcore
> to time out and go into recovery.
>
> commit 3719c17e1816695f415dd3b4ddcb679f7dc617c8
> ("wlcore/wl18xx: fw logger over sdio")
>
> Reverting the changes regarding write of the last partition size
> brings the module back to it's functional state.
>
> Reported-by: Ross Green 
> Signed-off-by: Emil Goode 

A proper "Fixes:" line is good to have, but I can add it.

I'm planning to queue this to 4.5.

-- 
Kalle Valo
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Fwd: Re: wilc1000 staging driver initialization failure

2016-02-10 Thread Andrew Boyce


Sorry for the mass forward, I was instructed to email more than just the 
linux-wireless mailing list.


Any help would be appreciated.

Thanks!
 -Andrew


 Forwarded Message 
Subject: Re: wilc1000 staging driver initialization failure
Date: Thu, 4 Feb 2016 13:26:04 -0500
From: Andrew Boyce 
To: linux-wireless-u79uwxl29ty76z2rm5m...@public.gmane.org
Newsgroups: gmane.linux.kernel.wireless.general
References: 

I've enabled more debugging.


The core of the issue seems to be that wilc_lock_timeout() is for some
reason failing to down_timeout(). I do not currently understand enough
of the internals to understand why.



[ 6852.53] wilc1000: module is from the staging directory, the
quality is unknown, you have been warned.
[ 6852.57] wilc1000_sdio: module is from the staging directory, the
quality is unknown, you have been warned.
[ 6852.58] wilc1000_sdio mmc0:0001:1: Initializing netdev
[ 6852.58] DBG [wilc_create_wiphy: 2783]Registering wifi device
[ 6852.58] DBG [WILC_WFI_CfgAlloc: 2747]Allocating wireless device
[ 6852.58] INFO [wilc_create_wiphy]Max number of PMKIDs = 16
[ 6852.58] INFO [wilc_create_wiphy]Max scan ids = 10,Max scan IE len
= 1000,Signal Type = 1,Interface Modes = 844,Interface Type = 2
[ 6852.58] DBG [wilc_create_wiphy: 2822]Successful Registering
[ 6852.58] DBG [wilc_create_wiphy: 2783]Registering wifi device
[ 6852.58] DBG [WILC_WFI_CfgAlloc: 2747]Allocating wireless device
[ 6852.58] INFO [wilc_create_wiphy]Max number of PMKIDs = 16
[ 6852.58] INFO [wilc_create_wiphy]Max scan ids = 10,Max scan IE len
= 1000,Signal Type = 1,Interface Modes = 844,Interface Type = 2
[ 6852.58] DBG [wilc_create_wiphy: 2822]Successful Registering
[ 6852.58] wilc1000_sdio mmc0:0001:1: Driver Initializing success
[ 6856.90] DBG [wilc_mac_open: 1020]MAC OPEN[cd8c9000]
[ 6856.90] DBG [wilc_init_host_int: 2835]Host[cd8c9000][cd97cd00]
[ 6856.90] DBG [wilc_init: 3790]Initializing host interface for client 1
[ 6856.90] DBG [wilc_init: 3810]Global handle pointer value=cee0f400
[ 6856.90] DBG [wilc_init: 3824]INIT: CLIENT COUNT 0
[ 6856.90] INFO [wilc_init]Initialization values, Site survey value: 2
 Scan source: 0
 Active scan time: 10
 Passive scan time: 1200
Current tx Rate = 0
[ 6856.90] DBG [wilc_mac_open: 1029]*** re-init ***
[ 6856.90] DBG [wlan_init_locks: 809]Initializing Locks ...
[ 6856.90] DBG [wilc_wlan_init: 1593]Initializing WILC_Wlan ...
[ 6856.90] ERR [wilc1000_wlan_init: 900]Initializing WILC_Wlan FAILED
[ 6856.90] ERR [wilc1000_wlan_init: 900]Initializing WILC_Wlan FAILED
[ 6856.90] DBG [wlan_deinit_locks: 835]De-Initializing Locks
[ 6856.90] ERR [wilc1000_wlan_init: 983]WLAN Iinitialization FAILED
[ 6856.90] ERR [wilc1000_wlan_init: 983]WLAN Iinitialization FAILED
[ 6856.90] ERR [wilc_mac_open: 1032]Failed to initialize wilc1000
[ 6856.90] ERR [wilc_mac_open: 1032]Failed to initialize wilc1000
[ 6856.90] DBG [wilc_deinit: 3896]De-initializing host interface for
client 1
[ 6856.90] DBG [wilc_deinit: 3905]>> Connect timer is active
[ 6856.90] DBG [wilc_send_config_pkt: 619]Sending config SET PACKET
WID:2085
[ 6856.90] Sending config SET PACKET WID:2085
[ 6856.90] Sending config SET PACKET val:
[ 6856.90] DBG [wilc_wlan_cfg_set: 1443][WILC]PACKET Commit with
sequence number 0
[ 6856.90] [WILC]PACKET Commit with sequence number 0
[ 6856.90] DBG [wilc_wlan_cfg_set: 1446]Processing cfg_set()
[ 6856.90] Processing cfg_set()
[ 6856.90] DBG [wilc_wlan_txq_add_cfg_pkt: 368]Adding config packet ...
[ 6856.90] DBG [wilc_wlan_txq_add_cfg_pkt: 389]Adding the config
packet at the Queue tail
[ 6856.90] DBG [wilc_lock_timeout: 257]Locking cd9eb82c
[ 6856.90] Locking cd9eb82c
[ 6856.90] timeout 2000
[ 6856.90] Failed, mutex is NULL
[ 6856.90] DBG [wilc_wlan_txq_add_to_head: 150]Number of entries in
TxQ = 1
[ 6856.90] DBG [wilc_wlan_txq_add_to_head: 155]Wake up the txq_handler
[ 6856.90] DBG [wilc_lock_timeout: 257]Locking cd9eb850
[ 6856.90] Locking cd9eb850
[ 6856.90] timeout 2000
[ 6858.90] Failed, mutex is NULL
[ 6858.90] DBG [hostIFthread: 2793]THREAD: Exiting HostIfThread
[ 6858.90] DBG [hostIFthread: 2989]Releasing thread exit semaphore
[ 6858.90] INFO [clear_shadow_scan]destroy aging timer
[ 6858.90] DBG [wilc_deinit_host_int: 2878]destroy during ip


Any help would be appreciated.

Thanks!
 -Andrew



On 2/3/16 6:09 PM, Andrew Boyce wrote:

I've been working to build and test the staging wilc1000-sdio driver and
have run into a problem.

I've built a kernel from Greg KH's staging-testing branch and loaded it
onto our device. When I try to bring the interface up, I get the following:

root@test:~# ifconfig wlan0 up
kernel: [ 3510.40] DBG [wilc_mac_open: 1014]MAC OPEN[cef2]

Re: [PATCH 8/9] rfkill: Userspace control for airplane mode

2016-02-10 Thread Johannes Berg
On Mon, 2016-02-08 at 10:11 -0600, Dan Williams wrote:
> I'd like to clarify a bit, so tell me if I'm correct or not.  Using
> RFKILL_OP_AIRPLANE_MODE_CHANGE does not actually change any device
> state. It's just an indicator with no relationship to any of the
> registered rfkill switches, right?

Yes. I'm not sure I'm totally happy with this userspace API.

> I wonder if setting RFKILL_OP_AIRPLANE_MODE_CHANGE(true) shouldn't
> also
> softblock all switches, otherwise you can set airplane mode all day
> long with RFKILL_OP_AIRPLANE_MODE_CHANGE and it doesn't actually
> enable
> airplane mode at all?

No, this is kinda the point that you could implement your policy in
userspace now.

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] iwlwifi: fix erroneous return value

2016-02-10 Thread Anton Protopopov
The iwl_trans_pcie_start_fw() function may return the positive value EIO
instead of -EIO in case of error.

Signed-off-by: Anton Protopopov 
---
 drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c 
b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
index d60a467..920ea9d 100644
--- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
+++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
@@ -1034,7 +1034,7 @@ static int iwl_trans_pcie_start_fw(struct iwl_trans 
*trans,
if (trans_pcie->is_down) {
IWL_WARN(trans,
 "Can't start_fw since the HW hasn't been started\n");
-   ret = EIO;
+   ret = -EIO;
goto out;
}
 
-- 
2.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 8/9] rfkill: Userspace control for airplane mode

2016-02-10 Thread Dan Williams
On Wed, 2016-02-10 at 17:07 +0100, Johannes Berg wrote:
> On Mon, 2016-02-08 at 10:11 -0600, Dan Williams wrote:
> > I'd like to clarify a bit, so tell me if I'm correct or not.  Using
> > RFKILL_OP_AIRPLANE_MODE_CHANGE does not actually change any device
> > state. It's just an indicator with no relationship to any of the
> > registered rfkill switches, right?
> 
> Yes. I'm not sure I'm totally happy with this userspace API.
> 
> > I wonder if setting RFKILL_OP_AIRPLANE_MODE_CHANGE(true) shouldn't
> > also
> > softblock all switches, otherwise you can set airplane mode all day
> > long with RFKILL_OP_AIRPLANE_MODE_CHANGE and it doesn't actually
> > enable
> > airplane mode at all?
> 
> No, this is kinda the point that you could implement your policy in
> userspace now.

Yeah, I get that now.  It's just that to me, something called
"AIRPLANE_MODE_CHANGE" seems like it should actually change airplane
mode on/off, which implies killing radios.  I wouldn't have had the
problem if it was named AIRPLANE_MODE_INDICATOR_CHANGE, which makes it
clear this is simply an indicator and has no actual effect on anything
other than a LED.

Dan
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC 2/2] mac80211: parse VHT info in injected frames

2016-02-10 Thread Lorenzo Bianconi
Add VHT radiotap parsing support to ieee80211_parse_tx_radiotap().
That capability has been tested on d-link dir-860l rev b1 running
OpenWrt trunk and mt76 driver

Signed-off-by: Lorenzo Bianconi 
---
 Documentation/networking/mac80211-injection.txt | 10 
 net/mac80211/tx.c   | 31 +
 2 files changed, 41 insertions(+)

diff --git a/Documentation/networking/mac80211-injection.txt 
b/Documentation/networking/mac80211-injection.txt
index ec8f934..ef57cc0 100644
--- a/Documentation/networking/mac80211-injection.txt
+++ b/Documentation/networking/mac80211-injection.txt
@@ -45,6 +45,16 @@ radiotap headers and used to control injection:
number of retries when either IEEE80211_RADIOTAP_RATE or
IEEE80211_RADIOTAP_MCS was used
 
+ * IEEE80211_RADIOTAP_VHT
+
+   VHT rate for the transmission (only for devices without own rate control).
+   Also some flags are parsed
+
+   IEEE80211_TX_RC_SHORT_GI: use short guard interval
+   IEEE80211_TX_RC_40_MHZ_WIDTH: send in HT40 mode
+   IEEE80211_TX_RC_80_MHZ_WIDTH: send in HT80 mode
+   IEEE80211_TX_RC_160_MHZ_WIDTH: send in HT160 mode
+
 The injection code can also skip all other currently defined radiotap fields
 facilitating replay of captured radiotap headers directly.
 
diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c
index 7bb67fa..17db889 100644
--- a/net/mac80211/tx.c
+++ b/net/mac80211/tx.c
@@ -1692,6 +1692,8 @@ static bool ieee80211_parse_tx_radiotap(struct 
ieee80211_local *local,
u8 rate_retries = 0;
u16 rate_flags = 0;
u8 mcs_known, mcs_flags;
+   u16 vht_known;
+   u8 vht_mcs = 0, vht_nss = 0;
int i;
 
info->flags |= IEEE80211_TX_INTFL_DONT_ENCRYPT |
@@ -1772,6 +1774,32 @@ static bool ieee80211_parse_tx_radiotap(struct 
ieee80211_local *local,
rate_flags |= IEEE80211_TX_RC_40_MHZ_WIDTH;
break;
 
+   case IEEE80211_RADIOTAP_VHT:
+   vht_known = get_unaligned_le16(iterator.this_arg);
+   rate_found = true;
+
+   rate_flags = IEEE80211_TX_RC_VHT_MCS;
+   if ((vht_known & IEEE80211_RADIOTAP_VHT_KNOWN_GI) &&
+   (iterator.this_arg[2] &
+IEEE80211_RADIOTAP_VHT_FLAG_SGI))
+   rate_flags |= IEEE80211_TX_RC_SHORT_GI;
+   if (vht_known &
+   IEEE80211_RADIOTAP_VHT_KNOWN_BANDWIDTH) {
+   if (iterator.this_arg[3] == 1)
+   rate_flags |=
+   IEEE80211_TX_RC_40_MHZ_WIDTH;
+   else if (iterator.this_arg[3] == 4)
+   rate_flags |=
+   IEEE80211_TX_RC_80_MHZ_WIDTH;
+   else if (iterator.this_arg[3] == 11)
+   rate_flags |=
+   IEEE80211_TX_RC_160_MHZ_WIDTH;
+   }
+
+   vht_mcs = iterator.this_arg[4] >> 4;
+   vht_nss = iterator.this_arg[4] & 0xF;
+   break;
+
/*
 * Please update the file
 * Documentation/networking/mac80211-injection.txt
@@ -1797,6 +1825,9 @@ static bool ieee80211_parse_tx_radiotap(struct 
ieee80211_local *local,
 
if (rate_flags & IEEE80211_TX_RC_MCS) {
info->control.rates[0].idx = rate;
+   } else if (rate_flags & IEEE80211_TX_RC_VHT_MCS) {
+   ieee80211_rate_set_vht(info->control.rates, vht_mcs,
+  vht_nss);
} else {
for (i = 0; i < sband->n_bitrates; i++) {
if (rate * 5 != sband->bitrates[i].bitrate)
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC 1/2] cfg80211: add radiotap VHT info to rtap_namespace_sizes

2016-02-10 Thread Lorenzo Bianconi
Add IEEE80211_RADIOTAP_VHT entry to rtap_namespace_sizes array in order to
define alignment and size of VHT info in tx radiotap

Signed-off-by: Lorenzo Bianconi 
---
 net/wireless/radiotap.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/wireless/radiotap.c b/net/wireless/radiotap.c
index 722da61..6582d15 100644
--- a/net/wireless/radiotap.c
+++ b/net/wireless/radiotap.c
@@ -43,6 +43,7 @@ static const struct radiotap_align_size 
rtap_namespace_sizes[] = {
[IEEE80211_RADIOTAP_DATA_RETRIES] = { .align = 1, .size = 1, },
[IEEE80211_RADIOTAP_MCS] = { .align = 1, .size = 3, },
[IEEE80211_RADIOTAP_AMPDU_STATUS] = { .align = 4, .size = 8, },
+   [IEEE80211_RADIOTAP_VHT] = { .align = 2, .size = 12, },
/*
 * add more here as they are defined in radiotap.h
 */
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[RFC 0/2] add VHT radiotap parsing support to mac80211

2016-02-10 Thread Lorenzo Bianconi
Lorenzo Bianconi (2):
  cfg80211: add radiotap VHT info to rtap_namespace_sizes
  mac80211: parse VHT info in injected frames

 Documentation/networking/mac80211-injection.txt | 10 
 net/mac80211/tx.c   | 31 +
 net/wireless/radiotap.c |  1 +
 3 files changed, 42 insertions(+)

-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Business Partnership

2016-02-10 Thread EYADEMA
Hello,

I am Mr. LAURENT EYADEMA from Republic of Togo.please read the attached 
proposal.
Thanks in anticipation of your urgent response,


LAURENT EYADEMA

proposal.docx
Description: Binary data


[PATCH 3/3] mwifiex: Added missing spaces around brackets

2016-02-10 Thread Ujjal Roy
This patch fixes the missing spaces issue in coding style.

Signed-off-by: Ujjal Roy 
---
 drivers/net/wireless/marvell/mwifiex/usb.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c 
b/drivers/net/wireless/marvell/mwifiex/usb.c
index e43aff9..0510861 100644
--- a/drivers/net/wireless/marvell/mwifiex/usb.c
+++ b/drivers/net/wireless/marvell/mwifiex/usb.c
@@ -244,9 +244,9 @@ setup_for_next:
if (card->rx_cmd_ep == context->ep) {
mwifiex_usb_submit_rx_urb(context, size);
} else {
-   if (atomic_read(>rx_pending) <= HIGH_RX_PENDING){
+   if (atomic_read(>rx_pending) <= HIGH_RX_PENDING) {
mwifiex_usb_submit_rx_urb(context, size);
-   }else{
+   } else {
context->skb = NULL;
}
}
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 2/3] mwifiex: Removed extra spaces before commas

2016-02-10 Thread Ujjal Roy
This patch fixes spaces before commas issue in coding style.

Signed-off-by: Ujjal Roy 
---
 drivers/net/wireless/marvell/mwifiex/pcie.c| 2 +-
 drivers/net/wireless/marvell/mwifiex/uap_cmd.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c 
b/drivers/net/wireless/marvell/mwifiex/pcie.c
index 6d0dc40..4d29cce 100644
--- a/drivers/net/wireless/marvell/mwifiex/pcie.c
+++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
@@ -1408,7 +1408,7 @@ mwifiex_pcie_send_boot_cmd(struct mwifiex_adapter 
*adapter, struct sk_buff *skb)
return -1;
}

-   if (mwifiex_map_pci_memory(adapter, skb, skb->len , PCI_DMA_TODEVICE))
+   if (mwifiex_map_pci_memory(adapter, skb, skb->len, PCI_DMA_TODEVICE))
return -1;

buf_pa = MWIFIEX_SKB_DMA_ADDR(skb);
diff --git a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c 
b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
index e791166..16d95b2 100644
--- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
+++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
@@ -192,7 +192,7 @@ mwifiex_set_ht_params(struct mwifiex_private *priv,
}
priv->ap_11n_enabled = 1;
} else {
-   memset(_cfg->ht_cap , 0, sizeof(struct ieee80211_ht_cap));
+   memset(_cfg->ht_cap, 0, sizeof(struct ieee80211_ht_cap));
bss_cfg->ht_cap.cap_info = cpu_to_le16(MWIFIEX_DEF_HT_CAP);
bss_cfg->ht_cap.ampdu_params_info = MWIFIEX_DEF_AMPDU;
}
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH 1/3] mwifiex: Fixed incorrect indentation issue

2016-02-10 Thread Ujjal Roy
This patch fixes the incorrect indentation of the case label.

Signed-off-by: Ujjal Roy 
---
 drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c 
b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
index e7adef7..cb0cf03 100644
--- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
@@ -676,7 +676,7 @@ mwifiex_cfg80211_set_wiphy_params(struct wiphy *wiphy, u32 
changed)
}
break;

-   case MWIFIEX_BSS_ROLE_STA:
+   case MWIFIEX_BSS_ROLE_STA:
if (priv->media_connected) {
mwifiex_dbg(adapter, ERROR,
"cannot change wiphy params when 
connected");
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH V2 1/4] staging: wilc1000: fix return type of wilc_send_config_pkt

2016-02-10 Thread Chaehyun Lim
wilc_send_config_pkt is returned 0 or -ETIMEDOUT according to return
value of wilc_wlan_cfg_set or wilc_wlan_cfg_set.
It is better to use int type to represent linux standard error code.

Signed-off-by: Chaehyun Lim 
---
v2: rebase latest staging-testing

 drivers/staging/wilc1000/wilc_wlan.c | 5 +++--
 drivers/staging/wilc1000/wilc_wlan.h | 2 +-
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c 
b/drivers/staging/wilc1000/wilc_wlan.c
index 98b21d4..2bc2970 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1349,10 +1349,11 @@ int wilc_wlan_cfg_get_val(u32 wid, u8 *buffer, u32 
buffer_size)
return ret;
 }
 
-s32 wilc_send_config_pkt(struct wilc_vif *vif, u8 mode, struct wid *wids,
+int wilc_send_config_pkt(struct wilc_vif *vif, u8 mode, struct wid *wids,
 u32 count, u32 drv)
 {
-   s32 counter = 0, ret = 0;
+   s32 counter = 0;
+   int ret = 0;
 
if (mode == GET_CFG) {
for (counter = 0; counter < count; counter++) {
diff --git a/drivers/staging/wilc1000/wilc_wlan.h 
b/drivers/staging/wilc1000/wilc_wlan.h
index d362fa8..06d02ab 100644
--- a/drivers/staging/wilc1000/wilc_wlan.h
+++ b/drivers/staging/wilc1000/wilc_wlan.h
@@ -301,6 +301,6 @@ void host_sleep_notify(struct wilc *wilc);
 extern bool wilc_enable_ps;
 void chip_allow_sleep(struct wilc *wilc);
 void chip_wakeup(struct wilc *wilc);
-s32 wilc_send_config_pkt(struct wilc_vif *vif, u8 mode, struct wid *wids,
+int wilc_send_config_pkt(struct wilc_vif *vif, u8 mode, struct wid *wids,
 u32 count, u32 drv);
 #endif
-- 
2.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH V2 3/4] staging: wilc1000: remove initialization code of counter variable

2016-02-10 Thread Chaehyun Lim
There is no need to set to 0 for counter variable before entering next
for-loop statement because counter is initialized again in for-loop
statement, so just remove it.

Signed-off-by: Chaehyun Lim 
---
v2: rebase latest staging-testing

 drivers/staging/wilc1000/wilc_wlan.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c 
b/drivers/staging/wilc1000/wilc_wlan.c
index f3140e0..c6bfec3 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1365,7 +1365,6 @@ int wilc_send_config_pkt(struct wilc_vif *vif, u8 mode, 
struct wid *wids,
break;
}
}
-   counter = 0;
for (counter = 0; counter < count; counter++) {
wids[counter].size = wilc_wlan_cfg_get_val(
wids[counter].id,
-- 
2.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH V2 2/4] staging: wilc1000: use int type for counter variable

2016-02-10 Thread Chaehyun Lim
counter is used as for-loop control variable and indicating index of
struct wid array so that it is better to use int type.
There is no need to set to 0 when it is declared at the top of this
function. It is initialized as 0 in for-loop statement.

Signed-off-by: Chaehyun Lim 
---
v2: rebase latest staging-testing

 drivers/staging/wilc1000/wilc_wlan.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c 
b/drivers/staging/wilc1000/wilc_wlan.c
index 2bc2970..f3140e0 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1352,7 +1352,7 @@ int wilc_wlan_cfg_get_val(u32 wid, u8 *buffer, u32 
buffer_size)
 int wilc_send_config_pkt(struct wilc_vif *vif, u8 mode, struct wid *wids,
 u32 count, u32 drv)
 {
-   s32 counter = 0;
+   int counter;
int ret = 0;
 
if (mode == GET_CFG) {
-- 
2.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH V2 4/4] staging: wilc1000: rename counter in wilc_send_config_pkt

2016-02-10 Thread Chaehyun Lim
This patch renames the name of counter variable to i.
This change makes more readability because wilc_send_config_pkt has a
similar argument name as count.

Signed-off-by: Chaehyun Lim 
---
v2: rebase latest staging-testing

 drivers/staging/wilc1000/wilc_wlan.c | 31 +++
 1 file changed, 15 insertions(+), 16 deletions(-)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c 
b/drivers/staging/wilc1000/wilc_wlan.c
index c6bfec3..8712eda 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1352,32 +1352,31 @@ int wilc_wlan_cfg_get_val(u32 wid, u8 *buffer, u32 
buffer_size)
 int wilc_send_config_pkt(struct wilc_vif *vif, u8 mode, struct wid *wids,
 u32 count, u32 drv)
 {
-   int counter;
+   int i;
int ret = 0;
 
if (mode == GET_CFG) {
-   for (counter = 0; counter < count; counter++) {
-   if (!wilc_wlan_cfg_get(vif, !counter,
-  wids[counter].id,
-  (counter == count - 1),
+   for (i = 0; i < count; i++) {
+   if (!wilc_wlan_cfg_get(vif, !i,
+  wids[i].id,
+  (i == count - 1),
   drv)) {
ret = -ETIMEDOUT;
break;
}
}
-   for (counter = 0; counter < count; counter++) {
-   wids[counter].size = wilc_wlan_cfg_get_val(
-   wids[counter].id,
-   wids[counter].val,
-   wids[counter].size);
+   for (i = 0; i < count; i++) {
+   wids[i].size = wilc_wlan_cfg_get_val(wids[i].id,
+wids[i].val,
+wids[i].size);
}
} else if (mode == SET_CFG) {
-   for (counter = 0; counter < count; counter++) {
-   if (!wilc_wlan_cfg_set(vif, !counter,
-  wids[counter].id,
-  wids[counter].val,
-  wids[counter].size,
-  (counter == count - 1),
+   for (i = 0; i < count; i++) {
+   if (!wilc_wlan_cfg_set(vif, !i,
+  wids[i].id,
+  wids[i].val,
+  wids[i].size,
+  (i == count - 1),
   drv)) {
ret = -ETIMEDOUT;
break;
-- 
2.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] iwlwifi: fix erroneous return value

2016-02-10 Thread Grumbach, Emmanuel


On 02/10/2016 07:10 PM, Anton Protopopov wrote:
> The iwl_trans_pcie_start_fw() function may return the positive value EIO
> instead of -EIO in case of error.
>
> Signed-off-by: Anton Protopopov 
> ---
>  drivers/net/wireless/intel/iwlwifi/pcie/trans.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c 
> b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
> index d60a467..920ea9d 100644
> --- a/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
> +++ b/drivers/net/wireless/intel/iwlwifi/pcie/trans.c
> @@ -1034,7 +1034,7 @@ static int iwl_trans_pcie_start_fw(struct iwl_trans 
> *trans,
>   if (trans_pcie->is_down) {
>   IWL_WARN(trans,
>"Can't start_fw since the HW hasn't been started\n");
> - ret = EIO;
> + ret = -EIO;
>   goto out;
>   }
>  

applied - thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] nl80211: Zero out the connection keys memory when freeing them.

2016-02-10 Thread Julian Calaby
Hi Ola,

On Thu, Feb 11, 2016 at 11:00 AM, Ola Olsson  wrote:
> The connection keys are zeroed out in all other cases except this
> one. Let's fix the last one as well.
>
> Signed-off-by: Ola Olsson 

Makes sense to me.

Reviewed-by: Julian Calaby 

> ---
>  net/wireless/nl80211.c |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
> index 72de698..c1ef6ce 100644
> --- a/net/wireless/nl80211.c
> +++ b/net/wireless/nl80211.c
> @@ -7547,7 +7547,7 @@ static int nl80211_join_ibss(struct sk_buff *skb, 
> struct genl_info *info)
>
> if ((ibss.chandef.width != NL80211_CHAN_WIDTH_20_NOHT) &&
> no_ht) {
> -   kfree(connkeys);
> +   kzfree(connkeys);
> return -EINVAL;
> }
> }
> --
> 1.7.9.5
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Julian Calaby

Email: julian.cal...@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] nl80211: Zero out the connection keys memory when freeing them.

2016-02-10 Thread Ola Olsson
The connection keys are zeroed out in all other cases except this
one. Let's fix the last one as well.

Signed-off-by: Ola Olsson 
---
 net/wireless/nl80211.c |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 72de698..c1ef6ce 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -7547,7 +7547,7 @@ static int nl80211_join_ibss(struct sk_buff *skb, struct 
genl_info *info)
 
if ((ibss.chandef.width != NL80211_CHAN_WIDTH_20_NOHT) &&
no_ht) {
-   kfree(connkeys);
+   kzfree(connkeys);
return -EINVAL;
}
}
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mwifiex: Fixed coding style issues

2016-02-10 Thread Julian Calaby
Hi Ujjal,

You should probably split this up into patches for each style
violation you're fixing, i.e. one for the incorrect indentation of the
case label, one for the spaces before commas, and one for the missing
spaces around brackets.

On Thu, Feb 11, 2016 at 1:04 AM, Ujjal Roy  wrote:
> Some indentation and basic style violations are fixed in this patch.
>
> Signed-off-by: Ujjal Roy 

Either way, this looks sane to me,

Reviewed-by: Julian Calaby 

> ---
>  drivers/net/wireless/marvell/mwifiex/cfg80211.c | 2 +-
>  drivers/net/wireless/marvell/mwifiex/pcie.c | 2 +-
>  drivers/net/wireless/marvell/mwifiex/uap_cmd.c  | 2 +-
>  drivers/net/wireless/marvell/mwifiex/usb.c  | 4 ++--
>  4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/wireless/marvell/mwifiex/cfg80211.c 
> b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> index e7adef7..cb0cf03 100644
> --- a/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> +++ b/drivers/net/wireless/marvell/mwifiex/cfg80211.c
> @@ -676,7 +676,7 @@ mwifiex_cfg80211_set_wiphy_params(struct wiphy *wiphy, 
> u32 changed)
> }
> break;
>
> -   case MWIFIEX_BSS_ROLE_STA:
> +   case MWIFIEX_BSS_ROLE_STA:
> if (priv->media_connected) {
> mwifiex_dbg(adapter, ERROR,
> "cannot change wiphy params when 
> connected");
> diff --git a/drivers/net/wireless/marvell/mwifiex/pcie.c 
> b/drivers/net/wireless/marvell/mwifiex/pcie.c
> index 6d0dc40..4d29cce 100644
> --- a/drivers/net/wireless/marvell/mwifiex/pcie.c
> +++ b/drivers/net/wireless/marvell/mwifiex/pcie.c
> @@ -1408,7 +1408,7 @@ mwifiex_pcie_send_boot_cmd(struct mwifiex_adapter 
> *adapter, struct sk_buff *skb)
> return -1;
> }
>
> -   if (mwifiex_map_pci_memory(adapter, skb, skb->len , PCI_DMA_TODEVICE))
> +   if (mwifiex_map_pci_memory(adapter, skb, skb->len, PCI_DMA_TODEVICE))
> return -1;
>
> buf_pa = MWIFIEX_SKB_DMA_ADDR(skb);
> diff --git a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c 
> b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
> index e791166..16d95b2 100644
> --- a/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
> +++ b/drivers/net/wireless/marvell/mwifiex/uap_cmd.c
> @@ -192,7 +192,7 @@ mwifiex_set_ht_params(struct mwifiex_private *priv,
> }
> priv->ap_11n_enabled = 1;
> } else {
> -   memset(_cfg->ht_cap , 0, sizeof(struct ieee80211_ht_cap));
> +   memset(_cfg->ht_cap, 0, sizeof(struct ieee80211_ht_cap));
> bss_cfg->ht_cap.cap_info = cpu_to_le16(MWIFIEX_DEF_HT_CAP);
> bss_cfg->ht_cap.ampdu_params_info = MWIFIEX_DEF_AMPDU;
> }
> diff --git a/drivers/net/wireless/marvell/mwifiex/usb.c 
> b/drivers/net/wireless/marvell/mwifiex/usb.c
> index e43aff9..0510861 100644
> --- a/drivers/net/wireless/marvell/mwifiex/usb.c
> +++ b/drivers/net/wireless/marvell/mwifiex/usb.c
> @@ -244,9 +244,9 @@ setup_for_next:
> if (card->rx_cmd_ep == context->ep) {
> mwifiex_usb_submit_rx_urb(context, size);
> } else {
> -   if (atomic_read(>rx_pending) <= HIGH_RX_PENDING){
> +   if (atomic_read(>rx_pending) <= HIGH_RX_PENDING) {
> mwifiex_usb_submit_rx_urb(context, size);
> -   }else{
> +   } else {
> context->skb = NULL;
> }
> }
> --
> 1.9.1
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html



-- 
Julian Calaby

Email: julian.cal...@gmail.com
Profile: http://www.google.com/profiles/julian.calaby/
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Business Partnership

2016-02-10 Thread EYADEMA
Hello,

I am Mr. LAURENT EYADEMA from Republic of Togo.please read the attached 
proposal.
Thanks in anticipation of your urgent response,


LAURENT EYADEMA

proposal.docx
Description: Binary data