*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];
}
}
}
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;
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;
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);
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);
}
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) {
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;
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);
}
/* 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 */
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);
}
}
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) {
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);
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)
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;
/* 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)