[PATCH] mac80211: Recalc min chandef when station is associated

2015-12-13 Thread Emmanuel Grumbach
From: Ilan Peer 

The minimum chandef bandwidth calculation was done only in case
a new station was inserted (or when an existing station was removed).
However, it is possible that stations are inserted before they are
associated, e.g., when FULL_AP_CLIENT_STATE is supported and user
space adds stations unassociated.

Fix this by calling ieee80211_recalc_min_chandef() whenever
a station transitions in/out the associated state, and only
consider station marked as associated.

Signed-off-by: Ilan Peer 
Signed-off-by: Emmanuel Grumbach 
---
 net/mac80211/chan.c | 2 +-
 net/mac80211/sta_info.c | 9 +
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/net/mac80211/chan.c b/net/mac80211/chan.c
index 1d1b9b7..2839811 100644
--- a/net/mac80211/chan.c
+++ b/net/mac80211/chan.c
@@ -231,7 +231,7 @@ ieee80211_get_max_required_bw(struct ieee80211_sub_if_data 
*sdata)
!(sta->sdata->bss && sta->sdata->bss == sdata->bss))
continue;
 
-   if (!sta->uploaded)
+   if (!sta->uploaded || !test_sta_flag(sta, WLAN_STA_ASSOC))
continue;
 
max_bw = max(max_bw, ieee80211_get_sta_bw(>sta));
diff --git a/net/mac80211/sta_info.c b/net/mac80211/sta_info.c
index 4402ad5..7e007cf 100644
--- a/net/mac80211/sta_info.c
+++ b/net/mac80211/sta_info.c
@@ -530,7 +530,6 @@ static int sta_info_insert_finish(struct sta_info *sta) 
__acquires(RCU)
/* accept BA sessions now */
clear_sta_flag(sta, WLAN_STA_BLOCK_BA);
 
-   ieee80211_recalc_min_chandef(sdata);
ieee80211_sta_debugfs_add(sta);
rate_control_add_sta_debugfs(sta);
 
@@ -941,7 +940,6 @@ static void __sta_info_destroy_part2(struct sta_info *sta)
 
rate_control_remove_sta_debugfs(sta);
ieee80211_sta_debugfs_remove(sta);
-   ieee80211_recalc_min_chandef(sdata);
 
cleanup_single_sta(sta);
 }
@@ -1808,14 +1806,17 @@ int sta_info_move_state(struct sta_info *sta,
clear_bit(WLAN_STA_AUTH, >_flags);
break;
case IEEE80211_STA_AUTH:
-   if (sta->sta_state == IEEE80211_STA_NONE)
+   if (sta->sta_state == IEEE80211_STA_NONE) {
set_bit(WLAN_STA_AUTH, >_flags);
-   else if (sta->sta_state == IEEE80211_STA_ASSOC)
+   } else if (sta->sta_state == IEEE80211_STA_ASSOC) {
clear_bit(WLAN_STA_ASSOC, >_flags);
+   ieee80211_recalc_min_chandef(sta->sdata);
+   }
break;
case IEEE80211_STA_ASSOC:
if (sta->sta_state == IEEE80211_STA_AUTH) {
set_bit(WLAN_STA_ASSOC, >_flags);
+   ieee80211_recalc_min_chandef(sta->sdata);
} else if (sta->sta_state == IEEE80211_STA_AUTHORIZED) {
if (sta->sdata->vif.type == NL80211_IFTYPE_AP ||
(sta->sdata->vif.type == NL80211_IFTYPE_AP_VLAN &&
-- 
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


[PATCH v2] mac80211: limit the A-MSDU Tx based on peer's capabilities

2015-12-13 Thread Emmanuel Grumbach
In VHT, the specification allows to limit the number of
MSDUs in an A-MSDU in the Extended Capabilities IE. There
is also a limitation on the byte size in the VHT IE.
In HT, the only limitation is on the byte size.
Parse the capabilities from the peer and make them
available to the driver.

In HT, there is another limitation when a BA agreement
is active: the byte size can't be greater than 4095.
This is not enforced here.

Signed-off-by: Emmanuel Grumbach 
---
v2: remove uneeded semicolon
---
 include/linux/ieee80211.h | 19 +++
 include/net/mac80211.h| 14 ++
 net/mac80211/cfg.c| 29 +
 net/mac80211/ht.c |  5 +
 net/mac80211/vht.c| 18 ++
 5 files changed, 85 insertions(+)

diff --git a/include/linux/ieee80211.h b/include/linux/ieee80211.h
index d9ddb89..3b1f6ce 100644
--- a/include/linux/ieee80211.h
+++ b/include/linux/ieee80211.h
@@ -163,6 +163,14 @@ static inline u16 ieee80211_sn_sub(u16 sn1, u16 sn2)
 /* 30 byte 4 addr hdr, 2 byte QoS, 2304 byte MSDU, 12 byte crypt, 4 byte FCS */
 #define IEEE80211_MAX_FRAME_LEN2352
 
+/* Maximal size of an A-MSDU */
+#define IEEE80211_MAX_MPDU_LEN_HT_3839 3839
+#define IEEE80211_MAX_MPDU_LEN_HT_7935 7935
+
+#define IEEE80211_MAX_MPDU_LEN_VHT_38953895
+#define IEEE80211_MAX_MPDU_LEN_VHT_79917991
+#define IEEE80211_MAX_MPDU_LEN_VHT_11454   11454
+
 #define IEEE80211_MAX_SSID_LEN 32
 
 #define IEEE80211_MAX_MESH_ID_LEN  32
@@ -1505,6 +1513,7 @@ struct ieee80211_vht_operation {
 #define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_3895 0x
 #define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_7991 0x0001
 #define IEEE80211_VHT_CAP_MAX_MPDU_LENGTH_11454
0x0002
+#define IEEE80211_VHT_CAP_MAX_MPDU_MASK
0x0003
 #define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160MHZ   0x0004
 #define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_160_80PLUS80MHZ  0x0008
 #define IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK 0x000C
@@ -2086,6 +2095,16 @@ enum ieee80211_tdls_actioncode {
 #define WLAN_EXT_CAPA8_TDLS_WIDE_BW_ENABLEDBIT(5)
 #define WLAN_EXT_CAPA8_OPMODE_NOTIFBIT(6)
 
+/* Defines the maximal number of MSDUs in an A-MSDU. */
+#define WLAN_EXT_CAPA8_MAX_MSDU_IN_AMSDU_LSB   BIT(7)
+#define WLAN_EXT_CAPA9_MAX_MSDU_IN_AMSDU_MSB   BIT(0)
+
+/*
+ * Fine Timing Measurement Initiator - bit 71 of @WLAN_EID_EXT_CAPABILITY
+ * information element
+ */
+#define WLAN_EXT_CAPA9_FTM_INITIATOR   BIT(7)
+
 /* TDLS specific payload type in the LLC/SNAP header */
 #define WLAN_TDLS_SNAP_RFTYPE  0x2
 
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index ee6305a..916c29c 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -1703,6 +1703,18 @@ struct ieee80211_sta_rates {
  * @tdls_initiator: indicates the STA is an initiator of the TDLS link. Only
  * valid if the STA is a TDLS peer in the first place.
  * @mfp: indicates whether the STA uses management frame protection or not.
+ * @max_amsdu_subframes: indicates the maximal number of MSDUs in a single
+ * A-MSDU. Taken from the Extended Capabilities element. 0 means
+ * unlimited.
+ * @max_amsdu_len: indicates the maximal length of an A-MSDU in bytes. This
+ * field is always valid for packets with a VHT preamble. For packets
+ * with a HT preamble, additional limits apply:
+ * + If the skb is transmitted as part of a BA agreement, the
+ *   A-MSDU maximal size is min(max_amsdu_len, 4065) bytes.
+ * + If the skb is not part of a BA aggreement, the A-MSDU maximal
+ *   size is min(max_amsdu_len, 7935) bytes.
+ * Both additional HT limits must be enforced by the low level driver.
+ * This is defined by the spec (IEEE 802.11-2012 section 8.3.2.2 NOTE 2).
  * @txq: per-TID data TX queues (if driver uses the TXQ abstraction)
  */
 struct ieee80211_sta {
@@ -1721,6 +1733,8 @@ struct ieee80211_sta {
bool tdls;
bool tdls_initiator;
bool mfp;
+   u8 max_amsdu_subframes;
+   u16 max_amsdu_len;
 
struct ieee80211_txq *txq[IEEE80211_NUM_TIDS];
 
diff --git a/net/mac80211/cfg.c b/net/mac80211/cfg.c
index 166a29f..66d22de 100644
--- a/net/mac80211/cfg.c
+++ b/net/mac80211/cfg.c
@@ -1131,6 +1131,34 @@ static int sta_apply_parameters(struct ieee80211_local 
*local,
sta->sta.max_sp = params->max_sp;
}
 
+   /* The sender might not have sent the last bit, consider it to be 0 */
+   if (params->ext_capab_len >= 8) {
+   u8 val = (params->ext_capab[7] &
+ WLAN_EXT_CAPA8_MAX_MSDU_IN_AMSDU_LSB) >> 7;
+
+   /* we did get all the bits, take the MSB as well */
+   if (params->ext_capab_len >= 9) {
+   u8 

Re: [PATCH 1/2] mac80211: pass block ack session timeout to to driver

2015-12-13 Thread Emmanuel Grumbach
On Tue, Dec 8, 2015 at 7:09 PM, Emmanuel Grumbach
 wrote:
> From: Sara Sharon 
>
> Currently mac80211 does not inform the driver of the session
> block ack timeout when starting a rx aggregation session.
> Drivers that manage the reorder buffer need to know this
> parameter.
> Seeing that there are now too many arguments for the
> drv_ampdu_action() function, wrap them inside a structure.
>
> Signed-off-by: Sara Sharon 
> Signed-off-by: Emmanuel Grumbach 
> ---

Obviously we forgot to update the other drivers. Please drop this
series. Sara will re-send with the fix for the other drivers.
--
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: iwlwifi - L1 Enabled - LTR Enabled loop

2015-12-13 Thread Arend van Spriel

On 12/12/2015 12:32 AM, Johannes Berg wrote:

On Fri, 2015-12-11 at 15:17 -0800, Luis R. Rodriguez wrote:


I just tried a base config from opensuse, then localmodconfig, then
'make xenconfig' (which I need) and that worked. I can't debug
further but I think this config might help debug this further:

http://drvbp1.linux-foundation.org/~mcgrof/tmp/config-iwl-fail.txt

So -- my new config works, but I have no idea what fixed it, a config
option obviously. Not sure what though.



Can you post the good one too?


I had the same issue occasionally when coming out of suspend. Running 
4.1 vanilla kernel with 3160 device. The issue also occurred more often 
with particular ucode version. Running iwlwifi-3160-10.ucode now and 
have not seen the issue pop up since.


Gr. AvS

--
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: iwlwifi - L1 Enabled - LTR Enabled loop

2015-12-13 Thread Grumbach, Emmanuel


On 12/14/2015 01:04 AM, Arend van Spriel wrote:
> On 12/12/2015 12:32 AM, Johannes Berg wrote:
>> On Fri, 2015-12-11 at 15:17 -0800, Luis R. Rodriguez wrote:
>>> I just tried a base config from opensuse, then localmodconfig, then
>>> 'make xenconfig' (which I need) and that worked. I can't debug
>>> further but I think this config might help debug this further:
>>>
>>> http://drvbp1.linux-foundation.org/~mcgrof/tmp/config-iwl-fail.txt
>>>
>>> So -- my new config works, but I have no idea what fixed it, a config
>>> option obviously. Not sure what though.
>>>
>> Can you post the good one too?
> I had the same issue occasionally when coming out of suspend. Running 
> 4.1 vanilla kernel with 3160 device. The issue also occurred more often 
> with particular ucode version. Running iwlwifi-3160-10.ucode now and 
> have not seen the issue pop up since.

This is really weird. I don't see how that could be firmware related.
BTW, -10.ucode is fairly old :) we have -16.ucode out there.
>
> Gr. AvS
>
>

--
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 07/12] staging: wilc1000: change join_req_drv type and it's name

2015-12-13 Thread Glen Lee
To use wilc_get_vif_idx instead of the last get_id_from_handler, join_req_drv
needs to be changed it's type with wilc_vif and name as well.
As a result, get_id_from_handler is not used anymore, so remove it.

Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 33 +--
 1 file changed, 9 insertions(+), 24 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 840253b..76e891c 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -259,7 +259,7 @@ static u8 mode_11i;
 static u8 auth_type;
 static u32 join_req_size;
 static u32 info_element_size;
-static struct host_if_drv *join_req_drv;
+static struct wilc_vif *join_req_vif;
 #define REAL_JOIN_REQ 0
 #define FLUSHED_JOIN_REQ 1
 #define FLUSHED_BYTE_POS 79
@@ -294,21 +294,6 @@ static int remove_handler_in_list(struct host_if_drv 
*handler)
return -EINVAL;
 }
 
-static int get_id_from_handler(struct host_if_drv *handler)
-{
-   int i;
-
-   if (!handler)
-   return 0;
-
-   for (i = 1; i < ARRAY_SIZE(wfidrv_list); i++) {
-   if (wfidrv_list[i] == handler)
-   return i;
-   }
-
-   return 0;
-}
-
 /* The u8IfIdx starts from 0 to NUM_CONCURRENT_IFC -1, but 0 index used as
  * special purpose in wilc device, so we add 1 to the index to starts from 1.
  * As a result, the returned index will be 1 to NUM_CONCURRENT_IFC.
@@ -1235,7 +1220,7 @@ static s32 Handle_Connect(struct wilc_vif *vif,
 
if (memcmp("DIRECT-", pstrHostIFconnectAttr->ssid, 7)) {
memcpy(join_req, pu8CurrByte, join_req_size);
-   join_req_drv = hif_drv;
+   join_req_vif = vif;
}
 
PRINT_D(GENERIC_DBG, "send HOST_IF_WAITING_CONN_RESP\n");
@@ -1349,7 +1334,7 @@ static s32 Handle_FlushConnect(struct wilc_vif *vif)
 
result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, strWIDList,
  u32WidsCount,
- get_id_from_handler(join_req_drv));
+ wilc_get_vif_idx(join_req_vif));
if (result) {
PRINT_ER("failed to send config packet\n");
result = -EINVAL;
@@ -1423,12 +1408,12 @@ static s32 Handle_ConnectTimeout(struct wilc_vif *vif)
 
eth_zero_addr(wilc_connected_ssid);
 
-   if (join_req && join_req_drv == hif_drv) {
+   if (join_req && join_req_vif == vif) {
kfree(join_req);
join_req = NULL;
}
 
-   if (info_element && join_req_drv == hif_drv) {
+   if (info_element && join_req_vif == vif) {
kfree(info_element);
info_element = NULL;
}
@@ -1715,12 +1700,12 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif 
*vif,
hif_drv->usr_conn_req.ies_len = 0;
kfree(hif_drv->usr_conn_req.ies);
 
-   if (join_req && join_req_drv == hif_drv) {
+   if (join_req && join_req_vif == vif) {
kfree(join_req);
join_req = NULL;
}
 
-   if (info_element && join_req_drv == hif_drv) {
+   if (info_element && join_req_vif == vif) {
kfree(info_element);
info_element = NULL;
}
@@ -2089,12 +2074,12 @@ static void Handle_Disconnect(struct wilc_vif *vif)
hif_drv->usr_conn_req.ies_len = 0;
kfree(hif_drv->usr_conn_req.ies);
 
-   if (join_req && join_req_drv == hif_drv) {
+   if (join_req && join_req_vif == vif) {
kfree(join_req);
join_req = NULL;
}
 
-   if (info_element && join_req_drv == hif_drv) {
+   if (info_element && join_req_vif == vif) {
kfree(info_element);
info_element = 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 09/12] staging: wilc1000: remove drv of struct host_if_msg

2015-12-13 Thread Glen Lee
This patch remove drv of struct host_if msg and it's related codes.

Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 50 ++-
 1 file changed, 3 insertions(+), 47 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 5bf2a47..39e93fa 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -193,7 +193,6 @@ union message_body {
 struct host_if_msg {
u16 id;
union message_body body;
-   struct host_if_drv *drv;
struct wilc_vif *vif;
 };
 
@@ -2787,7 +2786,6 @@ static int hostIFthread(void *pvArg)
 {
u32 u32Ret;
struct host_if_msg msg;
-   struct host_if_drv *hif_drv;
struct wilc *wilc = (struct wilc*)pvArg;
struct wilc_vif *vif;
 
@@ -2795,7 +2793,6 @@ static int hostIFthread(void *pvArg)
 
while (1) {
wilc_mq_recv(_msg_q, , sizeof(struct host_if_msg), 
);
-   hif_drv = (struct host_if_drv *)msg.drv;
vif = msg.vif;
if (msg.id == HOST_IF_MSG_EXIT) {
PRINT_D(GENERIC_DBG, "THREAD: Exiting HostIfThread\n");
@@ -2810,7 +2807,7 @@ static int hostIFthread(void *pvArg)
}
 
if (msg.id == HOST_IF_MSG_CONNECT &&
-   hif_drv->usr_scan_req.scan_result) {
+   vif->hif_drv->usr_scan_req.scan_result) {
PRINT_D(HOSTINF_DBG, "Requeue connect request till scan 
done received\n");
wilc_mq_send(_msg_q, , sizeof(struct 
host_if_msg));
usleep_range(2 * 1000, 2 * 1000);
@@ -2860,7 +2857,7 @@ static int hostIFthread(void *pvArg)
break;
 
case HOST_IF_MSG_RCVD_SCAN_COMPLETE:
-   del_timer(_drv->scan_timer);
+   del_timer(>hif_drv->scan_timer);
PRINT_D(HOSTINF_DBG, "scan completed successfully\n");
 
if (!wilc_wlan_get_num_conn_ifcs(wilc))
@@ -2868,7 +2865,7 @@ static int hostIFthread(void *pvArg)
 
Handle_ScanDone(msg.vif, SCAN_EVENT_DONE);
 
-   if (hif_drv->remain_on_ch_pending)
+   if (vif->hif_drv->remain_on_ch_pending)
Handle_RemainOnChan(msg.vif,
_on_ch);
 
@@ -3052,7 +3049,6 @@ int wilc_remove_wep_key(struct wilc_vif *vif, u8 index)
msg.id = HOST_IF_MSG_KEY;
msg.body.key_info.type = WEP;
msg.body.key_info.action = REMOVEKEY;
-   msg.drv = hif_drv;
msg.vif = vif;
msg.body.key_info.attr.wep.index = index;
 
@@ -3081,7 +3077,6 @@ int wilc_set_wep_default_keyid(struct wilc_vif *vif, u8 
index)
msg.id = HOST_IF_MSG_KEY;
msg.body.key_info.type = WEP;
msg.body.key_info.action = DEFAULTKEY;
-   msg.drv = hif_drv;
msg.vif = vif;
msg.body.key_info.attr.wep.index = index;
 
@@ -3110,7 +3105,6 @@ int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, const 
u8 *key, u8 len,
msg.id = HOST_IF_MSG_KEY;
msg.body.key_info.type = WEP;
msg.body.key_info.action = ADDKEY;
-   msg.drv = hif_drv;
msg.vif = vif;
msg.body.key_info.attr.wep.key = kmemdup(key, len, GFP_KERNEL);
if (!msg.body.key_info.attr.wep.key)
@@ -3149,7 +3143,6 @@ int wilc_add_wep_key_bss_ap(struct wilc_vif *vif, const 
u8 *key, u8 len,
msg.id = HOST_IF_MSG_KEY;
msg.body.key_info.type = WEP;
msg.body.key_info.action = ADDKEY_AP;
-   msg.drv = hif_drv;
msg.vif = vif;
msg.body.key_info.attr.wep.key = kmemdup(key, len, GFP_KERNEL);
if (!msg.body.key_info.attr.wep.key)
@@ -3222,7 +3215,6 @@ s32 wilc_add_ptk(struct wilc_vif *vif, const u8 *pu8Ptk, 
u8 u8PtkKeylen,
msg.body.key_info.attr.wpa.key_len = u8KeyLen;
msg.body.key_info.attr.wpa.mac_addr = mac_addr;
msg.body.key_info.attr.wpa.mode = u8Ciphermode;
-   msg.drv = hif_drv;
msg.vif = vif;
 
result = wilc_mq_send(_msg_q, , sizeof(struct host_if_msg));
@@ -3264,7 +3256,6 @@ s32 wilc_add_rx_gtk(struct wilc_vif *vif, const u8 
*pu8RxGtk, u8 u8GtkKeylen,
 
msg.id = HOST_IF_MSG_KEY;
msg.body.key_info.type = WPA_RX_GTK;
-   msg.drv = hif_drv;
msg.vif = vif;
 
if (mode == AP_MODE) {
@@ -3316,7 +3307,6 @@ s32 wilc_set_pmkid_info(struct wilc_vif *vif,
msg.id = HOST_IF_MSG_KEY;
msg.body.key_info.type = PMKSA;
msg.body.key_info.action = ADDKEY;
-   msg.drv = hif_drv;
msg.vif = vif;
 
for (i = 0; i < pu8PmkidInfoArray->numpmkid; i++) {
@@ -3337,13 +3327,11 @@ s32 wilc_get_mac_address(struct wilc_vif *vif, u8 
*pu8MacAddress)
 {
s32 result = 0;
struct host_if_msg msg;
-   struct 

[PATCH 06/12] staging: wilc1000: wilc_set_wfi_drv_handler: pass vif index

2015-12-13 Thread Glen Lee
Pass index of vif instead of hif_drv. wilc_get_vif_idx is used to get correct
index of vif.
In the handler function handle_set_wfi_drv_handler, use vif instead of hif_drv,
and use hif_drv_handler->handler instead of hif_drv when deinitialize wilc
device.

Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 14 ++
 drivers/staging/wilc1000/host_interface.h |  3 ++-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 12 +++-
 3 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 0893331..840253b 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -313,7 +313,7 @@ static int get_id_from_handler(struct host_if_drv *handler)
  * special purpose in wilc device, so we add 1 to the index to starts from 1.
  * As a result, the returned index will be 1 to NUM_CONCURRENT_IFC.
  */
-static int wilc_get_vif_idx(struct wilc_vif *vif)
+int wilc_get_vif_idx(struct wilc_vif *vif)
 {
return vif->u8IfIdx + 1;
 }
@@ -363,17 +363,16 @@ static s32 handle_set_wfi_drv_handler(struct wilc_vif 
*vif,
 {
s32 result = 0;
struct wid wid;
-   struct host_if_drv *hif_drv = vif->hif_drv;
 
wid.id = (u16)WID_SET_DRV_HANDLER;
wid.type = WID_INT;
wid.val = (s8 *)_drv_handler->handler;
wid.size = sizeof(u32);
 
-   result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, , 1,
+   result = wilc_send_config_pkt(vif->wilc, SET_CFG, , 1,
  hif_drv_handler->handler);
 
-   if (!hif_drv)
+   if (!hif_drv_handler->handler)
up(_sema_driver);
 
if (result) {
@@ -3631,15 +3630,14 @@ int wilc_wait_msg_queue_idle(void)
return result;
 }
 
-int wilc_set_wfi_drv_handler(struct wilc_vif *vif, struct host_if_drv *hif_drv)
+int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index)
 {
int result = 0;
struct host_if_msg msg;
 
memset(, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_SET_WFIDRV_HANDLER;
-   msg.body.drv.handler = get_id_from_handler(hif_drv);
-   msg.drv = hif_drv;
+   msg.body.drv.handler = index;
msg.vif = vif;
 
result = wilc_mq_send(_msg_q, , sizeof(struct host_if_msg));
@@ -3994,7 +3992,7 @@ s32 wilc_deinit(struct wilc_vif *vif)
 
del_timer_sync(_drv->remain_on_ch_timer);
 
-   wilc_set_wfi_drv_handler(vif, NULL);
+   wilc_set_wfi_drv_handler(vif, 0);
down(_sema_driver);
 
if (hif_drv->usr_scan_req.scan_result) {
diff --git a/drivers/staging/wilc1000/host_interface.h 
b/drivers/staging/wilc1000/host_interface.h
index 9716bc8..8922f29 100644
--- a/drivers/staging/wilc1000/host_interface.h
+++ b/drivers/staging/wilc1000/host_interface.h
@@ -367,13 +367,14 @@ s32 wilc_remain_on_channel(struct wilc_vif *vif, u32 
u32SessionID,
   void *pvUserArg);
 s32 wilc_listen_state_expired(struct wilc_vif *vif, u32 u32SessionID);
 s32 wilc_frame_register(struct wilc_vif *vif, u16 u16FrameType, bool bReg);
-int wilc_set_wfi_drv_handler(struct wilc_vif *vif, struct host_if_drv 
*hif_drv);
+int wilc_set_wfi_drv_handler(struct wilc_vif *vif, int index);
 int wilc_set_operation_mode(struct wilc_vif *vif, u32 mode);
 
 void wilc_free_join_params(void *pJoinParams);
 
 s32 wilc_get_statistics(struct wilc_vif *vif, struct rf_info *pstrStatistics);
 void wilc_resolve_disconnect_aberration(struct wilc_vif *vif);
+int wilc_get_vif_idx(struct wilc_vif *vif);
 
 extern bool wilc_optaining_ip;
 extern u8 wilc_connected_ssid[6];
diff --git a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c 
b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
index da4c4ad..53fb2d4 100644
--- a/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
+++ b/drivers/staging/wilc1000/wilc_wfi_cfgoperations.c
@@ -628,7 +628,7 @@ static int scan(struct wiphy *wiphy, struct 
cfg80211_scan_request *request)
 
priv->u32RcvdChCount = 0;
 
-   wilc_set_wfi_drv_handler(vif, priv->hWILCWFIDrv);
+   wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif));
reset_shadow_found();
 
priv->bCfgScanning = true;
@@ -709,7 +709,7 @@ static int connect(struct wiphy *wiphy, struct net_device 
*dev,
vif = netdev_priv(priv->dev);
pstrWFIDrv = (struct host_if_drv *)(priv->hWILCWFIDrv);
 
-   wilc_set_wfi_drv_handler(vif, priv->hWILCWFIDrv);
+   wilc_set_wfi_drv_handler(vif, wilc_get_vif_idx(vif));
 
PRINT_D(CFG80211_DBG, "Connecting to SSID [%s] on netdev [%p] host if 
[%p]\n", sme->ssid, dev, priv->hWILCWFIDrv);
if (!(strncmp(sme->ssid, "DIRECT-", 7))) {
@@ -2142,7 +2142,8 @@ static int change_virtual_intf(struct wiphy *wiphy, 
struct net_device *dev,
wilc_initialized = 1;
vif->iftype = interface_type;
 
- 

[PATCH 03/12] staging: wilc1000: take vif instead of drv in hostIFthread

2015-12-13 Thread Glen Lee
In the first patch, we sent vif to hostIFthread. we can use vif instead of
drv in the all functions which handle the commands from cfg operations.
Change first argument host_if_drv with wilc_vif and use hif_drv of wilc_vif.
Pass vif to the functions as well.
In case of timer callback functions, set vif to the data and use vif instead
of hif_drv.
Lastly, initialize u32RcvdAssocRespInfoLen since changing hif_drv with vif
causes one uninitialied build warning.
Now we have vif that currently being used so we can use interface index of
wilc_vif to send to wilc device.

Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 238 +-
 1 file changed, 135 insertions(+), 103 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index d4bcf39..e8c14cc 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -316,11 +316,12 @@ static struct host_if_drv *get_handler_from_id(int id)
return wfidrv_list[id];
 }
 
-static s32 handle_set_channel(struct host_if_drv *hif_drv,
+static s32 handle_set_channel(struct wilc_vif *vif,
  struct channel_attr *hif_set_ch)
 {
s32 result = 0;
struct wid wid;
+   struct host_if_drv *hif_drv = vif->hif_drv;
 
wid.id = (u16)WID_CURRENT_CHANNEL;
wid.type = WID_CHAR;
@@ -340,11 +341,12 @@ static s32 handle_set_channel(struct host_if_drv *hif_drv,
return result;
 }
 
-static s32 handle_set_wfi_drv_handler(struct host_if_drv *hif_drv,
+static s32 handle_set_wfi_drv_handler(struct wilc_vif *vif,
  struct drv_handler *hif_drv_handler)
 {
s32 result = 0;
struct wid wid;
+   struct host_if_drv *hif_drv = vif->hif_drv;
 
wid.id = (u16)WID_SET_DRV_HANDLER;
wid.type = WID_INT;
@@ -365,11 +367,12 @@ static s32 handle_set_wfi_drv_handler(struct host_if_drv 
*hif_drv,
return result;
 }
 
-static s32 handle_set_operation_mode(struct host_if_drv *hif_drv,
+static s32 handle_set_operation_mode(struct wilc_vif *vif,
 struct op_mode *hif_op_mode)
 {
s32 result = 0;
struct wid wid;
+   struct host_if_drv *hif_drv = vif->hif_drv;
 
wid.id = (u16)WID_SET_OPERATION_MODE;
wid.type = WID_INT;
@@ -394,13 +397,12 @@ static s32 host_int_get_ipaddress(struct wilc_vif *vif,
  struct host_if_drv *hif_drv,
  u8 *u16ipadd, u8 idx);
 
-static s32 handle_set_ip_address(struct wilc_vif *vif,
-struct host_if_drv *hif_drv, u8 *ip_addr,
-u8 idx)
+static s32 handle_set_ip_address(struct wilc_vif *vif, u8 *ip_addr, u8 idx)
 {
s32 result = 0;
struct wid wid;
char firmware_ip_addr[4] = {0};
+   struct host_if_drv *hif_drv = vif->hif_drv;
 
if (ip_addr[0] < 192)
ip_addr[0] = 0;
@@ -430,11 +432,11 @@ static s32 handle_set_ip_address(struct wilc_vif *vif,
return result;
 }
 
-static s32 handle_get_ip_address(struct wilc_vif *vif,
-struct host_if_drv *hif_drv, u8 idx)
+static s32 handle_get_ip_address(struct wilc_vif *vif, u8 idx)
 {
s32 result = 0;
struct wid wid;
+   struct host_if_drv *hif_drv = vif->hif_drv;
 
wid.id = (u16)WID_IP_ADDRESS;
wid.type = WID_STR;
@@ -465,11 +467,12 @@ static s32 handle_get_ip_address(struct wilc_vif *vif,
return result;
 }
 
-static s32 handle_set_mac_address(struct host_if_drv *hif_drv,
+static s32 handle_set_mac_address(struct wilc_vif *vif,
  struct set_mac_addr *set_mac_addr)
 {
s32 result = 0;
struct wid wid;
+   struct host_if_drv *hif_drv = vif->hif_drv;
u8 *mac_buf = kmalloc(ETH_ALEN, GFP_KERNEL);
 
if (!mac_buf) {
@@ -495,11 +498,12 @@ static s32 handle_set_mac_address(struct host_if_drv 
*hif_drv,
return result;
 }
 
-static s32 handle_get_mac_address(struct host_if_drv *hif_drv,
+static s32 handle_get_mac_address(struct wilc_vif *vif,
  struct get_mac_addr *get_mac_addr)
 {
s32 result = 0;
struct wid wid;
+   struct host_if_drv *hif_drv = vif->hif_drv;
 
wid.id = (u16)WID_MAC_ADDR;
wid.type = WID_STR;
@@ -518,11 +522,12 @@ static s32 handle_get_mac_address(struct host_if_drv 
*hif_drv,
return result;
 }
 
-static s32 handle_cfg_param(struct host_if_drv *hif_drv,
+static s32 handle_cfg_param(struct wilc_vif *vif,
struct cfg_param_attr *cfg_param_attr)
 {
s32 result = 0;
struct wid wid_list[32];
+   struct host_if_drv *hif_drv = vif->hif_drv;
u8 wid_cnt = 0;
 
down(_drv->sem_cfg_values);
@@ -818,10 +823,10 @@ static void 

[PATCH 02/12] staging: wilc1000: remove argument hif_drv

2015-12-13 Thread Glen Lee
In previous patch we add new argument vif which has hif_drv in it's member.
Therefore, no need to pass hif_drv in those functions. Remove argument
struct host_if_drv and use hif_drv of vif.

Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 176 -
 drivers/staging/wilc1000/host_interface.h | 127 +---
 drivers/staging/wilc1000/linux_wlan.c |  20 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 223 +++---
 4 files changed, 264 insertions(+), 282 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index c52a8e1..d4bcf39 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -451,7 +451,7 @@ static s32 handle_get_ip_address(struct wilc_vif *vif,
kfree(wid.val);
 
if (memcmp(get_ip[idx], set_ip[idx], IP_ALEN) != 0)
-   wilc_setup_ipaddress(vif, hif_drv, set_ip[idx], idx);
+   wilc_setup_ipaddress(vif, set_ip[idx], idx);
 
if (result != 0) {
PRINT_ER("Failed to get IP address\n");
@@ -1626,7 +1626,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
 
if ((u8MacStatus == MAC_CONNECTED) &&
(strConnectInfo.u16ConnectStatus == 
SUCCESSFUL_STATUSCODE)) {
-   wilc_set_power_mgmt(vif, hif_drv, 0, 0);
+   wilc_set_power_mgmt(vif, 0, 0);
 
PRINT_D(HOSTINF_DBG, "MAC status : CONNECTED 
and Connect Status : Successful\n");
hif_drv->hif_state = HOST_IF_CONNECTED;
@@ -1669,7 +1669,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
 
if (hif_drv->usr_conn_req.conn_result) {
wilc_optaining_ip = false;
-   wilc_set_power_mgmt(vif, hif_drv, 0, 0);
+   wilc_set_power_mgmt(vif, 0, 0);
 

hif_drv->usr_conn_req.conn_result(CONN_DISCONN_EVENT_DISCONN_NOTIF,
  NULL,
@@ -2007,7 +2007,7 @@ static void Handle_Disconnect(struct wilc_vif *vif,
PRINT_D(HOSTINF_DBG, "Sending disconnect request\n");
 
wilc_optaining_ip = false;
-   wilc_set_power_mgmt(vif, hif_drv, 0, 0);
+   wilc_set_power_mgmt(vif, 0, 0);
 
eth_zero_addr(wilc_connected_ssid);
 
@@ -2075,15 +2075,14 @@ static void Handle_Disconnect(struct wilc_vif *vif,
up(_drv->sem_test_disconn_block);
 }
 
-void wilc_resolve_disconnect_aberration(struct wilc_vif *vif,
-   struct host_if_drv *hif_drv)
+void wilc_resolve_disconnect_aberration(struct wilc_vif *vif)
 {
-   if (!hif_drv)
+   if (!vif->hif_drv)
return;
-   if ((hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) ||
-   (hif_drv->hif_state == HOST_IF_CONNECTING)) {
+   if ((vif->hif_drv->hif_state == HOST_IF_WAITING_CONN_RESP) ||
+   (vif->hif_drv->hif_state == HOST_IF_CONNECTING)) {
PRINT_D(HOSTINF_DBG, "\n\n<< correcting Supplicant state 
machine >>\n\n");
-   wilc_disconnect(vif, hif_drv, 1);
+   wilc_disconnect(vif, 1);
}
 }
 
@@ -3033,11 +3032,11 @@ s32 wilc_remove_key(struct host_if_drv *hif_drv, const 
u8 *pu8StaAddress)
return 0;
 }
 
-int wilc_remove_wep_key(struct wilc_vif *vif,
-   struct host_if_drv *hif_drv, u8 index)
+int wilc_remove_wep_key(struct wilc_vif *vif, u8 index)
 {
int result = 0;
struct host_if_msg msg;
+   struct host_if_drv *hif_drv = vif->hif_drv;
 
if (!hif_drv) {
result = -EFAULT;
@@ -3062,11 +3061,11 @@ int wilc_remove_wep_key(struct wilc_vif *vif,
return result;
 }
 
-int wilc_set_wep_default_keyid(struct wilc_vif *vif,
-  struct host_if_drv *hif_drv, u8 index)
+int wilc_set_wep_default_keyid(struct wilc_vif *vif, u8 index)
 {
int result = 0;
struct host_if_msg msg;
+   struct host_if_drv *hif_drv = vif->hif_drv;
 
if (!hif_drv) {
result = -EFAULT;
@@ -3091,11 +3090,12 @@ int wilc_set_wep_default_keyid(struct wilc_vif *vif,
return result;
 }
 
-int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, struct host_if_drv *hif_drv,
-const u8 *key, u8 len, u8 index)
+int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, const u8 *key, u8 len,
+u8 index)
 {
int result = 0;
struct host_if_msg msg;
+   struct host_if_drv *hif_drv = vif->hif_drv;
 
if (!hif_drv) {
PRINT_ER("driver is null\n");
@@ -3124,12 +3124,12 @@ int wilc_add_wep_key_bss_sta(struct wilc_vif *vif, 
struct host_if_drv *hif_drv,

[PATCH 04/12] staging: wilc1000: pass struct wilc

2015-12-13 Thread Glen Lee
Pass struct wilc to the following functions. The functions need wilc to
get proper vif using id from wilc device.

Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/coreconfigurator.h | 11 ++-
 drivers/staging/wilc1000/host_interface.c   |  9 ++---
 drivers/staging/wilc1000/wilc_wlan.c|  2 +-
 drivers/staging/wilc1000/wilc_wlan_cfg.c|  9 +
 drivers/staging/wilc1000/wilc_wlan_cfg.h|  4 +++-
 5 files changed, 21 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/wilc1000/coreconfigurator.h 
b/drivers/staging/wilc1000/coreconfigurator.h
index 3f2a7d3..fc43d04 100644
--- a/drivers/staging/wilc1000/coreconfigurator.h
+++ b/drivers/staging/wilc1000/coreconfigurator.h
@@ -135,9 +135,10 @@ s32 wilc_dealloc_network_info(tstrNetworkInfo 
*pstrNetworkInfo);
 s32 wilc_parse_assoc_resp_info(u8 *pu8Buffer, u32 u32BufferLen,
   tstrConnectRespInfo **ppstrConnectRespInfo);
 s32 wilc_dealloc_assoc_resp_info(tstrConnectRespInfo *pstrConnectRespInfo);
-
-void wilc_network_info_received(u8 *pu8Buffer, u32 u32Length);
-void wilc_gnrl_async_info_received(u8 *pu8Buffer, u32 u32Length);
-void wilc_scan_complete_received(u8 *pu8Buffer, u32 u32Length);
-
+void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer,
+u32 u32Length);
+void wilc_network_info_received(struct wilc *wilc, u8 *pu8Buffer,
+   u32 u32Length);
+void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *pu8Buffer,
+  u32 u32Length);
 #endif
diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index e8c14cc..259cefc 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -4021,7 +4021,8 @@ s32 wilc_deinit(struct wilc_vif *vif)
return result;
 }
 
-void wilc_network_info_received(u8 *pu8Buffer, u32 u32Length)
+void wilc_network_info_received(struct wilc *wilc, u8 *pu8Buffer,
+   u32 u32Length)
 {
s32 result = 0;
struct host_if_msg msg;
@@ -4050,7 +4051,8 @@ void wilc_network_info_received(u8 *pu8Buffer, u32 
u32Length)
PRINT_ER("Error in sending network info message queue message 
parameters: Error(%d)\n", result);
 }
 
-void wilc_gnrl_async_info_received(u8 *pu8Buffer, u32 u32Length)
+void wilc_gnrl_async_info_received(struct wilc *wilc, u8 *pu8Buffer,
+  u32 u32Length)
 {
s32 result = 0;
struct host_if_msg msg;
@@ -4091,7 +4093,8 @@ void wilc_gnrl_async_info_received(u8 *pu8Buffer, u32 
u32Length)
up(_sema_deinit);
 }
 
-void wilc_scan_complete_received(u8 *pu8Buffer, u32 u32Length)
+void wilc_scan_complete_received(struct wilc *wilc, u8 *pu8Buffer,
+u32 u32Length)
 {
s32 result = 0;
struct host_if_msg msg;
diff --git a/drivers/staging/wilc1000/wilc_wlan.c 
b/drivers/staging/wilc1000/wilc_wlan.c
index 768a42c..00f3464 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -988,7 +988,7 @@ static void wilc_wlan_handle_rxq(struct wilc *wilc)
} else {
struct wilc_cfg_rsp rsp;
 
-   
wilc_wlan_cfg_indicate_rx([pkt_offset + offset], pkt_len, );
+   wilc_wlan_cfg_indicate_rx(wilc, 
[pkt_offset + offset], pkt_len, );
if (rsp.type == WILC_CFG_RSP) {
PRINT_D(RX_DBG, 
"wilc->cfg_seq_no = %d - rsp.seq_no = %d\n", wilc->cfg_seq_no, rsp.seq_no);
if (wilc->cfg_seq_no == 
rsp.seq_no)
diff --git a/drivers/staging/wilc1000/wilc_wlan_cfg.c 
b/drivers/staging/wilc1000/wilc_wlan_cfg.c
index f62c0e6..b72c77b 100644
--- a/drivers/staging/wilc1000/wilc_wlan_cfg.c
+++ b/drivers/staging/wilc1000/wilc_wlan_cfg.c
@@ -495,7 +495,8 @@ int wilc_wlan_cfg_get_wid_value(u16 wid, u8 *buffer, u32 
buffer_size)
return ret;
 }
 
-int wilc_wlan_cfg_indicate_rx(u8 *frame, int size, struct wilc_cfg_rsp *rsp)
+int wilc_wlan_cfg_indicate_rx(struct wilc *wilc, u8 *frame, int size,
+ struct wilc_cfg_rsp *rsp)
 {
int ret = 1;
u8 msg_type;
@@ -522,17 +523,17 @@ int wilc_wlan_cfg_indicate_rx(u8 *frame, int size, struct 
wilc_cfg_rsp *rsp)
rsp->seq_no = msg_id;
/*call host interface info parse as well*/
PRINT_INFO(RX_DBG, "Info message received\n");
-   wilc_gnrl_async_info_received(frame - 4, size + 4);
+   wilc_gnrl_async_info_received(wilc, frame - 4, size + 4);
break;
 
case 'N':
-   wilc_network_info_received(frame - 4, size + 4);
+   wilc_network_info_received(wilc, 

[PATCH 05/12] staging: wilc1000: use vif index to communicate with wilc device

2015-12-13 Thread Glen Lee
We now have vif index in all functions related with host interface thread.
wilc_get_vif_idx and wilc_get_vif_from_idx are added to get id and vif
respectively.
Relace get_id_from_handler with wilc_get_vif_idx and get_handler_from_id with
wilc_get_vif_from_idx. Remove unused function get_handler_from_id as well.
We get vif where wilc_get_vif_from_idx is called, so pass vif to msg.vif.

There are two get_id_from_handler left. They will be removed in later patch.

Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 127 +++---
 1 file changed, 81 insertions(+), 46 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 259cefc..0893331 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -309,11 +309,28 @@ static int get_id_from_handler(struct host_if_drv 
*handler)
return 0;
 }
 
-static struct host_if_drv *get_handler_from_id(int id)
+/* The u8IfIdx starts from 0 to NUM_CONCURRENT_IFC -1, but 0 index used as
+ * special purpose in wilc device, so we add 1 to the index to starts from 1.
+ * As a result, the returned index will be 1 to NUM_CONCURRENT_IFC.
+ */
+static int wilc_get_vif_idx(struct wilc_vif *vif)
 {
-   if (id <= 0 || id >= ARRAY_SIZE(wfidrv_list))
+   return vif->u8IfIdx + 1;
+}
+
+/* We need to minus 1 from idx which is from wilc device to get real index
+ * of wilc->vif[], because we add 1 when pass to wilc device in the function
+ * wilc_get_vif_idx.
+ * As a result, the index should be between 0 and NUM_CONCURRENT_IFC -1.
+ */
+static struct wilc_vif *wilc_get_vif_from_idx(struct wilc *wilc, int idx)
+{
+   int index = idx - 1;
+
+   if (index < 0 || index >= NUM_CONCURRENT_IFC)
return NULL;
-   return wfidrv_list[id];
+
+   return wilc->vif[index];
 }
 
 static s32 handle_set_channel(struct wilc_vif *vif,
@@ -331,7 +348,7 @@ static s32 handle_set_channel(struct wilc_vif *vif,
PRINT_D(HOSTINF_DBG, "Setting channel\n");
 
result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, , 1,
-get_id_from_handler(hif_drv));
+wilc_get_vif_idx(vif));
 
if (result) {
PRINT_ER("Failed to set channel\n");
@@ -380,7 +397,7 @@ static s32 handle_set_operation_mode(struct wilc_vif *vif,
wid.size = sizeof(u32);
 
result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, , 1,
-get_id_from_handler(hif_drv));
+wilc_get_vif_idx(vif));
 
if ((hif_op_mode->mode) == IDLE_MODE)
up(_sema_driver);
@@ -418,7 +435,7 @@ static s32 handle_set_ip_address(struct wilc_vif *vif, u8 
*ip_addr, u8 idx)
wid.size = IP_ALEN;
 
result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, , 1,
-get_id_from_handler(hif_drv));
+wilc_get_vif_idx(vif));
 
host_int_get_ipaddress(vif, hif_drv, firmware_ip_addr, idx);
 
@@ -444,7 +461,7 @@ static s32 handle_get_ip_address(struct wilc_vif *vif, u8 
idx)
wid.size = IP_ALEN;
 
result = wilc_send_config_pkt(hif_drv->wilc, GET_CFG, , 1,
-get_id_from_handler(hif_drv));
+wilc_get_vif_idx(vif));
 
PRINT_INFO(HOSTINF_DBG, "%pI4\n", wid.val);
 
@@ -488,7 +505,7 @@ static s32 handle_set_mac_address(struct wilc_vif *vif,
PRINT_D(GENERIC_DBG, "mac addr = :%pM\n", wid.val);
 
result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, , 1,
-get_id_from_handler(hif_drv));
+wilc_get_vif_idx(vif));
if (result) {
PRINT_ER("Failed to set mac address\n");
result = -EFAULT;
@@ -511,7 +528,7 @@ static s32 handle_get_mac_address(struct wilc_vif *vif,
wid.size = ETH_ALEN;
 
result = wilc_send_config_pkt(hif_drv->wilc, GET_CFG, , 1,
-get_id_from_handler(hif_drv));
+wilc_get_vif_idx(vif));
 
if (result) {
PRINT_ER("Failed to get mac address\n");
@@ -807,7 +824,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
}
 
result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, wid_list,
- wid_cnt, get_id_from_handler(hif_drv));
+ wid_cnt, wilc_get_vif_idx(vif));
 
if (result)
PRINT_ER("Error in setting CFG params\n");
@@ -932,7 +949,7 @@ static s32 Handle_Scan(struct wilc_vif *vif,
 
result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, strWIDList,
  u32WidsCount,
- get_id_from_handler(hif_drv));
+

[PATCH 01/12] staging: wilc1000: pass vif to hostIFthread

2015-12-13 Thread Glen Lee
We will pass vif, which is currently being used as net_device, instead of
hif_dev. This is the first step to use index of vif to pass to the driver.
Add new argument vif to all the functions that send message to hostIFthread and
set vif to msg.vif. As a result, hostIfthread will get vif.
In later patch, we will remove drv of host_if_msg and use vif instead of it.

Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 235 ++
 drivers/staging/wilc1000/host_interface.h | 165 +++
 drivers/staging/wilc1000/linux_wlan.c |  22 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 166 ---
 4 files changed, 342 insertions(+), 246 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index f7e560e..c52a8e1 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -194,6 +194,7 @@ struct host_if_msg {
u16 id;
union message_body body;
struct host_if_drv *drv;
+   struct wilc_vif *vif;
 };
 
 struct join_bss_param {
@@ -389,9 +390,13 @@ static s32 handle_set_operation_mode(struct host_if_drv 
*hif_drv,
return result;
 }
 
-static s32 host_int_get_ipaddress(struct host_if_drv *hif_drv, u8 *u16ipadd, 
u8 idx);
+static s32 host_int_get_ipaddress(struct wilc_vif *vif,
+ struct host_if_drv *hif_drv,
+ u8 *u16ipadd, u8 idx);
 
-static s32 handle_set_ip_address(struct host_if_drv *hif_drv, u8 *ip_addr, u8 
idx)
+static s32 handle_set_ip_address(struct wilc_vif *vif,
+struct host_if_drv *hif_drv, u8 *ip_addr,
+u8 idx)
 {
s32 result = 0;
struct wid wid;
@@ -413,7 +418,7 @@ static s32 handle_set_ip_address(struct host_if_drv 
*hif_drv, u8 *ip_addr, u8 id
result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, , 1,
 get_id_from_handler(hif_drv));
 
-   host_int_get_ipaddress(hif_drv, firmware_ip_addr, idx);
+   host_int_get_ipaddress(vif, hif_drv, firmware_ip_addr, idx);
 
if (result) {
PRINT_ER("Failed to set IP address\n");
@@ -425,7 +430,8 @@ static s32 handle_set_ip_address(struct host_if_drv 
*hif_drv, u8 *ip_addr, u8 id
return result;
 }
 
-static s32 handle_get_ip_address(struct host_if_drv *hif_drv, u8 idx)
+static s32 handle_get_ip_address(struct wilc_vif *vif,
+struct host_if_drv *hif_drv, u8 idx)
 {
s32 result = 0;
struct wid wid;
@@ -445,7 +451,7 @@ static s32 handle_get_ip_address(struct host_if_drv 
*hif_drv, u8 idx)
kfree(wid.val);
 
if (memcmp(get_ip[idx], set_ip[idx], IP_ALEN) != 0)
-   wilc_setup_ipaddress(hif_drv, set_ip[idx], idx);
+   wilc_setup_ipaddress(vif, hif_drv, set_ip[idx], idx);
 
if (result != 0) {
PRINT_ER("Failed to get IP address\n");
@@ -1490,7 +1496,8 @@ static s32 host_int_get_assoc_res_info(struct host_if_drv 
*hif_drv,
   u32 u32MaxAssocRespInfoLen,
   u32 *pu32RcvdAssocRespInfoLen);
 
-static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv *hif_drv,
+static s32 Handle_RcvdGnrlAsyncInfo(struct wilc_vif *vif,
+   struct host_if_drv *hif_drv,
struct rcvd_async_info 
*pstrRcvdGnrlAsyncInfo)
 {
s32 result = 0;
@@ -1619,7 +1626,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv 
*hif_drv,
 
if ((u8MacStatus == MAC_CONNECTED) &&
(strConnectInfo.u16ConnectStatus == 
SUCCESSFUL_STATUSCODE)) {
-   wilc_set_power_mgmt(hif_drv, 0, 0);
+   wilc_set_power_mgmt(vif, hif_drv, 0, 0);
 
PRINT_D(HOSTINF_DBG, "MAC status : CONNECTED 
and Connect Status : Successful\n");
hif_drv->hif_state = HOST_IF_CONNECTED;
@@ -1662,7 +1669,7 @@ static s32 Handle_RcvdGnrlAsyncInfo(struct host_if_drv 
*hif_drv,
 
if (hif_drv->usr_conn_req.conn_result) {
wilc_optaining_ip = false;
-   wilc_set_power_mgmt(hif_drv, 0, 0);
+   wilc_set_power_mgmt(vif, hif_drv, 0, 0);
 

hif_drv->usr_conn_req.conn_result(CONN_DISCONN_EVENT_DISCONN_NOTIF,
  NULL,
@@ -1984,7 +1991,8 @@ _WPAPtk_end_case_:
return result;
 }
 
-static void Handle_Disconnect(struct host_if_drv *hif_drv)
+static void Handle_Disconnect(struct wilc_vif *vif,
+ struct host_if_drv *hif_drv)
 {
struct wid wid;
 
@@ -1999,7 

[PATCH 00/12] Use index of interface to communicate with wilc device

2015-12-13 Thread Glen Lee
Wilc device now use index of wfidrv_list which is list of host_if_drv pointers.
Each host_if_drv correspond with each wilc_vif interface, so we can use index
of vif. Therefore, so no need to make another list, wfidrv_list, to lookup
which interface the device is communicating.

Here are brief steps,
Firstly, Pass wilc_vif, currently being used, as msg argument to host interface
thread to use index of vif.
Secondly, Remove argument hif_drv since wilc_vif has it in it's member.
Thirdly, use index of vif to communicate with wilc device.
Lastly, remove unused structure and functions related with wfidrv_list
because it is not used anymore.

Last patch is bug fix which was found during patching this.

Glen Lee (12):
  staging: wilc1000: pass vif to hostIFthread
  staging: wilc1000: remove argument hif_drv
  staging: wilc1000: take vif instead of drv in hostIFthread
  staging: wilc1000: pass struct wilc
  staging: wilc1000: use vif index to communicate with wilc device
  staging: wilc1000: wilc_set_wfi_drv_handler: pass vif index
  staging: wilc1000: change join_req_drv type and it's name
  staging: wilc1000: remove used functions
  staging: wilc1000: remove drv of struct host_if_msg
  staging: wilc1000: remove wilc of struct host_if_drv
  staging: wilc1000: set hif_drv before it is used
  staging: wilc1000: bug fix on memory free

 drivers/staging/wilc1000/coreconfigurator.h   |  11 +-
 drivers/staging/wilc1000/host_interface.c | 790 +++---
 drivers/staging/wilc1000/host_interface.h | 144 ++--
 drivers/staging/wilc1000/linux_wlan.c |  23 +-
 drivers/staging/wilc1000/wilc_wfi_cfgoperations.c | 265 
 drivers/staging/wilc1000/wilc_wlan.c  |   3 +-
 drivers/staging/wilc1000/wilc_wlan_cfg.c  |   9 +-
 drivers/staging/wilc1000/wilc_wlan_cfg.h  |   4 +-
 8 files changed, 643 insertions(+), 606 deletions(-)

-- 
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 08/12] staging: wilc1000: remove used functions

2015-12-13 Thread Glen Lee
This patch remove unused functions add_handler_in_list and
remove_handler_in_list, and it's related global variable wfidrv_list and codes.
label fail_timer_2 and it's codes are removed since label is not used anymore.

Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 44 ---
 1 file changed, 44 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 76e891c..5bf2a47 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -226,7 +226,6 @@ struct join_bss_param {
u8 start_time[4];
 };
 
-static struct host_if_drv *wfidrv_list[NUM_CONCURRENT_IFC + 1];
 struct host_if_drv *terminated_handle;
 bool wilc_optaining_ip;
 static u8 P2P_LISTEN_STATE;
@@ -266,34 +265,6 @@ static struct wilc_vif *join_req_vif;
 
 static void *host_int_ParseJoinBssParam(tstrNetworkInfo *ptstrNetworkInfo);
 
-static int add_handler_in_list(struct host_if_drv *handler)
-{
-   int i;
-
-   for (i = 1; i < ARRAY_SIZE(wfidrv_list); i++) {
-   if (!wfidrv_list[i]) {
-   wfidrv_list[i] = handler;
-   return 0;
-   }
-   }
-
-   return -ENOBUFS;
-}
-
-static int remove_handler_in_list(struct host_if_drv *handler)
-{
-   int i;
-
-   for (i = 1; i < ARRAY_SIZE(wfidrv_list); i++) {
-   if (wfidrv_list[i] == handler) {
-   wfidrv_list[i] = NULL;
-   return 0;
-   }
-   }
-
-   return -EINVAL;
-}
-
 /* The u8IfIdx starts from 0 to NUM_CONCURRENT_IFC -1, but 0 index used as
  * special purpose in wilc device, so we add 1 to the index to starts from 1.
  * As a result, the returned index will be 1 to NUM_CONCURRENT_IFC.
@@ -3845,7 +3816,6 @@ s32 wilc_init(struct net_device *dev, struct host_if_drv 
**hif_drv_handler)
 {
s32 result = 0;
struct host_if_drv *hif_drv;
-   int err;
struct wilc_vif *vif;
struct wilc *wilc;
 
@@ -3865,11 +3835,6 @@ s32 wilc_init(struct net_device *dev, struct host_if_drv 
**hif_drv_handler)
}
hif_drv->wilc = wilc;
*hif_drv_handler = hif_drv;
-   err = add_handler_in_list(hif_drv);
-   if (err) {
-   result = -EFAULT;
-   goto _fail_timer_2;
-   }
 
wilc_optaining_ip = false;
 
@@ -3939,10 +3904,6 @@ s32 wilc_init(struct net_device *dev, struct host_if_drv 
**hif_drv_handler)
 
return result;
 
-_fail_timer_2:
-   del_timer_sync(_drv->connect_timer);
-   del_timer_sync(_drv->scan_timer);
-   kthread_stop(hif_thread_handler);
 _fail_mq_:
wilc_mq_destroy(_msg_q);
 _fail_:
@@ -3954,7 +3915,6 @@ s32 wilc_deinit(struct wilc_vif *vif)
s32 result = 0;
struct host_if_msg msg;
struct host_if_drv *hif_drv = vif->hif_drv;
-   int ret;
 
if (!hif_drv)   {
PRINT_ER("hif_drv = NULL\n");
@@ -4009,10 +3969,6 @@ s32 wilc_deinit(struct wilc_vif *vif)
wilc_mq_destroy(_msg_q);
}
 
-   ret = remove_handler_in_list(hif_drv);
-   if (ret)
-   result = -ENOENT;
-
kfree(hif_drv);
 
clients_count--;
-- 
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 11/12] staging: wilc1000: set hif_drv before it is used

2015-12-13 Thread Glen Lee
We are using hif_drv of vif, so it needs to be set before it is used.
Set hif_drv to vif->hifdrv soon after it is allocated.

Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 6 ++
 drivers/staging/wilc1000/linux_wlan.c | 1 -
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index f97ea49..0125e3d 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -3775,6 +3775,7 @@ s32 wilc_init(struct net_device *dev, struct host_if_drv 
**hif_drv_handler)
struct host_if_drv *hif_drv;
struct wilc_vif *vif;
struct wilc *wilc;
+   int i;
 
vif = netdev_priv(dev);
wilc = vif->wilc;
@@ -3791,6 +3792,11 @@ s32 wilc_init(struct net_device *dev, struct host_if_drv 
**hif_drv_handler)
goto _fail_;
}
*hif_drv_handler = hif_drv;
+   for (i = 0; i < wilc->vif_num; i++)
+   if (dev == wilc->vif[i]->ndev) {
+   wilc->vif[i]->hif_drv = hif_drv;
+   break;
+   }
 
wilc_optaining_ip = false;
 
diff --git a/drivers/staging/wilc1000/linux_wlan.c 
b/drivers/staging/wilc1000/linux_wlan.c
index a50e3ff..54fe9d7 100644
--- a/drivers/staging/wilc1000/linux_wlan.c
+++ b/drivers/staging/wilc1000/linux_wlan.c
@@ -1036,7 +1036,6 @@ int wilc_mac_open(struct net_device *ndev)
for (i = 0; i < wl->vif_num; i++) {
if (ndev == wl->vif[i]->ndev) {
memcpy(wl->vif[i]->src_addr, mac_add, ETH_ALEN);
-   wl->vif[i]->hif_drv = priv->hWILCWFIDrv;
break;
}
}
-- 
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 10/12] staging: wilc1000: remove wilc of struct host_if_drv

2015-12-13 Thread Glen Lee
vif has wilc in it's members so no need to have wilc in host_if_drv.
It is redundant so just remove it and use wilc of vif.

Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/host_interface.c | 100 --
 drivers/staging/wilc1000/host_interface.h |   1 -
 2 files changed, 41 insertions(+), 60 deletions(-)

diff --git a/drivers/staging/wilc1000/host_interface.c 
b/drivers/staging/wilc1000/host_interface.c
index 39e93fa..f97ea49 100644
--- a/drivers/staging/wilc1000/host_interface.c
+++ b/drivers/staging/wilc1000/host_interface.c
@@ -293,7 +293,6 @@ static s32 handle_set_channel(struct wilc_vif *vif,
 {
s32 result = 0;
struct wid wid;
-   struct host_if_drv *hif_drv = vif->hif_drv;
 
wid.id = (u16)WID_CURRENT_CHANNEL;
wid.type = WID_CHAR;
@@ -302,7 +301,7 @@ static s32 handle_set_channel(struct wilc_vif *vif,
 
PRINT_D(HOSTINF_DBG, "Setting channel\n");
 
-   result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, , 1,
+   result = wilc_send_config_pkt(vif->wilc, SET_CFG, , 1,
 wilc_get_vif_idx(vif));
 
if (result) {
@@ -343,14 +342,13 @@ static s32 handle_set_operation_mode(struct wilc_vif *vif,
 {
s32 result = 0;
struct wid wid;
-   struct host_if_drv *hif_drv = vif->hif_drv;
 
wid.id = (u16)WID_SET_OPERATION_MODE;
wid.type = WID_INT;
wid.val = (s8 *)_op_mode->mode;
wid.size = sizeof(u32);
 
-   result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, , 1,
+   result = wilc_send_config_pkt(vif->wilc, SET_CFG, , 1,
 wilc_get_vif_idx(vif));
 
if ((hif_op_mode->mode) == IDLE_MODE)
@@ -388,7 +386,7 @@ static s32 handle_set_ip_address(struct wilc_vif *vif, u8 
*ip_addr, u8 idx)
wid.val = (u8 *)ip_addr;
wid.size = IP_ALEN;
 
-   result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, , 1,
+   result = wilc_send_config_pkt(vif->wilc, SET_CFG, , 1,
 wilc_get_vif_idx(vif));
 
host_int_get_ipaddress(vif, hif_drv, firmware_ip_addr, idx);
@@ -407,14 +405,13 @@ static s32 handle_get_ip_address(struct wilc_vif *vif, u8 
idx)
 {
s32 result = 0;
struct wid wid;
-   struct host_if_drv *hif_drv = vif->hif_drv;
 
wid.id = (u16)WID_IP_ADDRESS;
wid.type = WID_STR;
wid.val = kmalloc(IP_ALEN, GFP_KERNEL);
wid.size = IP_ALEN;
 
-   result = wilc_send_config_pkt(hif_drv->wilc, GET_CFG, , 1,
+   result = wilc_send_config_pkt(vif->wilc, GET_CFG, , 1,
 wilc_get_vif_idx(vif));
 
PRINT_INFO(HOSTINF_DBG, "%pI4\n", wid.val);
@@ -443,7 +440,6 @@ static s32 handle_set_mac_address(struct wilc_vif *vif,
 {
s32 result = 0;
struct wid wid;
-   struct host_if_drv *hif_drv = vif->hif_drv;
u8 *mac_buf = kmalloc(ETH_ALEN, GFP_KERNEL);
 
if (!mac_buf) {
@@ -458,7 +454,7 @@ static s32 handle_set_mac_address(struct wilc_vif *vif,
wid.size = ETH_ALEN;
PRINT_D(GENERIC_DBG, "mac addr = :%pM\n", wid.val);
 
-   result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, , 1,
+   result = wilc_send_config_pkt(vif->wilc, SET_CFG, , 1,
 wilc_get_vif_idx(vif));
if (result) {
PRINT_ER("Failed to set mac address\n");
@@ -474,14 +470,13 @@ static s32 handle_get_mac_address(struct wilc_vif *vif,
 {
s32 result = 0;
struct wid wid;
-   struct host_if_drv *hif_drv = vif->hif_drv;
 
wid.id = (u16)WID_MAC_ADDR;
wid.type = WID_STR;
wid.val = get_mac_addr->mac_addr;
wid.size = ETH_ALEN;
 
-   result = wilc_send_config_pkt(hif_drv->wilc, GET_CFG, , 1,
+   result = wilc_send_config_pkt(vif->wilc, GET_CFG, , 1,
 wilc_get_vif_idx(vif));
 
if (result) {
@@ -777,7 +772,7 @@ static s32 handle_cfg_param(struct wilc_vif *vif,
wid_cnt++;
}
 
-   result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, wid_list,
+   result = wilc_send_config_pkt(vif->wilc, SET_CFG, wid_list,
  wid_cnt, wilc_get_vif_idx(vif));
 
if (result)
@@ -901,7 +896,7 @@ static s32 Handle_Scan(struct wilc_vif *vif,
else if (hif_drv->hif_state == HOST_IF_IDLE)
scan_while_connected = false;
 
-   result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, strWIDList,
+   result = wilc_send_config_pkt(vif->wilc, SET_CFG, strWIDList,
  u32WidsCount,
  wilc_get_vif_idx(vif));
 
@@ -947,7 +942,7 @@ static s32 Handle_ScanDone(struct wilc_vif *vif,
wid.val = (s8 *)_running_scan;
wid.size = sizeof(char);
 
-   result = wilc_send_config_pkt(hif_drv->wilc, SET_CFG, , 1,
+   result = 

[PATCH 12/12] staging: wilc1000: bug fix on memory free

2015-12-13 Thread Glen Lee
Set tx_buffer to NULL not to free again the memory that is already freed,
which could cause system crash when device is failed.

Signed-off-by: Glen Lee 
---
 drivers/staging/wilc1000/wilc_wlan.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/staging/wilc1000/wilc_wlan.c 
b/drivers/staging/wilc1000/wilc_wlan.c
index 00f3464..83af51b 100644
--- a/drivers/staging/wilc1000/wilc_wlan.c
+++ b/drivers/staging/wilc1000/wilc_wlan.c
@@ -1374,6 +1374,7 @@ void wilc_wlan_cleanup(struct net_device *dev)
kfree(wilc->rx_buffer);
wilc->rx_buffer = NULL;
kfree(wilc->tx_buffer);
+   wilc->tx_buffer = NULL;
 
acquire_bus(wilc, ACQUIRE_AND_WAKEUP);
 
-- 
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