Remove function rtllib_update_active_chan_map() as "active_channel_map"
and "channel_map" have the same content. Content of "channel_map" does
not change.
Tested with rtl8192e (WLL6130-D99) in Mode n (12.5 MB/s)
Transferred this patch over wlan connection of rtl8192e.
Used the following code for testing:
struct rt_dot11d_info *ph = priv->rtllib->dot11d_info;
for (i = 1; i <= 13; i++){
printk("priv->rtllib->active_channel_map) [%d] %d\n", i, priv->rtllib->active_channel_map[i]);
printk("priv->rtllib->dot11d_info->chan_map[%d] %d\n", i, ph->channel_map[i]);
}
Log:
[ 1141.288386] priv->rtllib->active_channel_map) [1] 1
[ 1141.288393] priv->rtllib->dot11d_info->chan_map[1] 1
[ 1141.288395] priv->rtllib->active_channel_map) [2] 1
[ 1141.288396] priv->rtllib->dot11d_info->chan_map[2] 1
...
[ 1141.288426] priv->rtllib->active_channel_map) [11] 1
[ 1141.288428] priv->rtllib->dot11d_info->chan_map[11] 1
[ 1141.288429] priv->rtllib->active_channel_map) [12] 2
[ 1141.288431] priv->rtllib->dot11d_info->chan_map[12] 2
[ 1141.288433] priv->rtllib->active_channel_map) [13] 2
[ 1141.288434] priv->rtllib->dot11d_info->chan_map[13] 2
Philipp Hortmann (5):
staging: rtl8192e: Remove function rtllib_update_active_chan_map()
staging: rtl8192e: Remove variable channel_map
staging: rtl8192e: Remove variable dot11d_info
staging: rtl8192e: Remove function dot11d_channel_map()
staging: rtl8192e: Remove files dot11d.c and dot11d.h
drivers/staging/rtl8192e/Makefile | 1 -
drivers/staging/rtl8192e/dot11d.c | 29 -------------------
drivers/staging/rtl8192e/dot11d.h | 30 --------------------
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 -
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 --
drivers/staging/rtl8192e/rtllib.h | 1 -
drivers/staging/rtl8192e/rtllib_rx.c | 1 -
drivers/staging/rtl8192e/rtllib_softmac.c | 19 -------------
drivers/staging/rtl8192e/rtllib_softmac_wx.c | 1 -
9 files changed, 85 deletions(-)
delete mode 100644 drivers/staging/rtl8192e/dot11d.c
delete mode 100644 drivers/staging/rtl8192e/dot11d.h
--
2.43.0
Remove function rtllib_update_active_chan_map() as "active_channel_map"
and "channel_map" have the same content.
Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/rtllib_softmac.c | 12 ------------
1 file changed, 12 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index d20970652432..fdb0e76d20b0 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -394,12 +394,6 @@ static void rtllib_send_probe_requests(struct rtllib_device *ieee)
}
}
-static void rtllib_update_active_chan_map(struct rtllib_device *ieee)
-{
- memcpy(ieee->active_channel_map, GET_DOT11D_INFO(ieee)->channel_map,
- MAX_CHANNEL_NUMBER + 1);
-}
-
/* this performs syncro scan blocking the caller until all channels
* in the allowed channel map has been checked.
*/
@@ -408,8 +402,6 @@ static void rtllib_softmac_scan_syncro(struct rtllib_device *ieee)
union iwreq_data wrqu;
short ch = 0;
- rtllib_update_active_chan_map(ieee);
-
ieee->be_scan_inprogress = true;
mutex_lock(&ieee->scan_mutex);
@@ -475,8 +467,6 @@ static void rtllib_softmac_scan_wq(void *data)
struct rtllib_device, softmac_scan_wq);
u8 last_channel = ieee->current_network.channel;
- rtllib_update_active_chan_map(ieee);
-
if (!ieee->ieee_up)
return;
if (rtllib_act_scanning(ieee, true))
@@ -2042,8 +2032,6 @@ void rtllib_start_protocol(struct rtllib_device *ieee)
short ch = 0;
int i = 0;
- rtllib_update_active_chan_map(ieee);
-
if (ieee->proto_started)
return;
--
2.43.0
Remove variable channel_map as it is initialized but not used. Remove
channel_array as well as it is without channel_map unused.
Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/dot11d.c | 10 ----------
drivers/staging/rtl8192e/dot11d.h | 1 -
2 files changed, 11 deletions(-)
diff --git a/drivers/staging/rtl8192e/dot11d.c b/drivers/staging/rtl8192e/dot11d.c
index d51d4afff61e..c44ff26e8d61 100644
--- a/drivers/staging/rtl8192e/dot11d.c
+++ b/drivers/staging/rtl8192e/dot11d.c
@@ -12,18 +12,8 @@ struct channel_list {
u8 len;
};
-static struct channel_list channel_array = {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13};
-
void dot11d_channel_map(struct rtllib_device *ieee)
{
- int i;
-
- memset(GET_DOT11D_INFO(ieee)->channel_map, 0,
- sizeof(GET_DOT11D_INFO(ieee)->channel_map));
- for (i = 0; i < channel_array.len; i++)
- GET_DOT11D_INFO(ieee)->channel_map[channel_array.channel[i]] = 1;
- for (i = 12; i <= 13; i++)
- GET_DOT11D_INFO(ieee)->channel_map[i] = 2;
}
EXPORT_SYMBOL(dot11d_channel_map);
diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h
index 5c02e51c39cd..d047283f2ceb 100644
--- a/drivers/staging/rtl8192e/dot11d.h
+++ b/drivers/staging/rtl8192e/dot11d.h
@@ -19,7 +19,6 @@
*/
struct rt_dot11d_info {
- u8 channel_map[MAX_CHANNEL_NUMBER + 1];
};
#define GET_DOT11D_INFO(__ieee_dev) \
--
2.43.0
Remove variable dot11d_info as it is unused. Remove unused struct
channel_list and empty struct rt_dot11d_info.
Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/dot11d.c | 5 -----
drivers/staging/rtl8192e/dot11d.h | 6 ------
drivers/staging/rtl8192e/rtllib.h | 1 -
drivers/staging/rtl8192e/rtllib_softmac.c | 6 ------
4 files changed, 18 deletions(-)
diff --git a/drivers/staging/rtl8192e/dot11d.c b/drivers/staging/rtl8192e/dot11d.c
index c44ff26e8d61..8d89f962b3bf 100644
--- a/drivers/staging/rtl8192e/dot11d.c
+++ b/drivers/staging/rtl8192e/dot11d.c
@@ -7,11 +7,6 @@
******************************************************************************/
#include "dot11d.h"
-struct channel_list {
- u8 channel[32];
- u8 len;
-};
-
void dot11d_channel_map(struct rtllib_device *ieee)
{
diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h
index d047283f2ceb..98aa28d0cf72 100644
--- a/drivers/staging/rtl8192e/dot11d.h
+++ b/drivers/staging/rtl8192e/dot11d.h
@@ -18,12 +18,6 @@
* 2 - valid (passive scan)
*/
-struct rt_dot11d_info {
-};
-
-#define GET_DOT11D_INFO(__ieee_dev) \
- ((struct rt_dot11d_info *)((__ieee_dev)->dot11d_info))
-
void dot11d_channel_map(struct rtllib_device *ieee);
#endif
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index ec720f776639..51dcea57a329 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -1320,7 +1320,6 @@ struct rtllib_device {
u16 scan_watch_dog;
/* map of allowed channels. 0 is dummy */
- void *dot11d_info;
u8 active_channel_map[MAX_CHANNEL_NUMBER+1];
int rate; /* current rate */
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index fdb0e76d20b0..3c92eb401e8c 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -2077,9 +2077,6 @@ int rtllib_softmac_init(struct rtllib_device *ieee)
ieee->link_state = MAC80211_NOLINK;
for (i = 0; i < 5; i++)
ieee->seq_ctrl[i] = 0;
- ieee->dot11d_info = kzalloc(sizeof(struct rt_dot11d_info), GFP_ATOMIC);
- if (!ieee->dot11d_info)
- return -ENOMEM;
ieee->link_detect_info.SlotIndex = 0;
ieee->link_detect_info.SlotNum = 2;
@@ -2153,9 +2150,6 @@ void rtllib_softmac_free(struct rtllib_device *ieee)
cancel_work_sync(&ieee->ips_leave_wq);
cancel_work_sync(&ieee->wx_sync_scan_wq);
cancel_work_sync(&ieee->ps_task);
-
- kfree(ieee->dot11d_info);
- ieee->dot11d_info = NULL;
}
static inline struct sk_buff *
--
2.43.0
Remove function dot11d_channel_map() as it is empty.
Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/dot11d.c | 6 ------
drivers/staging/rtl8192e/dot11d.h | 2 --
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 -
3 files changed, 9 deletions(-)
diff --git a/drivers/staging/rtl8192e/dot11d.c b/drivers/staging/rtl8192e/dot11d.c
index 8d89f962b3bf..ec71bae05c1f 100644
--- a/drivers/staging/rtl8192e/dot11d.c
+++ b/drivers/staging/rtl8192e/dot11d.c
@@ -6,9 +6,3 @@
* wlanfae <[email protected]>
******************************************************************************/
#include "dot11d.h"
-
-void dot11d_channel_map(struct rtllib_device *ieee)
-{
-
-}
-EXPORT_SYMBOL(dot11d_channel_map);
diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h
index 98aa28d0cf72..eeefbfa96938 100644
--- a/drivers/staging/rtl8192e/dot11d.h
+++ b/drivers/staging/rtl8192e/dot11d.h
@@ -18,6 +18,4 @@
* 2 - valid (passive scan)
*/
-void dot11d_channel_map(struct rtllib_device *ieee);
-
#endif
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index 1f45b6b00d1b..72e89ccfb184 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -761,7 +761,6 @@ static short _rtl92e_get_channel_map(struct net_device *dev)
struct r8192_priv *priv = rtllib_priv(dev);
- dot11d_channel_map(priv->rtllib);
for (i = 1; i <= 11; i++)
(priv->rtllib->active_channel_map)[i] = 1;
(priv->rtllib->active_channel_map)[12] = 2;
--
2.43.0
Remove files dot11d.c and dot11d.h as they are empty.
Signed-off-by: Philipp Hortmann <[email protected]>
---
drivers/staging/rtl8192e/Makefile | 1 -
drivers/staging/rtl8192e/dot11d.c | 8 --------
drivers/staging/rtl8192e/dot11d.h | 21 --------------------
drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 --
drivers/staging/rtl8192e/rtllib_rx.c | 1 -
drivers/staging/rtl8192e/rtllib_softmac.c | 1 -
drivers/staging/rtl8192e/rtllib_softmac_wx.c | 1 -
7 files changed, 35 deletions(-)
delete mode 100644 drivers/staging/rtl8192e/dot11d.c
delete mode 100644 drivers/staging/rtl8192e/dot11d.h
diff --git a/drivers/staging/rtl8192e/Makefile b/drivers/staging/rtl8192e/Makefile
index 6af519938868..a1492215dab1 100644
--- a/drivers/staging/rtl8192e/Makefile
+++ b/drivers/staging/rtl8192e/Makefile
@@ -1,6 +1,5 @@
# SPDX-License-Identifier: GPL-2.0
rtllib-objs := \
- dot11d.o \
rtllib_module.o \
rtllib_rx.o \
rtllib_tx.o \
diff --git a/drivers/staging/rtl8192e/dot11d.c b/drivers/staging/rtl8192e/dot11d.c
deleted file mode 100644
index ec71bae05c1f..000000000000
--- a/drivers/staging/rtl8192e/dot11d.c
+++ /dev/null
@@ -1,8 +0,0 @@
-// SPDX-License-Identifier: GPL-2.0
-/******************************************************************************
- * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
- *
- * Contact Information:
- * wlanfae <[email protected]>
- ******************************************************************************/
-#include "dot11d.h"
diff --git a/drivers/staging/rtl8192e/dot11d.h b/drivers/staging/rtl8192e/dot11d.h
deleted file mode 100644
index eeefbfa96938..000000000000
--- a/drivers/staging/rtl8192e/dot11d.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: GPL-2.0 */
-/******************************************************************************
- * Copyright(c) 2008 - 2010 Realtek Corporation. All rights reserved.
- *
- * Contact Information:
- * wlanfae <[email protected]>
- ******************************************************************************/
-#ifndef __INC_DOT11D_H
-#define __INC_DOT11D_H
-
-#include "rtllib.h"
-
-/**
- * struct rt_dot11d_info
- * @channel_map: holds channel values
- * 0 - invalid,
- * 1 - valid (active scan),
- * 2 - valid (passive scan)
- */
-
-#endif
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
index 546c8a33dae8..1d6d31292f41 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.h
@@ -34,8 +34,6 @@
#include "../rtllib.h"
-#include "../dot11d.h"
-
#include "r8192E_firmware.h"
#include "r8192E_hw.h"
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index d9517dbc5593..62d02576b441 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -34,7 +34,6 @@
#include <linux/ctype.h>
#include "rtllib.h"
-#include "dot11d.h"
static void rtllib_rx_mgt(struct rtllib_device *ieee, struct sk_buff *skb,
struct rtllib_rx_stats *stats);
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 3c92eb401e8c..5c89744b2bbe 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -18,7 +18,6 @@
#include <linux/uaccess.h>
#include <linux/etherdevice.h>
#include <linux/ieee80211.h>
-#include "dot11d.h"
static void rtllib_sta_wakeup(struct rtllib_device *ieee, short nl);
diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
index b48c89d2e7bf..5d165d0b134d 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
@@ -14,7 +14,6 @@
#include <linux/etherdevice.h>
#include "rtllib.h"
-#include "dot11d.h"
int rtllib_wx_set_freq(struct rtllib_device *ieee, struct iw_request_info *a,
union iwreq_data *wrqu, char *b)
--
2.43.0