mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-05 08:26:59 +00:00
staging: rtl8192e: Rename Regdot11HTOper.., bSupportM.. and PowerSaveCo..
Rename variable Regdot11HTOperationalRateSet to reg_dot11ht_oper_rate_set, bSupportMode to support_mode and PowerSaveControl to pwr_save_ctrl to avoid CamelCase which is not accepted by checkpatch. Fix unnecessary parentheses warning from checkpatch when used with this variables. Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com> Link: https://lore.kernel.org/r/1ef7fd22b4a037c4d1f8685065ce7916b6f0930b.1668313325.git.philipp.g.hortmann@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
b397fc48c5
commit
c7bf6d33d0
7 changed files with 31 additions and 31 deletions
|
@ -1304,7 +1304,7 @@ static bool _rtl92e_set_rf_power_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 *pPSC = (struct rt_pwr_save_ctrl *)
|
||||||
(&(priv->rtllib->PowerSaveControl));
|
(&priv->rtllib->pwr_save_ctrl);
|
||||||
bool bResult = true;
|
bool bResult = true;
|
||||||
u8 i = 0, QueueID = 0;
|
u8 i = 0, QueueID = 0;
|
||||||
struct rtl8192_tx_ring *ring = NULL;
|
struct rtl8192_tx_ring *ring = NULL;
|
||||||
|
|
|
@ -607,13 +607,13 @@ static void _rtl92e_refresh_support_rate(struct r8192_priv *priv)
|
||||||
|
|
||||||
if (ieee->mode == WIRELESS_MODE_N_24G ||
|
if (ieee->mode == WIRELESS_MODE_N_24G ||
|
||||||
ieee->mode == WIRELESS_MODE_N_5G) {
|
ieee->mode == WIRELESS_MODE_N_5G) {
|
||||||
memcpy(ieee->Regdot11HTOperationalRateSet,
|
memcpy(ieee->reg_dot11ht_oper_rate_set,
|
||||||
ieee->RegHTSuppRateSet, 16);
|
ieee->RegHTSuppRateSet, 16);
|
||||||
memcpy(ieee->Regdot11TxHTOperationalRateSet,
|
memcpy(ieee->Regdot11TxHTOperationalRateSet,
|
||||||
ieee->RegHTSuppRateSet, 16);
|
ieee->RegHTSuppRateSet, 16);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
memset(ieee->Regdot11HTOperationalRateSet, 0, 16);
|
memset(ieee->reg_dot11ht_oper_rate_set, 0, 16);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -642,19 +642,19 @@ static u8 _rtl92e_get_supported_wireless_mode(struct net_device *dev)
|
||||||
void rtl92e_set_wireless_mode(struct net_device *dev, u8 wireless_mode)
|
void rtl92e_set_wireless_mode(struct net_device *dev, u8 wireless_mode)
|
||||||
{
|
{
|
||||||
struct r8192_priv *priv = rtllib_priv(dev);
|
struct r8192_priv *priv = rtllib_priv(dev);
|
||||||
u8 bSupportMode = _rtl92e_get_supported_wireless_mode(dev);
|
u8 support_mode = _rtl92e_get_supported_wireless_mode(dev);
|
||||||
|
|
||||||
if ((wireless_mode == WIRELESS_MODE_AUTO) ||
|
if ((wireless_mode == WIRELESS_MODE_AUTO) ||
|
||||||
((wireless_mode & bSupportMode) == 0)) {
|
((wireless_mode & support_mode) == 0)) {
|
||||||
if (bSupportMode & WIRELESS_MODE_N_24G) {
|
if (support_mode & WIRELESS_MODE_N_24G) {
|
||||||
wireless_mode = WIRELESS_MODE_N_24G;
|
wireless_mode = WIRELESS_MODE_N_24G;
|
||||||
} else if (bSupportMode & WIRELESS_MODE_N_5G) {
|
} else if (support_mode & WIRELESS_MODE_N_5G) {
|
||||||
wireless_mode = WIRELESS_MODE_N_5G;
|
wireless_mode = WIRELESS_MODE_N_5G;
|
||||||
} else if ((bSupportMode & WIRELESS_MODE_A)) {
|
} else if ((support_mode & WIRELESS_MODE_A)) {
|
||||||
wireless_mode = WIRELESS_MODE_A;
|
wireless_mode = WIRELESS_MODE_A;
|
||||||
} else if ((bSupportMode & WIRELESS_MODE_G)) {
|
} else if ((support_mode & WIRELESS_MODE_G)) {
|
||||||
wireless_mode = WIRELESS_MODE_G;
|
wireless_mode = WIRELESS_MODE_G;
|
||||||
} else if ((bSupportMode & WIRELESS_MODE_B)) {
|
} else if ((support_mode & WIRELESS_MODE_B)) {
|
||||||
wireless_mode = WIRELESS_MODE_B;
|
wireless_mode = WIRELESS_MODE_B;
|
||||||
} else {
|
} else {
|
||||||
netdev_info(dev,
|
netdev_info(dev,
|
||||||
|
@ -683,7 +683,7 @@ 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 *pPSC = (struct rt_pwr_save_ctrl *)
|
||||||
(&priv->rtllib->PowerSaveControl);
|
(&priv->rtllib->pwr_save_ctrl);
|
||||||
bool init_status;
|
bool init_status;
|
||||||
|
|
||||||
priv->bdisable_nic = false;
|
priv->bdisable_nic = false;
|
||||||
|
@ -820,7 +820,7 @@ 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 *pPSC = (struct rt_pwr_save_ctrl *)
|
||||||
&priv->rtllib->PowerSaveControl;
|
&priv->rtllib->pwr_save_ctrl;
|
||||||
|
|
||||||
pPSC->reg_max_lps_awake_intvl = 5;
|
pPSC->reg_max_lps_awake_intvl = 5;
|
||||||
}
|
}
|
||||||
|
@ -877,7 +877,7 @@ static void _rtl92e_init_priv_variable(struct net_device *dev)
|
||||||
priv->rf_change_in_progress = false;
|
priv->rf_change_in_progress = false;
|
||||||
priv->bHwRfOffAction = 0;
|
priv->bHwRfOffAction = 0;
|
||||||
priv->SetRFPowerStateInProgress = false;
|
priv->SetRFPowerStateInProgress = false;
|
||||||
priv->rtllib->PowerSaveControl.bLeisurePs = true;
|
priv->rtllib->pwr_save_ctrl.bLeisurePs = true;
|
||||||
priv->rtllib->LPSDelayCnt = 0;
|
priv->rtllib->LPSDelayCnt = 0;
|
||||||
priv->rtllib->sta_sleep = LPS_IS_WAKE;
|
priv->rtllib->sta_sleep = LPS_IS_WAKE;
|
||||||
priv->rtllib->rf_power_state = rf_on;
|
priv->rtllib->rf_power_state = rf_on;
|
||||||
|
@ -1272,7 +1272,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
|
||||||
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 *pPSC = (struct rt_pwr_save_ctrl *)
|
||||||
(&priv->rtllib->PowerSaveControl);
|
(&priv->rtllib->pwr_save_ctrl);
|
||||||
bool bBusyTraffic = false;
|
bool bBusyTraffic = false;
|
||||||
bool bHigherBusyTraffic = false;
|
bool bHigherBusyTraffic = false;
|
||||||
bool bHigherBusyRxTraffic = false;
|
bool bHigherBusyRxTraffic = false;
|
||||||
|
@ -1295,7 +1295,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
|
||||||
RTLLIB_NOLINK) &&
|
RTLLIB_NOLINK) &&
|
||||||
(ieee->rf_power_state == rf_on) && !ieee->is_set_key &&
|
(ieee->rf_power_state == rf_on) && !ieee->is_set_key &&
|
||||||
(!ieee->proto_stoppping) && !ieee->wx_set_enc) {
|
(!ieee->proto_stoppping) && !ieee->wx_set_enc) {
|
||||||
if ((ieee->PowerSaveControl.ReturnPoint ==
|
if ((ieee->pwr_save_ctrl.ReturnPoint ==
|
||||||
IPS_CALLBACK_NONE) &&
|
IPS_CALLBACK_NONE) &&
|
||||||
(!ieee->bNetPromiscuousMode)) {
|
(!ieee->bNetPromiscuousMode)) {
|
||||||
rtl92e_ips_enter(dev);
|
rtl92e_ips_enter(dev);
|
||||||
|
@ -2422,7 +2422,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 *pPSC = (struct rt_pwr_save_ctrl *)
|
||||||
(&priv->rtllib->PowerSaveControl);
|
(&priv->rtllib->pwr_save_ctrl);
|
||||||
|
|
||||||
if (!priv->up) {
|
if (!priv->up) {
|
||||||
netdev_warn(dev, "%s(): Driver is already down!\n", __func__);
|
netdev_warn(dev, "%s(): Driver is already down!\n", __func__);
|
||||||
|
|
|
@ -101,7 +101,7 @@ 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 *pPSC = (struct rt_pwr_save_ctrl *)
|
||||||
&(priv->rtllib->PowerSaveControl);
|
&priv->rtllib->pwr_save_ctrl;
|
||||||
|
|
||||||
pPSC->bSwRfProcessing = true;
|
pPSC->bSwRfProcessing = true;
|
||||||
rtl92e_set_rf_state(dev, pPSC->eInactivePowerState, RF_CHANGE_BY_IPS);
|
rtl92e_set_rf_state(dev, pPSC->eInactivePowerState, RF_CHANGE_BY_IPS);
|
||||||
|
@ -113,7 +113,7 @@ 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 *pPSC = (struct rt_pwr_save_ctrl *)
|
||||||
&(priv->rtllib->PowerSaveControl);
|
&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;
|
||||||
|
@ -129,7 +129,7 @@ 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 *pPSC = (struct rt_pwr_save_ctrl *)
|
||||||
&(priv->rtllib->PowerSaveControl);
|
&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;
|
||||||
|
@ -207,7 +207,7 @@ 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 *pPSC = (struct rt_pwr_save_ctrl *)
|
||||||
&(priv->rtllib->PowerSaveControl);
|
&priv->rtllib->pwr_save_ctrl;
|
||||||
|
|
||||||
if (!((priv->rtllib->iw_mode == IW_MODE_INFRA) &&
|
if (!((priv->rtllib->iw_mode == IW_MODE_INFRA) &&
|
||||||
(priv->rtllib->state == RTLLIB_LINKED))
|
(priv->rtllib->state == RTLLIB_LINKED))
|
||||||
|
@ -233,7 +233,7 @@ 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 *pPSC = (struct rt_pwr_save_ctrl *)
|
||||||
&(priv->rtllib->PowerSaveControl);
|
&priv->rtllib->pwr_save_ctrl;
|
||||||
|
|
||||||
if (pPSC->bLeisurePs) {
|
if (pPSC->bLeisurePs) {
|
||||||
if (priv->rtllib->ps != RTLLIB_PS_DISABLED) {
|
if (priv->rtllib->ps != RTLLIB_PS_DISABLED) {
|
||||||
|
|
|
@ -160,7 +160,7 @@ static int _rtl92e_wx_adapter_power_status(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 *pPSC = (struct rt_pwr_save_ctrl *)
|
||||||
(&priv->rtllib->PowerSaveControl);
|
(&priv->rtllib->pwr_save_ctrl);
|
||||||
struct rtllib_device *ieee = priv->rtllib;
|
struct rtllib_device *ieee = priv->rtllib;
|
||||||
|
|
||||||
mutex_lock(&priv->wx_mutex);
|
mutex_lock(&priv->wx_mutex);
|
||||||
|
@ -189,7 +189,7 @@ static int _rtl92e_wx_set_lps_awake_interval(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 *pPSC = (struct rt_pwr_save_ctrl *)
|
||||||
(&priv->rtllib->PowerSaveControl);
|
(&priv->rtllib->pwr_save_ctrl);
|
||||||
|
|
||||||
mutex_lock(&priv->wx_mutex);
|
mutex_lock(&priv->wx_mutex);
|
||||||
|
|
||||||
|
|
|
@ -323,7 +323,7 @@ void HTConstructCapabilityElement(struct rtllib_device *ieee, u8 *posHTCap,
|
||||||
pCapELE->MPDUDensity = 0;
|
pCapELE->MPDUDensity = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
memcpy(pCapELE->MCS, ieee->Regdot11HTOperationalRateSet, 16);
|
memcpy(pCapELE->MCS, ieee->reg_dot11ht_oper_rate_set, 16);
|
||||||
memset(&pCapELE->ExtHTCapInfo, 0, 2);
|
memset(&pCapELE->ExtHTCapInfo, 0, 2);
|
||||||
memset(pCapELE->TxBFCap, 0, 4);
|
memset(pCapELE->TxBFCap, 0, 4);
|
||||||
|
|
||||||
|
|
|
@ -1435,7 +1435,7 @@ struct rtllib_device {
|
||||||
struct rt_hi_throughput *pHTInfo;
|
struct rt_hi_throughput *pHTInfo;
|
||||||
|
|
||||||
spinlock_t reorder_spinlock;
|
spinlock_t reorder_spinlock;
|
||||||
u8 Regdot11HTOperationalRateSet[16];
|
u8 reg_dot11ht_oper_rate_set[16];
|
||||||
u8 Regdot11TxHTOperationalRateSet[16];
|
u8 Regdot11TxHTOperationalRateSet[16];
|
||||||
u8 dot11HTOperationalRateSet[16];
|
u8 dot11HTOperationalRateSet[16];
|
||||||
u8 RegHTSuppRateSet[16];
|
u8 RegHTSuppRateSet[16];
|
||||||
|
@ -1645,7 +1645,7 @@ struct rtllib_device {
|
||||||
|
|
||||||
struct rt_link_detect LinkDetectInfo;
|
struct rt_link_detect LinkDetectInfo;
|
||||||
bool bIsAggregateFrame;
|
bool bIsAggregateFrame;
|
||||||
struct rt_pwr_save_ctrl PowerSaveControl;
|
struct rt_pwr_save_ctrl pwr_save_ctrl;
|
||||||
|
|
||||||
/* used if IEEE_SOFTMAC_TX_QUEUE is set */
|
/* used if IEEE_SOFTMAC_TX_QUEUE is set */
|
||||||
struct tx_pending tx_pending;
|
struct tx_pending tx_pending;
|
||||||
|
|
|
@ -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->PowerSaveControl);
|
struct rt_pwr_save_ctrl *pPSC = &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);
|
||||||
|
@ -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->PowerSaveControl);
|
struct rt_pwr_save_ctrl *pPSC = &ieee->pwr_save_ctrl;
|
||||||
|
|
||||||
if (ieee->LPSDelayCnt) {
|
if (ieee->LPSDelayCnt) {
|
||||||
ieee->LPSDelayCnt--;
|
ieee->LPSDelayCnt--;
|
||||||
|
@ -2984,9 +2984,9 @@ int rtllib_softmac_init(struct rtllib_device *ieee)
|
||||||
ieee->ps = RTLLIB_PS_DISABLED;
|
ieee->ps = RTLLIB_PS_DISABLED;
|
||||||
ieee->sta_sleep = LPS_IS_WAKE;
|
ieee->sta_sleep = LPS_IS_WAKE;
|
||||||
|
|
||||||
ieee->Regdot11HTOperationalRateSet[0] = 0xff;
|
ieee->reg_dot11ht_oper_rate_set[0] = 0xff;
|
||||||
ieee->Regdot11HTOperationalRateSet[1] = 0xff;
|
ieee->reg_dot11ht_oper_rate_set[1] = 0xff;
|
||||||
ieee->Regdot11HTOperationalRateSet[4] = 0x01;
|
ieee->reg_dot11ht_oper_rate_set[4] = 0x01;
|
||||||
|
|
||||||
ieee->Regdot11TxHTOperationalRateSet[0] = 0xff;
|
ieee->Regdot11TxHTOperationalRateSet[0] = 0xff;
|
||||||
ieee->Regdot11TxHTOperationalRateSet[1] = 0xff;
|
ieee->Regdot11TxHTOperationalRateSet[1] = 0xff;
|
||||||
|
|
Loading…
Reference in a new issue