diff options
Diffstat (limited to 'drivers/net/wireless/mwifiex/scan.c')
-rw-r--r-- | drivers/net/wireless/mwifiex/scan.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/net/wireless/mwifiex/scan.c b/drivers/net/wireless/mwifiex/scan.c index dae8dbb24a03..8d3ab378662b 100644 --- a/drivers/net/wireless/mwifiex/scan.c +++ b/drivers/net/wireless/mwifiex/scan.c | |||
@@ -819,8 +819,10 @@ mwifiex_scan_setup_scan_config(struct mwifiex_private *priv, | |||
819 | wildcard_ssid_tlv->header.len = cpu_to_le16( | 819 | wildcard_ssid_tlv->header.len = cpu_to_le16( |
820 | (u16) (ssid_len + sizeof(wildcard_ssid_tlv-> | 820 | (u16) (ssid_len + sizeof(wildcard_ssid_tlv-> |
821 | max_ssid_length))); | 821 | max_ssid_length))); |
822 | wildcard_ssid_tlv->max_ssid_length = | 822 | |
823 | user_scan_in->ssid_list[ssid_idx].max_len; | 823 | /* max_ssid_length = 0 tells firmware to perform |
824 | specific scan for the SSID filled */ | ||
825 | wildcard_ssid_tlv->max_ssid_length = 0; | ||
824 | 826 | ||
825 | memcpy(wildcard_ssid_tlv->ssid, | 827 | memcpy(wildcard_ssid_tlv->ssid, |
826 | user_scan_in->ssid_list[ssid_idx].ssid, | 828 | user_scan_in->ssid_list[ssid_idx].ssid, |
@@ -1469,7 +1471,7 @@ mwifiex_update_curr_bss_params(struct mwifiex_private *priv, u8 *bssid, | |||
1469 | s32 rssi, const u8 *ie_buf, size_t ie_len, | 1471 | s32 rssi, const u8 *ie_buf, size_t ie_len, |
1470 | u16 beacon_period, u16 cap_info_bitmap, u8 band) | 1472 | u16 beacon_period, u16 cap_info_bitmap, u8 band) |
1471 | { | 1473 | { |
1472 | struct mwifiex_bssdescriptor *bss_desc = NULL; | 1474 | struct mwifiex_bssdescriptor *bss_desc; |
1473 | int ret; | 1475 | int ret; |
1474 | unsigned long flags; | 1476 | unsigned long flags; |
1475 | u8 *beacon_ie; | 1477 | u8 *beacon_ie; |
@@ -1484,6 +1486,7 @@ mwifiex_update_curr_bss_params(struct mwifiex_private *priv, u8 *bssid, | |||
1484 | 1486 | ||
1485 | beacon_ie = kmemdup(ie_buf, ie_len, GFP_KERNEL); | 1487 | beacon_ie = kmemdup(ie_buf, ie_len, GFP_KERNEL); |
1486 | if (!beacon_ie) { | 1488 | if (!beacon_ie) { |
1489 | kfree(bss_desc); | ||
1487 | dev_err(priv->adapter->dev, " failed to alloc beacon_ie\n"); | 1490 | dev_err(priv->adapter->dev, " failed to alloc beacon_ie\n"); |
1488 | return -ENOMEM; | 1491 | return -ENOMEM; |
1489 | } | 1492 | } |