]> Pileus Git - ~andy/linux/commitdiff
mwifiex: remove redundant initialization for bss_descriptor master-2013-04-22-2
authorBing Zhao <bzhao@marvell.com>
Fri, 12 Apr 2013 17:34:18 +0000 (10:34 -0700)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 22 Apr 2013 19:38:36 +0000 (15:38 -0400)
Initialization of bss_descriptor is unnecessary as the entire
structure will be overwritten by a memcpy followed by.

Initialize disable_11ac flag properly by setting it to true in
mwifiex_fill_new_bss_desc().

Reported-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Signed-off-by: Bing Zhao <bzhao@marvell.com>
Signed-off-by: Yogesh Ashok Powar <yogeshp@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/mwifiex/scan.c
drivers/net/wireless/mwifiex/sta_ioctl.c

index 37b24e8308442447b08ad48a88df0ff2ecc13d37..9cf5d8f07df80b63d5385c416b5206025c3a776b 100644 (file)
@@ -1500,36 +1500,7 @@ static int mwifiex_update_curr_bss_params(struct mwifiex_private *priv,
        if (ret)
                goto done;
 
-       /* Update current bss descriptor parameters */
        spin_lock_irqsave(&priv->curr_bcn_buf_lock, flags);
-       priv->curr_bss_params.bss_descriptor.bcn_wpa_ie = NULL;
-       priv->curr_bss_params.bss_descriptor.wpa_offset = 0;
-       priv->curr_bss_params.bss_descriptor.bcn_rsn_ie = NULL;
-       priv->curr_bss_params.bss_descriptor.rsn_offset = 0;
-       priv->curr_bss_params.bss_descriptor.bcn_wapi_ie = NULL;
-       priv->curr_bss_params.bss_descriptor.wapi_offset = 0;
-       priv->curr_bss_params.bss_descriptor.bcn_ht_cap = NULL;
-       priv->curr_bss_params.bss_descriptor.ht_cap_offset = 0;
-       priv->curr_bss_params.bss_descriptor.bcn_ht_oper = NULL;
-       priv->curr_bss_params.bss_descriptor.ht_info_offset = 0;
-       priv->curr_bss_params.bss_descriptor.bcn_bss_co_2040 = NULL;
-       priv->curr_bss_params.bss_descriptor.bss_co_2040_offset = 0;
-       priv->curr_bss_params.bss_descriptor.bcn_ext_cap = NULL;
-       priv->curr_bss_params.bss_descriptor.ext_cap_offset = 0;
-       priv->curr_bss_params.bss_descriptor.beacon_buf = NULL;
-       priv->curr_bss_params.bss_descriptor.beacon_buf_size = 0;
-       priv->curr_bss_params.bss_descriptor.bcn_vht_cap = NULL;
-       priv->curr_bss_params.bss_descriptor.vht_cap_offset = 0;
-       priv->curr_bss_params.bss_descriptor.bcn_vht_oper = NULL;
-       priv->curr_bss_params.bss_descriptor.vht_info_offset = 0;
-       priv->curr_bss_params.bss_descriptor.oper_mode = NULL;
-       priv->curr_bss_params.bss_descriptor.oper_mode_offset = 0;
-
-       /* Disable 11ac by default. Enable it only where there
-        * exist VHT_CAP IE in AP beacon
-        */
-       priv->curr_bss_params.bss_descriptor.disable_11ac = true;
-
        /* Make a copy of current BSSID descriptor */
        memcpy(&priv->curr_bss_params.bss_descriptor, bss_desc,
               sizeof(priv->curr_bss_params.bss_descriptor));
index 27729cfef151b24240a838aeea009f13e8f3fe9e..311d0b26b81c0508177e3dc1297a4da967644ae1 100644 (file)
@@ -184,6 +184,11 @@ int mwifiex_fill_new_bss_desc(struct mwifiex_private *priv,
        else
                bss_desc->bss_mode = NL80211_IFTYPE_STATION;
 
+       /* Disable 11ac by default. Enable it only where there
+        * exist VHT_CAP IE in AP beacon
+        */
+       bss_desc->disable_11ac = true;
+
        return mwifiex_update_bss_desc_with_ie(priv->adapter, bss_desc);
 }