aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/mwifiex
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/mwifiex')
-rw-r--r--drivers/net/wireless/mwifiex/11n_aggr.c3
-rw-r--r--drivers/net/wireless/mwifiex/cfg80211.c37
-rw-r--r--drivers/net/wireless/mwifiex/cmdevt.c3
-rw-r--r--drivers/net/wireless/mwifiex/decl.h6
-rw-r--r--drivers/net/wireless/mwifiex/init.c5
-rw-r--r--drivers/net/wireless/mwifiex/main.c25
-rw-r--r--drivers/net/wireless/mwifiex/main.h4
-rw-r--r--drivers/net/wireless/mwifiex/scan.c8
-rw-r--r--drivers/net/wireless/mwifiex/sta_rx.c6
-rw-r--r--drivers/net/wireless/mwifiex/sta_tx.c3
-rw-r--r--drivers/net/wireless/mwifiex/txrx.c6
-rw-r--r--drivers/net/wireless/mwifiex/util.c3
-rw-r--r--drivers/net/wireless/mwifiex/wmm.c5
-rw-r--r--drivers/net/wireless/mwifiex/wmm.h4
14 files changed, 67 insertions, 51 deletions
diff --git a/drivers/net/wireless/mwifiex/11n_aggr.c b/drivers/net/wireless/mwifiex/11n_aggr.c
index 079e5532e686..ea6832dc6677 100644
--- a/drivers/net/wireless/mwifiex/11n_aggr.c
+++ b/drivers/net/wireless/mwifiex/11n_aggr.c
@@ -182,7 +182,8 @@ mwifiex_11n_aggregate_pkt(struct mwifiex_private *priv,
182 skb_reserve(skb_aggr, headroom + sizeof(struct txpd)); 182 skb_reserve(skb_aggr, headroom + sizeof(struct txpd));
183 tx_info_aggr = MWIFIEX_SKB_TXCB(skb_aggr); 183 tx_info_aggr = MWIFIEX_SKB_TXCB(skb_aggr);
184 184
185 tx_info_aggr->bss_index = tx_info_src->bss_index; 185 tx_info_aggr->bss_type = tx_info_src->bss_type;
186 tx_info_aggr->bss_num = tx_info_src->bss_num;
186 skb_aggr->priority = skb_src->priority; 187 skb_aggr->priority = skb_src->priority;
187 188
188 do { 189 do {
diff --git a/drivers/net/wireless/mwifiex/cfg80211.c b/drivers/net/wireless/mwifiex/cfg80211.c
index c3b6c4652cd6..6fef4925d13a 100644
--- a/drivers/net/wireless/mwifiex/cfg80211.c
+++ b/drivers/net/wireless/mwifiex/cfg80211.c
@@ -79,7 +79,7 @@ static int
79mwifiex_cfg80211_del_key(struct wiphy *wiphy, struct net_device *netdev, 79mwifiex_cfg80211_del_key(struct wiphy *wiphy, struct net_device *netdev,
80 u8 key_index, bool pairwise, const u8 *mac_addr) 80 u8 key_index, bool pairwise, const u8 *mac_addr)
81{ 81{
82 struct mwifiex_private *priv = mwifiex_cfg80211_get_priv(wiphy); 82 struct mwifiex_private *priv = mwifiex_netdev_get_priv(netdev);
83 83
84 if (mwifiex_set_encode(priv, NULL, 0, key_index, 1)) { 84 if (mwifiex_set_encode(priv, NULL, 0, key_index, 1)) {
85 wiphy_err(wiphy, "deleting the crypto keys\n"); 85 wiphy_err(wiphy, "deleting the crypto keys\n");
@@ -122,7 +122,7 @@ mwifiex_cfg80211_set_power_mgmt(struct wiphy *wiphy,
122 struct net_device *dev, 122 struct net_device *dev,
123 bool enabled, int timeout) 123 bool enabled, int timeout)
124{ 124{
125 struct mwifiex_private *priv = mwifiex_cfg80211_get_priv(wiphy); 125 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
126 u32 ps_mode; 126 u32 ps_mode;
127 127
128 if (timeout) 128 if (timeout)
@@ -143,7 +143,7 @@ mwifiex_cfg80211_set_default_key(struct wiphy *wiphy, struct net_device *netdev,
143 u8 key_index, bool unicast, 143 u8 key_index, bool unicast,
144 bool multicast) 144 bool multicast)
145{ 145{
146 struct mwifiex_private *priv = mwifiex_cfg80211_get_priv(wiphy); 146 struct mwifiex_private *priv = mwifiex_netdev_get_priv(netdev);
147 147
148 /* Return if WEP key not configured */ 148 /* Return if WEP key not configured */
149 if (priv->sec_info.wep_status == MWIFIEX_802_11_WEP_DISABLED) 149 if (priv->sec_info.wep_status == MWIFIEX_802_11_WEP_DISABLED)
@@ -165,7 +165,7 @@ mwifiex_cfg80211_add_key(struct wiphy *wiphy, struct net_device *netdev,
165 u8 key_index, bool pairwise, const u8 *mac_addr, 165 u8 key_index, bool pairwise, const u8 *mac_addr,
166 struct key_params *params) 166 struct key_params *params)
167{ 167{
168 struct mwifiex_private *priv = mwifiex_cfg80211_get_priv(wiphy); 168 struct mwifiex_private *priv = mwifiex_netdev_get_priv(netdev);
169 169
170 if (mwifiex_set_encode(priv, params->key, params->key_len, 170 if (mwifiex_set_encode(priv, params->key, params->key_len,
171 key_index, 0)) { 171 key_index, 0)) {
@@ -376,7 +376,7 @@ mwifiex_cfg80211_set_channel(struct wiphy *wiphy, struct net_device *dev,
376 struct ieee80211_channel *chan, 376 struct ieee80211_channel *chan,
377 enum nl80211_channel_type channel_type) 377 enum nl80211_channel_type channel_type)
378{ 378{
379 struct mwifiex_private *priv = mwifiex_cfg80211_get_priv(wiphy); 379 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
380 380
381 if (priv->media_connected) { 381 if (priv->media_connected) {
382 wiphy_err(wiphy, "This setting is valid only when station " 382 wiphy_err(wiphy, "This setting is valid only when station "
@@ -557,6 +557,23 @@ mwifiex_dump_station_info(struct mwifiex_private *priv,
557 /* bit rate is in 500 kb/s units. Convert it to 100kb/s units */ 557 /* bit rate is in 500 kb/s units. Convert it to 100kb/s units */
558 sinfo->txrate.legacy = rate.rate * 5; 558 sinfo->txrate.legacy = rate.rate * 5;
559 559
560 if (priv->bss_mode == NL80211_IFTYPE_STATION) {
561 sinfo->filled |= STATION_INFO_BSS_PARAM;
562 sinfo->bss_param.flags = 0;
563 if (priv->curr_bss_params.bss_descriptor.cap_info_bitmap &
564 WLAN_CAPABILITY_SHORT_PREAMBLE)
565 sinfo->bss_param.flags |=
566 BSS_PARAM_FLAGS_SHORT_PREAMBLE;
567 if (priv->curr_bss_params.bss_descriptor.cap_info_bitmap &
568 WLAN_CAPABILITY_SHORT_SLOT_TIME)
569 sinfo->bss_param.flags |=
570 BSS_PARAM_FLAGS_SHORT_SLOT_TIME;
571 sinfo->bss_param.dtim_period =
572 priv->curr_bss_params.bss_descriptor.dtim_period;
573 sinfo->bss_param.beacon_interval =
574 priv->curr_bss_params.bss_descriptor.beacon_period;
575 }
576
560 return ret; 577 return ret;
561} 578}
562 579
@@ -1004,7 +1021,7 @@ static int
1004mwifiex_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev, 1021mwifiex_cfg80211_join_ibss(struct wiphy *wiphy, struct net_device *dev,
1005 struct cfg80211_ibss_params *params) 1022 struct cfg80211_ibss_params *params)
1006{ 1023{
1007 struct mwifiex_private *priv = mwifiex_cfg80211_get_priv(wiphy); 1024 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
1008 int ret = 0; 1025 int ret = 0;
1009 1026
1010 if (priv->bss_mode != NL80211_IFTYPE_ADHOC) { 1027 if (priv->bss_mode != NL80211_IFTYPE_ADHOC) {
@@ -1042,7 +1059,7 @@ done:
1042static int 1059static int
1043mwifiex_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev) 1060mwifiex_cfg80211_leave_ibss(struct wiphy *wiphy, struct net_device *dev)
1044{ 1061{
1045 struct mwifiex_private *priv = mwifiex_cfg80211_get_priv(wiphy); 1062 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
1046 1063
1047 wiphy_dbg(wiphy, "info: disconnecting from essid %pM\n", 1064 wiphy_dbg(wiphy, "info: disconnecting from essid %pM\n",
1048 priv->cfg_bssid); 1065 priv->cfg_bssid);
@@ -1217,7 +1234,6 @@ struct net_device *mwifiex_add_virtual_intf(struct wiphy *wiphy,
1217 priv->frame_type = MWIFIEX_DATA_FRAME_TYPE_ETH_II; 1234 priv->frame_type = MWIFIEX_DATA_FRAME_TYPE_ETH_II;
1218 priv->bss_priority = 0; 1235 priv->bss_priority = 0;
1219 priv->bss_role = MWIFIEX_BSS_ROLE_STA; 1236 priv->bss_role = MWIFIEX_BSS_ROLE_STA;
1220 priv->bss_index = 0;
1221 priv->bss_num = 0; 1237 priv->bss_num = 0;
1222 1238
1223 break; 1239 break;
@@ -1281,10 +1297,7 @@ EXPORT_SYMBOL_GPL(mwifiex_add_virtual_intf);
1281 */ 1297 */
1282int mwifiex_del_virtual_intf(struct wiphy *wiphy, struct net_device *dev) 1298int mwifiex_del_virtual_intf(struct wiphy *wiphy, struct net_device *dev)
1283{ 1299{
1284 struct mwifiex_private *priv = mwifiex_cfg80211_get_priv(wiphy); 1300 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
1285
1286 if (!priv || !dev)
1287 return 0;
1288 1301
1289#ifdef CONFIG_DEBUG_FS 1302#ifdef CONFIG_DEBUG_FS
1290 mwifiex_dev_debugfs_remove(priv); 1303 mwifiex_dev_debugfs_remove(priv);
diff --git a/drivers/net/wireless/mwifiex/cmdevt.c b/drivers/net/wireless/mwifiex/cmdevt.c
index 6e0a3eaecf70..6623db69e157 100644
--- a/drivers/net/wireless/mwifiex/cmdevt.c
+++ b/drivers/net/wireless/mwifiex/cmdevt.c
@@ -391,7 +391,8 @@ int mwifiex_process_event(struct mwifiex_adapter *adapter)
391 391
392 if (skb) { 392 if (skb) {
393 rx_info = MWIFIEX_SKB_RXCB(skb); 393 rx_info = MWIFIEX_SKB_RXCB(skb);
394 rx_info->bss_index = priv->bss_index; 394 rx_info->bss_num = priv->bss_num;
395 rx_info->bss_type = priv->bss_type;
395 } 396 }
396 397
397 if (eventcause != EVENT_PS_SLEEP && eventcause != EVENT_PS_AWAKE) { 398 if (eventcause != EVENT_PS_SLEEP && eventcause != EVENT_PS_AWAKE) {
diff --git a/drivers/net/wireless/mwifiex/decl.h b/drivers/net/wireless/mwifiex/decl.h
index ae17ce02a3d0..3735c775495c 100644
--- a/drivers/net/wireless/mwifiex/decl.h
+++ b/drivers/net/wireless/mwifiex/decl.h
@@ -102,7 +102,8 @@ struct mwifiex_wait_queue {
102}; 102};
103 103
104struct mwifiex_rxinfo { 104struct mwifiex_rxinfo {
105 u8 bss_index; 105 u8 bss_num;
106 u8 bss_type;
106 struct sk_buff *parent; 107 struct sk_buff *parent;
107 u8 use_count; 108 u8 use_count;
108}; 109};
@@ -110,7 +111,8 @@ struct mwifiex_rxinfo {
110struct mwifiex_txinfo { 111struct mwifiex_txinfo {
111 u32 status_code; 112 u32 status_code;
112 u8 flags; 113 u8 flags;
113 u8 bss_index; 114 u8 bss_num;
115 u8 bss_type;
114}; 116};
115 117
116enum mwifiex_wmm_ac_e { 118enum mwifiex_wmm_ac_e {
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c
index e05b417a3fae..e13b6d99171a 100644
--- a/drivers/net/wireless/mwifiex/init.c
+++ b/drivers/net/wireless/mwifiex/init.c
@@ -526,8 +526,9 @@ static void mwifiex_delete_bss_prio_tbl(struct mwifiex_private *priv)
526 cur = &adapter->bss_prio_tbl[i].bss_prio_cur; 526 cur = &adapter->bss_prio_tbl[i].bss_prio_cur;
527 lock = &adapter->bss_prio_tbl[i].bss_prio_lock; 527 lock = &adapter->bss_prio_tbl[i].bss_prio_lock;
528 dev_dbg(adapter->dev, "info: delete BSS priority table," 528 dev_dbg(adapter->dev, "info: delete BSS priority table,"
529 " index = %d, i = %d, head = %p, cur = %p\n", 529 " bss_type = %d, bss_num = %d, i = %d,"
530 priv->bss_index, i, head, *cur); 530 " head = %p, cur = %p\n",
531 priv->bss_type, priv->bss_num, i, head, *cur);
531 if (*cur) { 532 if (*cur) {
532 spin_lock_irqsave(lock, flags); 533 spin_lock_irqsave(lock, flags);
533 if (list_empty(head)) { 534 if (list_empty(head)) {
diff --git a/drivers/net/wireless/mwifiex/main.c b/drivers/net/wireless/mwifiex/main.c
index 84be196188cc..80e44566bf6e 100644
--- a/drivers/net/wireless/mwifiex/main.c
+++ b/drivers/net/wireless/mwifiex/main.c
@@ -424,8 +424,8 @@ mwifiex_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
424 struct sk_buff *new_skb; 424 struct sk_buff *new_skb;
425 struct mwifiex_txinfo *tx_info; 425 struct mwifiex_txinfo *tx_info;
426 426
427 dev_dbg(priv->adapter->dev, "data: %lu BSS(%d): Data <= kernel\n", 427 dev_dbg(priv->adapter->dev, "data: %lu BSS(%d-%d): Data <= kernel\n",
428 jiffies, priv->bss_index); 428 jiffies, priv->bss_type, priv->bss_num);
429 429
430 if (priv->adapter->surprise_removed) { 430 if (priv->adapter->surprise_removed) {
431 kfree_skb(skb); 431 kfree_skb(skb);
@@ -458,10 +458,11 @@ mwifiex_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
458 } 458 }
459 459
460 tx_info = MWIFIEX_SKB_TXCB(skb); 460 tx_info = MWIFIEX_SKB_TXCB(skb);
461 tx_info->bss_index = priv->bss_index; 461 tx_info->bss_num = priv->bss_num;
462 tx_info->bss_type = priv->bss_type;
462 mwifiex_fill_buffer(skb); 463 mwifiex_fill_buffer(skb);
463 464
464 mwifiex_wmm_add_buf_txqueue(priv->adapter, skb); 465 mwifiex_wmm_add_buf_txqueue(priv, skb);
465 atomic_inc(&priv->adapter->tx_pending); 466 atomic_inc(&priv->adapter->tx_pending);
466 467
467 if (atomic_read(&priv->adapter->tx_pending) >= MAX_TX_PENDING) { 468 if (atomic_read(&priv->adapter->tx_pending) >= MAX_TX_PENDING) {
@@ -531,8 +532,8 @@ mwifiex_tx_timeout(struct net_device *dev)
531{ 532{
532 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev); 533 struct mwifiex_private *priv = mwifiex_netdev_get_priv(dev);
533 534
534 dev_err(priv->adapter->dev, "%lu : Tx timeout, bss_index=%d\n", 535 dev_err(priv->adapter->dev, "%lu : Tx timeout, bss_type-num = %d-%d\n",
535 jiffies, priv->bss_index); 536 jiffies, priv->bss_type, priv->bss_num);
536 mwifiex_set_trans_start(dev); 537 mwifiex_set_trans_start(dev);
537 priv->num_tx_timeout++; 538 priv->num_tx_timeout++;
538} 539}
@@ -605,18 +606,6 @@ int is_command_pending(struct mwifiex_adapter *adapter)
605} 606}
606 607
607/* 608/*
608 * This function returns the correct private structure pointer based
609 * upon the BSS number.
610 */
611struct mwifiex_private *
612mwifiex_bss_index_to_priv(struct mwifiex_adapter *adapter, u8 bss_index)
613{
614 if (!adapter || (bss_index >= adapter->priv_num))
615 return NULL;
616 return adapter->priv[bss_index];
617}
618
619/*
620 * This is the main work queue function. 609 * This is the main work queue function.
621 * 610 *
622 * It handles the main process, which in turn handles the complete 611 * It handles the main process, which in turn handles the complete
diff --git a/drivers/net/wireless/mwifiex/main.h b/drivers/net/wireless/mwifiex/main.h
index 3186aa437f42..3dc0f721c1db 100644
--- a/drivers/net/wireless/mwifiex/main.h
+++ b/drivers/net/wireless/mwifiex/main.h
@@ -249,6 +249,7 @@ struct mwifiex_bssdescriptor {
249 u32 channel; 249 u32 channel;
250 u32 freq; 250 u32 freq;
251 u16 beacon_period; 251 u16 beacon_period;
252 u8 dtim_period;
252 u8 erp_flags; 253 u8 erp_flags;
253 u32 bss_mode; 254 u32 bss_mode;
254 u8 supported_rates[MWIFIEX_SUPPORTED_RATES]; 255 u8 supported_rates[MWIFIEX_SUPPORTED_RATES];
@@ -352,7 +353,6 @@ struct mwifiex_private;
352 353
353struct mwifiex_private { 354struct mwifiex_private {
354 struct mwifiex_adapter *adapter; 355 struct mwifiex_adapter *adapter;
355 u8 bss_index;
356 u8 bss_type; 356 u8 bss_type;
357 u8 bss_role; 357 u8 bss_role;
358 u8 bss_priority; 358 u8 bss_priority;
@@ -884,8 +884,6 @@ mwifiex_netdev_get_priv(struct net_device *dev)
884 return (struct mwifiex_private *) (*(unsigned long *) netdev_priv(dev)); 884 return (struct mwifiex_private *) (*(unsigned long *) netdev_priv(dev));
885} 885}
886 886
887struct mwifiex_private *mwifiex_bss_index_to_priv(struct mwifiex_adapter
888 *adapter, u8 bss_index);
889int mwifiex_init_shutdown_fw(struct mwifiex_private *priv, 887int mwifiex_init_shutdown_fw(struct mwifiex_private *priv,
890 u32 func_init_shutdown); 888 u32 func_init_shutdown);
891int mwifiex_add_card(void *, struct semaphore *, struct mwifiex_if_ops *, u8); 889int mwifiex_add_card(void *, struct semaphore *, struct mwifiex_if_ops *, u8);
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c
index 6396d3318ead..135208596aff 100644
--- a/drivers/net/wireless/mwifiex/scan.c
+++ b/drivers/net/wireless/mwifiex/scan.c
@@ -1086,6 +1086,7 @@ mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter,
1086 struct ieee_types_vendor_specific *vendor_ie; 1086 struct ieee_types_vendor_specific *vendor_ie;
1087 const u8 wpa_oui[4] = { 0x00, 0x50, 0xf2, 0x01 }; 1087 const u8 wpa_oui[4] = { 0x00, 0x50, 0xf2, 0x01 };
1088 const u8 wmm_oui[4] = { 0x00, 0x50, 0xf2, 0x02 }; 1088 const u8 wmm_oui[4] = { 0x00, 0x50, 0xf2, 0x02 };
1089 struct ieee80211_tim_ie *tim_ie;
1089 1090
1090 found_data_rate_ie = false; 1091 found_data_rate_ie = false;
1091 rate_size = 0; 1092 rate_size = 0;
@@ -1258,6 +1259,11 @@ mwifiex_update_bss_desc_with_ie(struct mwifiex_adapter *adapter,
1258 sizeof(struct ieee_types_header) - 1259 sizeof(struct ieee_types_header) -
1259 bss_entry->beacon_buf); 1260 bss_entry->beacon_buf);
1260 break; 1261 break;
1262 case WLAN_EID_TIM:
1263 tim_ie = (void *) (current_ptr +
1264 sizeof(struct ieee_types_header));
1265 bss_entry->dtim_period = tim_ie->dtim_period;
1266 break;
1261 default: 1267 default:
1262 break; 1268 break;
1263 } 1269 }
@@ -2001,7 +2007,7 @@ mwifiex_save_curr_bcn(struct mwifiex_private *priv)
2001 2007
2002 kfree(priv->curr_bcn_buf); 2008 kfree(priv->curr_bcn_buf);
2003 priv->curr_bcn_buf = kmalloc(curr_bss->beacon_buf_size, 2009 priv->curr_bcn_buf = kmalloc(curr_bss->beacon_buf_size,
2004 GFP_KERNEL); 2010 GFP_ATOMIC);
2005 if (!priv->curr_bcn_buf) { 2011 if (!priv->curr_bcn_buf) {
2006 dev_err(priv->adapter->dev, 2012 dev_err(priv->adapter->dev,
2007 "failed to alloc curr_bcn_buf\n"); 2013 "failed to alloc curr_bcn_buf\n");
diff --git a/drivers/net/wireless/mwifiex/sta_rx.c b/drivers/net/wireless/mwifiex/sta_rx.c
index 5e1ef7e5da4f..d7a5d7616f22 100644
--- a/drivers/net/wireless/mwifiex/sta_rx.c
+++ b/drivers/net/wireless/mwifiex/sta_rx.c
@@ -43,7 +43,8 @@ int mwifiex_process_rx_packet(struct mwifiex_adapter *adapter,
43{ 43{
44 int ret; 44 int ret;
45 struct mwifiex_rxinfo *rx_info = MWIFIEX_SKB_RXCB(skb); 45 struct mwifiex_rxinfo *rx_info = MWIFIEX_SKB_RXCB(skb);
46 struct mwifiex_private *priv = adapter->priv[rx_info->bss_index]; 46 struct mwifiex_private *priv = mwifiex_get_priv_by_id(adapter,
47 rx_info->bss_num, rx_info->bss_type);
47 struct rx_packet_hdr *rx_pkt_hdr; 48 struct rx_packet_hdr *rx_pkt_hdr;
48 struct rxpd *local_rx_pd; 49 struct rxpd *local_rx_pd;
49 int hdr_chop; 50 int hdr_chop;
@@ -124,7 +125,8 @@ int mwifiex_process_sta_rx_packet(struct mwifiex_adapter *adapter,
124 struct rx_packet_hdr *rx_pkt_hdr; 125 struct rx_packet_hdr *rx_pkt_hdr;
125 u8 ta[ETH_ALEN]; 126 u8 ta[ETH_ALEN];
126 u16 rx_pkt_type; 127 u16 rx_pkt_type;
127 struct mwifiex_private *priv = adapter->priv[rx_info->bss_index]; 128 struct mwifiex_private *priv = mwifiex_get_priv_by_id(adapter,
129 rx_info->bss_num, rx_info->bss_type);
128 130
129 if (!priv) 131 if (!priv)
130 return -1; 132 return -1;
diff --git a/drivers/net/wireless/mwifiex/sta_tx.c b/drivers/net/wireless/mwifiex/sta_tx.c
index d97facd70e88..94d31a94620a 100644
--- a/drivers/net/wireless/mwifiex/sta_tx.c
+++ b/drivers/net/wireless/mwifiex/sta_tx.c
@@ -136,7 +136,8 @@ int mwifiex_send_null_packet(struct mwifiex_private *priv, u8 flags)
136 return -1; 136 return -1;
137 137
138 tx_info = MWIFIEX_SKB_TXCB(skb); 138 tx_info = MWIFIEX_SKB_TXCB(skb);
139 tx_info->bss_index = priv->bss_index; 139 tx_info->bss_num = priv->bss_num;
140 tx_info->bss_type = priv->bss_type;
140 skb_reserve(skb, sizeof(struct txpd) + INTF_HEADER_LEN); 141 skb_reserve(skb, sizeof(struct txpd) + INTF_HEADER_LEN);
141 skb_push(skb, sizeof(struct txpd)); 142 skb_push(skb, sizeof(struct txpd));
142 143
diff --git a/drivers/net/wireless/mwifiex/txrx.c b/drivers/net/wireless/mwifiex/txrx.c
index d9274a1b77ac..9a6eacc9d6f9 100644
--- a/drivers/net/wireless/mwifiex/txrx.c
+++ b/drivers/net/wireless/mwifiex/txrx.c
@@ -48,7 +48,8 @@ int mwifiex_handle_rx_packet(struct mwifiex_adapter *adapter,
48 if (!priv) 48 if (!priv)
49 priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY); 49 priv = mwifiex_get_priv(adapter, MWIFIEX_BSS_ROLE_ANY);
50 50
51 rx_info->bss_index = priv->bss_index; 51 rx_info->bss_num = priv->bss_num;
52 rx_info->bss_type = priv->bss_type;
52 53
53 return mwifiex_process_sta_rx_packet(adapter, skb); 54 return mwifiex_process_sta_rx_packet(adapter, skb);
54} 55}
@@ -130,7 +131,8 @@ int mwifiex_write_data_complete(struct mwifiex_adapter *adapter,
130 return 0; 131 return 0;
131 132
132 tx_info = MWIFIEX_SKB_TXCB(skb); 133 tx_info = MWIFIEX_SKB_TXCB(skb);
133 priv = mwifiex_bss_index_to_priv(adapter, tx_info->bss_index); 134 priv = mwifiex_get_priv_by_id(adapter, tx_info->bss_num,
135 tx_info->bss_type);
134 if (!priv) 136 if (!priv)
135 goto done; 137 goto done;
136 138
diff --git a/drivers/net/wireless/mwifiex/util.c b/drivers/net/wireless/mwifiex/util.c
index 06976f517f66..9c48f37069f7 100644
--- a/drivers/net/wireless/mwifiex/util.c
+++ b/drivers/net/wireless/mwifiex/util.c
@@ -159,7 +159,8 @@ int mwifiex_recv_packet(struct mwifiex_adapter *adapter, struct sk_buff *skb)
159 return -1; 159 return -1;
160 160
161 rx_info = MWIFIEX_SKB_RXCB(skb); 161 rx_info = MWIFIEX_SKB_RXCB(skb);
162 priv = mwifiex_bss_index_to_priv(adapter, rx_info->bss_index); 162 priv = mwifiex_get_priv_by_id(adapter, rx_info->bss_num,
163 rx_info->bss_type);
163 if (!priv) 164 if (!priv)
164 return -1; 165 return -1;
165 166
diff --git a/drivers/net/wireless/mwifiex/wmm.c b/drivers/net/wireless/mwifiex/wmm.c
index 6c239c3c8249..75f79ef9f6cf 100644
--- a/drivers/net/wireless/mwifiex/wmm.c
+++ b/drivers/net/wireless/mwifiex/wmm.c
@@ -599,11 +599,10 @@ mwifiex_is_ralist_valid(struct mwifiex_private *priv,
599 * is queued at the list tail. 599 * is queued at the list tail.
600 */ 600 */
601void 601void
602mwifiex_wmm_add_buf_txqueue(struct mwifiex_adapter *adapter, 602mwifiex_wmm_add_buf_txqueue(struct mwifiex_private *priv,
603 struct sk_buff *skb) 603 struct sk_buff *skb)
604{ 604{
605 struct mwifiex_txinfo *tx_info = MWIFIEX_SKB_TXCB(skb); 605 struct mwifiex_adapter *adapter = priv->adapter;
606 struct mwifiex_private *priv = adapter->priv[tx_info->bss_index];
607 u32 tid; 606 u32 tid;
608 struct mwifiex_ra_list_tbl *ra_list; 607 struct mwifiex_ra_list_tbl *ra_list;
609 u8 ra[ETH_ALEN], tid_down; 608 u8 ra[ETH_ALEN], tid_down;
diff --git a/drivers/net/wireless/mwifiex/wmm.h b/drivers/net/wireless/mwifiex/wmm.h
index fcea1f68792f..ec839952d2e7 100644
--- a/drivers/net/wireless/mwifiex/wmm.h
+++ b/drivers/net/wireless/mwifiex/wmm.h
@@ -80,8 +80,8 @@ mwifiex_wmm_is_ra_list_empty(struct list_head *ra_list_hhead)
80 return true; 80 return true;
81} 81}
82 82
83void mwifiex_wmm_add_buf_txqueue(struct mwifiex_adapter *adapter, 83void mwifiex_wmm_add_buf_txqueue(struct mwifiex_private *priv,
84 struct sk_buff *skb); 84 struct sk_buff *skb);
85void mwifiex_ralist_add(struct mwifiex_private *priv, u8 *ra); 85void mwifiex_ralist_add(struct mwifiex_private *priv, u8 *ra);
86 86
87int mwifiex_wmm_lists_empty(struct mwifiex_adapter *adapter); 87int mwifiex_wmm_lists_empty(struct mwifiex_adapter *adapter);