diff options
-rw-r--r-- | drivers/net/wireless/mwifiex/fw.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/init.c | 31 | ||||
-rw-r--r-- | drivers/net/wireless/mwifiex/join.c | 164 |
3 files changed, 98 insertions, 101 deletions
diff --git a/drivers/net/wireless/mwifiex/fw.h b/drivers/net/wireless/mwifiex/fw.h index fc4ffee6c6b9..e98fc5af73dc 100644 --- a/drivers/net/wireless/mwifiex/fw.h +++ b/drivers/net/wireless/mwifiex/fw.h | |||
@@ -117,8 +117,8 @@ enum MWIFIEX_802_11_PRIVACY_FILTER { | |||
117 | #define BA_STREAM_NOT_ALLOWED 0xff | 117 | #define BA_STREAM_NOT_ALLOWED 0xff |
118 | 118 | ||
119 | #define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \ | 119 | #define IS_11N_ENABLED(priv) ((priv->adapter->config_bands & BAND_GN || \ |
120 | priv->adapter->config_bands & BAND_AN) \ | 120 | priv->adapter->config_bands & BAND_AN) && \ |
121 | && priv->curr_bss_params.bss_descriptor.bcn_ht_cap) | 121 | priv->curr_bss_params.bss_descriptor.bcn_ht_cap) |
122 | #define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\ | 122 | #define INITIATOR_BIT(DelBAParamSet) (((DelBAParamSet) &\ |
123 | BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS) | 123 | BIT(DELBA_INITIATOR_POS)) >> DELBA_INITIATOR_POS) |
124 | 124 | ||
diff --git a/drivers/net/wireless/mwifiex/init.c b/drivers/net/wireless/mwifiex/init.c index e81bf6ef1666..54bb4839b57c 100644 --- a/drivers/net/wireless/mwifiex/init.c +++ b/drivers/net/wireless/mwifiex/init.c | |||
@@ -35,28 +35,24 @@ static int mwifiex_add_bss_prio_tbl(struct mwifiex_private *priv) | |||
35 | { | 35 | { |
36 | struct mwifiex_adapter *adapter = priv->adapter; | 36 | struct mwifiex_adapter *adapter = priv->adapter; |
37 | struct mwifiex_bss_prio_node *bss_prio; | 37 | struct mwifiex_bss_prio_node *bss_prio; |
38 | struct mwifiex_bss_prio_tbl *tbl = adapter->bss_prio_tbl; | ||
38 | unsigned long flags; | 39 | unsigned long flags; |
39 | 40 | ||
40 | bss_prio = kzalloc(sizeof(struct mwifiex_bss_prio_node), GFP_KERNEL); | 41 | bss_prio = kzalloc(sizeof(struct mwifiex_bss_prio_node), GFP_KERNEL); |
41 | if (!bss_prio) { | 42 | if (!bss_prio) { |
42 | dev_err(adapter->dev, "%s: failed to alloc bss_prio\n", | 43 | dev_err(adapter->dev, "%s: failed to alloc bss_prio\n", |
43 | __func__); | 44 | __func__); |
44 | return -ENOMEM; | 45 | return -ENOMEM; |
45 | } | 46 | } |
46 | 47 | ||
47 | bss_prio->priv = priv; | 48 | bss_prio->priv = priv; |
48 | INIT_LIST_HEAD(&bss_prio->list); | 49 | INIT_LIST_HEAD(&bss_prio->list); |
49 | if (!adapter->bss_prio_tbl[priv->bss_priority].bss_prio_cur) | 50 | if (!tbl[priv->bss_priority].bss_prio_cur) |
50 | adapter->bss_prio_tbl[priv->bss_priority].bss_prio_cur = | 51 | tbl[priv->bss_priority].bss_prio_cur = bss_prio; |
51 | bss_prio; | 52 | |
52 | 53 | spin_lock_irqsave(&tbl[priv->bss_priority].bss_prio_lock, flags); | |
53 | spin_lock_irqsave(&adapter->bss_prio_tbl[priv->bss_priority] | 54 | list_add_tail(&bss_prio->list, &tbl[priv->bss_priority].bss_prio_head); |
54 | .bss_prio_lock, flags); | 55 | spin_unlock_irqrestore(&tbl[priv->bss_priority].bss_prio_lock, flags); |
55 | list_add_tail(&bss_prio->list, | ||
56 | &adapter->bss_prio_tbl[priv->bss_priority] | ||
57 | .bss_prio_head); | ||
58 | spin_unlock_irqrestore(&adapter->bss_prio_tbl[priv->bss_priority] | ||
59 | .bss_prio_lock, flags); | ||
60 | 56 | ||
61 | return 0; | 57 | return 0; |
62 | } | 58 | } |
@@ -157,13 +153,13 @@ static int mwifiex_allocate_adapter(struct mwifiex_adapter *adapter) | |||
157 | ret = mwifiex_alloc_cmd_buffer(adapter); | 153 | ret = mwifiex_alloc_cmd_buffer(adapter); |
158 | if (ret) { | 154 | if (ret) { |
159 | dev_err(adapter->dev, "%s: failed to alloc cmd buffer\n", | 155 | dev_err(adapter->dev, "%s: failed to alloc cmd buffer\n", |
160 | __func__); | 156 | __func__); |
161 | return -1; | 157 | return -1; |
162 | } | 158 | } |
163 | 159 | ||
164 | adapter->sleep_cfm = | 160 | adapter->sleep_cfm = |
165 | dev_alloc_skb(sizeof(struct mwifiex_opt_sleep_confirm) | 161 | dev_alloc_skb(sizeof(struct mwifiex_opt_sleep_confirm) |
166 | + INTF_HEADER_LEN); | 162 | + INTF_HEADER_LEN); |
167 | 163 | ||
168 | if (!adapter->sleep_cfm) { | 164 | if (!adapter->sleep_cfm) { |
169 | dev_err(adapter->dev, "%s: failed to alloc sleep cfm" | 165 | dev_err(adapter->dev, "%s: failed to alloc sleep cfm" |
@@ -520,7 +516,7 @@ static void mwifiex_delete_bss_prio_tbl(struct mwifiex_private *priv) | |||
520 | struct mwifiex_adapter *adapter = priv->adapter; | 516 | struct mwifiex_adapter *adapter = priv->adapter; |
521 | struct mwifiex_bss_prio_node *bssprio_node, *tmp_node, **cur; | 517 | struct mwifiex_bss_prio_node *bssprio_node, *tmp_node, **cur; |
522 | struct list_head *head; | 518 | struct list_head *head; |
523 | spinlock_t *lock; | 519 | spinlock_t *lock; /* bss priority lock */ |
524 | unsigned long flags; | 520 | unsigned long flags; |
525 | 521 | ||
526 | for (i = 0; i < adapter->priv_num; ++i) { | 522 | for (i = 0; i < adapter->priv_num; ++i) { |
@@ -638,7 +634,7 @@ int mwifiex_dnld_fw(struct mwifiex_adapter *adapter, | |||
638 | ret = adapter->if_ops.check_fw_status(adapter, poll_num); | 634 | ret = adapter->if_ops.check_fw_status(adapter, poll_num); |
639 | if (!ret) { | 635 | if (!ret) { |
640 | dev_notice(adapter->dev, | 636 | dev_notice(adapter->dev, |
641 | "WLAN FW already running! Skip FW download\n"); | 637 | "WLAN FW already running! Skip FW download\n"); |
642 | goto done; | 638 | goto done; |
643 | } | 639 | } |
644 | poll_num = MAX_FIRMWARE_POLL_TRIES; | 640 | poll_num = MAX_FIRMWARE_POLL_TRIES; |
@@ -646,8 +642,7 @@ int mwifiex_dnld_fw(struct mwifiex_adapter *adapter, | |||
646 | /* Check if we are the winner for downloading FW */ | 642 | /* Check if we are the winner for downloading FW */ |
647 | if (!adapter->winner) { | 643 | if (!adapter->winner) { |
648 | dev_notice(adapter->dev, | 644 | dev_notice(adapter->dev, |
649 | "Other interface already running!" | 645 | "Other intf already running! Skip FW download\n"); |
650 | " Skip FW download\n"); | ||
651 | poll_num = MAX_MULTI_INTERFACE_POLL_TRIES; | 646 | poll_num = MAX_MULTI_INTERFACE_POLL_TRIES; |
652 | goto poll_fw; | 647 | goto poll_fw; |
653 | } | 648 | } |
diff --git a/drivers/net/wireless/mwifiex/join.c b/drivers/net/wireless/mwifiex/join.c index 803275f58c78..8f9382b9c3ca 100644 --- a/drivers/net/wireless/mwifiex/join.c +++ b/drivers/net/wireless/mwifiex/join.c | |||
@@ -52,8 +52,9 @@ mwifiex_cmd_append_generic_ie(struct mwifiex_private *priv, u8 **buffer) | |||
52 | * parameter buffer pointer. | 52 | * parameter buffer pointer. |
53 | */ | 53 | */ |
54 | if (priv->gen_ie_buf_len) { | 54 | if (priv->gen_ie_buf_len) { |
55 | dev_dbg(priv->adapter->dev, "info: %s: append generic %d to %p\n", | 55 | dev_dbg(priv->adapter->dev, |
56 | __func__, priv->gen_ie_buf_len, *buffer); | 56 | "info: %s: append generic ie len %d to %p\n", |
57 | __func__, priv->gen_ie_buf_len, *buffer); | ||
57 | 58 | ||
58 | /* Wrap the generic IE buffer with a pass through TLV type */ | 59 | /* Wrap the generic IE buffer with a pass through TLV type */ |
59 | ie_header.type = cpu_to_le16(TLV_TYPE_PASSTHROUGH); | 60 | ie_header.type = cpu_to_le16(TLV_TYPE_PASSTHROUGH); |
@@ -123,8 +124,9 @@ mwifiex_cmd_append_tsf_tlv(struct mwifiex_private *priv, u8 **buffer, | |||
123 | 124 | ||
124 | memcpy(&tsf_val, bss_desc->time_stamp, sizeof(tsf_val)); | 125 | memcpy(&tsf_val, bss_desc->time_stamp, sizeof(tsf_val)); |
125 | 126 | ||
126 | dev_dbg(priv->adapter->dev, "info: %s: TSF offset calc: %016llx - " | 127 | dev_dbg(priv->adapter->dev, |
127 | "%016llx\n", __func__, tsf_val, bss_desc->network_tsf); | 128 | "info: %s: TSF offset calc: %016llx - %016llx\n", |
129 | __func__, tsf_val, bss_desc->network_tsf); | ||
128 | 130 | ||
129 | memcpy(*buffer, &tsf_val, sizeof(tsf_val)); | 131 | memcpy(*buffer, &tsf_val, sizeof(tsf_val)); |
130 | *buffer += sizeof(tsf_val); | 132 | *buffer += sizeof(tsf_val); |
@@ -167,7 +169,7 @@ static int mwifiex_get_common_rates(struct mwifiex_private *priv, u8 *rate1, | |||
167 | } | 169 | } |
168 | 170 | ||
169 | dev_dbg(priv->adapter->dev, "info: Tx data rate set to %#x\n", | 171 | dev_dbg(priv->adapter->dev, "info: Tx data rate set to %#x\n", |
170 | priv->data_rate); | 172 | priv->data_rate); |
171 | 173 | ||
172 | if (!priv->is_data_rate_auto) { | 174 | if (!priv->is_data_rate_auto) { |
173 | while (*ptr) { | 175 | while (*ptr) { |
@@ -212,7 +214,7 @@ mwifiex_setup_rates_from_bssdesc(struct mwifiex_private *priv, | |||
212 | card_rates, card_rates_size)) { | 214 | card_rates, card_rates_size)) { |
213 | *out_rates_size = 0; | 215 | *out_rates_size = 0; |
214 | dev_err(priv->adapter->dev, "%s: cannot get common rates\n", | 216 | dev_err(priv->adapter->dev, "%s: cannot get common rates\n", |
215 | __func__); | 217 | __func__); |
216 | return -1; | 218 | return -1; |
217 | } | 219 | } |
218 | 220 | ||
@@ -248,7 +250,7 @@ mwifiex_cmd_append_wapi_ie(struct mwifiex_private *priv, u8 **buffer) | |||
248 | */ | 250 | */ |
249 | if (priv->wapi_ie_len) { | 251 | if (priv->wapi_ie_len) { |
250 | dev_dbg(priv->adapter->dev, "cmd: append wapi ie %d to %p\n", | 252 | dev_dbg(priv->adapter->dev, "cmd: append wapi ie %d to %p\n", |
251 | priv->wapi_ie_len, *buffer); | 253 | priv->wapi_ie_len, *buffer); |
252 | 254 | ||
253 | /* Wrap the generic IE buffer with a pass through TLV type */ | 255 | /* Wrap the generic IE buffer with a pass through TLV type */ |
254 | ie_header.type = cpu_to_le16(TLV_TYPE_WAPI_IE); | 256 | ie_header.type = cpu_to_le16(TLV_TYPE_WAPI_IE); |
@@ -293,10 +295,10 @@ static int mwifiex_append_rsn_ie_wpa_wpa2(struct mwifiex_private *priv, | |||
293 | le16_to_cpu(rsn_ie_tlv->header.type) & 0x00FF); | 295 | le16_to_cpu(rsn_ie_tlv->header.type) & 0x00FF); |
294 | rsn_ie_tlv->header.len = cpu_to_le16((u16) priv->wpa_ie[1]); | 296 | rsn_ie_tlv->header.len = cpu_to_le16((u16) priv->wpa_ie[1]); |
295 | rsn_ie_tlv->header.len = cpu_to_le16(le16_to_cpu(rsn_ie_tlv->header.len) | 297 | rsn_ie_tlv->header.len = cpu_to_le16(le16_to_cpu(rsn_ie_tlv->header.len) |
296 | & 0x00FF); | 298 | & 0x00FF); |
297 | if (le16_to_cpu(rsn_ie_tlv->header.len) <= (sizeof(priv->wpa_ie) - 2)) | 299 | if (le16_to_cpu(rsn_ie_tlv->header.len) <= (sizeof(priv->wpa_ie) - 2)) |
298 | memcpy(rsn_ie_tlv->rsn_ie, &priv->wpa_ie[2], | 300 | memcpy(rsn_ie_tlv->rsn_ie, &priv->wpa_ie[2], |
299 | le16_to_cpu(rsn_ie_tlv->header.len)); | 301 | le16_to_cpu(rsn_ie_tlv->header.len)); |
300 | else | 302 | else |
301 | return -1; | 303 | return -1; |
302 | 304 | ||
@@ -379,7 +381,7 @@ int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv, | |||
379 | ssid_tlv->header.type = cpu_to_le16(WLAN_EID_SSID); | 381 | ssid_tlv->header.type = cpu_to_le16(WLAN_EID_SSID); |
380 | ssid_tlv->header.len = cpu_to_le16((u16) bss_desc->ssid.ssid_len); | 382 | ssid_tlv->header.len = cpu_to_le16((u16) bss_desc->ssid.ssid_len); |
381 | memcpy(ssid_tlv->ssid, bss_desc->ssid.ssid, | 383 | memcpy(ssid_tlv->ssid, bss_desc->ssid.ssid, |
382 | le16_to_cpu(ssid_tlv->header.len)); | 384 | le16_to_cpu(ssid_tlv->header.len)); |
383 | pos += sizeof(ssid_tlv->header) + le16_to_cpu(ssid_tlv->header.len); | 385 | pos += sizeof(ssid_tlv->header) + le16_to_cpu(ssid_tlv->header.len); |
384 | 386 | ||
385 | phy_tlv = (struct mwifiex_ie_types_phy_param_set *) pos; | 387 | phy_tlv = (struct mwifiex_ie_types_phy_param_set *) pos; |
@@ -411,7 +413,7 @@ int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv, | |||
411 | memcpy(rates_tlv->rates, rates, rates_size); | 413 | memcpy(rates_tlv->rates, rates, rates_size); |
412 | pos += sizeof(rates_tlv->header) + rates_size; | 414 | pos += sizeof(rates_tlv->header) + rates_size; |
413 | dev_dbg(priv->adapter->dev, "info: ASSOC_CMD: rates size = %d\n", | 415 | dev_dbg(priv->adapter->dev, "info: ASSOC_CMD: rates size = %d\n", |
414 | rates_size); | 416 | rates_size); |
415 | 417 | ||
416 | /* Add the Authentication type to be used for Auth frames */ | 418 | /* Add the Authentication type to be used for Auth frames */ |
417 | auth_tlv = (struct mwifiex_ie_types_auth_type *) pos; | 419 | auth_tlv = (struct mwifiex_ie_types_auth_type *) pos; |
@@ -425,12 +427,12 @@ int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv, | |||
425 | 427 | ||
426 | pos += sizeof(auth_tlv->header) + le16_to_cpu(auth_tlv->header.len); | 428 | pos += sizeof(auth_tlv->header) + le16_to_cpu(auth_tlv->header.len); |
427 | 429 | ||
428 | if (IS_SUPPORT_MULTI_BANDS(priv->adapter) | 430 | if (IS_SUPPORT_MULTI_BANDS(priv->adapter) && |
429 | && !(ISSUPP_11NENABLED(priv->adapter->fw_cap_info) | 431 | !(ISSUPP_11NENABLED(priv->adapter->fw_cap_info) && |
430 | && (!bss_desc->disable_11n) | 432 | (!bss_desc->disable_11n) && |
431 | && (priv->adapter->config_bands & BAND_GN | 433 | (priv->adapter->config_bands & BAND_GN || |
432 | || priv->adapter->config_bands & BAND_AN) | 434 | priv->adapter->config_bands & BAND_AN) && |
433 | && (bss_desc->bcn_ht_cap) | 435 | (bss_desc->bcn_ht_cap) |
434 | ) | 436 | ) |
435 | ) { | 437 | ) { |
436 | /* Append a channel TLV for the channel the attempted AP was | 438 | /* Append a channel TLV for the channel the attempted AP was |
@@ -445,13 +447,13 @@ int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv, | |||
445 | chan_tlv->chan_scan_param[0].chan_number = | 447 | chan_tlv->chan_scan_param[0].chan_number = |
446 | (bss_desc->phy_param_set.ds_param_set.current_chan); | 448 | (bss_desc->phy_param_set.ds_param_set.current_chan); |
447 | dev_dbg(priv->adapter->dev, "info: Assoc: TLV Chan = %d\n", | 449 | dev_dbg(priv->adapter->dev, "info: Assoc: TLV Chan = %d\n", |
448 | chan_tlv->chan_scan_param[0].chan_number); | 450 | chan_tlv->chan_scan_param[0].chan_number); |
449 | 451 | ||
450 | chan_tlv->chan_scan_param[0].radio_type = | 452 | chan_tlv->chan_scan_param[0].radio_type = |
451 | mwifiex_band_to_radio_type((u8) bss_desc->bss_band); | 453 | mwifiex_band_to_radio_type((u8) bss_desc->bss_band); |
452 | 454 | ||
453 | dev_dbg(priv->adapter->dev, "info: Assoc: TLV Band = %d\n", | 455 | dev_dbg(priv->adapter->dev, "info: Assoc: TLV Band = %d\n", |
454 | chan_tlv->chan_scan_param[0].radio_type); | 456 | chan_tlv->chan_scan_param[0].radio_type); |
455 | pos += sizeof(chan_tlv->header) + | 457 | pos += sizeof(chan_tlv->header) + |
456 | sizeof(struct mwifiex_chan_scan_param_set); | 458 | sizeof(struct mwifiex_chan_scan_param_set); |
457 | } | 459 | } |
@@ -464,10 +466,10 @@ int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv, | |||
464 | return -1; | 466 | return -1; |
465 | } | 467 | } |
466 | 468 | ||
467 | if (ISSUPP_11NENABLED(priv->adapter->fw_cap_info) | 469 | if (ISSUPP_11NENABLED(priv->adapter->fw_cap_info) && |
468 | && (!bss_desc->disable_11n) | 470 | (!bss_desc->disable_11n) && |
469 | && (priv->adapter->config_bands & BAND_GN | 471 | (priv->adapter->config_bands & BAND_GN || |
470 | || priv->adapter->config_bands & BAND_AN)) | 472 | priv->adapter->config_bands & BAND_AN)) |
471 | mwifiex_cmd_append_11n_tlv(priv, bss_desc, &pos); | 473 | mwifiex_cmd_append_11n_tlv(priv, bss_desc, &pos); |
472 | 474 | ||
473 | /* Append vendor specific IE TLV */ | 475 | /* Append vendor specific IE TLV */ |
@@ -493,7 +495,7 @@ int mwifiex_cmd_802_11_associate(struct mwifiex_private *priv, | |||
493 | 495 | ||
494 | tmp_cap &= CAPINFO_MASK; | 496 | tmp_cap &= CAPINFO_MASK; |
495 | dev_dbg(priv->adapter->dev, "info: ASSOC_CMD: tmp_cap=%4X CAPINFO_MASK=%4lX\n", | 497 | dev_dbg(priv->adapter->dev, "info: ASSOC_CMD: tmp_cap=%4X CAPINFO_MASK=%4lX\n", |
496 | tmp_cap, CAPINFO_MASK); | 498 | tmp_cap, CAPINFO_MASK); |
497 | assoc->cap_info_bitmap = cpu_to_le16(tmp_cap); | 499 | assoc->cap_info_bitmap = cpu_to_le16(tmp_cap); |
498 | 500 | ||
499 | return 0; | 501 | return 0; |
@@ -573,17 +575,17 @@ int mwifiex_ret_802_11_associate(struct mwifiex_private *priv, | |||
573 | assoc_rsp = (struct ieee_types_assoc_rsp *) &resp->params; | 575 | assoc_rsp = (struct ieee_types_assoc_rsp *) &resp->params; |
574 | 576 | ||
575 | priv->assoc_rsp_size = min(le16_to_cpu(resp->size) - S_DS_GEN, | 577 | priv->assoc_rsp_size = min(le16_to_cpu(resp->size) - S_DS_GEN, |
576 | sizeof(priv->assoc_rsp_buf)); | 578 | sizeof(priv->assoc_rsp_buf)); |
577 | 579 | ||
578 | memcpy(priv->assoc_rsp_buf, &resp->params, priv->assoc_rsp_size); | 580 | memcpy(priv->assoc_rsp_buf, &resp->params, priv->assoc_rsp_size); |
579 | 581 | ||
580 | if (le16_to_cpu(assoc_rsp->status_code)) { | 582 | if (le16_to_cpu(assoc_rsp->status_code)) { |
581 | priv->adapter->dbg.num_cmd_assoc_failure++; | 583 | priv->adapter->dbg.num_cmd_assoc_failure++; |
582 | dev_err(priv->adapter->dev, "ASSOC_RESP: association failed, " | 584 | dev_err(priv->adapter->dev, |
583 | "status code = %d, error = 0x%x, a_id = 0x%x\n", | 585 | "ASSOC_RESP: failed, status code=%d err=%#x a_id=%#x\n", |
584 | le16_to_cpu(assoc_rsp->status_code), | 586 | le16_to_cpu(assoc_rsp->status_code), |
585 | le16_to_cpu(assoc_rsp->cap_info_bitmap), | 587 | le16_to_cpu(assoc_rsp->cap_info_bitmap), |
586 | le16_to_cpu(assoc_rsp->a_id)); | 588 | le16_to_cpu(assoc_rsp->a_id)); |
587 | 589 | ||
588 | ret = le16_to_cpu(assoc_rsp->status_code); | 590 | ret = le16_to_cpu(assoc_rsp->status_code); |
589 | goto done; | 591 | goto done; |
@@ -600,7 +602,7 @@ int mwifiex_ret_802_11_associate(struct mwifiex_private *priv, | |||
600 | bss_desc = priv->attempted_bss_desc; | 602 | bss_desc = priv->attempted_bss_desc; |
601 | 603 | ||
602 | dev_dbg(priv->adapter->dev, "info: ASSOC_RESP: %s\n", | 604 | dev_dbg(priv->adapter->dev, "info: ASSOC_RESP: %s\n", |
603 | bss_desc->ssid.ssid); | 605 | bss_desc->ssid.ssid); |
604 | 606 | ||
605 | /* Make a copy of current BSSID descriptor */ | 607 | /* Make a copy of current BSSID descriptor */ |
606 | memcpy(&priv->curr_bss_params.bss_descriptor, | 608 | memcpy(&priv->curr_bss_params.bss_descriptor, |
@@ -617,8 +619,8 @@ int mwifiex_ret_802_11_associate(struct mwifiex_private *priv, | |||
617 | else | 619 | else |
618 | priv->curr_bss_params.wmm_enabled = false; | 620 | priv->curr_bss_params.wmm_enabled = false; |
619 | 621 | ||
620 | if ((priv->wmm_required || bss_desc->bcn_ht_cap) | 622 | if ((priv->wmm_required || bss_desc->bcn_ht_cap) && |
621 | && priv->curr_bss_params.wmm_enabled) | 623 | priv->curr_bss_params.wmm_enabled) |
622 | priv->wmm_enabled = true; | 624 | priv->wmm_enabled = true; |
623 | else | 625 | else |
624 | priv->wmm_enabled = false; | 626 | priv->wmm_enabled = false; |
@@ -631,7 +633,7 @@ int mwifiex_ret_802_11_associate(struct mwifiex_private *priv, | |||
631 | IEEE80211_WMM_IE_AP_QOSINFO_UAPSD) ? 1 : 0); | 633 | IEEE80211_WMM_IE_AP_QOSINFO_UAPSD) ? 1 : 0); |
632 | 634 | ||
633 | dev_dbg(priv->adapter->dev, "info: ASSOC_RESP: curr_pkt_filter is %#x\n", | 635 | dev_dbg(priv->adapter->dev, "info: ASSOC_RESP: curr_pkt_filter is %#x\n", |
634 | priv->curr_pkt_filter); | 636 | priv->curr_pkt_filter); |
635 | if (priv->sec_info.wpa_enabled || priv->sec_info.wpa2_enabled) | 637 | if (priv->sec_info.wpa_enabled || priv->sec_info.wpa2_enabled) |
636 | priv->wpa_is_gtk_set = false; | 638 | priv->wpa_is_gtk_set = false; |
637 | 639 | ||
@@ -755,7 +757,7 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv, | |||
755 | memcpy(adhoc_start->ssid, req_ssid->ssid, req_ssid->ssid_len); | 757 | memcpy(adhoc_start->ssid, req_ssid->ssid, req_ssid->ssid_len); |
756 | 758 | ||
757 | dev_dbg(adapter->dev, "info: ADHOC_S_CMD: SSID = %s\n", | 759 | dev_dbg(adapter->dev, "info: ADHOC_S_CMD: SSID = %s\n", |
758 | adhoc_start->ssid); | 760 | adhoc_start->ssid); |
759 | 761 | ||
760 | memset(bss_desc->ssid.ssid, 0, IEEE80211_MAX_SSID_LEN); | 762 | memset(bss_desc->ssid.ssid, 0, IEEE80211_MAX_SSID_LEN); |
761 | memcpy(bss_desc->ssid.ssid, req_ssid->ssid, req_ssid->ssid_len); | 763 | memcpy(bss_desc->ssid.ssid, req_ssid->ssid, req_ssid->ssid_len); |
@@ -792,7 +794,7 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv, | |||
792 | } | 794 | } |
793 | 795 | ||
794 | dev_dbg(adapter->dev, "info: ADHOC_S_CMD: creating ADHOC on channel %d\n", | 796 | dev_dbg(adapter->dev, "info: ADHOC_S_CMD: creating ADHOC on channel %d\n", |
795 | priv->adhoc_channel); | 797 | priv->adhoc_channel); |
796 | 798 | ||
797 | priv->curr_bss_params.bss_descriptor.channel = priv->adhoc_channel; | 799 | priv->curr_bss_params.bss_descriptor.channel = priv->adhoc_channel; |
798 | priv->curr_bss_params.band = adapter->adhoc_start_band; | 800 | priv->curr_bss_params.band = adapter->adhoc_start_band; |
@@ -813,7 +815,7 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv, | |||
813 | adhoc_start->ss_param_set.ibss_param_set.element_id = IBSS_PARA_IE_ID; | 815 | adhoc_start->ss_param_set.ibss_param_set.element_id = IBSS_PARA_IE_ID; |
814 | adhoc_start->ss_param_set.ibss_param_set.len = IBSS_PARA_IE_LEN; | 816 | adhoc_start->ss_param_set.ibss_param_set.len = IBSS_PARA_IE_LEN; |
815 | adhoc_start->ss_param_set.ibss_param_set.atim_window | 817 | adhoc_start->ss_param_set.ibss_param_set.atim_window |
816 | = cpu_to_le16(priv->atim_window); | 818 | = cpu_to_le16(priv->atim_window); |
817 | memcpy(&bss_desc->ss_param_set, &adhoc_start->ss_param_set, | 819 | memcpy(&bss_desc->ss_param_set, &adhoc_start->ss_param_set, |
818 | sizeof(union ieee_types_ss_param_set)); | 820 | sizeof(union ieee_types_ss_param_set)); |
819 | 821 | ||
@@ -841,10 +843,10 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv, | |||
841 | if ((adapter->adhoc_start_band & BAND_G) && | 843 | if ((adapter->adhoc_start_band & BAND_G) && |
842 | (priv->curr_pkt_filter & HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON)) { | 844 | (priv->curr_pkt_filter & HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON)) { |
843 | if (mwifiex_send_cmd_async(priv, HostCmd_CMD_MAC_CONTROL, | 845 | if (mwifiex_send_cmd_async(priv, HostCmd_CMD_MAC_CONTROL, |
844 | HostCmd_ACT_GEN_SET, 0, | 846 | HostCmd_ACT_GEN_SET, 0, |
845 | &priv->curr_pkt_filter)) { | 847 | &priv->curr_pkt_filter)) { |
846 | dev_err(adapter->dev, | 848 | dev_err(adapter->dev, |
847 | "ADHOC_S_CMD: G Protection config failed\n"); | 849 | "ADHOC_S_CMD: G Protection config failed\n"); |
848 | return -1; | 850 | return -1; |
849 | } | 851 | } |
850 | } | 852 | } |
@@ -860,8 +862,8 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv, | |||
860 | &adhoc_start->data_rate, priv->curr_bss_params.num_of_rates); | 862 | &adhoc_start->data_rate, priv->curr_bss_params.num_of_rates); |
861 | 863 | ||
862 | dev_dbg(adapter->dev, "info: ADHOC_S_CMD: rates=%02x %02x %02x %02x\n", | 864 | dev_dbg(adapter->dev, "info: ADHOC_S_CMD: rates=%02x %02x %02x %02x\n", |
863 | adhoc_start->data_rate[0], adhoc_start->data_rate[1], | 865 | adhoc_start->data_rate[0], adhoc_start->data_rate[1], |
864 | adhoc_start->data_rate[2], adhoc_start->data_rate[3]); | 866 | adhoc_start->data_rate[2], adhoc_start->data_rate[3]); |
865 | 867 | ||
866 | dev_dbg(adapter->dev, "info: ADHOC_S_CMD: AD-HOC Start command is ready\n"); | 868 | dev_dbg(adapter->dev, "info: ADHOC_S_CMD: AD-HOC Start command is ready\n"); |
867 | 869 | ||
@@ -878,12 +880,12 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv, | |||
878 | (u8) priv->curr_bss_params.bss_descriptor.channel; | 880 | (u8) priv->curr_bss_params.bss_descriptor.channel; |
879 | 881 | ||
880 | dev_dbg(adapter->dev, "info: ADHOC_S_CMD: TLV Chan = %d\n", | 882 | dev_dbg(adapter->dev, "info: ADHOC_S_CMD: TLV Chan = %d\n", |
881 | chan_tlv->chan_scan_param[0].chan_number); | 883 | chan_tlv->chan_scan_param[0].chan_number); |
882 | 884 | ||
883 | chan_tlv->chan_scan_param[0].radio_type | 885 | chan_tlv->chan_scan_param[0].radio_type |
884 | = mwifiex_band_to_radio_type(priv->curr_bss_params.band); | 886 | = mwifiex_band_to_radio_type(priv->curr_bss_params.band); |
885 | if (adapter->adhoc_start_band & BAND_GN | 887 | if (adapter->adhoc_start_band & BAND_GN || |
886 | || adapter->adhoc_start_band & BAND_AN) { | 888 | adapter->adhoc_start_band & BAND_AN) { |
887 | if (adapter->sec_chan_offset == | 889 | if (adapter->sec_chan_offset == |
888 | IEEE80211_HT_PARAM_CHA_SEC_ABOVE) | 890 | IEEE80211_HT_PARAM_CHA_SEC_ABOVE) |
889 | chan_tlv->chan_scan_param[0].radio_type |= | 891 | chan_tlv->chan_scan_param[0].radio_type |= |
@@ -894,7 +896,7 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv, | |||
894 | (IEEE80211_HT_PARAM_CHA_SEC_BELOW << 4); | 896 | (IEEE80211_HT_PARAM_CHA_SEC_BELOW << 4); |
895 | } | 897 | } |
896 | dev_dbg(adapter->dev, "info: ADHOC_S_CMD: TLV Band = %d\n", | 898 | dev_dbg(adapter->dev, "info: ADHOC_S_CMD: TLV Band = %d\n", |
897 | chan_tlv->chan_scan_param[0].radio_type); | 899 | chan_tlv->chan_scan_param[0].radio_type); |
898 | pos += sizeof(chan_tlv->header) + | 900 | pos += sizeof(chan_tlv->header) + |
899 | sizeof(struct mwifiex_chan_scan_param_set); | 901 | sizeof(struct mwifiex_chan_scan_param_set); |
900 | cmd_append_size += | 902 | cmd_append_size += |
@@ -925,15 +927,14 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv, | |||
925 | mwifiex_fill_cap_info(priv, radio_type, ht_cap); | 927 | mwifiex_fill_cap_info(priv, radio_type, ht_cap); |
926 | 928 | ||
927 | pos += sizeof(struct mwifiex_ie_types_htcap); | 929 | pos += sizeof(struct mwifiex_ie_types_htcap); |
928 | cmd_append_size += | 930 | cmd_append_size += sizeof(struct mwifiex_ie_types_htcap); |
929 | sizeof(struct mwifiex_ie_types_htcap); | ||
930 | 931 | ||
931 | /* Fill HT INFORMATION */ | 932 | /* Fill HT INFORMATION */ |
932 | ht_info = (struct mwifiex_ie_types_htinfo *) pos; | 933 | ht_info = (struct mwifiex_ie_types_htinfo *) pos; |
933 | memset(ht_info, 0, sizeof(struct mwifiex_ie_types_htinfo)); | 934 | memset(ht_info, 0, sizeof(struct mwifiex_ie_types_htinfo)); |
934 | ht_info->header.type = cpu_to_le16(WLAN_EID_HT_INFORMATION); | 935 | ht_info->header.type = cpu_to_le16(WLAN_EID_HT_INFORMATION); |
935 | ht_info->header.len = | 936 | ht_info->header.len = |
936 | cpu_to_le16(sizeof(struct ieee80211_ht_info)); | 937 | cpu_to_le16(sizeof(struct ieee80211_ht_info)); |
937 | 938 | ||
938 | ht_info->ht_info.control_chan = | 939 | ht_info->ht_info.control_chan = |
939 | (u8) priv->curr_bss_params.bss_descriptor.channel; | 940 | (u8) priv->curr_bss_params.bss_descriptor.channel; |
@@ -947,12 +948,12 @@ mwifiex_cmd_802_11_ad_hoc_start(struct mwifiex_private *priv, | |||
947 | ht_info->ht_info.basic_set[0] = 0xff; | 948 | ht_info->ht_info.basic_set[0] = 0xff; |
948 | pos += sizeof(struct mwifiex_ie_types_htinfo); | 949 | pos += sizeof(struct mwifiex_ie_types_htinfo); |
949 | cmd_append_size += | 950 | cmd_append_size += |
950 | sizeof(struct mwifiex_ie_types_htinfo); | 951 | sizeof(struct mwifiex_ie_types_htinfo); |
951 | } | 952 | } |
952 | 953 | ||
953 | cmd->size = cpu_to_le16((u16) | 954 | cmd->size = |
954 | (sizeof(struct host_cmd_ds_802_11_ad_hoc_start) | 955 | cpu_to_le16((u16)(sizeof(struct host_cmd_ds_802_11_ad_hoc_start) |
955 | + S_DS_GEN + cmd_append_size)); | 956 | + S_DS_GEN + cmd_append_size)); |
956 | 957 | ||
957 | if (adapter->adhoc_start_band == BAND_B) | 958 | if (adapter->adhoc_start_band == BAND_B) |
958 | tmp_cap &= ~WLAN_CAPABILITY_SHORT_SLOT_TIME; | 959 | tmp_cap &= ~WLAN_CAPABILITY_SHORT_SLOT_TIME; |
@@ -1005,10 +1006,10 @@ mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv, | |||
1005 | curr_pkt_filter | HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON; | 1006 | curr_pkt_filter | HostCmd_ACT_MAC_ADHOC_G_PROTECTION_ON; |
1006 | 1007 | ||
1007 | if (mwifiex_send_cmd_async(priv, HostCmd_CMD_MAC_CONTROL, | 1008 | if (mwifiex_send_cmd_async(priv, HostCmd_CMD_MAC_CONTROL, |
1008 | HostCmd_ACT_GEN_SET, 0, | 1009 | HostCmd_ACT_GEN_SET, 0, |
1009 | &curr_pkt_filter)) { | 1010 | &curr_pkt_filter)) { |
1010 | dev_err(priv->adapter->dev, | 1011 | dev_err(priv->adapter->dev, |
1011 | "ADHOC_J_CMD: G Protection config failed\n"); | 1012 | "ADHOC_J_CMD: G Protection config failed\n"); |
1012 | return -1; | 1013 | return -1; |
1013 | } | 1014 | } |
1014 | } | 1015 | } |
@@ -1039,13 +1040,14 @@ mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv, | |||
1039 | 1040 | ||
1040 | tmp_cap &= CAPINFO_MASK; | 1041 | tmp_cap &= CAPINFO_MASK; |
1041 | 1042 | ||
1042 | dev_dbg(priv->adapter->dev, "info: ADHOC_J_CMD: tmp_cap=%4X" | 1043 | dev_dbg(priv->adapter->dev, |
1043 | " CAPINFO_MASK=%4lX\n", tmp_cap, CAPINFO_MASK); | 1044 | "info: ADHOC_J_CMD: tmp_cap=%4X CAPINFO_MASK=%4lX\n", |
1045 | tmp_cap, CAPINFO_MASK); | ||
1044 | 1046 | ||
1045 | /* Information on BSSID descriptor passed to FW */ | 1047 | /* Information on BSSID descriptor passed to FW */ |
1046 | dev_dbg(priv->adapter->dev, "info: ADHOC_J_CMD: BSSID = %pM, SSID = %s\n", | 1048 | dev_dbg(priv->adapter->dev, "info: ADHOC_J_CMD: BSSID=%pM, SSID='%s'\n", |
1047 | adhoc_join->bss_descriptor.bssid, | 1049 | adhoc_join->bss_descriptor.bssid, |
1048 | adhoc_join->bss_descriptor.ssid); | 1050 | adhoc_join->bss_descriptor.ssid); |
1049 | 1051 | ||
1050 | for (i = 0; bss_desc->supported_rates[i] && | 1052 | for (i = 0; bss_desc->supported_rates[i] && |
1051 | i < MWIFIEX_SUPPORTED_RATES; | 1053 | i < MWIFIEX_SUPPORTED_RATES; |
@@ -1082,18 +1084,18 @@ mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv, | |||
1082 | sizeof(struct mwifiex_chan_scan_param_set)); | 1084 | sizeof(struct mwifiex_chan_scan_param_set)); |
1083 | chan_tlv->chan_scan_param[0].chan_number = | 1085 | chan_tlv->chan_scan_param[0].chan_number = |
1084 | (bss_desc->phy_param_set.ds_param_set.current_chan); | 1086 | (bss_desc->phy_param_set.ds_param_set.current_chan); |
1085 | dev_dbg(priv->adapter->dev, "info: ADHOC_J_CMD: TLV Chan = %d\n", | 1087 | dev_dbg(priv->adapter->dev, "info: ADHOC_J_CMD: TLV Chan=%d\n", |
1086 | chan_tlv->chan_scan_param[0].chan_number); | 1088 | chan_tlv->chan_scan_param[0].chan_number); |
1087 | 1089 | ||
1088 | chan_tlv->chan_scan_param[0].radio_type = | 1090 | chan_tlv->chan_scan_param[0].radio_type = |
1089 | mwifiex_band_to_radio_type((u8) bss_desc->bss_band); | 1091 | mwifiex_band_to_radio_type((u8) bss_desc->bss_band); |
1090 | 1092 | ||
1091 | dev_dbg(priv->adapter->dev, "info: ADHOC_J_CMD: TLV Band = %d\n", | 1093 | dev_dbg(priv->adapter->dev, "info: ADHOC_J_CMD: TLV Band=%d\n", |
1092 | chan_tlv->chan_scan_param[0].radio_type); | 1094 | chan_tlv->chan_scan_param[0].radio_type); |
1093 | pos += sizeof(chan_tlv->header) + | 1095 | pos += sizeof(chan_tlv->header) + |
1094 | sizeof(struct mwifiex_chan_scan_param_set); | 1096 | sizeof(struct mwifiex_chan_scan_param_set); |
1095 | cmd_append_size += sizeof(chan_tlv->header) + | 1097 | cmd_append_size += sizeof(chan_tlv->header) + |
1096 | sizeof(struct mwifiex_chan_scan_param_set); | 1098 | sizeof(struct mwifiex_chan_scan_param_set); |
1097 | } | 1099 | } |
1098 | 1100 | ||
1099 | if (priv->sec_info.wpa_enabled) | 1101 | if (priv->sec_info.wpa_enabled) |
@@ -1110,9 +1112,9 @@ mwifiex_cmd_802_11_ad_hoc_join(struct mwifiex_private *priv, | |||
1110 | cmd_append_size += mwifiex_cmd_append_vsie_tlv(priv, | 1112 | cmd_append_size += mwifiex_cmd_append_vsie_tlv(priv, |
1111 | MWIFIEX_VSIE_MASK_ADHOC, &pos); | 1113 | MWIFIEX_VSIE_MASK_ADHOC, &pos); |
1112 | 1114 | ||
1113 | cmd->size = cpu_to_le16((u16) | 1115 | cmd->size = cpu_to_le16 |
1114 | (sizeof(struct host_cmd_ds_802_11_ad_hoc_join) | 1116 | ((u16) (sizeof(struct host_cmd_ds_802_11_ad_hoc_join) |
1115 | + S_DS_GEN + cmd_append_size)); | 1117 | + S_DS_GEN + cmd_append_size)); |
1116 | 1118 | ||
1117 | adhoc_join->bss_descriptor.cap_info_bitmap = cpu_to_le16(tmp_cap); | 1119 | adhoc_join->bss_descriptor.cap_info_bitmap = cpu_to_le16(tmp_cap); |
1118 | 1120 | ||
@@ -1157,7 +1159,7 @@ int mwifiex_ret_802_11_ad_hoc(struct mwifiex_private *priv, | |||
1157 | 1159 | ||
1158 | if (le16_to_cpu(resp->command) == HostCmd_CMD_802_11_AD_HOC_START) { | 1160 | if (le16_to_cpu(resp->command) == HostCmd_CMD_802_11_AD_HOC_START) { |
1159 | dev_dbg(priv->adapter->dev, "info: ADHOC_S_RESP %s\n", | 1161 | dev_dbg(priv->adapter->dev, "info: ADHOC_S_RESP %s\n", |
1160 | bss_desc->ssid.ssid); | 1162 | bss_desc->ssid.ssid); |
1161 | 1163 | ||
1162 | /* Update the created network descriptor with the new BSSID */ | 1164 | /* Update the created network descriptor with the new BSSID */ |
1163 | memcpy(bss_desc->mac_address, | 1165 | memcpy(bss_desc->mac_address, |
@@ -1170,7 +1172,7 @@ int mwifiex_ret_802_11_ad_hoc(struct mwifiex_private *priv, | |||
1170 | * If BSSID has changed use SSID to compare instead of BSSID | 1172 | * If BSSID has changed use SSID to compare instead of BSSID |
1171 | */ | 1173 | */ |
1172 | dev_dbg(priv->adapter->dev, "info: ADHOC_J_RESP %s\n", | 1174 | dev_dbg(priv->adapter->dev, "info: ADHOC_J_RESP %s\n", |
1173 | bss_desc->ssid.ssid); | 1175 | bss_desc->ssid.ssid); |
1174 | 1176 | ||
1175 | /* | 1177 | /* |
1176 | * Make a copy of current BSSID descriptor, only needed for | 1178 | * Make a copy of current BSSID descriptor, only needed for |
@@ -1184,9 +1186,9 @@ int mwifiex_ret_802_11_ad_hoc(struct mwifiex_private *priv, | |||
1184 | } | 1186 | } |
1185 | 1187 | ||
1186 | dev_dbg(priv->adapter->dev, "info: ADHOC_RESP: channel = %d\n", | 1188 | dev_dbg(priv->adapter->dev, "info: ADHOC_RESP: channel = %d\n", |
1187 | priv->adhoc_channel); | 1189 | priv->adhoc_channel); |
1188 | dev_dbg(priv->adapter->dev, "info: ADHOC_RESP: BSSID = %pM\n", | 1190 | dev_dbg(priv->adapter->dev, "info: ADHOC_RESP: BSSID = %pM\n", |
1189 | priv->curr_bss_params.bss_descriptor.mac_address); | 1191 | priv->curr_bss_params.bss_descriptor.mac_address); |
1190 | 1192 | ||
1191 | if (!netif_carrier_ok(priv->netdev)) | 1193 | if (!netif_carrier_ok(priv->netdev)) |
1192 | netif_carrier_on(priv->netdev); | 1194 | netif_carrier_on(priv->netdev); |
@@ -1249,9 +1251,9 @@ mwifiex_adhoc_start(struct mwifiex_private *priv, | |||
1249 | dev_dbg(priv->adapter->dev, "info: Adhoc Channel = %d\n", | 1251 | dev_dbg(priv->adapter->dev, "info: Adhoc Channel = %d\n", |
1250 | priv->adhoc_channel); | 1252 | priv->adhoc_channel); |
1251 | dev_dbg(priv->adapter->dev, "info: curr_bss_params.channel = %d\n", | 1253 | dev_dbg(priv->adapter->dev, "info: curr_bss_params.channel = %d\n", |
1252 | priv->curr_bss_params.bss_descriptor.channel); | 1254 | priv->curr_bss_params.bss_descriptor.channel); |
1253 | dev_dbg(priv->adapter->dev, "info: curr_bss_params.band = %d\n", | 1255 | dev_dbg(priv->adapter->dev, "info: curr_bss_params.band = %d\n", |
1254 | priv->curr_bss_params.band); | 1256 | priv->curr_bss_params.band); |
1255 | 1257 | ||
1256 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_AD_HOC_START, | 1258 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_AD_HOC_START, |
1257 | HostCmd_ACT_GEN_SET, 0, adhoc_ssid); | 1259 | HostCmd_ACT_GEN_SET, 0, adhoc_ssid); |
@@ -1267,13 +1269,13 @@ int mwifiex_adhoc_join(struct mwifiex_private *priv, | |||
1267 | struct mwifiex_bssdescriptor *bss_desc) | 1269 | struct mwifiex_bssdescriptor *bss_desc) |
1268 | { | 1270 | { |
1269 | dev_dbg(priv->adapter->dev, "info: adhoc join: curr_bss ssid =%s\n", | 1271 | dev_dbg(priv->adapter->dev, "info: adhoc join: curr_bss ssid =%s\n", |
1270 | priv->curr_bss_params.bss_descriptor.ssid.ssid); | 1272 | priv->curr_bss_params.bss_descriptor.ssid.ssid); |
1271 | dev_dbg(priv->adapter->dev, "info: adhoc join: curr_bss ssid_len =%u\n", | 1273 | dev_dbg(priv->adapter->dev, "info: adhoc join: curr_bss ssid_len =%u\n", |
1272 | priv->curr_bss_params.bss_descriptor.ssid.ssid_len); | 1274 | priv->curr_bss_params.bss_descriptor.ssid.ssid_len); |
1273 | dev_dbg(priv->adapter->dev, "info: adhoc join: ssid =%s\n", | 1275 | dev_dbg(priv->adapter->dev, "info: adhoc join: ssid =%s\n", |
1274 | bss_desc->ssid.ssid); | 1276 | bss_desc->ssid.ssid); |
1275 | dev_dbg(priv->adapter->dev, "info: adhoc join: ssid_len =%u\n", | 1277 | dev_dbg(priv->adapter->dev, "info: adhoc join: ssid_len =%u\n", |
1276 | bss_desc->ssid.ssid_len); | 1278 | bss_desc->ssid.ssid_len); |
1277 | 1279 | ||
1278 | /* Check if the requested SSID is already joined */ | 1280 | /* Check if the requested SSID is already joined */ |
1279 | if (priv->curr_bss_params.bss_descriptor.ssid.ssid_len && | 1281 | if (priv->curr_bss_params.bss_descriptor.ssid.ssid_len && |
@@ -1287,9 +1289,9 @@ int mwifiex_adhoc_join(struct mwifiex_private *priv, | |||
1287 | } | 1289 | } |
1288 | 1290 | ||
1289 | dev_dbg(priv->adapter->dev, "info: curr_bss_params.channel = %d\n", | 1291 | dev_dbg(priv->adapter->dev, "info: curr_bss_params.channel = %d\n", |
1290 | priv->curr_bss_params.bss_descriptor.channel); | 1292 | priv->curr_bss_params.bss_descriptor.channel); |
1291 | dev_dbg(priv->adapter->dev, "info: curr_bss_params.band = %c\n", | 1293 | dev_dbg(priv->adapter->dev, "info: curr_bss_params.band = %c\n", |
1292 | priv->curr_bss_params.band); | 1294 | priv->curr_bss_params.band); |
1293 | 1295 | ||
1294 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_AD_HOC_JOIN, | 1296 | return mwifiex_send_cmd_sync(priv, HostCmd_CMD_802_11_AD_HOC_JOIN, |
1295 | HostCmd_ACT_GEN_SET, 0, bss_desc); | 1297 | HostCmd_ACT_GEN_SET, 0, bss_desc); |