staging: rtl8192e: Remove unused function dot11d_update_country()
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Sun, 19 Nov 2023 22:14:42 +0000 (23:14 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Nov 2023 12:46:27 +0000 (12:46 +0000)
Remove unused function dot11d_update_country().

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/364462eae2271f3925b362a439ec27d50dd899ef.1700431464.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/dot11d.c
drivers/staging/rtl8192e/dot11d.h

index fdc39e6e7abbe28e004638ff611a40e5fc166a17..fc65a63a4de6d448c234d4f8dcc9a86cec096f99 100644 (file)
@@ -61,50 +61,6 @@ void dot11d_reset(struct rtllib_device *ieee)
        RESET_CIE_WATCHDOG(ieee);
 }
 
-void dot11d_update_country(struct rtllib_device *dev, u8 *address,
-                          u16 country_len, u8 *country)
-{
-       struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(dev);
-       u8 i, j, number_of_triples, max_channel_number;
-       struct chnl_txpow_triple *triple;
-
-       memset(dot11d_info->channel_map, 0, MAX_CHANNEL_NUMBER + 1);
-       memset(dot11d_info->max_tx_power_list, 0xFF, MAX_CHANNEL_NUMBER + 1);
-       max_channel_number = 0;
-       number_of_triples = (country_len - 3) / 3;
-       triple = (struct chnl_txpow_triple *)(country + 3);
-       for (i = 0; i < number_of_triples; i++) {
-               if (max_channel_number >= triple->first_channel) {
-                       netdev_info(dev->dev,
-                                   "%s: Invalid country IE, skip it......1\n",
-                                   __func__);
-                       return;
-               }
-               if (MAX_CHANNEL_NUMBER < (triple->first_channel +
-                   triple->num_channels)) {
-                       netdev_info(dev->dev,
-                                   "%s: Invalid country IE, skip it......2\n",
-                                   __func__);
-                       return;
-               }
-
-               for (j = 0; j < triple->num_channels; j++) {
-                       dot11d_info->channel_map[triple->first_channel + j] = 1;
-                       dot11d_info->max_tx_power_list[triple->first_channel + j] =
-                                                triple->max_tx_power;
-                       max_channel_number = triple->first_channel + j;
-               }
-
-               triple = (struct chnl_txpow_triple *)((u8 *)triple + 3);
-       }
-
-       UPDATE_CIE_SRC(dev, address);
-
-       dot11d_info->country_len = country_len;
-       memcpy(dot11d_info->country_buffer, country, country_len);
-       dot11d_info->state = DOT11D_STATE_LEARNED;
-}
-
 void dot11d_scan_complete(struct rtllib_device *dev)
 {
        struct rt_dot11d_info *dot11d_info = GET_DOT11D_INFO(dev);
index 78d1ca1e7743c41ab596117b7ff3cff837d3bdb3..39bda2f94eed6451e055fea230b0040f799a4029 100644 (file)
@@ -77,8 +77,6 @@ static inline void RESET_CIE_WATCHDOG(struct rtllib_device *__ieee_dev)
 void dot11d_init(struct rtllib_device *dev);
 void dot11d_channel_map(struct rtllib_device *ieee);
 void dot11d_reset(struct rtllib_device *dev);
-void dot11d_update_country(struct rtllib_device *dev, u8 *address,
-                          u16 country_len, u8 *country);
 void dot11d_scan_complete(struct rtllib_device *dev);
 
 #endif