staging: rtl8192e: Remove last private functions from iw_handler_def
cover staging: rtl8192e: Remove last private functions from iw_handler_def
The Linux kernel authors consider "wireless tools" package deprecated. The "wireless extension" is also deprecated. Remove private functions of "wireless extensions" that can only be accessed by "wireless tools" from driver.
Tested with rtl8192e (WLL6130-D99) in Mode n (12.5 MB/s) Transferred this patch over wlan connection of rtl8192e.
Philipp Hortmann (10):
staging: rtl8192e: Remove function _rtl92e_wx_set_force_lps()
staging: rtl8192e: Remove function _rtl92e_wx_set_lps_awake_interval()
staging: rtl8192e: Remove constant variable reg_max_lps_awake_intvl
staging: rtl8192e: Remove function _rtl92e_wx_adapter_power_status()
staging: rtl8192e: Remove constant variable ps_force
staging: rtl8192e: Remove function _rtl92e_wx_set_scan_type()
staging: rtl8192e: Remove unchanged variable active_scan
staging: rtl8192e: Remove function _rtl92e_wx_set_debug()
staging: rtl8192e: Remove unused variable rt_global_debug_component
staging: rtl8192e: Remove unused file rtllib_debug.h
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 11 -- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 2 - drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 3 +- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 145 ------------------- drivers/staging/rtl8192e/rtllib.h | 4 - drivers/staging/rtl8192e/rtllib_debug.h | 49 ------- drivers/staging/rtl8192e/rtllib_module.c | 3 - drivers/staging/rtl8192e/rtllib_softmac.c | 11 +- 8 files changed, 3 insertions(+), 225 deletions(-) delete mode 100644 drivers/staging/rtl8192e/rtllib_debug.h
Signature · 1 line
2.42.0
PATCH 1/10 staging: rtl8192e: Remove function _rtl92e_wx_set_force_lps()
Remove function _rtl92e_wx_set_force_lps() as this functionality is not commonly used and the tool to access it is deprecated.
--- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 23 +------------------- 2 files changed, 1 insertion(+), 23 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.h +0 -1
@@ -370,7 +370,6 @@ struct r8192_priv {u16 tx_counter;u16 rx_ctr; -bool force_lps; };extern const struct ethtool_ops rtl819x_ethtool_ops;
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +1 -22
@@ -133,7 +133,7 @@ static int _rtl92e_wx_adapter_power_status(struct net_device *dev,mutex_lock (&priv->wx_mutex); -if (*extra || priv->force_lps) { +if (*extra) { priv->ps_force = false; psc->bLeisurePs = true; }else {
@@ -169,22 +169,6 @@ static int _rtl92e_wx_set_lps_awake_interval(struct net_device *dev,return 0 ; } -static int _rtl92e_wx_set_force_lps (struct net_device *dev, -struct iw_request_info *info, -union iwreq_data *wrqu,char *extra) -{ -struct r8192_priv *priv =rtllib_priv (dev); - -mutex_lock (&priv->wx_mutex); - -netdev_info (dev, -"%s(): force LPS ! extra is %d (1 is open 0 is close)\n" , - __func__, *extra); - priv->force_lps = *extra; -mutex_unlock (&priv->wx_mutex); -return 0 ; -} -static int _rtl92e_wx_set_debug (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra)
@@ -970,10 +954,6 @@ static const struct iw_priv_args r8192_private_args[] = {SIOCIWFIRSTPRIV +0xa ,IW_PRIV_TYPE_INT |IW_PRIV_SIZE_FIXED |1 ,IW_PRIV_TYPE_NONE , "lps_interv" - }, { -SIOCIWFIRSTPRIV +0xb , -IW_PRIV_TYPE_INT |IW_PRIV_SIZE_FIXED |1 ,IW_PRIV_TYPE_NONE , - "lps_force" } };
@@ -990,7 +970,6 @@ static iw_handler r8192_private_handler[] = { (iw_handler )NULL , (iw_handler )NULL , (iw_handler)_rtl92e_wx_set_lps_awake_interval, - (iw_handler)_rtl92e_wx_set_force_lps, };static struct iw_statistics *_rtl92e_get_wireless_stats (struct net_device *dev)
Signature · 1 line
2.42.0
PATCH 2/10 staging: rtl8192e: Remove function _rtl92e_wx_set_lps_awake_interval()
In reply to Philipp HortmannRemove function _rtl92e_wx_set_lps_awake_interval() as this functionality is not commonly used and the tool to access it is deprecated.
--- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 27 ---------------------- 1 file changed, 27 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +0 -27
@@ -150,25 +150,6 @@ static int _rtl92e_wx_adapter_power_status(struct net_device *dev,return 0 ; } -static int _rtl92e_wx_set_lps_awake_interval (struct net_device *dev, -struct iw_request_info *info, -union iwreq_data *wrqu, -char *extra) -{ -struct r8192_priv *priv =rtllib_priv (dev); -struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *) - (&priv->rtllib->pwr_save_ctrl); - -mutex_lock (&priv->wx_mutex); - -netdev_info (dev,"%s(): set lps awake interval ! extra is %d\n" , - __func__, *extra); - - psc->reg_max_lps_awake_intvl = *extra; -mutex_unlock (&priv->wx_mutex); -return 0 ; -} -static int _rtl92e_wx_set_debug (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra)
@@ -950,10 +931,6 @@ static const struct iw_priv_args r8192_private_args[] = {SIOCIWFIRSTPRIV +0x6 ,IW_PRIV_TYPE_INT |IW_PRIV_SIZE_FIXED |1 ,IW_PRIV_TYPE_NONE , "set_power" - }, { -SIOCIWFIRSTPRIV +0xa , -IW_PRIV_TYPE_INT |IW_PRIV_SIZE_FIXED |1 ,IW_PRIV_TYPE_NONE , - "lps_interv" } };
@@ -966,10 +943,6 @@ static iw_handler r8192_private_handler[] = { (iw_handler )NULL , (iw_handler )NULL , (iw_handler)_rtl92e_wx_adapter_power_status, - (iw_handler )NULL , - (iw_handler )NULL , - (iw_handler )NULL , - (iw_handler)_rtl92e_wx_set_lps_awake_interval, };static struct iw_statistics *_rtl92e_get_wireless_stats (struct net_device *dev)
Signature · 1 line
2.42.0
PATCH 3/10 staging: rtl8192e: Remove constant variable reg_max_lps_awake_intvl
In reply to Philipp HortmannRemove constant variable reg_max_lps_awake_intvl as this value is just written to MaxPeriod. Function _rtl92e_init_priv_constant() is then empty and can be removed as well.
--- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 10 ---------- drivers/staging/rtl8192e/rtllib.h | 1 - drivers/staging/rtl8192e/rtllib_softmac.c | 8 +------- 3 files changed, 1 insertion(+), 18 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +0 -10
@@ -712,15 +712,6 @@ static void _rtl92e_init_priv_handler(struct net_device *dev) priv->rtllib->ScanOperationBackupHandler = rtl92e_scan_op_backup; } -static void _rtl92e_init_priv_constant (struct net_device *dev) -{ -struct r8192_priv *priv =rtllib_priv (dev); -struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *) - &priv->rtllib->pwr_save_ctrl; - - psc->reg_max_lps_awake_intvl =5 ; -} -static void _rtl92e_init_priv_variable (struct net_device *dev) {struct r8192_priv *priv =rtllib_priv (dev);
@@ -838,7 +829,6 @@ static short _rtl92e_init(struct net_device *dev)memset (&priv->stats,0 ,sizeof (struct rt_stats ));_rtl92e_init_priv_handler (dev); -_rtl92e_init_priv_constant (dev);_rtl92e_init_priv_variable (dev);_rtl92e_init_priv_lock (priv);_rtl92e_init_priv_task (dev);
drivers/staging/rtl8192e/rtllib.h +0 -1
@@ -1079,7 +1079,6 @@ struct rt_pwr_save_ctrl {bool bLeisurePs;u8 LpsIdleCount; -u8 reg_max_lps_awake_intvl;u8 LPSAwakeIntvl;u32 CurPsLevel;
drivers/staging/rtl8192e/rtllib_softmac.c +1 -7
@@ -1588,16 +1588,10 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)if (ieee->bAwakePktSent) { psc->LPSAwakeIntvl =1 ; }else { -u8 MaxPeriod =1 ; +u8 MaxPeriod =5 ;if (psc->LPSAwakeIntvl ==0 ) psc->LPSAwakeIntvl =1 ; -if (psc->reg_max_lps_awake_intvl ==0 ) - MaxPeriod =1 ; -else if (psc->reg_max_lps_awake_intvl ==0xFF ) - MaxPeriod = ieee->current_network.dtim_period; -else - MaxPeriod = psc->reg_max_lps_awake_intvl; psc->LPSAwakeIntvl = (psc->LPSAwakeIntvl >= MaxPeriod) ? MaxPeriod : (psc->LPSAwakeIntvl +1 );
Signature · 1 line
2.42.0
PATCH 4/10 staging: rtl8192e: Remove function _rtl92e_wx_adapter_power_status()
In reply to Philipp HortmannRemove function _rtl92e_wx_adapter_power_status() as this functionality is not commonly used and the tool to access it is deprecated.
--- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 37 ---------------------- 1 file changed, 37 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +0 -37
@@ -122,34 +122,6 @@ static int _rtl92e_wx_get_power(struct net_device *dev,return rtllib_wx_get_power (priv->rtllib, info, wrqu, extra); } -static int _rtl92e_wx_adapter_power_status (struct net_device *dev, -struct iw_request_info *info, -union iwreq_data *wrqu,char *extra) -{ -struct r8192_priv *priv =rtllib_priv (dev); -struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *) - (&priv->rtllib->pwr_save_ctrl); -struct rtllib_device *ieee = priv->rtllib; - -mutex_lock (&priv->wx_mutex); - -if (*extra) { - priv->ps_force = false; - psc->bLeisurePs = true; - }else { -if (priv->rtllib->link_state ==MAC80211_LINKED ) -rtl92e_leisure_ps_leave (dev); - - priv->ps_force = true; - psc->bLeisurePs = false; - ieee->ps = *extra; - } - -mutex_unlock (&priv->wx_mutex); - -return 0 ; -} -static int _rtl92e_wx_set_debug (struct net_device *dev,struct iw_request_info *info,union iwreq_data *wrqu,char *extra)
@@ -927,10 +899,6 @@ static const struct iw_priv_args r8192_private_args[] = { }, {SIOCIWFIRSTPRIV +0x1 , IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "activescan" - }, { -SIOCIWFIRSTPRIV +0x6 , -IW_PRIV_TYPE_INT |IW_PRIV_SIZE_FIXED |1 ,IW_PRIV_TYPE_NONE , - "set_power" } };
@@ -938,11 +906,6 @@ static const struct iw_priv_args r8192_private_args[] = {static iw_handler r8192_private_handler[] = { (iw_handler )_rtl92e_wx_set_debug,/*SIOCIWSECONDPRIV*/ (iw_handler )_rtl92e_wx_set_scan_type, - (iw_handler )NULL , - (iw_handler )NULL , - (iw_handler )NULL , - (iw_handler )NULL , - (iw_handler )_rtl92e_wx_adapter_power_status, };static struct iw_statistics *_rtl92e_get_wireless_stats (struct net_device *dev)
Signature · 1 line
2.42.0
PATCH 5/10 staging: rtl8192e: Remove constant variable ps_force
In reply to Philipp HortmannRemove constant variable ps_force as its value is always 0. The equation results accordingly. Remove dead code.
--- drivers/staging/rtl8192e/rtl8192e/rtl_core.h | 1 - drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.h +0 -1
@@ -263,7 +263,6 @@ struct r8192_priv {short promisc;short chan; -bool ps_force;u32 irq_mask[2 ];
drivers/staging/rtl8192e/rtl8192e/rtl_ps.c +1 -2
@@ -181,8 +181,7 @@ static bool _rtl92e_ps_set_mode(struct net_device *dev, u8 rtPsMode) {struct r8192_priv *priv =rtllib_priv (dev); -if (!priv->ps_force) - priv->rtllib->ps = rtPsMode; + priv->rtllib->ps = rtPsMode;if (priv->rtllib->sta_sleep !=LPS_IS_WAKE && rtPsMode ==RTLLIB_PS_DISABLED ) {unsigned long flags;
Signature · 1 line
2.42.0
PATCH 6/10 staging: rtl8192e: Remove function _rtl92e_wx_set_scan_type()
In reply to Philipp HortmannRemove function _rtl92e_wx_set_scan_type() as this functionality is not commonly used and the tool to access it is deprecated.
--- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 20 -------------------- 1 file changed, 20 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +0 -20
@@ -627,22 +627,6 @@ static int _rtl92e_wx_set_enc(struct net_device *dev,return ret; } -static int _rtl92e_wx_set_scan_type (struct net_device *dev, -struct iw_request_info *aa, -union iwreq_data *wrqu,char *p) -{ -struct r8192_priv *priv =rtllib_priv (dev); -int *parms = (int *)p; -int mode = parms[0 ]; - -if (priv->hw_radio_off) -return 0 ; - - priv->rtllib->active_scan = mode; - -return 1 ; -} -#define R8192_MAX_RETRY 255 static int _rtl92e_wx_set_retry(struct net_device *dev, struct iw_request_info *info,
@@ -896,16 +880,12 @@ static const struct iw_priv_args r8192_private_args[] = { {SIOCIWFIRSTPRIV +0x0 , IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "set_debugflag" - }, { -SIOCIWFIRSTPRIV +0x1 , - IW_PRIV_TYPE_INT | IW_PRIV_SIZE_FIXED | 1, 0, "activescan" } };static iw_handler r8192_private_handler[] = { (iw_handler )_rtl92e_wx_set_debug,/*SIOCIWSECONDPRIV*/ - (iw_handler )_rtl92e_wx_set_scan_type, };static struct iw_statistics *_rtl92e_get_wireless_stats (struct net_device *dev)
Signature · 1 line
2.42.0
PATCH 7/10 staging: rtl8192e: Remove unchanged variable active_scan
In reply to Philipp HortmannRemove variable active_scan as its value is set to 1 at initialization. No further writes to active_scan are done. The equation results accordingly. Remove dead code.
--- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 1 - drivers/staging/rtl8192e/rtllib.h | 2 -- drivers/staging/rtl8192e/rtllib_softmac.c | 3 +-- 3 files changed, 1 insertion(+), 5 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +0 -1
@@ -755,7 +755,6 @@ static void _rtl92e_init_priv_variable(struct net_device *dev) priv->rtllib->current_network.beacon_interval =DEFAULT_BEACONINTERVAL ; priv->rtllib->iw_mode =IW_MODE_INFRA ; - priv->rtllib->active_scan =1 ; priv->rtllib->be_scan_inprogress = false; priv->rtllib->fts =DEFAULT_FRAG_THRESHOLD ;
drivers/staging/rtl8192e/rtllib.h +0 -2
@@ -1332,8 +1332,6 @@ struct rtllib_device {int rate;/* current rate */ int basic_rate; -short active_scan; -/* this contains flags for selectively enable softmac support */ u16 softmac_features;
drivers/staging/rtl8192e/rtllib_softmac.c +1 -2
@@ -419,8 +419,7 @@ static void rtllib_send_probe(struct rtllib_device *ieee)static void rtllib_send_probe_requests (struct rtllib_device *ieee) { -if (ieee->active_scan && (ieee->softmac_features & -IEEE_SOFTMAC_PROBERQ )) { +if (ieee->softmac_features &IEEE_SOFTMAC_PROBERQ ) {rtllib_send_probe (ieee);rtllib_send_probe (ieee); }
Signature · 1 line
2.42.0
PATCH 8/10 staging: rtl8192e: Remove function _rtl92e_wx_set_debug()
In reply to Philipp HortmannRemove function _rtl92e_wx_set_debug() as this functionality is not commonly used and the tool to access it is deprecated.
--- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 40 ---------------------- 1 file changed, 40 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +0 -40
@@ -122,25 +122,6 @@ static int _rtl92e_wx_get_power(struct net_device *dev,return rtllib_wx_get_power (priv->rtllib, info, wrqu, extra); } -static int _rtl92e_wx_set_debug (struct net_device *dev, -struct iw_request_info *info, -union iwreq_data *wrqu,char *extra) -{ -struct r8192_priv *priv =rtllib_priv (dev); -u8 c = *extra; - -if (priv->hw_radio_off) -return 0 ; - -netdev_info (dev,"=====>%s(), *extra:%x, debugflag:%x\n" , __func__, - *extra, rt_global_debug_component); -if (c >0 ) - rt_global_debug_component |= (1 << c); -else - rt_global_debug_component &=BIT31 ; -return 0 ; -} -static int _rtl92e_wx_set_mode (struct net_device *dev,struct iw_request_info *a,union iwreq_data *wrqu,char *b)
@@ -872,22 +853,6 @@ static iw_handler r8192_wx_handlers[] = { [IW_IOCTL(SIOCSIWENCODEEXT)] = _rtl92e_wx_set_encode_ext, }; -/* the following rule need to be following, -* Odd : get (world access), -* even : set (root access) -*/ -static const struct iw_priv_args r8192_private_args[] = { - { -SIOCIWFIRSTPRIV +0x0 , -IW_PRIV_TYPE_INT |IW_PRIV_SIZE_FIXED |1 ,0 ,"set_debugflag" - } - -}; - -static iw_handler r8192_private_handler[] = { - (iw_handler )_rtl92e_wx_set_debug,/*SIOCIWSECONDPRIV*/ -}; -static struct iw_statistics *_rtl92e_get_wireless_stats (struct net_device *dev) {struct r8192_priv *priv =rtllib_priv (dev);
@@ -919,10 +884,5 @@ static struct iw_statistics *_rtl92e_get_wireless_stats(struct net_device *dev)const struct iw_handler_def r8192_wx_handlers_def = { .standard = r8192_wx_handlers, .num_standard =ARRAY_SIZE (r8192_wx_handlers), - .private = r8192_private_handler, - .num_private =ARRAY_SIZE (r8192_private_handler), - .num_private_args =sizeof (r8192_private_args) / -sizeof (struct iw_priv_args ), .get_wireless_stats = _rtl92e_get_wireless_stats, - .private_args = (struct iw_priv_args *)r8192_private_args, };
Signature · 1 line
2.42.0
PATCH 9/10 staging: rtl8192e: Remove unused variable rt_global_debug_component
In reply to Philipp HortmannRemove unused variable rt_global_debug_component.
--- drivers/staging/rtl8192e/rtllib_debug.h | 2 -- drivers/staging/rtl8192e/rtllib_module.c | 3 --- 2 files changed, 5 deletions(-)
drivers/staging/rtl8192e/rtllib_debug.h +0 -2
@@ -14,8 +14,6 @@#define DRV_NAME "rtllib_92e"#endif -extern u32 rt_global_debug_component; -/* These are the defines for rt_global_debug_component */ enum RTL_DEBUG {COMP_TRACE =BIT (0 ),
drivers/staging/rtl8192e/rtllib_module.c +0 -3
@@ -34,9 +34,6 @@#include <net/arp.h> #include "rtllib.h" -u32 rt_global_debug_component =COMP_ERR ; -EXPORT_SYMBOL (rt_global_debug_component); -static inline int rtllib_networks_allocate (struct rtllib_device *ieee) {if (ieee->networks)
Signature · 1 line
2.42.0
PATCH 10/10 staging: rtl8192e: Remove unused file rtllib_debug.h
In reply to Philipp HortmannRemove #define DRV_NAME "rtllib_92e" as it is already set. Remove enum RTL_DEBUG as it is unused. Remove #include <linux/bits.h> as it is unused.
--- drivers/staging/rtl8192e/rtllib.h | 1 - drivers/staging/rtl8192e/rtllib_debug.h | 47 ------------------------- 2 files changed, 48 deletions(-) delete mode 100644 drivers/staging/rtl8192e/rtllib_debug.h
drivers/staging/rtl8192e/rtllib.h +0 -1
@@ -31,7 +31,6 @@#include <linux/delay.h> #include <linux/wireless.h> -#include "rtllib_debug.h" #include "rtl819x_HT.h" #include "rtl819x_BA.h" #include "rtl819x_TS.h"
drivers/staging/rtl8192e/rtllib_debug.h deleted +0 -47
47 lines not on this page · raw message
Signature · 1 line
2.42.0