staging: rtl8192e: Remove unused function rtllib_probe_resp()
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Fri, 24 Nov 2023 21:31:15 +0000 (22:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 26 Nov 2023 10:27:49 +0000 (10:27 +0000)
Remove unused function rtllib_probe_resp().

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/be709ffea087df6f960075a51c0eab89f86ef8b2.1700860759.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtllib_softmac.c

index 8c7ad56d4402294936a9d91404f1f12c27afd612..d20970652432241a723d7823319541d17164629a 100644 (file)
@@ -632,152 +632,6 @@ rtllib_authentication_req(struct rtllib_network *beacon,
        return skb;
 }
 
-static struct sk_buff *rtllib_probe_resp(struct rtllib_device *ieee,
-                                        const u8 *dest)
-{
-       u8 *tag;
-       int beacon_size;
-       struct rtllib_probe_response *beacon_buf;
-       struct sk_buff *skb = NULL;
-       int encrypt;
-       int atim_len, erp_len;
-       struct lib80211_crypt_data *crypt;
-
-       char *ssid = ieee->current_network.ssid;
-       int ssid_len = ieee->current_network.ssid_len;
-       int rate_len = ieee->current_network.rates_len + 2;
-       int rate_ex_len = ieee->current_network.rates_ex_len;
-       int wpa_ie_len = ieee->wpa_ie_len;
-       u8 erpinfo_content = 0;
-
-       u8 *tmp_ht_cap_buf = NULL;
-       u8 tmp_ht_cap_len = 0;
-       u8 *tmp_ht_info_buf = NULL;
-       u8 tmp_ht_info_len = 0;
-       struct rt_hi_throughput *ht_info = ieee->ht_info;
-       u8 *tmp_generic_ie_buf = NULL;
-       u8 tmp_generic_ie_len = 0;
-
-       if (rate_ex_len > 0)
-               rate_ex_len += 2;
-
-       if (ieee->current_network.capability & WLAN_CAPABILITY_IBSS)
-               atim_len = 4;
-       else
-               atim_len = 0;
-
-       if ((ieee->current_network.mode == WIRELESS_MODE_G) ||
-          (ieee->current_network.mode == WIRELESS_MODE_N_24G &&
-          ieee->ht_info->bCurSuppCCK)) {
-               erp_len = 3;
-               erpinfo_content = 0;
-               if (ieee->current_network.buseprotection)
-                       erpinfo_content |= ERP_UseProtection;
-       } else {
-               erp_len = 0;
-       }
-
-       crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx];
-       encrypt = crypt && crypt->ops &&
-               ((strcmp(crypt->ops->name, "R-WEP") == 0 || wpa_ie_len));
-       if (ieee->ht_info->current_ht_support) {
-               tmp_ht_cap_buf = (u8 *)&(ieee->ht_info->SelfHTCap);
-               tmp_ht_cap_len = sizeof(ieee->ht_info->SelfHTCap);
-               tmp_ht_info_buf = (u8 *)&(ieee->ht_info->SelfHTInfo);
-               tmp_ht_info_len = sizeof(ieee->ht_info->SelfHTInfo);
-               HTConstructCapabilityElement(ieee, tmp_ht_cap_buf,
-                                            &tmp_ht_cap_len, encrypt, false);
-               HTConstructInfoElement(ieee, tmp_ht_info_buf, &tmp_ht_info_len,
-                                      encrypt);
-
-               if (ht_info->reg_rt2rt_aggregation) {
-                       tmp_generic_ie_buf = ieee->ht_info->sz_rt2rt_agg_buf;
-                       tmp_generic_ie_len =
-                                sizeof(ieee->ht_info->sz_rt2rt_agg_buf);
-                       HTConstructRT2RTAggElement(ieee, tmp_generic_ie_buf,
-                                                  &tmp_generic_ie_len);
-               }
-       }
-
-       beacon_size = sizeof(struct rtllib_probe_response) + 2 +
-               ssid_len + 3 + rate_len + rate_ex_len + atim_len + erp_len
-               + wpa_ie_len + ieee->tx_headroom;
-       skb = dev_alloc_skb(beacon_size);
-       if (!skb)
-               return NULL;
-
-       skb_reserve(skb, ieee->tx_headroom);
-
-       beacon_buf = skb_put(skb, (beacon_size - ieee->tx_headroom));
-       ether_addr_copy(beacon_buf->header.addr1, dest);
-       ether_addr_copy(beacon_buf->header.addr2, ieee->dev->dev_addr);
-       ether_addr_copy(beacon_buf->header.addr3, ieee->current_network.bssid);
-
-       beacon_buf->header.duration_id = 0;
-       beacon_buf->beacon_interval =
-               cpu_to_le16(ieee->current_network.beacon_interval);
-       beacon_buf->capability =
-               cpu_to_le16(ieee->current_network.capability &
-               WLAN_CAPABILITY_IBSS);
-       beacon_buf->capability |=
-               cpu_to_le16(ieee->current_network.capability &
-               WLAN_CAPABILITY_SHORT_PREAMBLE);
-
-       if (ieee->current_network.capability & WLAN_CAPABILITY_SHORT_SLOT_TIME)
-               beacon_buf->capability |=
-                       cpu_to_le16(WLAN_CAPABILITY_SHORT_SLOT_TIME);
-
-       crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx];
-       if (encrypt)
-               beacon_buf->capability |= cpu_to_le16(WLAN_CAPABILITY_PRIVACY);
-
-       beacon_buf->header.frame_control = cpu_to_le16(IEEE80211_STYPE_PROBE_RESP);
-       beacon_buf->info_element[0].id = MFIE_TYPE_SSID;
-       beacon_buf->info_element[0].len = ssid_len;
-
-       tag = (u8 *)beacon_buf->info_element[0].data;
-
-       memcpy(tag, ssid, ssid_len);
-
-       tag += ssid_len;
-
-       *(tag++) = MFIE_TYPE_RATES;
-       *(tag++) = rate_len - 2;
-       memcpy(tag, ieee->current_network.rates, rate_len - 2);
-       tag += rate_len - 2;
-
-       *(tag++) = MFIE_TYPE_DS_SET;
-       *(tag++) = 1;
-       *(tag++) = ieee->current_network.channel;
-
-       if (atim_len) {
-               u16 val16;
-               *(tag++) = MFIE_TYPE_IBSS_SET;
-               *(tag++) = 2;
-               val16 = ieee->current_network.atim_window;
-               memcpy((u8 *)tag, (u8 *)&val16, 2);
-               tag += 2;
-       }
-
-       if (erp_len) {
-               *(tag++) = MFIE_TYPE_ERP;
-               *(tag++) = 1;
-               *(tag++) = erpinfo_content;
-       }
-       if (rate_ex_len) {
-               *(tag++) = MFIE_TYPE_RATES_EX;
-               *(tag++) = rate_ex_len - 2;
-               memcpy(tag, ieee->current_network.rates_ex, rate_ex_len - 2);
-               tag += rate_ex_len - 2;
-       }
-
-       if (wpa_ie_len) {
-               memcpy(tag, ieee->wpa_ie, ieee->wpa_ie_len);
-               tag += ieee->wpa_ie_len;
-       }
-       return skb;
-}
-
 static struct sk_buff *rtllib_null_func(struct rtllib_device *ieee, short pwr)
 {
        struct sk_buff *skb;