]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
wifi: mwifiex: cleanup struct mwifiex_private
authorDmitry Antipov <dmantipov@yandex.ru>
Fri, 27 Sep 2024 08:43:17 +0000 (11:43 +0300)
committerKalle Valo <kvalo@kernel.org>
Thu, 17 Oct 2024 16:48:28 +0000 (19:48 +0300)
Remove set but otherwise unused 'adhoc_is_link_sensed' and
'assoc_resp_ht_param' members of 'struct mwifiex_private' and
simplify related code in 'mwifiex_ret_802_11_associate()'.
Compile tested only.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://patch.msgid.link/20240927084317.96687-2-dmantipov@yandex.ru
drivers/net/wireless/marvell/mwifiex/join.c
drivers/net/wireless/marvell/mwifiex/main.h
drivers/net/wireless/marvell/mwifiex/sta_event.c
drivers/net/wireless/marvell/mwifiex/sta_ioctl.c

index 6d8f1d1d7ca4e9900aea1f6916d47968cc2eac14..5a1a0287c1d58bf44b7e7a0711950ef2ba2fd7cf 100644 (file)
@@ -663,7 +663,6 @@ int mwifiex_ret_802_11_associate(struct mwifiex_private *priv,
        bool enable_data = true;
        u16 cap_info, status_code, aid;
        const u8 *ie_ptr;
-       struct ieee80211_ht_operation *assoc_resp_ht_oper;
 
        if (!priv->attempted_bss_desc) {
                mwifiex_dbg(priv->adapter, ERROR,
@@ -779,14 +778,8 @@ int mwifiex_ret_802_11_associate(struct mwifiex_private *priv,
        ie_ptr = cfg80211_find_ie(WLAN_EID_HT_OPERATION, assoc_rsp->ie_buffer,
                                  priv->assoc_rsp_size
                                  - sizeof(struct ieee_types_assoc_rsp));
-       if (ie_ptr) {
-               assoc_resp_ht_oper = (struct ieee80211_ht_operation *)(ie_ptr
-                                       + sizeof(struct ieee_types_header));
-               priv->assoc_resp_ht_param = assoc_resp_ht_oper->ht_param;
-               priv->ht_param_present = true;
-       } else {
-               priv->ht_param_present = false;
-       }
+
+       priv->ht_param_present = ie_ptr ? true : false;
 
        mwifiex_dbg(priv->adapter, INFO,
                    "info: ASSOC_RESP: curr_pkt_filter is %#x\n",
index f993dd885d154dc32fc93fada2c678d33efc57fc..0674dcf7a53745b6ff16971d3bb6f2ecabfb8690 100644 (file)
@@ -573,7 +573,6 @@ struct mwifiex_private {
        u16 listen_interval;
        u16 atim_window;
        u8 adhoc_channel;
-       u8 adhoc_is_link_sensed;
        u8 adhoc_state;
        struct mwifiex_802_11_security sec_info;
        struct mwifiex_wep_key wep_key[NUM_WEP_KEYS];
@@ -682,7 +681,6 @@ struct mwifiex_private {
        struct mwifiex_ds_mem_rw mem_rw;
        struct sk_buff_head bypass_txq;
        struct mwifiex_user_scan_chan hidden_chan[MWIFIEX_USER_SCAN_CHAN_MAX];
-       u8 assoc_resp_ht_param;
        bool ht_param_present;
 };
 
index b5f3821a6a8f21c8ca6f8958335e61b184223385..400348abeee549382d12ae1acc33ff5975de99cb 100644 (file)
@@ -177,17 +177,14 @@ void mwifiex_reset_connect_state(struct mwifiex_private *priv, u16 reason_code,
        priv->is_data_rate_auto = true;
        priv->data_rate = 0;
 
-       priv->assoc_resp_ht_param = 0;
        priv->ht_param_present = false;
 
        if ((GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_STA ||
             GET_BSS_ROLE(priv) == MWIFIEX_BSS_ROLE_UAP) && priv->hist_data)
                mwifiex_hist_data_reset(priv);
 
-       if (priv->bss_mode == NL80211_IFTYPE_ADHOC) {
+       if (priv->bss_mode == NL80211_IFTYPE_ADHOC)
                priv->adhoc_state = ADHOC_IDLE;
-               priv->adhoc_is_link_sensed = false;
-       }
 
        /*
         * Memorize the previous SSID and BSSID so
@@ -843,7 +840,6 @@ int mwifiex_process_sta_event(struct mwifiex_private *priv)
 
        case EVENT_ADHOC_BCN_LOST:
                mwifiex_dbg(adapter, EVENT, "event: ADHOC_BCN_LOST\n");
-               priv->adhoc_is_link_sensed = false;
                mwifiex_clean_txrx(priv);
                mwifiex_stop_net_dev_queue(priv->netdev, adapter);
                if (netif_carrier_ok(priv->netdev))
index d3cba6895f8ce45f524cd3bcd59d639d8c788ed3..e06a0622973e728f9236a381150ae31fca9d48a0 100644 (file)
@@ -351,8 +351,6 @@ int mwifiex_bss_start(struct mwifiex_private *priv, struct cfg80211_bss *bss,
                        goto done;
                }
 
-               priv->adhoc_is_link_sensed = false;
-
                ret = mwifiex_check_network_compatibility(priv, bss_desc);
 
                mwifiex_stop_net_dev_queue(priv->netdev, adapter);