staging: rtl8192e: Remove variable priv->reg_chnl_plan
authorPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Sat, 24 Jun 2023 06:04:44 +0000 (08:04 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jul 2023 07:57:39 +0000 (09:57 +0200)
Remove variable priv->reg_chnl_plan as it is only once initialized and
only once evaluated. So the result is always the same. Remove dead code.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/0dd4f8eded4b172d75f0cb5d5a34ba3dc66e2e8f.1687583718.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
drivers/staging/rtl8192e/rtl8192e/rtl_core.c
drivers/staging/rtl8192e/rtl8192e/rtl_core.h

index e5925899402ca8ce9fe13ee699012eefaa42a6fc..5ac6af7e3a7927ce623a0bb94f93ce994d4047f1 100644 (file)
@@ -419,10 +419,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
 
        rtl92e_init_adaptive_rate(dev);
 
-       if (priv->reg_chnl_plan == 0xf)
-               priv->chnl_plan = priv->eeprom_chnl_plan;
-       else
-               priv->chnl_plan = priv->reg_chnl_plan;
+       priv->chnl_plan = priv->eeprom_chnl_plan;
 
        switch (priv->eeprom_customer_id) {
        case EEPROM_CID_NetCore:
index 23f9b729940bc8f8b20660d44307f4de9f0a4571..a245275851665744d869a72fec03243232ff1d55 100644 (file)
@@ -763,7 +763,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
        priv->rxringcount = MAX_RX_COUNT;
        priv->irq_enabled = 0;
        priv->chan = 1;
-       priv->reg_chnl_plan = 0xf;
        priv->rtllib->mode = WIRELESS_MODE_AUTO;
        priv->rtllib->iw_mode = IW_MODE_INFRA;
        priv->rtllib->net_promiscuous_md = false;
index 38b215d86eebebd681613373afaddbeb6dbbe512..fa82a0667813901a617cae5727b8da0c5409ace7 100644 (file)
@@ -316,7 +316,6 @@ struct r8192_priv {
 
        bool tx_pwr_data_read_from_eeprom;
 
-       u16 reg_chnl_plan;
        u16 chnl_plan;
        u8 hw_rf_off_action;