Commit 7e5cfa3c authored by Philipp Hortmann's avatar Philipp Hortmann Committed by Greg Kroah-Hartman

staging: rtl8192e: Rename LinkDetectInfo

Rename variable LinkDetectInfo to link_detect_info to avoid CamelCase
which is not accepted by checkpatch.
Signed-off-by: default avatarPhilipp Hortmann <philipp.g.hortmann@gmail.com>
Link: https://lore.kernel.org/r/48d043893fa755490e810af204e5b7ad2ba606de.1668313325.git.philipp.g.hortmann@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ab4bcf79
......@@ -1250,15 +1250,15 @@ static void _rtl92e_update_rxcounts(struct r8192_priv *priv, u32 *TotalRxBcnNum,
*TotalRxBcnNum = 0;
*TotalRxDataNum = 0;
SlotIndex = (priv->rtllib->LinkDetectInfo.SlotIndex++) %
(priv->rtllib->LinkDetectInfo.SlotNum);
priv->rtllib->LinkDetectInfo.RxBcnNum[SlotIndex] =
priv->rtllib->LinkDetectInfo.NumRecvBcnInPeriod;
priv->rtllib->LinkDetectInfo.RxDataNum[SlotIndex] =
priv->rtllib->LinkDetectInfo.NumRecvDataInPeriod;
for (i = 0; i < priv->rtllib->LinkDetectInfo.SlotNum; i++) {
*TotalRxBcnNum += priv->rtllib->LinkDetectInfo.RxBcnNum[i];
*TotalRxDataNum += priv->rtllib->LinkDetectInfo.RxDataNum[i];
SlotIndex = (priv->rtllib->link_detect_info.SlotIndex++) %
(priv->rtllib->link_detect_info.SlotNum);
priv->rtllib->link_detect_info.RxBcnNum[SlotIndex] =
priv->rtllib->link_detect_info.NumRecvBcnInPeriod;
priv->rtllib->link_detect_info.RxDataNum[SlotIndex] =
priv->rtllib->link_detect_info.NumRecvDataInPeriod;
for (i = 0; i < priv->rtllib->link_detect_info.SlotNum; i++) {
*TotalRxBcnNum += priv->rtllib->link_detect_info.RxBcnNum[i];
*TotalRxDataNum += priv->rtllib->link_detect_info.RxDataNum[i];
}
}
......@@ -1304,22 +1304,22 @@ static void _rtl92e_watchdog_wq_cb(void *data)
}
if ((ieee->state == RTLLIB_LINKED) && (ieee->iw_mode ==
IW_MODE_INFRA) && (!ieee->bNetPromiscuousMode)) {
if (ieee->LinkDetectInfo.NumRxOkInPeriod > 100 ||
ieee->LinkDetectInfo.NumTxOkInPeriod > 100)
if (ieee->link_detect_info.NumRxOkInPeriod > 100 ||
ieee->link_detect_info.NumTxOkInPeriod > 100)
bBusyTraffic = true;
if (ieee->LinkDetectInfo.NumRxOkInPeriod > 4000 ||
ieee->LinkDetectInfo.NumTxOkInPeriod > 4000) {
if (ieee->link_detect_info.NumRxOkInPeriod > 4000 ||
ieee->link_detect_info.NumTxOkInPeriod > 4000) {
bHigherBusyTraffic = true;
if (ieee->LinkDetectInfo.NumRxOkInPeriod > 5000)
if (ieee->link_detect_info.NumRxOkInPeriod > 5000)
bHigherBusyRxTraffic = true;
else
bHigherBusyRxTraffic = false;
}
if (((ieee->LinkDetectInfo.NumRxUnicastOkInPeriod +
ieee->LinkDetectInfo.NumTxOkInPeriod) > 8) ||
(ieee->LinkDetectInfo.NumRxUnicastOkInPeriod > 2))
if (((ieee->link_detect_info.NumRxUnicastOkInPeriod +
ieee->link_detect_info.NumTxOkInPeriod) > 8) ||
(ieee->link_detect_info.NumRxUnicastOkInPeriod > 2))
bEnterPS = false;
else
bEnterPS = true;
......@@ -1336,13 +1336,13 @@ static void _rtl92e_watchdog_wq_cb(void *data)
rtl92e_leisure_ps_leave(dev);
}
ieee->LinkDetectInfo.NumRxOkInPeriod = 0;
ieee->LinkDetectInfo.NumTxOkInPeriod = 0;
ieee->LinkDetectInfo.NumRxUnicastOkInPeriod = 0;
ieee->LinkDetectInfo.bBusyTraffic = bBusyTraffic;
ieee->link_detect_info.NumRxOkInPeriod = 0;
ieee->link_detect_info.NumTxOkInPeriod = 0;
ieee->link_detect_info.NumRxUnicastOkInPeriod = 0;
ieee->link_detect_info.bBusyTraffic = bBusyTraffic;
ieee->LinkDetectInfo.bHigherBusyTraffic = bHigherBusyTraffic;
ieee->LinkDetectInfo.bHigherBusyRxTraffic = bHigherBusyRxTraffic;
ieee->link_detect_info.bHigherBusyTraffic = bHigherBusyTraffic;
ieee->link_detect_info.bHigherBusyRxTraffic = bHigherBusyRxTraffic;
if (ieee->state == RTLLIB_LINKED && ieee->iw_mode == IW_MODE_INFRA) {
u32 TotalRxBcnNum = 0;
......@@ -1383,8 +1383,8 @@ static void _rtl92e_watchdog_wq_cb(void *data)
priv->check_roaming_cnt = 0;
}
ieee->LinkDetectInfo.NumRecvBcnInPeriod = 0;
ieee->LinkDetectInfo.NumRecvDataInPeriod = 0;
ieee->link_detect_info.NumRecvBcnInPeriod = 0;
ieee->link_detect_info.NumRecvDataInPeriod = 0;
}
spin_lock_irqsave(&priv->tx_lock, flags);
......@@ -2213,25 +2213,25 @@ static irqreturn_t _rtl92e_irq(int irq, void *netdev)
if (inta & IMR_BKDOK) {
priv->stats.txbkokint++;
priv->rtllib->LinkDetectInfo.NumTxOkInPeriod++;
priv->rtllib->link_detect_info.NumTxOkInPeriod++;
_rtl92e_tx_isr(dev, BK_QUEUE);
}
if (inta & IMR_BEDOK) {
priv->stats.txbeokint++;
priv->rtllib->LinkDetectInfo.NumTxOkInPeriod++;
priv->rtllib->link_detect_info.NumTxOkInPeriod++;
_rtl92e_tx_isr(dev, BE_QUEUE);
}
if (inta & IMR_VIDOK) {
priv->stats.txviokint++;
priv->rtllib->LinkDetectInfo.NumTxOkInPeriod++;
priv->rtllib->link_detect_info.NumTxOkInPeriod++;
_rtl92e_tx_isr(dev, VI_QUEUE);
}
if (inta & IMR_VODOK) {
priv->stats.txvookint++;
priv->rtllib->LinkDetectInfo.NumTxOkInPeriod++;
priv->rtllib->link_detect_info.NumTxOkInPeriod++;
_rtl92e_tx_isr(dev, VO_QUEUE);
}
......
......@@ -393,7 +393,7 @@ static int _rtl92e_wx_set_scan(struct net_device *dev,
rt_state = priv->rtllib->rf_power_state;
if (!priv->up)
return -ENETDOWN;
if (priv->rtllib->LinkDetectInfo.bBusyTraffic == true)
if (priv->rtllib->link_detect_info.bBusyTraffic == true)
return -EAGAIN;
if (wrqu->data.flags & IW_SCAN_THIS_ESSID) {
......
......@@ -1643,7 +1643,7 @@ struct rtllib_device {
struct bandwidth_autoswitch bandwidth_auto_switch;
bool FwRWRF;
struct rt_link_detect LinkDetectInfo;
struct rt_link_detect link_detect_info;
bool bIsAggregateFrame;
struct rt_pwr_save_ctrl pwr_save_ctrl;
......
......@@ -1211,9 +1211,9 @@ static void rtllib_rx_check_leave_lps(struct rtllib_device *ieee, u8 unicast,
if (unicast) {
if (ieee->state == RTLLIB_LINKED) {
if (((ieee->LinkDetectInfo.NumRxUnicastOkInPeriod +
ieee->LinkDetectInfo.NumTxOkInPeriod) > 8) ||
(ieee->LinkDetectInfo.NumRxUnicastOkInPeriod > 2)) {
if (((ieee->link_detect_info.NumRxUnicastOkInPeriod +
ieee->link_detect_info.NumTxOkInPeriod) > 8) ||
(ieee->link_detect_info.NumRxUnicastOkInPeriod > 2)) {
if (ieee->LeisurePSLeave)
ieee->LeisurePSLeave(ieee->dev);
}
......@@ -1355,8 +1355,8 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb,
/* Update statstics for AP roaming */
if (!bToOtherSTA) {
ieee->LinkDetectInfo.NumRecvDataInPeriod++;
ieee->LinkDetectInfo.NumRxOkInPeriod++;
ieee->link_detect_info.NumRecvDataInPeriod++;
ieee->link_detect_info.NumRxOkInPeriod++;
}
/* Data frame - extract src/dst addresses */
......@@ -1437,7 +1437,7 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb,
else
nr_subframes = 1;
if (unicast)
ieee->LinkDetectInfo.NumRxUnicastOkInPeriod += nr_subframes;
ieee->link_detect_info.NumRxUnicastOkInPeriod += nr_subframes;
rtllib_rx_check_leave_lps(ieee, unicast, nr_subframes);
}
......@@ -2620,7 +2620,7 @@ static inline void rtllib_process_probe_response(
}
if (is_beacon(frame_ctl)) {
if (ieee->state >= RTLLIB_LINKED)
ieee->LinkDetectInfo.NumRecvBcnInPeriod++;
ieee->link_detect_info.NumRecvBcnInPeriod++;
}
}
list_for_each_entry(target, &ieee->network_list, list) {
......
......@@ -1534,13 +1534,13 @@ static void rtllib_associate_complete_wq(void *data)
ieee->pHTInfo->enable_ht);
memset(ieee->dot11ht_oper_rate_set, 0, 16);
}
ieee->LinkDetectInfo.SlotNum = 2 * (1 +
ieee->link_detect_info.SlotNum = 2 * (1 +
ieee->current_network.beacon_interval /
500);
if (ieee->LinkDetectInfo.NumRecvBcnInPeriod == 0 ||
ieee->LinkDetectInfo.NumRecvDataInPeriod == 0) {
ieee->LinkDetectInfo.NumRecvBcnInPeriod = 1;
ieee->LinkDetectInfo.NumRecvDataInPeriod = 1;
if (ieee->link_detect_info.NumRecvBcnInPeriod == 0 ||
ieee->link_detect_info.NumRecvDataInPeriod == 0) {
ieee->link_detect_info.NumRecvBcnInPeriod = 1;
ieee->link_detect_info.NumRecvDataInPeriod = 1;
}
psc->LpsIdleCount = 0;
ieee->link_change(ieee->dev);
......@@ -2369,7 +2369,7 @@ rtllib_rx_deauth(struct rtllib_device *ieee, struct sk_buff *skb)
ieee->state = RTLLIB_ASSOCIATING;
ieee->softmac_stats.reassoc++;
ieee->is_roaming = true;
ieee->LinkDetectInfo.bBusyTraffic = false;
ieee->link_detect_info.bBusyTraffic = false;
rtllib_disassociate(ieee);
RemovePeerTS(ieee, header->addr2);
if (ieee->LedControlHandler != NULL)
......@@ -2963,13 +2963,13 @@ int rtllib_softmac_init(struct rtllib_device *ieee)
if (!ieee->dot11d_info)
return -ENOMEM;
ieee->LinkDetectInfo.SlotIndex = 0;
ieee->LinkDetectInfo.SlotNum = 2;
ieee->LinkDetectInfo.NumRecvBcnInPeriod = 0;
ieee->LinkDetectInfo.NumRecvDataInPeriod = 0;
ieee->LinkDetectInfo.NumTxOkInPeriod = 0;
ieee->LinkDetectInfo.NumRxOkInPeriod = 0;
ieee->LinkDetectInfo.NumRxUnicastOkInPeriod = 0;
ieee->link_detect_info.SlotIndex = 0;
ieee->link_detect_info.SlotNum = 2;
ieee->link_detect_info.NumRecvBcnInPeriod = 0;
ieee->link_detect_info.NumRecvDataInPeriod = 0;
ieee->link_detect_info.NumTxOkInPeriod = 0;
ieee->link_detect_info.NumRxOkInPeriod = 0;
ieee->link_detect_info.NumRxUnicastOkInPeriod = 0;
ieee->bIsAggregateFrame = false;
ieee->assoc_id = 0;
ieee->queue_stop = 0;
......
......@@ -391,10 +391,10 @@ void rtllib_wx_sync_scan_wq(void *data)
/* Notify AP that I wake up again */
rtllib_sta_ps_send_null_frame(ieee, 0);
if (ieee->LinkDetectInfo.NumRecvBcnInPeriod == 0 ||
ieee->LinkDetectInfo.NumRecvDataInPeriod == 0) {
ieee->LinkDetectInfo.NumRecvBcnInPeriod = 1;
ieee->LinkDetectInfo.NumRecvDataInPeriod = 1;
if (ieee->link_detect_info.NumRecvBcnInPeriod == 0 ||
ieee->link_detect_info.NumRecvDataInPeriod == 0) {
ieee->link_detect_info.NumRecvBcnInPeriod = 1;
ieee->link_detect_info.NumRecvDataInPeriod = 1;
}
if (ieee->data_hard_resume)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment