staging: rtl8192e: Rename pPSC

Rename variable pPSC to psc to avoid CamelCase which is not accepted by
checkpatch.

Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/47ded8a906e55d6f09b51cd8f2dfb78b7b92c1cc.1668313325.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Philipp Hortmann 2022-11-13 05:35:34 +01:00 committed by Greg Kroah-Hartman
parent ca25401e21
commit ca0298c09a
6 changed files with 60 additions and 60 deletions

View file

@ -1303,7 +1303,7 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
enum rt_rf_power_state rf_power_state) enum rt_rf_power_state rf_power_state)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *) struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
(&priv->rtllib->pwr_save_ctrl); (&priv->rtllib->pwr_save_ctrl);
bool bResult = true; bool bResult = true;
u8 i = 0, QueueID = 0; u8 i = 0, QueueID = 0;
@ -1318,7 +1318,7 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
switch (rf_power_state) { switch (rf_power_state) {
case rf_on: case rf_on:
if ((priv->rtllib->rf_power_state == rf_off) && if ((priv->rtllib->rf_power_state == rf_off) &&
RT_IN_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC)) { RT_IN_PS_LEVEL(psc, RT_RF_OFF_LEVL_HALT_NIC)) {
bool rtstatus; bool rtstatus;
u32 InitilizeCount = 3; u32 InitilizeCount = 3;
@ -1335,7 +1335,7 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
return false; return false;
} }
RT_CLEAR_PS_LEVEL(pPSC, RT_CLEAR_PS_LEVEL(psc,
RT_RF_OFF_LEVL_HALT_NIC); RT_RF_OFF_LEVL_HALT_NIC);
} else { } else {
rtl92e_writeb(dev, ANAPAR, 0x37); rtl92e_writeb(dev, ANAPAR, 0x37);
@ -1399,11 +1399,11 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
break; break;
} }
if (pPSC->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC && if (psc->RegRfPsLevel & RT_RF_OFF_LEVL_HALT_NIC &&
!RT_IN_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC)) { !RT_IN_PS_LEVEL(psc, RT_RF_OFF_LEVL_HALT_NIC)) {
rtl92e_disable_nic(dev); rtl92e_disable_nic(dev);
RT_SET_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC); RT_SET_PS_LEVEL(psc, RT_RF_OFF_LEVL_HALT_NIC);
} else if (!(pPSC->RegRfPsLevel & } else if (!(psc->RegRfPsLevel &
RT_RF_OFF_LEVL_HALT_NIC)) { RT_RF_OFF_LEVL_HALT_NIC)) {
rtl92e_set_rf_off(dev); rtl92e_set_rf_off(dev);
} }

View file

@ -682,7 +682,7 @@ void rtl92e_set_wireless_mode(struct net_device *dev, u8 wireless_mode)
static int _rtl92e_sta_up(struct net_device *dev, bool is_silent_reset) static int _rtl92e_sta_up(struct net_device *dev, bool is_silent_reset)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *) struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
(&priv->rtllib->pwr_save_ctrl); (&priv->rtllib->pwr_save_ctrl);
bool init_status; bool init_status;
@ -700,7 +700,7 @@ static int _rtl92e_sta_up(struct net_device *dev, bool is_silent_reset)
return -1; return -1;
} }
RT_CLEAR_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC); RT_CLEAR_PS_LEVEL(psc, RT_RF_OFF_LEVL_HALT_NIC);
priv->bfirst_init = false; priv->bfirst_init = false;
if (priv->polling_timer_on == 0) if (priv->polling_timer_on == 0)
@ -819,10 +819,10 @@ static void _rtl92e_init_priv_handler(struct net_device *dev)
static void _rtl92e_init_priv_constant(struct net_device *dev) static void _rtl92e_init_priv_constant(struct net_device *dev)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *) struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
&priv->rtllib->pwr_save_ctrl; &priv->rtllib->pwr_save_ctrl;
pPSC->reg_max_lps_awake_intvl = 5; psc->reg_max_lps_awake_intvl = 5;
} }
static void _rtl92e_init_priv_variable(struct net_device *dev) static void _rtl92e_init_priv_variable(struct net_device *dev)
@ -1271,7 +1271,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
enum reset_type ResetType = RESET_TYPE_NORESET; enum reset_type ResetType = RESET_TYPE_NORESET;
static u8 check_reset_cnt; static u8 check_reset_cnt;
unsigned long flags; unsigned long flags;
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *) struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
(&priv->rtllib->pwr_save_ctrl); (&priv->rtllib->pwr_save_ctrl);
bool bBusyTraffic = false; bool bBusyTraffic = false;
bool bHigherBusyTraffic = false; bool bHigherBusyTraffic = false;
@ -1389,7 +1389,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
spin_lock_irqsave(&priv->tx_lock, flags); spin_lock_irqsave(&priv->tx_lock, flags);
if ((check_reset_cnt++ >= 3) && (!ieee->is_roaming) && if ((check_reset_cnt++ >= 3) && (!ieee->is_roaming) &&
(!priv->rf_change_in_progress) && (!pPSC->bSwRfProcessing)) { (!priv->rf_change_in_progress) && (!psc->bSwRfProcessing)) {
ResetType = _rtl92e_if_check_reset(dev); ResetType = _rtl92e_if_check_reset(dev);
check_reset_cnt = 3; check_reset_cnt = 3;
} }
@ -2421,7 +2421,7 @@ bool rtl92e_enable_nic(struct net_device *dev)
{ {
bool init_status = true; bool init_status = true;
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *) struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
(&priv->rtllib->pwr_save_ctrl); (&priv->rtllib->pwr_save_ctrl);
if (!priv->up) { if (!priv->up) {
@ -2437,7 +2437,7 @@ bool rtl92e_enable_nic(struct net_device *dev)
priv->bdisable_nic = false; priv->bdisable_nic = false;
return false; return false;
} }
RT_CLEAR_PS_LEVEL(pPSC, RT_RF_OFF_LEVL_HALT_NIC); RT_CLEAR_PS_LEVEL(psc, RT_RF_OFF_LEVL_HALT_NIC);
priv->bfirst_init = false; priv->bfirst_init = false;
rtl92e_irq_enable(dev); rtl92e_irq_enable(dev);

View file

@ -100,27 +100,27 @@ void rtl92e_enter_sleep(struct net_device *dev, u64 time)
static void _rtl92e_ps_update_rf_state(struct net_device *dev) static void _rtl92e_ps_update_rf_state(struct net_device *dev)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *) struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
&priv->rtllib->pwr_save_ctrl; &priv->rtllib->pwr_save_ctrl;
pPSC->bSwRfProcessing = true; psc->bSwRfProcessing = true;
rtl92e_set_rf_state(dev, pPSC->eInactivePowerState, RF_CHANGE_BY_IPS); rtl92e_set_rf_state(dev, psc->eInactivePowerState, RF_CHANGE_BY_IPS);
pPSC->bSwRfProcessing = false; psc->bSwRfProcessing = false;
} }
void rtl92e_ips_enter(struct net_device *dev) void rtl92e_ips_enter(struct net_device *dev)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *) struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
&priv->rtllib->pwr_save_ctrl; &priv->rtllib->pwr_save_ctrl;
enum rt_rf_power_state rt_state; enum rt_rf_power_state rt_state;
rt_state = priv->rtllib->rf_power_state; rt_state = priv->rtllib->rf_power_state;
if (rt_state == rf_on && !pPSC->bSwRfProcessing && if (rt_state == rf_on && !psc->bSwRfProcessing &&
(priv->rtllib->state != RTLLIB_LINKED) && (priv->rtllib->state != RTLLIB_LINKED) &&
(priv->rtllib->iw_mode != IW_MODE_MASTER)) { (priv->rtllib->iw_mode != IW_MODE_MASTER)) {
pPSC->eInactivePowerState = rf_off; psc->eInactivePowerState = rf_off;
_rtl92e_ps_update_rf_state(dev); _rtl92e_ps_update_rf_state(dev);
} }
} }
@ -128,14 +128,14 @@ void rtl92e_ips_enter(struct net_device *dev)
void rtl92e_ips_leave(struct net_device *dev) void rtl92e_ips_leave(struct net_device *dev)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *) struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
&priv->rtllib->pwr_save_ctrl; &priv->rtllib->pwr_save_ctrl;
enum rt_rf_power_state rt_state; enum rt_rf_power_state rt_state;
rt_state = priv->rtllib->rf_power_state; rt_state = priv->rtllib->rf_power_state;
if (rt_state != rf_on && !pPSC->bSwRfProcessing && if (rt_state != rf_on && !psc->bSwRfProcessing &&
priv->rtllib->rf_off_reason <= RF_CHANGE_BY_IPS) { priv->rtllib->rf_off_reason <= RF_CHANGE_BY_IPS) {
pPSC->eInactivePowerState = rf_on; psc->eInactivePowerState = rf_on;
_rtl92e_ps_update_rf_state(dev); _rtl92e_ps_update_rf_state(dev);
} }
} }
@ -206,7 +206,7 @@ static bool _rtl92e_ps_set_mode(struct net_device *dev, u8 rtPsMode)
void rtl92e_leisure_ps_enter(struct net_device *dev) void rtl92e_leisure_ps_enter(struct net_device *dev)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *) struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
&priv->rtllib->pwr_save_ctrl; &priv->rtllib->pwr_save_ctrl;
if (!((priv->rtllib->iw_mode == IW_MODE_INFRA) && if (!((priv->rtllib->iw_mode == IW_MODE_INFRA) &&
@ -215,8 +215,8 @@ void rtl92e_leisure_ps_enter(struct net_device *dev)
(priv->rtllib->iw_mode == IW_MODE_MASTER)) (priv->rtllib->iw_mode == IW_MODE_MASTER))
return; return;
if (pPSC->bLeisurePs) { if (psc->bLeisurePs) {
if (pPSC->LpsIdleCount >= RT_CHECK_FOR_HANG_PERIOD) { if (psc->LpsIdleCount >= RT_CHECK_FOR_HANG_PERIOD) {
if (priv->rtllib->ps == RTLLIB_PS_DISABLED) { if (priv->rtllib->ps == RTLLIB_PS_DISABLED) {
if (priv->rtllib->SetFwCmdHandler) if (priv->rtllib->SetFwCmdHandler)
@ -225,17 +225,17 @@ void rtl92e_leisure_ps_enter(struct net_device *dev)
RTLLIB_PS_UNICAST); RTLLIB_PS_UNICAST);
} }
} else } else
pPSC->LpsIdleCount++; psc->LpsIdleCount++;
} }
} }
void rtl92e_leisure_ps_leave(struct net_device *dev) void rtl92e_leisure_ps_leave(struct net_device *dev)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *) struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
&priv->rtllib->pwr_save_ctrl; &priv->rtllib->pwr_save_ctrl;
if (pPSC->bLeisurePs) { if (psc->bLeisurePs) {
if (priv->rtllib->ps != RTLLIB_PS_DISABLED) { if (priv->rtllib->ps != RTLLIB_PS_DISABLED) {
_rtl92e_ps_set_mode(dev, RTLLIB_PS_DISABLED); _rtl92e_ps_set_mode(dev, RTLLIB_PS_DISABLED);
if (priv->rtllib->SetFwCmdHandler) if (priv->rtllib->SetFwCmdHandler)

View file

@ -159,7 +159,7 @@ static int _rtl92e_wx_adapter_power_status(struct net_device *dev,
union iwreq_data *wrqu, char *extra) union iwreq_data *wrqu, char *extra)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *) struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
(&priv->rtllib->pwr_save_ctrl); (&priv->rtllib->pwr_save_ctrl);
struct rtllib_device *ieee = priv->rtllib; struct rtllib_device *ieee = priv->rtllib;
@ -167,13 +167,13 @@ static int _rtl92e_wx_adapter_power_status(struct net_device *dev,
if (*extra || priv->force_lps) { if (*extra || priv->force_lps) {
priv->ps_force = false; priv->ps_force = false;
pPSC->bLeisurePs = true; psc->bLeisurePs = true;
} else { } else {
if (priv->rtllib->state == RTLLIB_LINKED) if (priv->rtllib->state == RTLLIB_LINKED)
rtl92e_leisure_ps_leave(dev); rtl92e_leisure_ps_leave(dev);
priv->ps_force = true; priv->ps_force = true;
pPSC->bLeisurePs = false; psc->bLeisurePs = false;
ieee->ps = *extra; ieee->ps = *extra;
} }
@ -188,7 +188,7 @@ static int _rtl92e_wx_set_lps_awake_interval(struct net_device *dev,
char *extra) char *extra)
{ {
struct r8192_priv *priv = rtllib_priv(dev); struct r8192_priv *priv = rtllib_priv(dev);
struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *) struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *)
(&priv->rtllib->pwr_save_ctrl); (&priv->rtllib->pwr_save_ctrl);
mutex_lock(&priv->wx_mutex); mutex_lock(&priv->wx_mutex);
@ -196,7 +196,7 @@ static int _rtl92e_wx_set_lps_awake_interval(struct net_device *dev,
netdev_info(dev, "%s(): set lps awake interval ! extra is %d\n", netdev_info(dev, "%s(): set lps awake interval ! extra is %d\n",
__func__, *extra); __func__, *extra);
pPSC->reg_max_lps_awake_intvl = *extra; psc->reg_max_lps_awake_intvl = *extra;
mutex_unlock(&priv->wx_mutex); mutex_unlock(&priv->wx_mutex);
return 0; return 0;
} }

View file

@ -111,11 +111,11 @@ static inline void *netdev_priv_rsl(struct net_device *dev)
#define SUPPORT_CKIP_MIC 0x08 #define SUPPORT_CKIP_MIC 0x08
#define SUPPORT_CKIP_PK 0x10 #define SUPPORT_CKIP_PK 0x10
#define RT_RF_OFF_LEVL_HALT_NIC BIT3 #define RT_RF_OFF_LEVL_HALT_NIC BIT3
#define RT_IN_PS_LEVEL(pPSC, _PS_FLAG) \ #define RT_IN_PS_LEVEL(psc, _PS_FLAG) \
((pPSC->CurPsLevel & _PS_FLAG) ? true : false) ((psc->CurPsLevel & _PS_FLAG) ? true : false)
#define RT_CLEAR_PS_LEVEL(pPSC, _PS_FLAG) \ #define RT_CLEAR_PS_LEVEL(psc, _PS_FLAG) \
(pPSC->CurPsLevel &= (~(_PS_FLAG))) (psc->CurPsLevel &= (~(_PS_FLAG)))
#define RT_SET_PS_LEVEL(pPSC, _PS_FLAG) (pPSC->CurPsLevel |= _PS_FLAG) #define RT_SET_PS_LEVEL(psc, _PS_FLAG) (psc->CurPsLevel |= _PS_FLAG)
/* defined for skb cb field */ /* defined for skb cb field */
/* At most 28 byte */ /* At most 28 byte */

View file

@ -1504,7 +1504,7 @@ static void rtllib_associate_complete_wq(void *data)
container_of_work_rsl(data, container_of_work_rsl(data,
struct rtllib_device, struct rtllib_device,
associate_complete_wq); associate_complete_wq);
struct rt_pwr_save_ctrl *pPSC = &ieee->pwr_save_ctrl; struct rt_pwr_save_ctrl *psc = &ieee->pwr_save_ctrl;
netdev_info(ieee->dev, "Associated successfully with %pM\n", netdev_info(ieee->dev, "Associated successfully with %pM\n",
ieee->current_network.bssid); ieee->current_network.bssid);
@ -1542,7 +1542,7 @@ static void rtllib_associate_complete_wq(void *data)
ieee->LinkDetectInfo.NumRecvBcnInPeriod = 1; ieee->LinkDetectInfo.NumRecvBcnInPeriod = 1;
ieee->LinkDetectInfo.NumRecvDataInPeriod = 1; ieee->LinkDetectInfo.NumRecvDataInPeriod = 1;
} }
pPSC->LpsIdleCount = 0; psc->LpsIdleCount = 0;
ieee->link_change(ieee->dev); ieee->link_change(ieee->dev);
if (ieee->is_silent_reset) { if (ieee->is_silent_reset) {
@ -1960,7 +1960,7 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
{ {
int timeout; int timeout;
u8 dtim; u8 dtim;
struct rt_pwr_save_ctrl *pPSC = &ieee->pwr_save_ctrl; struct rt_pwr_save_ctrl *psc = &ieee->pwr_save_ctrl;
if (ieee->LPSDelayCnt) { if (ieee->LPSDelayCnt) {
ieee->LPSDelayCnt--; ieee->LPSDelayCnt--;
@ -1990,21 +1990,21 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
if (time) { if (time) {
if (ieee->bAwakePktSent) { if (ieee->bAwakePktSent) {
pPSC->LPSAwakeIntvl = 1; psc->LPSAwakeIntvl = 1;
} else { } else {
u8 MaxPeriod = 1; u8 MaxPeriod = 1;
if (pPSC->LPSAwakeIntvl == 0) if (psc->LPSAwakeIntvl == 0)
pPSC->LPSAwakeIntvl = 1; psc->LPSAwakeIntvl = 1;
if (pPSC->reg_max_lps_awake_intvl == 0) if (psc->reg_max_lps_awake_intvl == 0)
MaxPeriod = 1; MaxPeriod = 1;
else if (pPSC->reg_max_lps_awake_intvl == 0xFF) else if (psc->reg_max_lps_awake_intvl == 0xFF)
MaxPeriod = ieee->current_network.dtim_period; MaxPeriod = ieee->current_network.dtim_period;
else else
MaxPeriod = pPSC->reg_max_lps_awake_intvl; MaxPeriod = psc->reg_max_lps_awake_intvl;
pPSC->LPSAwakeIntvl = (pPSC->LPSAwakeIntvl >= psc->LPSAwakeIntvl = (psc->LPSAwakeIntvl >=
MaxPeriod) ? MaxPeriod : MaxPeriod) ? MaxPeriod :
(pPSC->LPSAwakeIntvl + 1); (psc->LPSAwakeIntvl + 1);
} }
{ {
u8 LPSAwakeIntvl_tmp = 0; u8 LPSAwakeIntvl_tmp = 0;
@ -2012,23 +2012,23 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time)
u8 count = ieee->current_network.tim.tim_count; u8 count = ieee->current_network.tim.tim_count;
if (count == 0) { if (count == 0) {
if (pPSC->LPSAwakeIntvl > period) if (psc->LPSAwakeIntvl > period)
LPSAwakeIntvl_tmp = period + LPSAwakeIntvl_tmp = period +
(pPSC->LPSAwakeIntvl - (psc->LPSAwakeIntvl -
period) - period) -
((pPSC->LPSAwakeIntvl-period) % ((psc->LPSAwakeIntvl-period) %
period); period);
else else
LPSAwakeIntvl_tmp = pPSC->LPSAwakeIntvl; LPSAwakeIntvl_tmp = psc->LPSAwakeIntvl;
} else { } else {
if (pPSC->LPSAwakeIntvl > if (psc->LPSAwakeIntvl >
ieee->current_network.tim.tim_count) ieee->current_network.tim.tim_count)
LPSAwakeIntvl_tmp = count + LPSAwakeIntvl_tmp = count +
(pPSC->LPSAwakeIntvl - count) - (psc->LPSAwakeIntvl - count) -
((pPSC->LPSAwakeIntvl-count)%period); ((psc->LPSAwakeIntvl-count)%period);
else else
LPSAwakeIntvl_tmp = pPSC->LPSAwakeIntvl; LPSAwakeIntvl_tmp = psc->LPSAwakeIntvl;
} }
*time = ieee->current_network.last_dtim_sta_time *time = ieee->current_network.last_dtim_sta_time