staging: rtl8192e: Remove c files dot11d.c/.h
cover staging: rtl8192e: Remove c files dot11d.c/.h
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] 2Philipp 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
Signature · 1 line
2.43.0
PATCH 1/5 staging: rtl8192e: Remove function rtllib_update_active_chan_map()
Remove function rtllib_update_active_chan_map() as "active_channel_map" and "channel_map" have the same content.
--- drivers/staging/rtl8192e/rtllib_softmac.c | 12 ------------ 1 file changed, 12 deletions(-)
drivers/staging/rtl8192e/rtllib_softmac.c +0 -12
@@ -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 ;
Signature · 1 line
2.43.0
PATCH 2/5 staging: rtl8192e: Remove variable channel_map
In reply to Philipp HortmannRemove variable channel_map as it is initialized but not used. Remove channel_array as well as it is without channel_map unused.
--- drivers/staging/rtl8192e/dot11d.c | 10 ---------- drivers/staging/rtl8192e/dot11d.h | 1 - 2 files changed, 11 deletions(-)
drivers/staging/rtl8192e/dot11d.c +0 -10
@@ -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);
drivers/staging/rtl8192e/dot11d.h +0 -1
@@ -19,7 +19,6 @@*/ struct rt_dot11d_info { -u8 channel_map[MAX_CHANNEL_NUMBER +1 ]; };#define GET_DOT11D_INFO (__ieee_dev) \
Signature · 1 line
2.43.0
PATCH 3/5 staging: rtl8192e: Remove variable dot11d_info
In reply to Philipp HortmannRemove variable dot11d_info as it is unused. Remove unused struct channel_list and empty struct rt_dot11d_info.
--- 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(-)
drivers/staging/rtl8192e/dot11d.c +0 -5
@@ -7,11 +7,6 @@******************************************************************************/ #include "dot11d.h" -struct channel_list { -u8 channel[32 ]; -u8 len; -}; -void dot11d_channel_map (struct rtllib_device *ieee) {
drivers/staging/rtl8192e/dot11d.h +0 -6
@@ -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
drivers/staging/rtl8192e/rtllib.h +0 -1
@@ -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 */
drivers/staging/rtl8192e/rtllib_softmac.c +0 -6
@@ -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 *
Signature · 1 line
2.43.0
PATCH 4/5 staging: rtl8192e: Remove function dot11d_channel_map()
In reply to Philipp HortmannRemove function dot11d_channel_map() as it is empty.
--- 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(-)
drivers/staging/rtl8192e/dot11d.c +0 -6
@@ -6,9 +6,3 @@* wlanfae <[email protected]> ******************************************************************************/ #include "dot11d.h" - -void dot11d_channel_map (struct rtllib_device *ieee) -{ - -} -EXPORT_SYMBOL (dot11d_channel_map);
drivers/staging/rtl8192e/dot11d.h +0 -2
@@ -18,6 +18,4 @@* 2 - valid (passive scan) */ -void dot11d_channel_map (struct rtllib_device *ieee); -#endif
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +0 -1
@@ -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 ;
Signature · 1 line
2.43.0
PATCH 5/5 staging: rtl8192e: Remove files dot11d.c and dot11d.h
In reply to Philipp HortmannRemove files dot11d.c and dot11d.h as they are empty.
--- 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
drivers/staging/rtl8192e/Makefile +0 -1
@@ -1,6 +1,5 @@ # SPDX-License-Identifier: GPL-2.0 rtllib-objs := \ - dot11d.o \ rtllib_module.o \ rtllib_rx.o \ rtllib_tx.o \
drivers/staging/rtl8192e/dot11d.c deleted +0 -8
@@ -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"
drivers/staging/rtl8192e/dot11d.h deleted +0 -21
@@ -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
drivers/staging/rtl8192e/rtl8192e/rtl_core.h +0 -2
@@ -34,8 +34,6 @@#include "../rtllib.h" -#include "../dot11d.h" -#include "r8192E_firmware.h" #include "r8192E_hw.h"
drivers/staging/rtl8192e/rtllib_rx.c +0 -1
@@ -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);
drivers/staging/rtl8192e/rtllib_softmac.c +0 -1
@@ -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);
drivers/staging/rtl8192e/rtllib_softmac_wx.c +0 -1
@@ -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)
Signature · 1 line
2.43.0