diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:11:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-08-07 13:11:40 +0000 |
commit | 8b0a8165cdad0f4133837d753649ef4682e42c3b (patch) | |
tree | 5c58f869f31ddb1f7bd6e8bdea269b680b36c5b6 /drivers/staging/rtl8192e | |
parent | Releasing progress-linux version 6.8.12-1~progress7.99u1. (diff) | |
download | linux-8b0a8165cdad0f4133837d753649ef4682e42c3b.tar.xz linux-8b0a8165cdad0f4133837d753649ef4682e42c3b.zip |
Merging upstream version 6.9.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'drivers/staging/rtl8192e')
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 103 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c | 1 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 64 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 37 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 4 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl819x_BAProc.c | 70 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl819x_HT.h | 6 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl819x_HTProc.c | 44 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl819x_Qos.h | 2 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtl819x_TSProc.c | 30 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib.h | 98 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_rx.c | 50 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_softmac.c | 278 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_softmac_wx.c | 8 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_tx.c | 18 | ||||
-rw-r--r-- | drivers/staging/rtl8192e/rtllib_wx.c | 2 |
17 files changed, 383 insertions, 436 deletions
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c index c7a2eae2fd..e3ed709a76 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c @@ -164,7 +164,7 @@ void rtl92e_set_reg(struct net_device *dev, u8 variable, u8 *val) eACI); break; } - priv->rtllib->SetHwRegHandler(dev, HW_VAR_ACM_CTRL, + priv->rtllib->set_hw_reg_handler(dev, HW_VAR_ACM_CTRL, &pAcParam); break; } @@ -693,11 +693,10 @@ void rtl92e_link_change(struct net_device *dev) u32 reg; reg = rtl92e_readl(dev, RCR); - if (priv->rtllib->link_state == MAC80211_LINKED) { + if (priv->rtllib->link_state == MAC80211_LINKED) priv->receive_config = reg |= RCR_CBSSID; - } else { + else priv->receive_config = reg &= ~RCR_CBSSID; - } rtl92e_writel(dev, RCR, reg); } @@ -1296,7 +1295,6 @@ static void _rtl92e_query_rxphystatus( pwdb_all = rtl92e_rx_db_to_percent(rx_pwr_all); pstats->RxPWDBAll = precord_stats->RxPWDBAll = pwdb_all; - pstats->RxPower = precord_stats->RxPower = rx_pwr_all; pstats->RecvSignalPower = rx_pwr_all; if (pdrvinfo->RxHT && pdrvinfo->RxRate >= DESC90_RATEMCS8 && pdrvinfo->RxRate <= DESC90_RATEMCS15) @@ -1348,14 +1346,7 @@ static void _rtl92e_process_phyinfo(struct r8192_priv *priv, u8 *buffer, static u32 slide_beacon_adc_pwdb_index; static u32 slide_beacon_adc_pwdb_statistics; static u32 last_beacon_adc_pwdb; - struct ieee80211_hdr_3addr *hdr; - u16 sc; - unsigned int seq; - hdr = (struct ieee80211_hdr_3addr *)buffer; - sc = le16_to_cpu(hdr->seq_ctrl); - seq = WLAN_GET_SEQ_SEQ(sc); - curr_st->Seq_Num = seq; if (!prev_st->bIsAMPDU) bcheck = true; @@ -1536,7 +1527,7 @@ static void _rtl92e_update_received_rate_histogram_stats( { struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); u32 rcvType = 1; - u32 rateIndex; + u32 rate_index; if (pstats->bCRC) rcvType = 2; @@ -1545,95 +1536,95 @@ static void _rtl92e_update_received_rate_histogram_stats( switch (pstats->rate) { case MGN_1M: - rateIndex = 0; + rate_index = 0; break; case MGN_2M: - rateIndex = 1; + rate_index = 1; break; case MGN_5_5M: - rateIndex = 2; + rate_index = 2; break; case MGN_11M: - rateIndex = 3; + rate_index = 3; break; case MGN_6M: - rateIndex = 4; + rate_index = 4; break; case MGN_9M: - rateIndex = 5; + rate_index = 5; break; case MGN_12M: - rateIndex = 6; + rate_index = 6; break; case MGN_18M: - rateIndex = 7; + rate_index = 7; break; case MGN_24M: - rateIndex = 8; + rate_index = 8; break; case MGN_36M: - rateIndex = 9; + rate_index = 9; break; case MGN_48M: - rateIndex = 10; + rate_index = 10; break; case MGN_54M: - rateIndex = 11; + rate_index = 11; break; case MGN_MCS0: - rateIndex = 12; + rate_index = 12; break; case MGN_MCS1: - rateIndex = 13; + rate_index = 13; break; case MGN_MCS2: - rateIndex = 14; + rate_index = 14; break; case MGN_MCS3: - rateIndex = 15; + rate_index = 15; break; case MGN_MCS4: - rateIndex = 16; + rate_index = 16; break; case MGN_MCS5: - rateIndex = 17; + rate_index = 17; break; case MGN_MCS6: - rateIndex = 18; + rate_index = 18; break; case MGN_MCS7: - rateIndex = 19; + rate_index = 19; break; case MGN_MCS8: - rateIndex = 20; + rate_index = 20; break; case MGN_MCS9: - rateIndex = 21; + rate_index = 21; break; case MGN_MCS10: - rateIndex = 22; + rate_index = 22; break; case MGN_MCS11: - rateIndex = 23; + rate_index = 23; break; case MGN_MCS12: - rateIndex = 24; + rate_index = 24; break; case MGN_MCS13: - rateIndex = 25; + rate_index = 25; break; case MGN_MCS14: - rateIndex = 26; + rate_index = 26; break; case MGN_MCS15: - rateIndex = 27; + rate_index = 27; break; default: - rateIndex = 28; + rate_index = 28; break; } - priv->stats.received_rate_histogram[0][rateIndex]++; - priv->stats.received_rate_histogram[rcvType][rateIndex]++; + priv->stats.received_rate_histogram[0][rate_index]++; + priv->stats.received_rate_histogram[rcvType][rate_index]++; } bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats, @@ -1650,7 +1641,6 @@ bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats, stats->bHwError |= 1; if (stats->bHwError) { - stats->bShift = false; return false; } @@ -1662,7 +1652,6 @@ bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats, stats->rate = _rtl92e_rate_hw_to_mgn((bool)pDrvInfo->RxHT, pDrvInfo->RxRate); - stats->bShortPreamble = pDrvInfo->SPLCP; _rtl92e_update_received_rate_histogram_stats(dev, stats); @@ -1673,19 +1662,9 @@ bool rtl92e_get_rx_stats(struct net_device *dev, struct rtllib_rx_stats *stats, stats->TimeStampLow = pDrvInfo->TSFL; stats->TimeStampHigh = rtl92e_readl(dev, TSFR + 4); - if ((stats->RxBufShift + stats->RxDrvInfoSize) > 0) - stats->bShift = 1; - - stats->RxIs40MHzPacket = pDrvInfo->BW; - _rtl92e_translate_rx_signal_stats(dev, skb, stats, pdesc, pDrvInfo); skb_trim(skb, skb->len - S_CRC_LEN); - - stats->packetlength = stats->Length - 4; - stats->fraglength = stats->packetlength; - stats->fragoffset = 0; - stats->ntotalfrag = 1; return true; } @@ -1698,7 +1677,7 @@ void rtl92e_stop_adapter(struct net_device *dev, bool reset) u32 ulRegRead; op_mode = RT_OP_MODE_NO_LINK; - priv->rtllib->SetHwRegHandler(dev, HW_VAR_MEDIA_STATUS, &op_mode); + priv->rtllib->set_hw_reg_handler(dev, HW_VAR_MEDIA_STATUS, &op_mode); if (!priv->rtllib->bSupportRemoteWakeUp) { u1bTmp = 0x0; @@ -1852,7 +1831,7 @@ bool rtl92e_is_rx_stuck(struct net_device *dev) u16 RegRxCounter = rtl92e_readw(dev, 0x130); bool bStuck = false; static u8 rx_chk_cnt; - u32 SlotIndex = 0, TotalRxStuckCount = 0; + u32 slot_index = 0, TotalRxStuckCount = 0; u8 i; u8 SilentResetRxSoltNum = 4; @@ -1882,10 +1861,10 @@ bool rtl92e_is_rx_stuck(struct net_device *dev) } - SlotIndex = (priv->silent_reset_rx_slot_index++) % SilentResetRxSoltNum; + slot_index = (priv->silent_reset_rx_slot_index++) % SilentResetRxSoltNum; if (priv->rx_ctr == RegRxCounter) { - priv->silent_reset_rx_stuck_event[SlotIndex] = 1; + priv->silent_reset_rx_stuck_event[slot_index] = 1; for (i = 0; i < SilentResetRxSoltNum; i++) TotalRxStuckCount += priv->silent_reset_rx_stuck_event[i]; @@ -1897,7 +1876,7 @@ bool rtl92e_is_rx_stuck(struct net_device *dev) priv->silent_reset_rx_stuck_event[i]; } } else { - priv->silent_reset_rx_stuck_event[SlotIndex] = 0; + priv->silent_reset_rx_stuck_event[slot_index] = 0; } priv->rx_ctr = RegRxCounter; @@ -1938,5 +1917,5 @@ bool rtl92e_is_halfn_supported_by_ap(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); struct rtllib_device *ieee = priv->rtllib; - return ieee->bHalfWirelessN24GMode; + return ieee->half_wireless_n24g_mode; } diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c index e1bd4d67e8..18b948d4d8 100644 --- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c +++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c @@ -714,7 +714,6 @@ void rtl92e_set_channel(struct net_device *dev, u8 channel) if (priv->up) _rtl92e_phy_switch_channel_work_item(dev); priv->sw_chnl_in_progress = false; - return; } static void _rtl92e_cck_tx_power_track_bw_switch_tssi(struct net_device *dev) diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c index 6815d18a79..649b529657 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c @@ -172,7 +172,7 @@ bool rtl92e_set_rf_state(struct net_device *dev, priv->blinked_ingpio = true; else priv->blinked_ingpio = false; - rtllib_MgntDisconnect(priv->rtllib, + rtllib_mgnt_disconnect(priv->rtllib, WLAN_REASON_DISASSOC_STA_HAS_LEFT); } } @@ -236,14 +236,14 @@ static void _rtl92e_update_cap(struct net_device *dev, u16 cap) if (priv->dot11_current_preamble_mode != PREAMBLE_SHORT) { ShortPreamble = true; priv->dot11_current_preamble_mode = PREAMBLE_SHORT; - priv->rtllib->SetHwRegHandler(dev, HW_VAR_ACK_PREAMBLE, + priv->rtllib->set_hw_reg_handler(dev, HW_VAR_ACK_PREAMBLE, (unsigned char *)&ShortPreamble); } } else { if (priv->dot11_current_preamble_mode != PREAMBLE_LONG) { ShortPreamble = false; priv->dot11_current_preamble_mode = PREAMBLE_LONG; - priv->rtllib->SetHwRegHandler(dev, HW_VAR_ACK_PREAMBLE, + priv->rtllib->set_hw_reg_handler(dev, HW_VAR_ACK_PREAMBLE, (unsigned char *)&ShortPreamble); } } @@ -256,13 +256,13 @@ static void _rtl92e_update_cap(struct net_device *dev, u16 cap) (!priv->rtllib->ht_info->current_rt2rt_long_slot_time)) { if (cur_slot_time != SHORT_SLOT_TIME) { slot_time_val = SHORT_SLOT_TIME; - priv->rtllib->SetHwRegHandler(dev, + priv->rtllib->set_hw_reg_handler(dev, HW_VAR_SLOT_TIME, &slot_time_val); } } else { if (cur_slot_time != NON_SHORT_SLOT_TIME) { slot_time_val = NON_SHORT_SLOT_TIME; - priv->rtllib->SetHwRegHandler(dev, + priv->rtllib->set_hw_reg_handler(dev, HW_VAR_SLOT_TIME, &slot_time_val); } } @@ -301,7 +301,7 @@ static void _rtl92e_qos_activate(void *data) goto success; for (i = 0; i < QOS_QUEUE_NUM; i++) - priv->rtllib->SetHwRegHandler(dev, HW_VAR_AC_PARAM, (u8 *)(&i)); + priv->rtllib->set_hw_reg_handler(dev, HW_VAR_AC_PARAM, (u8 *)(&i)); success: mutex_unlock(&priv->mutex); @@ -656,12 +656,12 @@ static void _rtl92e_init_priv_handler(struct net_device *dev) priv->rtllib->enter_sleep_state = rtl92e_enter_sleep; priv->rtllib->ps_is_queue_empty = _rtl92e_is_tx_queue_empty; - priv->rtllib->GetNmodeSupportBySecCfg = rtl92e_get_nmode_support_by_sec; - priv->rtllib->GetHalfNmodeSupportByAPsHandler = + priv->rtllib->get_nmode_support_by_sec_cfg = rtl92e_get_nmode_support_by_sec; + priv->rtllib->get_half_nmode_support_by_aps_handler = rtl92e_is_halfn_supported_by_ap; - priv->rtllib->SetHwRegHandler = rtl92e_set_reg; - priv->rtllib->AllowAllDestAddrHandler = rtl92e_set_monitor_mode; + priv->rtllib->set_hw_reg_handler = rtl92e_set_reg; + priv->rtllib->allow_all_dest_addr_handler = rtl92e_set_monitor_mode; priv->rtllib->init_gain_handler = rtl92e_init_gain; priv->rtllib->rtllib_ips_leave_wq = rtl92e_rtllib_ips_leave_wq; priv->rtllib->rtllib_ips_leave = rtl92e_rtllib_ips_leave; @@ -705,7 +705,7 @@ static void _rtl92e_init_priv_variable(struct net_device *dev) priv->hw_rf_off_action = 0; priv->set_rf_pwr_state_in_progress = false; priv->rtllib->pwr_save_ctrl.bLeisurePs = true; - priv->rtllib->LPSDelayCnt = 0; + priv->rtllib->lps_delay_cnt = 0; priv->rtllib->sta_sleep = LPS_IS_WAKE; priv->rtllib->rf_power_state = rf_on; @@ -909,25 +909,24 @@ static void _rtl92e_if_check_reset(struct net_device *dev) netdev_info(dev, "%s(): TxResetType is %d, RxResetType is %d\n", __func__, TxResetType, RxResetType); } - return; } static void _rtl92e_update_rxcounts(struct r8192_priv *priv, u32 *TotalRxBcnNum, u32 *TotalRxDataNum) { - u16 SlotIndex; + u16 slot_index; u8 i; *TotalRxBcnNum = 0; *TotalRxDataNum = 0; - 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++) { + slot_index = (priv->rtllib->link_detect_info.slot_index++) % + (priv->rtllib->link_detect_info.slot_num); + priv->rtllib->link_detect_info.RxBcnNum[slot_index] = + priv->rtllib->link_detect_info.num_recv_bcn_in_period; + priv->rtllib->link_detect_info.RxDataNum[slot_index] = + priv->rtllib->link_detect_info.num_recv_data_in_period; + for (i = 0; i < priv->rtllib->link_detect_info.slot_num; i++) { *TotalRxBcnNum += priv->rtllib->link_detect_info.RxBcnNum[i]; *TotalRxDataNum += priv->rtllib->link_detect_info.RxDataNum[i]; } @@ -943,7 +942,7 @@ static void _rtl92e_watchdog_wq_cb(void *data) unsigned long flags; struct rt_pwr_save_ctrl *psc = (struct rt_pwr_save_ctrl *) (&priv->rtllib->pwr_save_ctrl); - bool bBusyTraffic = false; + bool busy_traffic = false; bool bHigherBusyTraffic = false; bool bHigherBusyRxTraffic = false; bool bEnterPS = false; @@ -965,15 +964,14 @@ static void _rtl92e_watchdog_wq_cb(void *data) MAC80211_NOLINK) && (ieee->rf_power_state == rf_on) && !ieee->is_set_key && (!ieee->proto_stoppping) && !ieee->wx_set_enc) { - if (ieee->pwr_save_ctrl.ReturnPoint == IPS_CALLBACK_NONE) { + if (ieee->pwr_save_ctrl.ReturnPoint == IPS_CALLBACK_NONE) rtl92e_ips_enter(dev); - } } } if ((ieee->link_state == MAC80211_LINKED) && (ieee->iw_mode == IW_MODE_INFRA)) { if (ieee->link_detect_info.num_rx_ok_in_period > 100 || ieee->link_detect_info.num_tx_ok_in_period > 100) - bBusyTraffic = true; + busy_traffic = true; if (ieee->link_detect_info.num_rx_ok_in_period > 4000 || ieee->link_detect_info.num_tx_ok_in_period > 4000) { @@ -984,9 +982,9 @@ static void _rtl92e_watchdog_wq_cb(void *data) bHigherBusyRxTraffic = false; } - if (((ieee->link_detect_info.NumRxUnicastOkInPeriod + + if (((ieee->link_detect_info.num_rx_unicast_ok_in_period + ieee->link_detect_info.num_tx_ok_in_period) > 8) || - (ieee->link_detect_info.NumRxUnicastOkInPeriod > 2)) + (ieee->link_detect_info.num_rx_unicast_ok_in_period > 2)) bEnterPS = false; else bEnterPS = true; @@ -1005,8 +1003,8 @@ static void _rtl92e_watchdog_wq_cb(void *data) ieee->link_detect_info.num_rx_ok_in_period = 0; ieee->link_detect_info.num_tx_ok_in_period = 0; - ieee->link_detect_info.NumRxUnicastOkInPeriod = 0; - ieee->link_detect_info.bBusyTraffic = bBusyTraffic; + ieee->link_detect_info.num_rx_unicast_ok_in_period = 0; + ieee->link_detect_info.busy_traffic = busy_traffic; ieee->link_detect_info.bHigherBusyTraffic = bHigherBusyTraffic; ieee->link_detect_info.bHigherBusyRxTraffic = bHigherBusyRxTraffic; @@ -1032,7 +1030,7 @@ static void _rtl92e_watchdog_wq_cb(void *data) ieee->link_state = RTLLIB_ASSOCIATING; - RemovePeerTS(priv->rtllib, + remove_peer_ts(priv->rtllib, priv->rtllib->current_network.bssid); ieee->is_roaming = true; ieee->is_set_key = false; @@ -1046,8 +1044,8 @@ static void _rtl92e_watchdog_wq_cb(void *data) priv->check_roaming_cnt = 0; } - ieee->link_detect_info.NumRecvBcnInPeriod = 0; - ieee->link_detect_info.NumRecvDataInPeriod = 0; + ieee->link_detect_info.num_recv_bcn_in_period = 0; + ieee->link_detect_info.num_recv_data_in_period = 0; } spin_lock_irqsave(&priv->tx_lock, flags); @@ -1257,7 +1255,7 @@ static short _rtl92e_tx(struct net_device *dev, struct sk_buff *skb) int idx; u32 fwinfo_size = 0; - priv->rtllib->bAwakePktSent = true; + priv->rtllib->awake_pkt_sent = true; fwinfo_size = sizeof(struct tx_fwinfo_8190pci); @@ -1502,8 +1500,6 @@ static void _rtl92e_rx_normal(struct net_device *dev) }; unsigned int count = priv->rxringcount; - stats.nic_type = NIC_8192E; - while (count--) { struct rx_desc *pdesc = &priv->rx_ring [priv->rx_idx]; diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c index 92143c50c1..c34087af97 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c @@ -354,7 +354,7 @@ static void _rtl92e_dm_check_rate_adaptive(struct net_device *dev) } } - if (priv->rtllib->GetHalfNmodeSupportByAPsHandler(dev)) + if (priv->rtllib->get_half_nmode_support_by_aps_handler(dev)) target_ratr &= 0xf00fffff; current_ratr = rtl92e_readl(dev, RATR0); @@ -1185,7 +1185,7 @@ static void _rtl92e_dm_check_edca_turbo(struct net_device *dev) if (priv->bcurrent_turbo_EDCA) { u8 tmp = AC0_BE; - priv->rtllib->SetHwRegHandler(dev, HW_VAR_AC_PARAM, + priv->rtllib->set_hw_reg_handler(dev, HW_VAR_AC_PARAM, (u8 *)(&tmp)); priv->bcurrent_turbo_EDCA = false; } @@ -1523,7 +1523,7 @@ static void _rtl92e_dm_init_fsync(struct net_device *dev) priv->rtllib->fsync_multiple_timeinterval = 3; priv->rtllib->fsync_firstdiff_ratethreshold = 100; priv->rtllib->fsync_seconddiff_ratethreshold = 200; - priv->rtllib->fsync_state = Default_Fsync; + priv->rtllib->fsync_state = DEFAULT_FSYNC; timer_setup(&priv->fsync_timer, _rtl92e_dm_fsync_timer_callback, 0); } @@ -1636,7 +1636,7 @@ static void _rtl92e_dm_start_hw_fsync(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); rtl92e_writel(dev, rOFDM0_RxDetector2, 0x465c12cf); - priv->rtllib->SetHwRegHandler(dev, HW_VAR_RF_TIMING, + priv->rtllib->set_hw_reg_handler(dev, HW_VAR_RF_TIMING, (u8 *)(&rf_timing)); rtl92e_writeb(dev, 0xc3b, 0x41); } @@ -1647,7 +1647,7 @@ static void _rtl92e_dm_end_hw_fsync(struct net_device *dev) struct r8192_priv *priv = rtllib_priv(dev); rtl92e_writel(dev, rOFDM0_RxDetector2, 0x465c52cd); - priv->rtllib->SetHwRegHandler(dev, HW_VAR_RF_TIMING, (u8 *) + priv->rtllib->set_hw_reg_handler(dev, HW_VAR_RF_TIMING, (u8 *) (&rf_timing)); rtl92e_writeb(dev, 0xc3b, 0x49); } @@ -1716,31 +1716,29 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev) priv->rtllib->ht_info->iot_peer == HT_IOT_PEER_BROADCOM) { if (priv->rtllib->bfsync_enable == 0) { switch (priv->rtllib->fsync_state) { - case Default_Fsync: + case DEFAULT_FSYNC: _rtl92e_dm_start_hw_fsync(dev); - priv->rtllib->fsync_state = HW_Fsync; + priv->rtllib->fsync_state = HW_FSYNC; break; - case SW_Fsync: + case SW_FSYNC: _rtl92e_dm_end_sw_fsync(dev); _rtl92e_dm_start_hw_fsync(dev); - priv->rtllib->fsync_state = HW_Fsync; + priv->rtllib->fsync_state = HW_FSYNC; break; - case HW_Fsync: default: break; } } else { switch (priv->rtllib->fsync_state) { - case Default_Fsync: + case DEFAULT_FSYNC: _rtl92e_dm_start_sw_fsync(dev); - priv->rtllib->fsync_state = SW_Fsync; + priv->rtllib->fsync_state = SW_FSYNC; break; - case HW_Fsync: + case HW_FSYNC: _rtl92e_dm_end_hw_fsync(dev); _rtl92e_dm_start_sw_fsync(dev); - priv->rtllib->fsync_state = SW_Fsync; + priv->rtllib->fsync_state = SW_FSYNC; break; - case SW_Fsync: default: break; } @@ -1752,15 +1750,14 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev) } } else { switch (priv->rtllib->fsync_state) { - case HW_Fsync: + case HW_FSYNC: _rtl92e_dm_end_hw_fsync(dev); - priv->rtllib->fsync_state = Default_Fsync; + priv->rtllib->fsync_state = DEFAULT_FSYNC; break; - case SW_Fsync: + case SW_FSYNC: _rtl92e_dm_end_sw_fsync(dev); - priv->rtllib->fsync_state = Default_Fsync; + priv->rtllib->fsync_state = DEFAULT_FSYNC; break; - case Default_Fsync: default: break; } diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c index 44a9fe8318..5aac9110bf 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c @@ -208,12 +208,12 @@ void rtl92e_leisure_ps_enter(struct net_device *dev) return; if (psc->bLeisurePs) { - if (psc->LpsIdleCount >= RT_CHECK_FOR_HANG_PERIOD) { + if (psc->lps_idle_count >= RT_CHECK_FOR_HANG_PERIOD) { if (priv->rtllib->ps == RTLLIB_PS_DISABLED) _rtl92e_ps_set_mode(dev, RTLLIB_PS_MBCAST | RTLLIB_PS_UNICAST); } else { - psc->LpsIdleCount++; + psc->lps_idle_count++; } } } diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c index 4c884c5277..d131ef525f 100644 --- a/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl8192e/rtl_wx.c @@ -253,7 +253,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->link_detect_info.bBusyTraffic) + if (priv->rtllib->link_detect_info.busy_traffic) return -EAGAIN; if (wrqu->data.flags & IW_SCAN_THIS_ESSID) { @@ -269,7 +269,7 @@ static int _rtl92e_wx_set_scan(struct net_device *dev, mutex_lock(&priv->wx_mutex); - priv->rtllib->FirstIe_InScan = true; + priv->rtllib->first_ie_in_scan = true; if (priv->rtllib->link_state != MAC80211_LINKED) { if (rt_state == rf_off) { diff --git a/drivers/staging/rtl8192e/rtl819x_BAProc.c b/drivers/staging/rtl8192e/rtl819x_BAProc.c index ee9ce39215..834329886e 100644 --- a/drivers/staging/rtl8192e/rtl819x_BAProc.c +++ b/drivers/staging/rtl8192e/rtl819x_BAProc.c @@ -125,7 +125,7 @@ static struct sk_buff *rtllib_ADDBA(struct rtllib_device *ieee, u8 *dst, static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst, struct ba_record *ba, - enum tr_select TxRxSelect, u16 reason_code) + enum tr_select tx_rx_select, u16 reason_code) { union delba_param_set del_ba_param_set; struct sk_buff *skb = NULL; @@ -139,7 +139,7 @@ static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst, memset(&del_ba_param_set, 0, 2); - del_ba_param_set.field.initiator = (TxRxSelect == TX_DIR) ? 1 : 0; + del_ba_param_set.field.initiator = (tx_rx_select == TX_DIR) ? 1 : 0; del_ba_param_set.field.tid = ba->ba_param_set.field.tid; skb = dev_alloc_skb(len + sizeof(struct ieee80211_hdr_3addr)); @@ -173,8 +173,8 @@ static struct sk_buff *rtllib_DELBA(struct rtllib_device *ieee, u8 *dst, return skb; } -static void rtllib_send_ADDBAReq(struct rtllib_device *ieee, u8 *dst, - struct ba_record *ba) +static void rtllib_send_add_ba_req(struct rtllib_device *ieee, u8 *dst, + struct ba_record *ba) { struct sk_buff *skb; @@ -186,8 +186,8 @@ static void rtllib_send_ADDBAReq(struct rtllib_device *ieee, u8 *dst, netdev_dbg(ieee->dev, "Failed to generate ADDBAReq packet.\n"); } -static void rtllib_send_ADDBARsp(struct rtllib_device *ieee, u8 *dst, - struct ba_record *ba, u16 status_code) +static void rtllib_send_add_ba_rsp(struct rtllib_device *ieee, u8 *dst, + struct ba_record *ba, u16 status_code) { struct sk_buff *skb; @@ -199,19 +199,19 @@ static void rtllib_send_ADDBARsp(struct rtllib_device *ieee, u8 *dst, } static void rtllib_send_DELBA(struct rtllib_device *ieee, u8 *dst, - struct ba_record *ba, enum tr_select TxRxSelect, + struct ba_record *ba, enum tr_select tx_rx_select, u16 reason_code) { struct sk_buff *skb; - skb = rtllib_DELBA(ieee, dst, ba, TxRxSelect, reason_code); + skb = rtllib_DELBA(ieee, dst, ba, tx_rx_select, reason_code); if (skb) softmac_mgmt_xmit(skb, ieee); else netdev_dbg(ieee->dev, "Failed to generate DELBA packet.\n"); } -int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb) +int rtllib_rx_add_ba_req(struct rtllib_device *ieee, struct sk_buff *skb) { struct ieee80211_hdr_3addr *req = NULL; u16 rc = 0; @@ -251,13 +251,13 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb) "Failed to reply on ADDBA_REQ as some capability is not ready(%d, %d)\n", ieee->current_network.qos_data.active, ieee->ht_info->current_ht_support); - goto OnADDBAReq_Fail; + goto on_add_ba_req_fail; } if (!rtllib_get_ts(ieee, (struct ts_common_info **)&ts, dst, - (u8)(ba_param_set->field.tid), RX_DIR, true)) { + (u8)(ba_param_set->field.tid), RX_DIR, true)) { rc = ADDBA_STATUS_REFUSED; netdev_warn(ieee->dev, "%s(): can't get TS\n", __func__); - goto OnADDBAReq_Fail; + goto on_add_ba_req_fail; } ba = &ts->rx_admitted_ba_record; @@ -265,10 +265,10 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb) rc = ADDBA_STATUS_INVALID_PARAM; netdev_warn(ieee->dev, "%s(): BA Policy is not correct\n", __func__); - goto OnADDBAReq_Fail; + goto on_add_ba_req_fail; } - rtllib_FlushRxTsPendingPkts(ieee, ts); + rtllib_flush_rx_ts_pending_pkts(ieee, ts); deactivate_ba_entry(ieee, ba); ba->dialog_token = *dialog_token; @@ -276,18 +276,18 @@ int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb) ba->ba_timeout_value = *ba_timeout_value; ba->ba_start_seq_ctrl = *ba_start_seq_ctrl; - if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev) || - (ieee->ht_info->iot_action & HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT)) + if (ieee->get_half_nmode_support_by_aps_handler(ieee->dev) || + (ieee->ht_info->iot_action & HT_IOT_ACT_ALLOW_PEER_AGG_ONE_PKT)) ba->ba_param_set.field.buffer_size = 1; else ba->ba_param_set.field.buffer_size = 32; activate_ba_entry(ba, 0); - rtllib_send_ADDBARsp(ieee, dst, ba, ADDBA_STATUS_SUCCESS); + rtllib_send_add_ba_rsp(ieee, dst, ba, ADDBA_STATUS_SUCCESS); return 0; -OnADDBAReq_Fail: +on_add_ba_req_fail: { struct ba_record BA; @@ -295,12 +295,12 @@ OnADDBAReq_Fail: BA.ba_timeout_value = *ba_timeout_value; BA.dialog_token = *dialog_token; BA.ba_param_set.field.ba_policy = BA_POLICY_IMMEDIATE; - rtllib_send_ADDBARsp(ieee, dst, &BA, rc); + rtllib_send_add_ba_rsp(ieee, dst, &BA, rc); return 0; } } -int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb) +int rtllib_rx_add_ba_rsp(struct rtllib_device *ieee, struct sk_buff *skb) { struct ieee80211_hdr_3addr *rsp = NULL; struct ba_record *pending_ba, *admitted_ba; @@ -334,14 +334,14 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb) ieee->ht_info->current_ht_support, ieee->ht_info->current_ampdu_enable); reason_code = DELBA_REASON_UNKNOWN_BA; - goto OnADDBARsp_Reject; + goto on_add_ba_rsp_reject; } if (!rtllib_get_ts(ieee, (struct ts_common_info **)&ts, dst, - (u8)(ba_param_set->field.tid), TX_DIR, false)) { + (u8)(ba_param_set->field.tid), TX_DIR, false)) { netdev_warn(ieee->dev, "%s(): can't get TS\n", __func__); reason_code = DELBA_REASON_UNKNOWN_BA; - goto OnADDBARsp_Reject; + goto on_add_ba_rsp_reject; } ts->add_ba_req_in_progress = false; @@ -358,7 +358,7 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb) "%s(): ADDBA Rsp. BA invalid, DELBA!\n", __func__); reason_code = DELBA_REASON_UNKNOWN_BA; - goto OnADDBARsp_Reject; + goto on_add_ba_rsp_reject; } else { netdev_dbg(ieee->dev, "%s(): Recv ADDBA Rsp. BA is admitted! Status code:%X\n", @@ -371,7 +371,7 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb) ts->add_ba_req_delayed = true; deactivate_ba_entry(ieee, admitted_ba); reason_code = DELBA_REASON_END_BA; - goto OnADDBARsp_Reject; + goto on_add_ba_rsp_reject; } admitted_ba->dialog_token = *dialog_token; @@ -384,12 +384,12 @@ int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb) ts->add_ba_req_delayed = true; ts->disable_add_ba = true; reason_code = DELBA_REASON_END_BA; - goto OnADDBARsp_Reject; + goto on_add_ba_rsp_reject; } return 0; -OnADDBARsp_Reject: +on_add_ba_rsp_reject: { struct ba_record BA; @@ -433,7 +433,7 @@ int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb) struct rx_ts_record *ts; if (!rtllib_get_ts(ieee, (struct ts_common_info **)&ts, dst, - (u8)del_ba_param_set->field.tid, RX_DIR, false)) { + (u8)del_ba_param_set->field.tid, RX_DIR, false)) { netdev_warn(ieee->dev, "%s(): can't get TS for RXTS. dst:%pM TID:%d\n", __func__, dst, @@ -446,7 +446,7 @@ int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb) struct tx_ts_record *ts; if (!rtllib_get_ts(ieee, (struct ts_common_info **)&ts, dst, - (u8)del_ba_param_set->field.tid, TX_DIR, false)) { + (u8)del_ba_param_set->field.tid, TX_DIR, false)) { netdev_warn(ieee->dev, "%s(): can't get TS for TXTS\n", __func__); return -1; @@ -481,14 +481,14 @@ void rtllib_ts_init_add_ba(struct rtllib_device *ieee, struct tx_ts_record *ts, activate_ba_entry(ba, BA_SETUP_TIMEOUT); - rtllib_send_ADDBAReq(ieee, ts->ts_common_info.addr, ba); + rtllib_send_add_ba_req(ieee, ts->ts_common_info.addr, ba); } void rtllib_ts_init_del_ba(struct rtllib_device *ieee, struct ts_common_info *ts_common_info, - enum tr_select TxRxSelect) + enum tr_select tx_rx_select) { - if (TxRxSelect == TX_DIR) { + if (tx_rx_select == TX_DIR) { struct tx_ts_record *ts = (struct tx_ts_record *)ts_common_info; @@ -497,14 +497,14 @@ void rtllib_ts_init_del_ba(struct rtllib_device *ieee, (ts->tx_admitted_ba_record.b_valid) ? (&ts->tx_admitted_ba_record) : (&ts->tx_pending_ba_record), - TxRxSelect, DELBA_REASON_END_BA); - } else if (TxRxSelect == RX_DIR) { + tx_rx_select, DELBA_REASON_END_BA); + } else if (tx_rx_select == RX_DIR) { struct rx_ts_record *ts = (struct rx_ts_record *)ts_common_info; if (rx_ts_delete_ba(ieee, ts)) rtllib_send_DELBA(ieee, ts_common_info->addr, &ts->rx_admitted_ba_record, - TxRxSelect, DELBA_REASON_END_BA); + tx_rx_select, DELBA_REASON_END_BA); } } diff --git a/drivers/staging/rtl8192e/rtl819x_HT.h b/drivers/staging/rtl8192e/rtl819x_HT.h index 68577bffb9..a458044530 100644 --- a/drivers/staging/rtl8192e/rtl819x_HT.h +++ b/drivers/staging/rtl8192e/rtl819x_HT.h @@ -98,9 +98,9 @@ struct rt_hi_throughput { u8 cur_short_gi_40mhz; u8 cur_short_gi_20mhz; enum ht_spec_ver peer_ht_spec_ver; - struct ht_capab_ele SelfHTCap; - u8 PeerHTCapBuf[32]; - u8 PeerHTInfoBuf[32]; + struct ht_capab_ele self_ht_cap; + u8 peer_ht_cap_buf[32]; + u8 peer_ht_info_buf[32]; u8 ampdu_enable; u8 current_ampdu_enable; u8 ampdu_factor; diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c index 6d0912f901..fa96a2c2c9 100644 --- a/drivers/staging/rtl8192e/rtl819x_HTProc.c +++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c @@ -252,7 +252,7 @@ void ht_construct_capability_element(struct rtllib_device *ieee, u8 *pos_ht_cap, } cap_ele->AdvCoding = 0; - if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) + if (ieee->get_half_nmode_support_by_aps_handler(ieee->dev)) cap_ele->ChlWidth = 0; else cap_ele->ChlWidth = 1; @@ -301,7 +301,7 @@ void ht_construct_capability_element(struct rtllib_device *ieee, u8 *pos_ht_cap, if (ht->iot_action & HT_IOT_ACT_DISABLE_RX_40MHZ_SHORT_GI) cap_ele->ShortGI40Mhz = 0; - if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) { + if (ieee->get_half_nmode_support_by_aps_handler(ieee->dev)) { cap_ele->ChlWidth = 0; cap_ele->MCS[1] = 0; } @@ -408,7 +408,7 @@ static u8 ht_filter_mcs_rate(struct rtllib_device *ieee, u8 *pSupportMCS, ht_pick_mcs_rate(ieee, pOperateMCS); - if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) + if (ieee->get_half_nmode_support_by_aps_handler(ieee->dev)) pOperateMCS[1] = 0; for (i = 2; i <= 15; i++) @@ -437,16 +437,16 @@ void ht_on_assoc_rsp(struct rtllib_device *ieee) } netdev_dbg(ieee->dev, "%s(): HT_ENABLE\n", __func__); - if (!memcmp(ht_info->PeerHTCapBuf, EWC11NHTCap, sizeof(EWC11NHTCap))) - pPeerHTCap = (struct ht_capab_ele *)(&ht_info->PeerHTCapBuf[4]); + if (!memcmp(ht_info->peer_ht_cap_buf, EWC11NHTCap, sizeof(EWC11NHTCap))) + pPeerHTCap = (struct ht_capab_ele *)(&ht_info->peer_ht_cap_buf[4]); else - pPeerHTCap = (struct ht_capab_ele *)(ht_info->PeerHTCapBuf); + pPeerHTCap = (struct ht_capab_ele *)(ht_info->peer_ht_cap_buf); - if (!memcmp(ht_info->PeerHTInfoBuf, EWC11NHTInfo, sizeof(EWC11NHTInfo))) + if (!memcmp(ht_info->peer_ht_info_buf, EWC11NHTInfo, sizeof(EWC11NHTInfo))) pPeerHTInfo = (struct ht_info_ele *) - (&ht_info->PeerHTInfoBuf[4]); + (&ht_info->peer_ht_info_buf[4]); else - pPeerHTInfo = (struct ht_info_ele *)(ht_info->PeerHTInfoBuf); + pPeerHTInfo = (struct ht_info_ele *)(ht_info->peer_ht_info_buf); #ifdef VERBOSE_DEBUG print_hex_dump_bytes("%s: ", __func__, DUMP_PREFIX_NONE, @@ -480,9 +480,9 @@ void ht_on_assoc_rsp(struct rtllib_device *ieee) } ht_info->current_mpdu_density = pPeerHTCap->MPDUDensity; - if (ht_info->iot_action & HT_IOT_ACT_TX_USE_AMSDU_8K) { + if (ht_info->iot_action & HT_IOT_ACT_TX_USE_AMSDU_8K) ht_info->current_ampdu_enable = false; - } + ht_info->cur_rx_reorder_enable = 1; if (pPeerHTCap->MCS[0] == 0) @@ -516,12 +516,12 @@ void ht_initialize_ht_info(struct rtllib_device *ieee) ht_info->current_mpdu_density = 0; ht_info->CurrentAMPDUFactor = ht_info->ampdu_factor; - memset((void *)(&ht_info->SelfHTCap), 0, - sizeof(ht_info->SelfHTCap)); - memset((void *)(&ht_info->PeerHTCapBuf), 0, - sizeof(ht_info->PeerHTCapBuf)); - memset((void *)(&ht_info->PeerHTInfoBuf), 0, - sizeof(ht_info->PeerHTInfoBuf)); + memset((void *)(&ht_info->self_ht_cap), 0, + sizeof(ht_info->self_ht_cap)); + memset((void *)(&ht_info->peer_ht_cap_buf), 0, + sizeof(ht_info->peer_ht_cap_buf)); + memset((void *)(&ht_info->peer_ht_info_buf), 0, + sizeof(ht_info->peer_ht_info_buf)); ht_info->sw_bw_in_progress = false; @@ -572,15 +572,15 @@ void ht_reset_self_and_save_peer_setting(struct rtllib_device *ieee, ht_info->peer_ht_spec_ver = pNetwork->bssht.bd_ht_spec_ver; if (pNetwork->bssht.bd_ht_cap_len > 0 && - pNetwork->bssht.bd_ht_cap_len <= sizeof(ht_info->PeerHTCapBuf)) - memcpy(ht_info->PeerHTCapBuf, + pNetwork->bssht.bd_ht_cap_len <= sizeof(ht_info->peer_ht_cap_buf)) + memcpy(ht_info->peer_ht_cap_buf, pNetwork->bssht.bd_ht_cap_buf, pNetwork->bssht.bd_ht_cap_len); if (pNetwork->bssht.bd_ht_info_len > 0 && pNetwork->bssht.bd_ht_info_len <= - sizeof(ht_info->PeerHTInfoBuf)) - memcpy(ht_info->PeerHTInfoBuf, + sizeof(ht_info->peer_ht_info_buf)) + memcpy(ht_info->peer_ht_info_buf, pNetwork->bssht.bd_ht_info_buf, pNetwork->bssht.bd_ht_info_len); @@ -666,7 +666,7 @@ void ht_set_connect_bw_mode(struct rtllib_device *ieee, { struct rt_hi_throughput *ht_info = ieee->ht_info; - if (ieee->GetHalfNmodeSupportByAPsHandler(ieee->dev)) + if (ieee->get_half_nmode_support_by_aps_handler(ieee->dev)) bandwidth = HT_CHANNEL_WIDTH_20; if (ht_info->sw_bw_in_progress) { diff --git a/drivers/staging/rtl8192e/rtl819x_Qos.h b/drivers/staging/rtl8192e/rtl819x_Qos.h index 50e01ca49a..dc99110074 100644 --- a/drivers/staging/rtl8192e/rtl819x_Qos.h +++ b/drivers/staging/rtl8192e/rtl819x_Qos.h @@ -13,7 +13,7 @@ struct qos_tsinfo { }; struct octet_string { - u8 *Octet; + u8 *octet; u16 Length; }; diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c index 7e73d31dcc..9903fe3f3c 100644 --- a/drivers/staging/rtl8192e/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c @@ -171,14 +171,14 @@ void rtllib_ts_init(struct rtllib_device *ieee) static struct ts_common_info *SearchAdmitTRStream(struct rtllib_device *ieee, u8 *addr, u8 TID, - enum tr_select TxRxSelect) + enum tr_select tx_rx_select) { u8 dir; bool search_dir[4] = {0}; struct list_head *psearch_list; struct ts_common_info *pRet = NULL; - if (TxRxSelect == TX_DIR) { + if (tx_rx_select == TX_DIR) { search_dir[DIR_UP] = true; search_dir[DIR_BI_DIR] = true; search_dir[DIR_DIRECT] = true; @@ -188,7 +188,7 @@ static struct ts_common_info *SearchAdmitTRStream(struct rtllib_device *ieee, search_dir[DIR_DIRECT] = true; } - if (TxRxSelect == TX_DIR) + if (tx_rx_select == TX_DIR) psearch_list = &ieee->Tx_TS_Admit_List; else psearch_list = &ieee->Rx_TS_Admit_List; @@ -225,7 +225,7 @@ static void MakeTSEntry(struct ts_common_info *ts_common_info, u8 *addr, } bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS, - u8 *addr, u8 TID, enum tr_select TxRxSelect, bool bAddNewTs) + u8 *addr, u8 TID, enum tr_select tx_rx_select, bool bAddNewTs) { u8 UP = 0; struct qos_tsinfo tspec; @@ -265,7 +265,7 @@ bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS, } } - *ppTS = SearchAdmitTRStream(ieee, addr, UP, TxRxSelect); + *ppTS = SearchAdmitTRStream(ieee, addr, UP, tx_rx_select); if (*ppTS) return true; @@ -274,21 +274,21 @@ bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS, return false; } - pUnusedList = (TxRxSelect == TX_DIR) ? + pUnusedList = (tx_rx_select == TX_DIR) ? (&ieee->Tx_TS_Unused_List) : (&ieee->Rx_TS_Unused_List); - pAddmitList = (TxRxSelect == TX_DIR) ? + pAddmitList = (tx_rx_select == TX_DIR) ? (&ieee->Tx_TS_Admit_List) : (&ieee->Rx_TS_Admit_List); - Dir = ((TxRxSelect == TX_DIR) ? DIR_UP : DIR_DOWN); + Dir = ((tx_rx_select == TX_DIR) ? DIR_UP : DIR_DOWN); if (!list_empty(pUnusedList)) { (*ppTS) = list_entry(pUnusedList->next, struct ts_common_info, list); list_del_init(&(*ppTS)->list); - if (TxRxSelect == TX_DIR) { + if (tx_rx_select == TX_DIR) { struct tx_ts_record *tmp = container_of(*ppTS, struct tx_ts_record, @@ -321,11 +321,11 @@ bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS, } static void RemoveTsEntry(struct rtllib_device *ieee, - struct ts_common_info *pTs, enum tr_select TxRxSelect) + struct ts_common_info *pTs, enum tr_select tx_rx_select) { - rtllib_ts_init_del_ba(ieee, pTs, TxRxSelect); + rtllib_ts_init_del_ba(ieee, pTs, tx_rx_select); - if (TxRxSelect == RX_DIR) { + if (tx_rx_select == RX_DIR) { struct rx_reorder_entry *pRxReorderEntry; struct rx_ts_record *ts = (struct rx_ts_record *)pTs; @@ -360,7 +360,7 @@ static void RemoveTsEntry(struct rtllib_device *ieee, } } -void RemovePeerTS(struct rtllib_device *ieee, u8 *addr) +void remove_peer_ts(struct rtllib_device *ieee, u8 *addr) { struct ts_common_info *ts, *pTmpTS; @@ -400,9 +400,9 @@ void RemovePeerTS(struct rtllib_device *ieee, u8 *addr) } } } -EXPORT_SYMBOL(RemovePeerTS); +EXPORT_SYMBOL(remove_peer_ts); -void RemoveAllTS(struct rtllib_device *ieee) +void remove_all_ts(struct rtllib_device *ieee) { struct ts_common_info *ts, *pTmpTS; diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index 7b39a1987f..6fbf11ac16 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -123,7 +123,7 @@ struct cb_desc { u8 bPacketBW:1; u8 bRTSUseShortPreamble:1; u8 bRTSUseShortGI:1; - u8 bMulticast:1; + u8 multicast:1; u8 bBroadcast:1; u8 drv_agg_enable:1; u8 reserved2:1; @@ -474,47 +474,30 @@ struct rtllib_rx_stats { u8 control; u8 mask; u16 len; - u64 tsf; - u32 beacon_time; - u8 nic_type; u16 Length; u8 SignalQuality; s32 RecvSignalPower; - s8 RxPower; u8 SignalStrength; u16 bHwError:1; u16 bCRC:1; u16 bICV:1; - u16 bShortPreamble:1; - u16 Antenna:1; u16 Decrypted:1; - u16 Wakeup:1; - u16 Reserved0:1; - u8 AGC; u32 TimeStampLow; u32 TimeStampHigh; - bool bShift; - bool bIsQosData; u8 RxDrvInfoSize; u8 RxBufShift; bool bIsAMPDU; bool bFirstMPDU; bool bContainHTC; - bool RxIs40MHzPacket; u32 RxPWDBAll; u8 RxMIMOSignalStrength[4]; s8 RxMIMOSignalQuality[2]; bool bPacketMatchBSSID; bool bIsCCK; bool bPacketToSelf; - u16 packetlength; - u16 fraglength; - u16 fragoffset; - u16 ntotalfrag; bool bPacketBeacon; bool bToSelfBA; - u16 Seq_Num; }; /* IEEE 802.11 requires that STA supports concurrent reception of at least @@ -928,14 +911,14 @@ struct rtllib_network { struct rtllib_qos_data qos_data; bool bWithAironetIE; - bool bCkipSupported; - bool bCcxRmEnable; + bool ckip_supported; + bool ccx_rm_enable; u8 CcxRmState[2]; bool bMBssidValid; u8 MBssidMask; u8 MBssid[ETH_ALEN]; bool bWithCcxVerNum; - u8 BssCcxVerNumber; + u8 bss_ccx_ver_number; /* These are network statistics */ struct rtllib_rx_stats stats; u16 capability; @@ -965,7 +948,7 @@ struct rtllib_network { u8 wmm_info; struct rtllib_wmm_ac_param wmm_param[4]; - u8 Turbo_Enable; + u8 turbo_enable; u16 CountryIeLen; u8 CountryIeBuf[MAX_IE_LEN]; struct bss_ht bssht; @@ -1048,9 +1031,9 @@ struct rx_reorder_entry { }; enum fsync_state { - Default_Fsync, - HW_Fsync, - SW_Fsync + DEFAULT_FSYNC, + HW_FSYNC, + SW_FSYNC }; enum ips_callback_function { @@ -1071,8 +1054,8 @@ struct rt_pwr_save_ctrl { enum ips_callback_function ReturnPoint; bool bLeisurePs; - u8 LpsIdleCount; - u8 LPSAwakeIntvl; + u8 lps_idle_count; + u8 lps_awake_intvl; u32 CurPsLevel; }; @@ -1110,18 +1093,18 @@ enum scan_op_backup_opt { #define RT_MAX_LD_SLOT_NUM 10 struct rt_link_detect { - u32 NumRecvBcnInPeriod; - u32 NumRecvDataInPeriod; + u32 num_recv_bcn_in_period; + u32 num_recv_data_in_period; u32 RxBcnNum[RT_MAX_LD_SLOT_NUM]; u32 RxDataNum[RT_MAX_LD_SLOT_NUM]; - u16 SlotNum; - u16 SlotIndex; + u16 slot_num; + u16 slot_index; u32 num_tx_ok_in_period; u32 num_rx_ok_in_period; - u32 NumRxUnicastOkInPeriod; - bool bBusyTraffic; + u32 num_rx_unicast_ok_in_period; + bool busy_traffic; bool bHigherBusyTraffic; bool bHigherBusyRxTraffic; }; @@ -1161,7 +1144,7 @@ struct rate_adaptive { #define NUM_PMKID_CACHE 16 struct rt_pmkid_list { - u8 Bssid[ETH_ALEN]; + u8 bssid[ETH_ALEN]; u8 PMKID[16]; u8 SsidBuf[33]; u8 used; @@ -1193,7 +1176,7 @@ struct rtllib_device { u8 *assocreq_ies, *assocresp_ies; size_t assocreq_ies_len, assocresp_ies_len; - bool bForcedBgMode; + bool forced_bg_mode; u8 hwsec_active; bool is_roaming; @@ -1201,7 +1184,7 @@ struct rtllib_device { bool cannot_notify; bool bSupportRemoteWakeUp; bool actscanning; - bool FirstIe_InScan; + bool first_ie_in_scan; bool be_scan_inprogress; bool beinretry; enum rt_rf_power_state rf_power_state; @@ -1264,7 +1247,7 @@ struct rtllib_device { int ieee802_1x; /* is IEEE 802.1X used */ /* WPA data */ - bool bHalfWirelessN24GMode; + bool half_wireless_n24g_mode; int wpa_enabled; int drop_unencrypted; int tkip_countermeasures; @@ -1281,7 +1264,7 @@ struct rtllib_device { struct sw_cam_table swcamtable[TOTAL_CAM_ENTRY]; - struct rt_pmkid_list PMKIDList[NUM_PMKID_CACHE]; + struct rt_pmkid_list pmkid_list[NUM_PMKID_CACHE]; /* Fragmentation structures */ struct rtllib_frag_entry frag_cache[17][RTLLIB_FRAG_CACHE_LEN]; @@ -1374,14 +1357,14 @@ struct rtllib_device { /* for PS mode */ unsigned long last_rx_ps_time; - bool bAwakePktSent; - u8 LPSDelayCnt; + bool awake_pkt_sent; + u8 lps_delay_cnt; /* used if IEEE_SOFTMAC_SINGLE_QUEUE is set */ struct sk_buff *mgmt_queue_ring[MGMT_QUEUE_NUM]; int mgmt_queue_head; int mgmt_queue_tail; - u8 AsocRetryCount; + u8 asoc_retry_count; struct sk_buff_head skb_waitq[MAX_QUEUE_SIZE]; bool bdynamic_txpower_enable; @@ -1484,17 +1467,18 @@ struct rtllib_device { void (*set_bw_mode_handler)(struct net_device *dev, enum ht_channel_width bandwidth, enum ht_extchnl_offset Offset); - bool (*GetNmodeSupportBySecCfg)(struct net_device *dev); + bool (*get_nmode_support_by_sec_cfg)(struct net_device *dev); void (*set_wireless_mode)(struct net_device *dev, u8 wireless_mode); - bool (*GetHalfNmodeSupportByAPsHandler)(struct net_device *dev); + bool (*get_half_nmode_support_by_aps_handler)(struct net_device *dev); u8 (*rtllib_ap_sec_type)(struct rtllib_device *ieee); void (*init_gain_handler)(struct net_device *dev, u8 Operation); void (*ScanOperationBackupHandler)(struct net_device *dev, u8 Operation); - void (*SetHwRegHandler)(struct net_device *dev, u8 variable, u8 *val); + void (*set_hw_reg_handler)(struct net_device *dev, u8 variable, u8 *val); - void (*AllowAllDestAddrHandler)(struct net_device *dev, - bool bAllowAllDA, bool WriteIntoReg); + void (*allow_all_dest_addr_handler)(struct net_device *dev, + bool bAllowAllDA, + bool WriteIntoReg); void (*rtllib_ips_leave_wq)(struct net_device *dev); void (*rtllib_ips_leave)(struct net_device *dev); @@ -1662,7 +1646,7 @@ int rtllib_rx_frame_softmac(struct rtllib_device *ieee, struct sk_buff *skb, void rtllib_softmac_new_net(struct rtllib_device *ieee, struct rtllib_network *net); -void SendDisassociation(struct rtllib_device *ieee, bool deauth, u16 asRsn); +void send_disassociation(struct rtllib_device *ieee, bool deauth, u16 rsn); void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee); int rtllib_softmac_init(struct rtllib_device *ieee); @@ -1771,25 +1755,25 @@ u8 ht_c_check(struct rtllib_device *ieee, u8 *pFrame); void ht_reset_iot_setting(struct rt_hi_throughput *ht_info); bool is_ht_half_nmode_aps(struct rtllib_device *ieee); u16 tx_count_to_data_rate(struct rtllib_device *ieee, u8 nDataRate); -int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb); -int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb); +int rtllib_rx_add_ba_req(struct rtllib_device *ieee, struct sk_buff *skb); +int rtllib_rx_add_ba_rsp(struct rtllib_device *ieee, struct sk_buff *skb); int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb); void rtllib_ts_init_add_ba(struct rtllib_device *ieee, struct tx_ts_record *ts, u8 policy, u8 overwrite_pending); void rtllib_ts_init_del_ba(struct rtllib_device *ieee, struct ts_common_info *ts_common_info, - enum tr_select TxRxSelect); + enum tr_select tx_rx_select); void rtllib_ba_setup_timeout(struct timer_list *t); void rtllib_tx_ba_inact_timeout(struct timer_list *t); void rtllib_rx_ba_inact_timeout(struct timer_list *t); void rtllib_reset_ba_entry(struct ba_record *ba); bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS, u8 *addr, - u8 TID, enum tr_select TxRxSelect, bool bAddNewTs); + u8 TID, enum tr_select tx_rx_select, bool bAddNewTs); void rtllib_ts_init(struct rtllib_device *ieee); void TsStartAddBaProcess(struct rtllib_device *ieee, struct tx_ts_record *pTxTS); -void RemovePeerTS(struct rtllib_device *ieee, u8 *addr); -void RemoveAllTS(struct rtllib_device *ieee); +void remove_peer_ts(struct rtllib_device *ieee, u8 *addr); +void remove_all_ts(struct rtllib_device *ieee); static inline const char *escape_essid(const char *essid, u8 essid_len) { @@ -1805,13 +1789,13 @@ static inline const char *escape_essid(const char *essid, u8 essid_len) } /* fun with the built-in rtllib stack... */ -bool rtllib_MgntDisconnect(struct rtllib_device *rtllib, u8 asRsn); +bool rtllib_mgnt_disconnect(struct rtllib_device *rtllib, u8 rsn); /* For the function is more related to hardware setting, it's better to use the * ieee handler to refer to it. */ -void rtllib_FlushRxTsPendingPkts(struct rtllib_device *ieee, - struct rx_ts_record *ts); +void rtllib_flush_rx_ts_pending_pkts(struct rtllib_device *ieee, + struct rx_ts_record *ts); int rtllib_parse_info_param(struct rtllib_device *ieee, struct rtllib_info_element *info_element, u16 length, @@ -1821,6 +1805,6 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, void rtllib_indicate_packets(struct rtllib_device *ieee, struct rtllib_rxb **prxbIndicateArray, u8 index); #define RT_ASOC_RETRY_LIMIT 5 -u8 MgntQuery_TxRateExcludeCCKRates(struct rtllib_device *ieee); +u8 mgnt_query_tx_rate_exclude_cck_rates(struct rtllib_device *ieee); #endif /* RTLLIB_H */ diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index 4df20f4d6b..ebf8a2fd36 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -487,8 +487,8 @@ void rtllib_indicate_packets(struct rtllib_device *ieee, } } -void rtllib_FlushRxTsPendingPkts(struct rtllib_device *ieee, - struct rx_ts_record *ts) +void rtllib_flush_rx_ts_pending_pkts(struct rtllib_device *ieee, + struct rx_ts_record *ts) { struct rx_reorder_entry *pRxReorderEntry; u8 RfdCnt = 0; @@ -865,9 +865,6 @@ static size_t rtllib_rx_get_hdrlen(struct rtllib_device *ieee, rx_stats->bContainHTC = true; } - if (RTLLIB_QOS_HAS_SEQ(fc)) - rx_stats->bIsQosData = true; - return hdrlen; } @@ -943,10 +940,9 @@ static void rtllib_rx_extract_addr(struct rtllib_device *ieee, static int rtllib_rx_data_filter(struct rtllib_device *ieee, struct ieee80211_hdr *hdr, u8 *dst, u8 *src, u8 *bssid, u8 *addr2) { - u8 type, stype; u16 fc = le16_to_cpu(hdr->frame_control); - type = WLAN_FC_GET_TYPE(fc); - stype = WLAN_FC_GET_STYPE(fc); + u8 type = WLAN_FC_GET_TYPE(fc); + u8 stype = WLAN_FC_GET_STYPE(fc); /* Filter frames from different BSS */ if (ieee80211_has_a4(hdr->frame_control) && @@ -1149,9 +1145,9 @@ static void rtllib_rx_check_leave_lps(struct rtllib_device *ieee, u8 unicast, { if (unicast) { if (ieee->link_state == MAC80211_LINKED) { - if (((ieee->link_detect_info.NumRxUnicastOkInPeriod + + if (((ieee->link_detect_info.num_rx_unicast_ok_in_period + ieee->link_detect_info.num_tx_ok_in_period) > 8) || - (ieee->link_detect_info.NumRxUnicastOkInPeriod > 2)) { + (ieee->link_detect_info.num_rx_unicast_ok_in_period > 2)) { ieee->leisure_ps_leave(ieee->dev); } } @@ -1284,7 +1280,7 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb, /* Filter WAPI DATA Frame */ /* Update statstics for AP roaming */ - ieee->link_detect_info.NumRecvDataInPeriod++; + ieee->link_detect_info.num_recv_data_in_period++; ieee->link_detect_info.num_rx_ok_in_period++; /* Data frame - extract src/dst addresses */ @@ -1363,7 +1359,7 @@ static int rtllib_rx_InfraAdhoc(struct rtllib_device *ieee, struct sk_buff *skb, else nr_subframes = 1; if (unicast) - ieee->link_detect_info.NumRxUnicastOkInPeriod += nr_subframes; + ieee->link_detect_info.num_rx_unicast_ok_in_period += nr_subframes; rtllib_rx_check_leave_lps(ieee, unicast, nr_subframes); /* Indicate packets to upper layer or Rx Reorder */ @@ -1689,7 +1685,7 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee, info_element->data[2] == 0x4c && info_element->data[3] == 0x01 && info_element->data[4] == 0x02) - network->Turbo_Enable = 1; + network->turbo_enable = 1; if (*tmp_htcap_len == 0) { if (info_element->len >= 4 && @@ -1819,9 +1815,9 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee, if (info_element->len == 6) { memcpy(network->CcxRmState, &info_element->data[4], 2); if (network->CcxRmState[0] != 0) - network->bCcxRmEnable = true; + network->ccx_rm_enable = true; else - network->bCcxRmEnable = false; + network->ccx_rm_enable = false; network->MBssidMask = network->CcxRmState[1] & 0x07; if (network->MBssidMask != 0) { network->bMBssidValid = true; @@ -1834,7 +1830,7 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee, network->bMBssidValid = false; } } else { - network->bCcxRmEnable = false; + network->ccx_rm_enable = false; } } if (info_element->len > 4 && @@ -1844,10 +1840,10 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee, info_element->data[3] == 0x03) { if (info_element->len == 5) { network->bWithCcxVerNum = true; - network->BssCcxVerNumber = info_element->data[4]; + network->bss_ccx_ver_number = info_element->data[4]; } else { network->bWithCcxVerNum = false; - network->BssCcxVerNumber = 0; + network->bss_ccx_ver_number = 0; } } if (info_element->len > 4 && @@ -2100,12 +2096,12 @@ int rtllib_parse_info_param(struct rtllib_device *ieee, & SUPPORT_CKIP_MIC) || (info_element->data[IE_CISCO_FLAG_POSITION] & SUPPORT_CKIP_PK)) - network->bCkipSupported = true; + network->ckip_supported = true; else - network->bCkipSupported = false; + network->ckip_supported = false; } else { network->bWithAironetIE = false; - network->bCkipSupported = false; + network->ckip_supported = false; } break; case MFIE_TYPE_QOS_PARAMETER: @@ -2184,7 +2180,7 @@ static inline int rtllib_network_init( network->realtek_cap_exit = false; network->marvell_cap_exist = false; network->airgo_cap_exist = false; - network->Turbo_Enable = 0; + network->turbo_enable = 0; network->SignalStrength = stats->SignalStrength; network->RSSI = stats->SignalStrength; network->CountryIeLen = 0; @@ -2344,20 +2340,20 @@ static inline void update_network(struct rtllib_device *ieee, dst->SignalStrength = src->SignalStrength; dst->RSSI = src->RSSI; - dst->Turbo_Enable = src->Turbo_Enable; + dst->turbo_enable = src->turbo_enable; dst->CountryIeLen = src->CountryIeLen; memcpy(dst->CountryIeBuf, src->CountryIeBuf, src->CountryIeLen); dst->bWithAironetIE = src->bWithAironetIE; - dst->bCkipSupported = src->bCkipSupported; + dst->ckip_supported = src->ckip_supported; memcpy(dst->CcxRmState, src->CcxRmState, 2); - dst->bCcxRmEnable = src->bCcxRmEnable; + dst->ccx_rm_enable = src->ccx_rm_enable; dst->MBssidMask = src->MBssidMask; dst->bMBssidValid = src->bMBssidValid; memcpy(dst->MBssid, src->MBssid, 6); dst->bWithCcxVerNum = src->bWithCcxVerNum; - dst->BssCcxVerNumber = src->BssCcxVerNumber; + dst->bss_ccx_ver_number = src->bss_ccx_ver_number; } static int IsPassiveChannel(struct rtllib_device *rtllib, u8 channel) @@ -2470,7 +2466,7 @@ static inline void rtllib_process_probe_response( } if (ieee80211_is_beacon(frame_ctl)) { if (ieee->link_state >= MAC80211_LINKED) - ieee->link_detect_info.NumRecvBcnInPeriod++; + ieee->link_detect_info.num_recv_bcn_in_period++; } } list_for_each_entry(target, &ieee->network_list, list) { diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index b9278b26ac..97fdca828d 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -138,7 +138,7 @@ static void init_mgmt_queue(struct rtllib_device *ieee) ieee->mgmt_queue_head = 0; } -u8 MgntQuery_TxRateExcludeCCKRates(struct rtllib_device *ieee) +u8 mgnt_query_tx_rate_exclude_cck_rates(struct rtllib_device *ieee) { u16 i; u8 query_rate = 0; @@ -163,7 +163,7 @@ u8 MgntQuery_TxRateExcludeCCKRates(struct rtllib_device *ieee) return query_rate; } -static u8 MgntQuery_MgntFrameTxRate(struct rtllib_device *ieee) +static u8 mgnt_query_mgnt_frame_tx_rate(struct rtllib_device *ieee) { struct rt_hi_throughput *ht_info = ieee->ht_info; u8 rate; @@ -201,7 +201,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct rtllib_device *ieee) if (ieee->disable_mgnt_queue) tcb_desc->queue_index = HIGH_QUEUE; - tcb_desc->data_rate = MgntQuery_MgntFrameTxRate(ieee); + tcb_desc->data_rate = mgnt_query_mgnt_frame_tx_rate(ieee); tcb_desc->ratr_index = 7; tcb_desc->tx_dis_rate_fallback = 1; tcb_desc->tx_use_drv_assinged_rate = 1; @@ -277,7 +277,7 @@ softmac_ps_mgmt_xmit(struct sk_buff *skb, if (ieee->disable_mgnt_queue) tcb_desc->queue_index = HIGH_QUEUE; - tcb_desc->data_rate = MgntQuery_MgntFrameTxRate(ieee); + tcb_desc->data_rate = mgnt_query_mgnt_frame_tx_rate(ieee); tcb_desc->ratr_index = 7; tcb_desc->tx_dis_rate_fallback = 1; tcb_desc->tx_use_drv_assinged_rate = 1; @@ -355,20 +355,19 @@ void rtllib_enable_net_monitor_mode(struct net_device *dev, netdev_info(dev, "========>Enter Monitor Mode\n"); - ieee->AllowAllDestAddrHandler(dev, true, !init_state); + ieee->allow_all_dest_addr_handler(dev, true, !init_state); } /* Disables network monitor mode. Only packets destinated to * us will be received. */ -void rtllib_disable_net_monitor_mode(struct net_device *dev, - bool init_state) +void rtllib_disable_net_monitor_mode(struct net_device *dev, bool init_state) { struct rtllib_device *ieee = netdev_priv_rsl(dev); netdev_info(dev, "========>Exit Monitor Mode\n"); - ieee->AllowAllDestAddrHandler(dev, false, !init_state); + ieee->allow_all_dest_addr_handler(dev, false, !init_state); } static void rtllib_send_probe(struct rtllib_device *ieee) @@ -665,13 +664,13 @@ static struct sk_buff *rtllib_pspoll_func(struct rtllib_device *ieee) return skb; } -static inline int SecIsInPMKIDList(struct rtllib_device *ieee, u8 *bssid) +static inline int sec_is_in_pmkid_list(struct rtllib_device *ieee, u8 *bssid) { int i = 0; do { - if ((ieee->PMKIDList[i].used) && - (memcmp(ieee->PMKIDList[i].Bssid, bssid, ETH_ALEN) == 0)) + if ((ieee->pmkid_list[i].used) && + (memcmp(ieee->pmkid_list[i].bssid, bssid, ETH_ALEN) == 0)) break; i++; } while (i < NUM_PMKID_CACHE); @@ -700,7 +699,7 @@ rtllib_association_req(struct rtllib_network *beacon, unsigned int cxvernum_ie_len = 0; struct lib80211_crypt_data *crypt; int encrypt; - int PMKCacheIdx; + int pmk_cache_idx; unsigned int rate_len = (beacon->rates_len ? (beacon->rates_len + 2) : 0) + @@ -708,7 +707,7 @@ rtllib_association_req(struct rtllib_network *beacon, 2 : 0); unsigned int wmm_info_len = beacon->qos_data.supported ? 9 : 0; - unsigned int turbo_info_len = beacon->Turbo_Enable ? 9 : 0; + unsigned int turbo_info_len = beacon->turbo_enable ? 9 : 0; int len = 0; @@ -722,14 +721,14 @@ rtllib_association_req(struct rtllib_network *beacon, if ((ieee->rtllib_ap_sec_type && (ieee->rtllib_ap_sec_type(ieee) & SEC_ALG_TKIP)) || - ieee->bForcedBgMode) { + ieee->forced_bg_mode) { ieee->ht_info->enable_ht = 0; ieee->mode = WIRELESS_MODE_G; } if (ieee->ht_info->current_ht_support && ieee->ht_info->enable_ht) { - ht_cap_buf = (u8 *)&ieee->ht_info->SelfHTCap; - ht_cap_len = sizeof(ieee->ht_info->SelfHTCap); + ht_cap_buf = (u8 *)&ieee->ht_info->self_ht_cap; + ht_cap_len = sizeof(ieee->ht_info->self_ht_cap); ht_construct_capability_element(ieee, ht_cap_buf, &ht_cap_len, encrypt, true); if (ieee->ht_info->current_rt2rt_aggregation) { @@ -741,15 +740,15 @@ rtllib_association_req(struct rtllib_network *beacon, } } - if (beacon->bCkipSupported) + if (beacon->ckip_supported) ckip_ie_len = 30 + 2; - if (beacon->bCcxRmEnable) + if (beacon->ccx_rm_enable) ccxrm_ie_len = 6 + 2; - if (beacon->BssCcxVerNumber >= 2) + if (beacon->bss_ccx_ver_number >= 2) cxvernum_ie_len = 5 + 2; - PMKCacheIdx = SecIsInPMKIDList(ieee, ieee->current_network.bssid); - if (PMKCacheIdx >= 0) { + pmk_cache_idx = sec_is_in_pmkid_list(ieee, ieee->current_network.bssid); + if (pmk_cache_idx >= 0) { wpa_ie_len += 18; netdev_info(ieee->dev, "[PMK cache]: WPA2 IE length: %x\n", wpa_ie_len); @@ -818,52 +817,52 @@ rtllib_association_req(struct rtllib_network *beacon, *tag++ = beacon->rates_ex[i]; } - if (beacon->bCkipSupported) { - static const u8 AironetIeOui[] = {0x00, 0x01, 0x66}; - u8 CcxAironetBuf[30]; - struct octet_string osCcxAironetIE; + if (beacon->ckip_supported) { + static const u8 aironet_ie_oui[] = {0x00, 0x01, 0x66}; + u8 ccx_aironet_buf[30]; + struct octet_string os_ccx_aironet_ie; - memset(CcxAironetBuf, 0, 30); - osCcxAironetIE.Octet = CcxAironetBuf; - osCcxAironetIE.Length = sizeof(CcxAironetBuf); - memcpy(osCcxAironetIE.Octet, AironetIeOui, - sizeof(AironetIeOui)); + memset(ccx_aironet_buf, 0, 30); + os_ccx_aironet_ie.octet = ccx_aironet_buf; + os_ccx_aironet_ie.Length = sizeof(ccx_aironet_buf); + memcpy(os_ccx_aironet_ie.octet, aironet_ie_oui, + sizeof(aironet_ie_oui)); - osCcxAironetIE.Octet[IE_CISCO_FLAG_POSITION] |= + os_ccx_aironet_ie.octet[IE_CISCO_FLAG_POSITION] |= (SUPPORT_CKIP_PK | SUPPORT_CKIP_MIC); tag = skb_put(skb, ckip_ie_len); *tag++ = MFIE_TYPE_AIRONET; - *tag++ = osCcxAironetIE.Length; - memcpy(tag, osCcxAironetIE.Octet, osCcxAironetIE.Length); - tag += osCcxAironetIE.Length; + *tag++ = os_ccx_aironet_ie.Length; + memcpy(tag, os_ccx_aironet_ie.octet, os_ccx_aironet_ie.Length); + tag += os_ccx_aironet_ie.Length; } - if (beacon->bCcxRmEnable) { - static const u8 CcxRmCapBuf[] = {0x00, 0x40, 0x96, 0x01, 0x01, + if (beacon->ccx_rm_enable) { + static const u8 ccx_rm_cap_buf[] = {0x00, 0x40, 0x96, 0x01, 0x01, 0x00}; - struct octet_string osCcxRmCap; + struct octet_string os_ccx_rm_cap; - osCcxRmCap.Octet = (u8 *)CcxRmCapBuf; - osCcxRmCap.Length = sizeof(CcxRmCapBuf); + os_ccx_rm_cap.octet = (u8 *)ccx_rm_cap_buf; + os_ccx_rm_cap.Length = sizeof(ccx_rm_cap_buf); tag = skb_put(skb, ccxrm_ie_len); *tag++ = MFIE_TYPE_GENERIC; - *tag++ = osCcxRmCap.Length; - memcpy(tag, osCcxRmCap.Octet, osCcxRmCap.Length); - tag += osCcxRmCap.Length; + *tag++ = os_ccx_rm_cap.Length; + memcpy(tag, os_ccx_rm_cap.octet, os_ccx_rm_cap.Length); + tag += os_ccx_rm_cap.Length; } - if (beacon->BssCcxVerNumber >= 2) { - u8 CcxVerNumBuf[] = {0x00, 0x40, 0x96, 0x03, 0x00}; - struct octet_string osCcxVerNum; + if (beacon->bss_ccx_ver_number >= 2) { + u8 ccx_ver_num_buf[] = {0x00, 0x40, 0x96, 0x03, 0x00}; + struct octet_string os_ccx_ver_num; - CcxVerNumBuf[4] = beacon->BssCcxVerNumber; - osCcxVerNum.Octet = CcxVerNumBuf; - osCcxVerNum.Length = sizeof(CcxVerNumBuf); + ccx_ver_num_buf[4] = beacon->bss_ccx_ver_number; + os_ccx_ver_num.octet = ccx_ver_num_buf; + os_ccx_ver_num.Length = sizeof(ccx_ver_num_buf); tag = skb_put(skb, cxvernum_ie_len); *tag++ = MFIE_TYPE_GENERIC; - *tag++ = osCcxVerNum.Length; - memcpy(tag, osCcxVerNum.Octet, osCcxVerNum.Length); - tag += osCcxVerNum.Length; + *tag++ = os_ccx_ver_num.Length; + memcpy(tag, os_ccx_ver_num.octet, os_ccx_ver_num.Length); + tag += os_ccx_ver_num.Length; } if (ieee->ht_info->current_ht_support && ieee->ht_info->enable_ht) { if (ieee->ht_info->peer_ht_spec_ver != HT_SPEC_VER_EWC) { @@ -878,11 +877,11 @@ rtllib_association_req(struct rtllib_network *beacon, if (wpa_ie_len) { skb_put_data(skb, ieee->wpa_ie, ieee->wpa_ie_len); - if (PMKCacheIdx >= 0) { + if (pmk_cache_idx >= 0) { tag = skb_put(skb, 18); *tag = 1; *(tag + 1) = 0; - memcpy((tag + 2), &ieee->PMKIDList[PMKCacheIdx].PMKID, + memcpy((tag + 2), &ieee->pmkid_list[pmk_cache_idx].PMKID, 16); } } @@ -1072,17 +1071,16 @@ static void rtllib_associate_complete_wq(void *data) ieee->ht_info->enable_ht); memset(ieee->dot11ht_oper_rate_set, 0, 16); } - ieee->link_detect_info.SlotNum = 2 * (1 + + ieee->link_detect_info.slot_num = 2 * (1 + ieee->current_network.beacon_interval / 500); - 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->link_detect_info.num_recv_bcn_in_period == 0 || + ieee->link_detect_info.num_recv_data_in_period == 0) { + ieee->link_detect_info.num_recv_bcn_in_period = 1; + ieee->link_detect_info.num_recv_data_in_period = 1; } - psc->LpsIdleCount = 0; + psc->lps_idle_count = 0; ieee->link_change(ieee->dev); - } static void rtllib_sta_send_associnfo(struct rtllib_device *ieee) @@ -1209,18 +1207,18 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee, ieee->current_network.flags); if ((rtllib_act_scanning(ieee, false)) && - !(ieee->softmac_features & IEEE_SOFTMAC_SCAN)) + !(ieee->softmac_features & IEEE_SOFTMAC_SCAN)) rtllib_stop_scan_syncro(ieee); ht_reset_iot_setting(ieee->ht_info); ieee->wmm_acm = 0; if (ieee->iw_mode == IW_MODE_INFRA) { /* Join the network for the first time */ - ieee->AsocRetryCount = 0; + ieee->asoc_retry_count = 0; if ((ieee->current_network.qos_data.supported == 1) && ieee->current_network.bssht.bd_support_ht) ht_reset_self_and_save_peer_setting(ieee, - &(ieee->current_network)); + &ieee->current_network); else ieee->ht_info->current_ht_support = false; @@ -1319,10 +1317,10 @@ static inline u16 assoc_parse(struct rtllib_device *ieee, struct sk_buff *skb, status_code == WLAN_STATUS_CAPS_UNSUPPORTED) && ((ieee->mode == WIRELESS_MODE_G) && (ieee->current_network.mode == WIRELESS_MODE_N_24G) && - (ieee->AsocRetryCount++ < (RT_ASOC_RETRY_LIMIT - 1)))) { + (ieee->asoc_retry_count++ < (RT_ASOC_RETRY_LIMIT - 1)))) { ieee->ht_info->iot_action |= HT_IOT_ACT_PURE_N_MODE; } else { - ieee->AsocRetryCount = 0; + ieee->asoc_retry_count = 0; } return le16_to_cpu(response_head->status); @@ -1351,8 +1349,8 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time) u8 dtim; struct rt_pwr_save_ctrl *psc = &ieee->pwr_save_ctrl; - if (ieee->LPSDelayCnt) { - ieee->LPSDelayCnt--; + if (ieee->lps_delay_cnt) { + ieee->lps_delay_cnt--; return 0; } @@ -1378,45 +1376,45 @@ static short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u64 *time) return 0; if (time) { - if (ieee->bAwakePktSent) { - psc->LPSAwakeIntvl = 1; + if (ieee->awake_pkt_sent) { + psc->lps_awake_intvl = 1; } else { - u8 MaxPeriod = 5; + u8 max_period = 5; - if (psc->LPSAwakeIntvl == 0) - psc->LPSAwakeIntvl = 1; - psc->LPSAwakeIntvl = (psc->LPSAwakeIntvl >= - MaxPeriod) ? MaxPeriod : - (psc->LPSAwakeIntvl + 1); + if (psc->lps_awake_intvl == 0) + psc->lps_awake_intvl = 1; + psc->lps_awake_intvl = (psc->lps_awake_intvl >= + max_period) ? max_period : + (psc->lps_awake_intvl + 1); } { - u8 LPSAwakeIntvl_tmp = 0; + u8 lps_awake_intvl_tmp = 0; u8 period = ieee->current_network.dtim_period; u8 count = ieee->current_network.tim.tim_count; if (count == 0) { - if (psc->LPSAwakeIntvl > period) - LPSAwakeIntvl_tmp = period + - (psc->LPSAwakeIntvl - + if (psc->lps_awake_intvl > period) + lps_awake_intvl_tmp = period + + (psc->lps_awake_intvl - period) - - ((psc->LPSAwakeIntvl - period) % + ((psc->lps_awake_intvl - period) % period); else - LPSAwakeIntvl_tmp = psc->LPSAwakeIntvl; + lps_awake_intvl_tmp = psc->lps_awake_intvl; } else { - if (psc->LPSAwakeIntvl > + if (psc->lps_awake_intvl > ieee->current_network.tim.tim_count) - LPSAwakeIntvl_tmp = count + - (psc->LPSAwakeIntvl - count) - - ((psc->LPSAwakeIntvl - count) % period); + lps_awake_intvl_tmp = count + + (psc->lps_awake_intvl - count) - + ((psc->lps_awake_intvl - count) % period); else - LPSAwakeIntvl_tmp = psc->LPSAwakeIntvl; + lps_awake_intvl_tmp = psc->lps_awake_intvl; } *time = ieee->current_network.last_dtim_sta_time + msecs_to_jiffies(ieee->current_network.beacon_interval * - LPSAwakeIntvl_tmp); + lps_awake_intvl_tmp); } } @@ -1461,7 +1459,7 @@ static inline void rtllib_sta_ps(struct work_struct *work) spin_unlock_irqrestore(&ieee->mgmt_tx_lock, flags2); } - ieee->bAwakePktSent = false; + ieee->awake_pkt_sent = false; } else if (sleep == 2) { spin_lock_irqsave(&ieee->mgmt_tx_lock, flags2); @@ -1553,10 +1551,10 @@ static void rtllib_process_action(struct rtllib_device *ieee, case ACT_CAT_BA: switch (*act) { case ACT_ADDBAREQ: - rtllib_rx_ADDBAReq(ieee, skb); + rtllib_rx_add_ba_req(ieee, skb); break; case ACT_ADDBARSP: - rtllib_rx_ADDBARsp(ieee, skb); + rtllib_rx_add_ba_rsp(ieee, skb); break; case ACT_DELBA: rtllib_rx_DELBA(ieee, skb); @@ -1606,10 +1604,10 @@ rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb, kfree(network); return 1; } - memcpy(ieee->ht_info->PeerHTCapBuf, + memcpy(ieee->ht_info->peer_ht_cap_buf, network->bssht.bd_ht_cap_buf, network->bssht.bd_ht_cap_len); - memcpy(ieee->ht_info->PeerHTInfoBuf, + memcpy(ieee->ht_info->peer_ht_info_buf, network->bssht.bd_ht_info_buf, network->bssht.bd_ht_info_len); ieee->handle_assoc_response(ieee->dev, @@ -1634,7 +1632,7 @@ rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb, netdev_info(ieee->dev, "Association response status code 0x%x\n", errcode); - if (ieee->AsocRetryCount < RT_ASOC_RETRY_LIMIT) + if (ieee->asoc_retry_count < RT_ASOC_RETRY_LIMIT) schedule_delayed_work(&ieee->associate_procedure_wq, 0); else rtllib_associate_abort(ieee); @@ -1648,7 +1646,7 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb) int errcode; u8 *challenge; int chlen = 0; - bool bSupportNmode = true, bHalfSupportNmode = false; + bool support_nmode = true, half_support_nmode = false; errcode = auth_parse(ieee->dev, skb, &challenge, &chlen); @@ -1664,18 +1662,18 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb) ieee->link_state = RTLLIB_ASSOCIATING_AUTHENTICATED; ieee->softmac_stats.rx_auth_rs_ok++; if (!(ieee->ht_info->iot_action & HT_IOT_ACT_PURE_N_MODE)) { - if (!ieee->GetNmodeSupportBySecCfg(ieee->dev)) { + if (!ieee->get_nmode_support_by_sec_cfg(ieee->dev)) { if (is_ht_half_nmode_aps(ieee)) { - bSupportNmode = true; - bHalfSupportNmode = true; + support_nmode = true; + half_support_nmode = true; } else { - bSupportNmode = false; - bHalfSupportNmode = false; + support_nmode = false; + half_support_nmode = false; } } } /* Dummy wirless mode setting to avoid encryption issue */ - if (bSupportNmode) { + if (support_nmode) { ieee->set_wireless_mode(ieee->dev, ieee->current_network.mode); } else { @@ -1684,11 +1682,11 @@ static void rtllib_rx_auth_resp(struct rtllib_device *ieee, struct sk_buff *skb) } if ((ieee->current_network.mode == WIRELESS_MODE_N_24G) && - bHalfSupportNmode) { + half_support_nmode) { netdev_info(ieee->dev, "======>enter half N mode\n"); - ieee->bHalfWirelessN24GMode = true; + ieee->half_wireless_n24g_mode = true; } else { - ieee->bHalfWirelessN24GMode = false; + ieee->half_wireless_n24g_mode = false; } rtllib_associate_step2(ieee); } else { @@ -1734,13 +1732,11 @@ rtllib_rx_deauth(struct rtllib_device *ieee, struct sk_buff *skb) ieee->link_state = RTLLIB_ASSOCIATING; ieee->softmac_stats.reassoc++; ieee->is_roaming = true; - ieee->link_detect_info.bBusyTraffic = false; + ieee->link_detect_info.busy_traffic = false; rtllib_disassociate(ieee); - RemovePeerTS(ieee, header->addr2); - if (!(ieee->rtllib_ap_sec_type(ieee) & - (SEC_ALG_CCMP | SEC_ALG_TKIP))) - schedule_delayed_work( - &ieee->associate_procedure_wq, 5); + remove_peer_ts(ieee, header->addr2); + if (!(ieee->rtllib_ap_sec_type(ieee) & (SEC_ALG_CCMP | SEC_ALG_TKIP))) + schedule_delayed_work(&ieee->associate_procedure_wq, 5); } return 0; } @@ -1816,7 +1812,7 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee) /* update the tx status */ tcb_desc = (struct cb_desc *)(txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE); - if (tcb_desc->bMulticast) + if (tcb_desc->multicast) ieee->stats.multicast++; /* if xmit available, just xmit it immediately, else just insert it to @@ -1998,11 +1994,11 @@ void rtllib_stop_protocol(struct rtllib_device *ieee) if (ieee->link_state == MAC80211_LINKED) { if (ieee->iw_mode == IW_MODE_INFRA) - SendDisassociation(ieee, 1, WLAN_REASON_DEAUTH_LEAVING); + send_disassociation(ieee, 1, WLAN_REASON_DEAUTH_LEAVING); rtllib_disassociate(ieee); } - RemoveAllTS(ieee); + remove_all_ts(ieee); ieee->proto_stoppping = 0; kfree(ieee->assocreq_ies); @@ -2072,13 +2068,13 @@ int rtllib_softmac_init(struct rtllib_device *ieee) for (i = 0; i < 5; i++) ieee->seq_ctrl[i] = 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.slot_index = 0; + ieee->link_detect_info.slot_num = 2; + ieee->link_detect_info.num_recv_bcn_in_period = 0; + ieee->link_detect_info.num_recv_data_in_period = 0; ieee->link_detect_info.num_tx_ok_in_period = 0; ieee->link_detect_info.num_rx_ok_in_period = 0; - ieee->link_detect_info.NumRxUnicastOkInPeriod = 0; + ieee->link_detect_info.num_rx_unicast_ok_in_period = 0; ieee->is_aggregate_frame = false; ieee->assoc_id = 0; ieee->queue_stop = 0; @@ -2101,7 +2097,7 @@ int rtllib_softmac_init(struct rtllib_device *ieee) ieee->reg_dot11tx_ht_oper_rate_set[1] = 0xff; ieee->reg_dot11tx_ht_oper_rate_set[4] = 0x01; - ieee->FirstIe_InScan = false; + ieee->first_ie_in_scan = false; ieee->actscanning = false; ieee->beinretry = false; ieee->is_set_key = false; @@ -2148,7 +2144,7 @@ void rtllib_softmac_free(struct rtllib_device *ieee) static inline struct sk_buff * rtllib_disauth_skb(struct rtllib_network *beacon, - struct rtllib_device *ieee, u16 asRsn) + struct rtllib_device *ieee, u16 rsn) { struct sk_buff *skb; struct rtllib_disauth *disauth; @@ -2168,13 +2164,13 @@ rtllib_disauth_skb(struct rtllib_network *beacon, ether_addr_copy(disauth->header.addr2, ieee->dev->dev_addr); ether_addr_copy(disauth->header.addr3, beacon->bssid); - disauth->reason = cpu_to_le16(asRsn); + disauth->reason = cpu_to_le16(rsn); return skb; } static inline struct sk_buff * rtllib_disassociate_skb(struct rtllib_network *beacon, - struct rtllib_device *ieee, u16 asRsn) + struct rtllib_device *ieee, u16 rsn) { struct sk_buff *skb; struct rtllib_disassoc *disass; @@ -2195,19 +2191,19 @@ rtllib_disassociate_skb(struct rtllib_network *beacon, ether_addr_copy(disass->header.addr2, ieee->dev->dev_addr); ether_addr_copy(disass->header.addr3, beacon->bssid); - disass->reason = cpu_to_le16(asRsn); + disass->reason = cpu_to_le16(rsn); return skb; } -void SendDisassociation(struct rtllib_device *ieee, bool deauth, u16 asRsn) +void send_disassociation(struct rtllib_device *ieee, bool deauth, u16 rsn) { struct rtllib_network *beacon = &ieee->current_network; struct sk_buff *skb; if (deauth) - skb = rtllib_disauth_skb(beacon, ieee, asRsn); + skb = rtllib_disauth_skb(beacon, ieee, rsn); else - skb = rtllib_disassociate_skb(beacon, ieee, asRsn); + skb = rtllib_disassociate_skb(beacon, ieee, rsn); if (skb) softmac_mgmt_xmit(skb, ieee); @@ -2241,56 +2237,56 @@ u8 rtllib_ap_sec_type(struct rtllib_device *ieee) } } -static void rtllib_MlmeDisassociateRequest(struct rtllib_device *rtllib, - u8 *asSta, u8 asRsn) +static void rtllib_mlme_disassociate_request(struct rtllib_device *rtllib, + u8 *addr, u8 rsn) { u8 i; u8 op_mode; - RemovePeerTS(rtllib, asSta); + remove_peer_ts(rtllib, addr); - if (memcmp(rtllib->current_network.bssid, asSta, 6) == 0) { + if (memcmp(rtllib->current_network.bssid, addr, 6) == 0) { rtllib->link_state = MAC80211_NOLINK; for (i = 0; i < 6; i++) rtllib->current_network.bssid[i] = 0x22; op_mode = RT_OP_MODE_NO_LINK; rtllib->op_mode = RT_OP_MODE_NO_LINK; - rtllib->SetHwRegHandler(rtllib->dev, HW_VAR_MEDIA_STATUS, + rtllib->set_hw_reg_handler(rtllib->dev, HW_VAR_MEDIA_STATUS, (u8 *)(&op_mode)); rtllib_disassociate(rtllib); - rtllib->SetHwRegHandler(rtllib->dev, HW_VAR_BSSID, + rtllib->set_hw_reg_handler(rtllib->dev, HW_VAR_BSSID, rtllib->current_network.bssid); } } -static void rtllib_MgntDisconnectAP(struct rtllib_device *rtllib, u8 asRsn) +static void rtllib_mgnt_disconnect_ap(struct rtllib_device *rtllib, u8 rsn) { - bool bFilterOutNonAssociatedBSSID = false; + bool filter_out_nonassociated_bssid = false; - bFilterOutNonAssociatedBSSID = false; - rtllib->SetHwRegHandler(rtllib->dev, HW_VAR_CECHK_BSSID, - (u8 *)(&bFilterOutNonAssociatedBSSID)); - rtllib_MlmeDisassociateRequest(rtllib, rtllib->current_network.bssid, - asRsn); + filter_out_nonassociated_bssid = false; + rtllib->set_hw_reg_handler(rtllib->dev, HW_VAR_CECHK_BSSID, + (u8 *)(&filter_out_nonassociated_bssid)); + rtllib_mlme_disassociate_request(rtllib, rtllib->current_network.bssid, + rsn); rtllib->link_state = MAC80211_NOLINK; } -bool rtllib_MgntDisconnect(struct rtllib_device *rtllib, u8 asRsn) +bool rtllib_mgnt_disconnect(struct rtllib_device *rtllib, u8 rsn) { if (rtllib->ps != RTLLIB_PS_DISABLED) rtllib->sta_wake_up(rtllib->dev); if (rtllib->link_state == MAC80211_LINKED) { if (rtllib->iw_mode == IW_MODE_INFRA) - rtllib_MgntDisconnectAP(rtllib, asRsn); + rtllib_mgnt_disconnect_ap(rtllib, rsn); } return true; } -EXPORT_SYMBOL(rtllib_MgntDisconnect); +EXPORT_SYMBOL(rtllib_mgnt_disconnect); void notify_wx_assoc_event(struct rtllib_device *ieee) { diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c index 2afa701e54..d6bc74ba90 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c +++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c @@ -347,10 +347,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->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->link_detect_info.num_recv_bcn_in_period == 0 || + ieee->link_detect_info.num_recv_data_in_period == 0) { + ieee->link_detect_info.num_recv_bcn_in_period = 1; + ieee->link_detect_info.num_recv_data_in_period = 1; } rtllib_wake_all_queues(ieee); diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c index f7098a2ba8..54100dd815 100644 --- a/drivers/staging/rtl8192e/rtllib_tx.c +++ b/drivers/staging/rtl8192e/rtllib_tx.c @@ -286,7 +286,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee, if (ht_info->iot_action & HT_IOT_ACT_TX_NO_AGGREGATION) return; - if (!ieee->GetNmodeSupportBySecCfg(ieee->dev)) + if (!ieee->get_nmode_support_by_sec_cfg(ieee->dev)) return; if (ht_info->current_ampdu_enable) { if (!rtllib_get_ts(ieee, (struct ts_common_info **)(&ts), hdr->addr1, @@ -356,7 +356,7 @@ static void rtllib_query_BandwidthMode(struct rtllib_device *ieee, if (!ht_info->current_ht_support || !ht_info->enable_ht) return; - if (tcb_desc->bMulticast || tcb_desc->bBroadcast) + if (tcb_desc->multicast || tcb_desc->bBroadcast) return; if ((tcb_desc->data_rate & 0x80) == 0) @@ -378,7 +378,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee, tcb_desc->RTSSC = 0; tcb_desc->bRTSBW = false; - if (tcb_desc->bBroadcast || tcb_desc->bMulticast) + if (tcb_desc->bBroadcast || tcb_desc->multicast) return; if (is_broadcast_ether_addr(skb->data + 16)) @@ -595,14 +595,14 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) ((((u8 *)udp)[1] == 67) && (((u8 *)udp)[3] == 68))) { bdhcp = true; - ieee->LPSDelayCnt = 200; + ieee->lps_delay_cnt = 200; } } } else if (ether_type == ETH_P_ARP) { netdev_info(ieee->dev, "=================>DHCP Protocol start tx ARP pkt!!\n"); bdhcp = true; - ieee->LPSDelayCnt = + ieee->lps_delay_cnt = ieee->current_network.tim.tim_count; } } @@ -832,7 +832,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) if (ieee->ht_info->iot_action & HT_IOT_ACT_WA_IOT_Broadcom) { tcb_desc->data_rate = - MgntQuery_TxRateExcludeCCKRates(ieee); + mgnt_query_tx_rate_exclude_cck_rates(ieee); tcb_desc->tx_dis_rate_fallback = false; } else { tcb_desc->data_rate = ieee->basic_rate; @@ -843,11 +843,11 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) tcb_desc->tx_use_drv_assinged_rate = 1; } else { if (is_multicast_ether_addr(header.addr1)) - tcb_desc->bMulticast = 1; + tcb_desc->multicast = 1; if (is_broadcast_ether_addr(header.addr1)) tcb_desc->bBroadcast = 1; rtllib_txrate_selectmode(ieee, tcb_desc); - if (tcb_desc->bMulticast || tcb_desc->bBroadcast) + if (tcb_desc->multicast || tcb_desc->bBroadcast) tcb_desc->data_rate = ieee->basic_rate; else tcb_desc->data_rate = rtllib_current_rate(ieee); @@ -856,7 +856,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) if (ieee->ht_info->iot_action & HT_IOT_ACT_WA_IOT_Broadcom) { tcb_desc->data_rate = - MgntQuery_TxRateExcludeCCKRates(ieee); + mgnt_query_tx_rate_exclude_cck_rates(ieee); tcb_desc->tx_dis_rate_fallback = false; } else { tcb_desc->data_rate = MGN_1M; diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c index f92ec0faf4..55a3e4222c 100644 --- a/drivers/staging/rtl8192e/rtllib_wx.c +++ b/drivers/staging/rtl8192e/rtllib_wx.c @@ -636,7 +636,7 @@ int rtllib_wx_set_mlme(struct rtllib_device *ieee, ieee->cannot_notify = true; - SendDisassociation(ieee, deauth, mlme->reason_code); + send_disassociation(ieee, deauth, mlme->reason_code); rtllib_disassociate(ieee); ieee->wap_set = 0; |