[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240919185445.119969-1-dominik.karol.piatkowski@protonmail.com>
Date: Thu, 19 Sep 2024 18:55:00 +0000
From: Dominik Karol Piątkowski <dominik.karol.piatkowski@...tonmail.com>
To: gregkh@...uxfoundation.org, tdavies@...kphysics.net, philipp.g.hortmann@...il.com, dan.carpenter@...aro.org
Cc: linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org, Dominik Karol Piątkowski <dominik.karol.piatkowski@...tonmail.com>
Subject: [PATCH] staging: rtl8192e: Fix alignment to open parentheses
This patch aligns the code to open parentheses to improve readability.
Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski@...tonmail.com>
---
.../rtl8192e/rtl8192e/r8190P_rtl8256.c | 9 +-
.../staging/rtl8192e/rtl8192e/r8192E_dev.c | 20 ++--
.../staging/rtl8192e/rtl8192e/r8192E_phy.c | 11 +--
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 30 +++---
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 10 +-
drivers/staging/rtl8192e/rtl8192e/rtl_ps.c | 2 +-
drivers/staging/rtl8192e/rtl819x_HTProc.c | 26 +++---
drivers/staging/rtl8192e/rtl819x_TSProc.c | 20 ++--
drivers/staging/rtl8192e/rtllib.h | 30 +++---
drivers/staging/rtl8192e/rtllib_rx.c | 91 +++++++++----------
drivers/staging/rtl8192e/rtllib_softmac.c | 53 +++++------
drivers/staging/rtl8192e/rtllib_softmac_wx.c | 60 ++++++------
drivers/staging/rtl8192e/rtllib_wx.c | 3 +-
13 files changed, 172 insertions(+), 193 deletions(-)
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
index 7061f1cf4d3a..d909f5c4fd21 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8190P_rtl8256.c
@@ -101,12 +101,9 @@ bool rtl92e_config_rf(struct net_device *dev)
RF3_Final_Value = 0;
while (RF3_Final_Value != RegValueToBeCheck &&
RetryTimes != 0) {
- ret = rtl92e_config_rf_path(dev,
- (enum rf90_radio_path)eRFPath);
- RF3_Final_Value = rtl92e_get_rf_reg(dev,
- (enum rf90_radio_path)eRFPath,
- RegOffSetToBeCheck,
- bMask12Bits);
+ ret = rtl92e_config_rf_path(dev, (enum rf90_radio_path)eRFPath);
+ RF3_Final_Value = rtl92e_get_rf_reg(dev, (enum rf90_radio_path)eRFPath,
+ RegOffSetToBeCheck, bMask12Bits);
RetryTimes--;
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
index 2672b1ddf88e..cf1231fe5319 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c
@@ -321,8 +321,7 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
if (priv->epromtype == EEPROM_93C46) {
if (!priv->autoload_fail_flag) {
- usValue = rtl92e_eeprom_read(dev,
- EEPROM_TxPwDiff_CrystalCap >> 1);
+ usValue = rtl92e_eeprom_read(dev, EEPROM_TxPwDiff_CrystalCap >> 1);
priv->eeprom_ant_pwr_diff = usValue & 0x0fff;
priv->eeprom_crystal_cap = (usValue & 0xf000)
>> 12;
@@ -335,8 +334,9 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
for (i = 0; i < 14; i += 2) {
if (!priv->autoload_fail_flag)
- usValue = rtl92e_eeprom_read(dev,
- (EEPROM_TxPwIndex_CCK + i) >> 1);
+ usValue =
+ rtl92e_eeprom_read(dev,
+ (EEPROM_TxPwIndex_CCK + i) >> 1);
else
usValue = EEPROM_Default_TxPower;
*((u16 *)(&priv->eeprom_tx_pwr_level_cck[i])) =
@@ -345,7 +345,8 @@ static void _rtl92e_read_eeprom_info(struct net_device *dev)
for (i = 0; i < 14; i += 2) {
if (!priv->autoload_fail_flag)
usValue = rtl92e_eeprom_read(dev,
- (EEPROM_TxPwIndex_OFDM_24G + i) >> 1);
+ (EEPROM_TxPwIndex_OFDM_24G + i)
+ >> 1);
else
usValue = EEPROM_Default_TxPower;
*((u16 *)(&priv->eeprom_tx_pwr_level_ofdm24g[i]))
@@ -1325,8 +1326,8 @@ static void _rtl92e_query_rxphystatus(struct r8192_priv *priv,
} else {
if (rf_rx_num != 0)
pstats->signal_strength = precord_stats->signal_strength =
- _rtl92e_signal_scale_mapping(priv,
- (long)(total_rssi /= rf_rx_num));
+ _rtl92e_signal_scale_mapping(priv, (long)
+ (total_rssi /= rf_rx_num));
}
}
@@ -1737,7 +1738,7 @@ void rtl92e_update_ratr_table(struct net_device *dev)
ieee->ht_info->cur_short_gi_40mhz)
ratr_value |= 0x80000000;
else if (!ieee->ht_info->cur_tx_bw40mhz &&
- ieee->ht_info->cur_short_gi_20mhz)
+ ieee->ht_info->cur_short_gi_20mhz)
ratr_value |= 0x80000000;
rtl92e_writel(dev, RATR0 + rate_index * 4, ratr_value);
rtl92e_writeb(dev, UFWP, 1);
@@ -1898,8 +1899,7 @@ bool rtl92e_get_nmode_support_by_sec(struct net_device *dev)
struct rtllib_device *ieee = priv->rtllib;
if (ieee->rtllib_ap_sec_type &&
- (ieee->rtllib_ap_sec_type(priv->rtllib) & (SEC_ALG_WEP |
- SEC_ALG_TKIP))) {
+ (ieee->rtllib_ap_sec_type(priv->rtllib) & (SEC_ALG_WEP | SEC_ALG_TKIP))) {
return false;
} else {
return true;
diff --git a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
index fbe624e235df..b5f516c18b72 100644
--- a/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
+++ b/drivers/staging/rtl8192e/rtl8192e/r8192E_phy.c
@@ -632,10 +632,9 @@ static u8 _rtl92e_phy_switch_channel_step(struct net_device *dev, u8 channel,
case cmd_id_rf_write_reg:
for (eRFPath = 0; eRFPath <
priv->num_total_rf_path; eRFPath++)
- rtl92e_set_rf_reg(dev,
- (enum rf90_radio_path)eRFPath,
- CurrentCmd->para1, bMask12Bits,
- CurrentCmd->para2 << 7);
+ rtl92e_set_rf_reg(dev, (enum rf90_radio_path)eRFPath,
+ CurrentCmd->para1, bMask12Bits,
+ CurrentCmd->para2 << 7);
break;
default:
break;
@@ -992,7 +991,7 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
switch (rf_power_state) {
case rf_on:
if ((priv->rtllib->rf_power_state == rf_off) &&
- RT_IN_PS_LEVEL(psc, RT_RF_OFF_LEVL_HALT_NIC)) {
+ RT_IN_PS_LEVEL(psc, RT_RF_OFF_LEVL_HALT_NIC)) {
bool rtstatus;
u32 InitilizeCount = 3;
@@ -1013,7 +1012,7 @@ static bool _rtl92e_set_rf_power_state(struct net_device *dev,
rtl92e_writeb(dev, ANAPAR, 0x37);
mdelay(1);
rtl92e_set_bb_reg(dev, rFPGA0_AnalogParameter1,
- 0x4, 0x1);
+ 0x4, 0x1);
priv->hw_rf_off_action = 0;
rtl92e_set_bb_reg(dev, rFPGA0_XA_RFInterfaceOE,
BIT(4), 0x1);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
index dc1301f1a0c1..82a1b19fa1b3 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_core.c
@@ -253,7 +253,7 @@ static void _rtl92e_update_cap(struct net_device *dev, u16 cap)
u8 cur_slot_time = priv->slot_time;
if ((cap & WLAN_CAPABILITY_SHORT_SLOT_TIME) &&
- (!priv->rtllib->ht_info->current_rt2rt_long_slot_time)) {
+ (!priv->rtllib->ht_info->current_rt2rt_long_slot_time)) {
if (cur_slot_time != SHORT_SLOT_TIME) {
slot_time_val = SHORT_SLOT_TIME;
priv->rtllib->set_hw_reg_handler(dev,
@@ -326,9 +326,8 @@ static int _rtl92e_qos_handle_probe_response(struct r8192_priv *priv,
network->qos_data.active = network->qos_data.supported;
if ((network->qos_data.active == 1) && (active_network == 1) &&
- (network->flags & NETWORK_HAS_QOS_PARAMETERS) &&
- (network->qos_data.old_param_count !=
- network->qos_data.param_count)) {
+ (network->flags & NETWORK_HAS_QOS_PARAMETERS) &&
+ (network->qos_data.old_param_count != network->qos_data.param_count)) {
network->qos_data.old_param_count =
network->qos_data.param_count;
priv->rtllib->wmm_acm = network->qos_data.wmm_acm;
@@ -390,7 +389,7 @@ static int _rtl92e_qos_assoc_resp(struct r8192_priv *priv,
network->qos_data.param_count;
} else {
memcpy(&priv->rtllib->current_network.qos_data.parameters,
- &def_qos_parameters, size);
+ &def_qos_parameters, size);
priv->rtllib->current_network.qos_data.active = 0;
priv->rtllib->current_network.qos_data.supported = 0;
set_qos_param = 1;
@@ -406,8 +405,8 @@ static int _rtl92e_qos_assoc_resp(struct r8192_priv *priv,
}
static int _rtl92e_handle_assoc_response(struct net_device *dev,
- struct rtllib_assoc_response_frame *resp,
- struct rtllib_network *network)
+ struct rtllib_assoc_response_frame *resp,
+ struct rtllib_network *network)
{
struct r8192_priv *priv = rtllib_priv(dev);
@@ -819,7 +818,7 @@ static short _rtl92e_is_tx_queue_empty(struct net_device *dev)
continue;
if (skb_queue_len(&(&priv->tx_ring[i])->queue) > 0) {
netdev_info(dev, "===>tx queue is not empty:%d, %d\n",
- i, skb_queue_len(&(&priv->tx_ring[i])->queue));
+ i, skb_queue_len(&(&priv->tx_ring[i])->queue));
return 0;
}
}
@@ -905,7 +904,7 @@ static void _rtl92e_if_check_reset(struct net_device *dev)
RxResetType = _rtl92e_rx_check_stuck(dev);
if (TxResetType == RESET_TYPE_SILENT ||
- RxResetType == RESET_TYPE_SILENT) {
+ RxResetType == RESET_TYPE_SILENT) {
netdev_info(dev, "%s(): TxResetType is %d, RxResetType is %d\n",
__func__, TxResetType, RxResetType);
}
@@ -970,7 +969,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
}
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)
+ ieee->link_detect_info.num_tx_ok_in_period > 100)
busy_traffic = true;
if (ieee->link_detect_info.num_rx_ok_in_period > 4000 ||
@@ -1030,8 +1029,7 @@ static void _rtl92e_watchdog_wq_cb(void *data)
ieee->link_state = RTLLIB_ASSOCIATING;
- remove_peer_ts(priv->rtllib,
- priv->rtllib->current_network.bssid);
+ remove_peer_ts(priv->rtllib, priv->rtllib->current_network.bssid);
ieee->is_roaming = true;
ieee->is_set_key = false;
ieee->link_change(dev);
@@ -1170,7 +1168,7 @@ static int _rtl92e_hard_start_xmit(struct sk_buff *skb, struct net_device *dev)
if (queue_index != TXCMD_QUEUE) {
if ((priv->rtllib->rf_power_state == rf_off) ||
- !priv->up) {
+ !priv->up) {
kfree_skb(skb);
return 0;
}
@@ -1571,7 +1569,7 @@ static void _rtl92e_tx_resume(struct net_device *dev)
for (queue_index = BK_QUEUE;
queue_index < MAX_QUEUE_SIZE; queue_index++) {
while ((!skb_queue_empty(&ieee->skb_waitq[queue_index])) &&
- (priv->rtllib->check_nic_enough_desc(dev, queue_index) > 0)) {
+ (priv->rtllib->check_nic_enough_desc(dev, queue_index) > 0)) {
skb = skb_dequeue(&ieee->skb_waitq[queue_index]);
ieee->softmac_data_hard_start_xmit(skb, dev, 0);
}
@@ -1640,7 +1638,7 @@ static int _rtl92e_close(struct net_device *dev)
int ret;
if ((rtllib_act_scanning(priv->rtllib, false)) &&
- !(priv->rtllib->softmac_features & IEEE_SOFTMAC_SCAN)) {
+ !(priv->rtllib->softmac_features & IEEE_SOFTMAC_SCAN)) {
rtllib_stop_scan(priv->rtllib);
}
@@ -1952,7 +1950,7 @@ static void _rtl92e_pci_disconnect(struct pci_dev *pdev)
if (dev->mem_start != 0) {
iounmap((void __iomem *)dev->mem_start);
release_mem_region(pci_resource_start(pdev, 1),
- pci_resource_len(pdev, 1));
+ pci_resource_len(pdev, 1));
}
free_rtllib(dev);
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
index e9ca5a8768ad..207dc0e57315 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_dm.c
@@ -540,11 +540,9 @@ static void _rtl92e_dm_tx_power_tracking_callback_tssi(struct net_device *dev)
for (k = 0; k < 5; k++) {
if (k != 4)
- tmp_report[k] = rtl92e_readb(dev,
- Tssi_Report_Value1 + k);
+ tmp_report[k] = rtl92e_readb(dev, Tssi_Report_Value1 + k);
else
- tmp_report[k] = rtl92e_readb(dev,
- Tssi_Report_Value2);
+ tmp_report[k] = rtl92e_readb(dev, Tssi_Report_Value2);
if (tmp_report[k] <= 20) {
viviflag = true;
@@ -1765,8 +1763,8 @@ static void _rtl92e_dm_check_fsync(struct net_device *dev)
(REG_C38_TH + 5)) {
if (reg_c38_State) {
rtl92e_writeb(dev,
- rOFDM0_RxDetector3,
- priv->framesync);
+ rOFDM0_RxDetector3,
+ priv->framesync);
reg_c38_State = RegC38_Default;
}
}
diff --git a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
index 7b6247acf6f4..dba35ba20dac 100644
--- a/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
+++ b/drivers/staging/rtl8192e/rtl8192e/rtl_ps.c
@@ -118,7 +118,7 @@ void rtl92e_ips_enter(struct net_device *dev)
rt_state = priv->rtllib->rf_power_state;
if (rt_state == rf_on && !psc->bSwRfProcessing &&
- (priv->rtllib->link_state != MAC80211_LINKED)) {
+ (priv->rtllib->link_state != MAC80211_LINKED)) {
psc->eInactivePowerState = rf_off;
_rtl92e_ps_update_rf_state(dev);
}
diff --git a/drivers/staging/rtl8192e/rtl819x_HTProc.c b/drivers/staging/rtl8192e/rtl819x_HTProc.c
index 9c9c0bc0cfde..ec43b5fda06e 100644
--- a/drivers/staging/rtl8192e/rtl819x_HTProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_HTProc.c
@@ -228,7 +228,7 @@ void ht_reset_iot_setting(struct rt_hi_throughput *ht_info)
}
void ht_construct_capability_element(struct rtllib_device *ieee, u8 *pos_ht_cap,
- u8 *len, u8 is_encrypt, bool assoc)
+ u8 *len, u8 is_encrypt, bool assoc)
{
struct rt_hi_throughput *ht = ieee->ht_info;
struct ht_capab_ele *cap_ele = NULL;
@@ -308,8 +308,7 @@ void ht_construct_capability_element(struct rtllib_device *ieee, u8 *pos_ht_cap,
}
}
-void ht_construct_rt2rt_agg_element(struct rtllib_device *ieee, u8 *posRT2RTAgg,
- u8 *len)
+void ht_construct_rt2rt_agg_element(struct rtllib_device *ieee, u8 *posRT2RTAgg, u8 *len)
{
if (!posRT2RTAgg) {
netdev_warn(ieee->dev, "%s(): posRT2RTAgg is null\n", __func__);
@@ -357,8 +356,7 @@ static u8 ht_pick_mcs_rate(struct rtllib_device *ieee, u8 *pOperateMCS)
return true;
}
-u8 ht_get_highest_mcs_rate(struct rtllib_device *ieee, u8 *pMCSRateSet,
- u8 *pMCSFilter)
+u8 ht_get_highest_mcs_rate(struct rtllib_device *ieee, u8 *pMCSRateSet, u8 *pMCSFilter)
{
u8 i, j;
u8 bitMap;
@@ -398,7 +396,7 @@ u8 ht_get_highest_mcs_rate(struct rtllib_device *ieee, u8 *pMCSRateSet,
}
static u8 ht_filter_mcs_rate(struct rtllib_device *ieee, u8 *pSupportMCS,
- u8 *pOperateMCS)
+ u8 *pOperateMCS)
{
u8 i;
@@ -418,8 +416,8 @@ static u8 ht_filter_mcs_rate(struct rtllib_device *ieee, u8 *pSupportMCS,
}
void ht_set_connect_bw_mode(struct rtllib_device *ieee,
- enum ht_channel_width bandwidth,
- enum ht_extchnl_offset Offset);
+ enum ht_channel_width bandwidth,
+ enum ht_extchnl_offset Offset);
void ht_on_assoc_rsp(struct rtllib_device *ieee)
{
@@ -453,7 +451,7 @@ void ht_on_assoc_rsp(struct rtllib_device *ieee)
pPeerHTCap, sizeof(struct ht_capab_ele));
#endif
ht_set_connect_bw_mode(ieee, (enum ht_channel_width)(pPeerHTCap->chl_width),
- (enum ht_extchnl_offset)(pPeerHTInfo->ExtChlOffset));
+ (enum ht_extchnl_offset)(pPeerHTInfo->ExtChlOffset));
ht_info->cur_tx_bw40mhz = ((pPeerHTInfo->RecommemdedTxWidth == 1) ?
true : false);
@@ -494,8 +492,8 @@ void ht_on_assoc_rsp(struct rtllib_device *ieee)
pMcsFilter = MCS_FILTER_ALL;
ieee->HTHighestOperaRate = ht_get_highest_mcs_rate(ieee,
- ieee->dot11ht_oper_rate_set,
- pMcsFilter);
+ ieee->dot11ht_oper_rate_set,
+ pMcsFilter);
ieee->ht_curr_op_rate = ieee->HTHighestOperaRate;
ht_info->current_op_mode = pPeerHTInfo->opt_mode;
@@ -559,7 +557,7 @@ void ht_initialize_bss_desc(struct bss_ht *bss_ht)
}
void ht_reset_self_and_save_peer_setting(struct rtllib_device *ieee,
- struct rtllib_network *network)
+ struct rtllib_network *network)
{
struct rt_hi_throughput *ht_info = ieee->ht_info;
u8 bIOTAction = 0;
@@ -661,8 +659,8 @@ static void ht_set_connect_bw_mode_callback(struct rtllib_device *ieee)
}
void ht_set_connect_bw_mode(struct rtllib_device *ieee,
- enum ht_channel_width bandwidth,
- enum ht_extchnl_offset Offset)
+ enum ht_channel_width bandwidth,
+ enum ht_extchnl_offset Offset)
{
struct rt_hi_throughput *ht_info = ieee->ht_info;
diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c
index 89092cd434de..3e04da7468b0 100644
--- a/drivers/staging/rtl8192e/rtl819x_TSProc.c
+++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c
@@ -25,7 +25,7 @@ static void RxPktPendingTimeout(struct timer_list *t)
while (!list_empty(&ts->rx_pending_pkt_list)) {
reorder_entry = (struct rx_reorder_entry *)
list_entry(ts->rx_pending_pkt_list.prev,
- struct rx_reorder_entry, list);
+ struct rx_reorder_entry, list);
if (index == 0)
ts->rx_indicate_seq = reorder_entry->seq_num;
@@ -36,7 +36,7 @@ static void RxPktPendingTimeout(struct timer_list *t)
list_del_init(&reorder_entry->list);
if (SN_EQUAL(reorder_entry->seq_num,
- ts->rx_indicate_seq))
+ ts->rx_indicate_seq))
ts->rx_indicate_seq =
(ts->rx_indicate_seq + 1) % 4096;
@@ -139,7 +139,7 @@ void rtllib_ts_init(struct rtllib_device *ieee)
ResetTxTsEntry(pTxTS);
list_add_tail(&pTxTS->ts_common_info.list,
- &ieee->Tx_TS_Unused_List);
+ &ieee->Tx_TS_Unused_List);
pTxTS++;
}
@@ -221,11 +221,11 @@ static void MakeTSEntry(struct ts_common_info *ts_common_info, u8 *addr,
if (pTSPEC)
memcpy((u8 *)(&(ts_common_info->tspec)), (u8 *)pTSPEC,
- sizeof(struct qos_tsinfo));
+ sizeof(struct qos_tsinfo));
}
bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS,
- u8 *addr, u8 TID, enum tr_select tx_rx_select, bool add_new_ts)
+ u8 *addr, u8 TID, enum tr_select tx_rx_select, bool add_new_ts)
{
u8 UP = 0;
struct qos_tsinfo tspec;
@@ -291,14 +291,14 @@ bool rtllib_get_ts(struct rtllib_device *ieee, struct ts_common_info **ppTS,
if (tx_rx_select == TX_DIR) {
struct tx_ts_record *tmp =
container_of(*ppTS,
- struct tx_ts_record,
- ts_common_info);
+ struct tx_ts_record,
+ ts_common_info);
ResetTxTsEntry(tmp);
} else {
struct rx_ts_record *ts =
container_of(*ppTS,
- struct rx_ts_record,
- ts_common_info);
+ struct rx_ts_record,
+ ts_common_info);
ResetRxTsEntry(ts);
}
@@ -335,7 +335,7 @@ static void RemoveTsEntry(struct rtllib_device *ieee,
while (!list_empty(&ts->rx_pending_pkt_list)) {
pRxReorderEntry = (struct rx_reorder_entry *)
list_entry(ts->rx_pending_pkt_list.prev,
- struct rx_reorder_entry, list);
+ struct rx_reorder_entry, list);
netdev_dbg(ieee->dev, "%s(): Delete seq_num %d!\n",
__func__, pRxReorderEntry->seq_num);
list_del_init(&pRxReorderEntry->list);
diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h
index d6615f787d53..ca87aa9f374e 100644
--- a/drivers/staging/rtl8192e/rtllib.h
+++ b/drivers/staging/rtl8192e/rtllib.h
@@ -795,8 +795,9 @@ static inline u8 frame_qos_tid(u8 *buf)
hdr = (struct ieee80211_hdr_3addr *)buf;
fc = le16_to_cpu(hdr->frame_control);
- return (u8)((union frameqos *)(buf + (((fc & IEEE80211_FCTL_TODS) &&
- (fc & IEEE80211_FCTL_FROMDS)) ? 30 : 24)))->field.tid;
+ return (u8)((union frameqos *)
+ (buf + (((fc & IEEE80211_FCTL_TODS) &&
+ (fc & IEEE80211_FCTL_FROMDS)) ? 30 : 24)))->field.tid;
}
struct eapol {
@@ -1416,7 +1417,7 @@ struct rtllib_device {
* This function can't sleep.
*/
int (*softmac_hard_start_xmit)(struct sk_buff *skb,
- struct net_device *dev);
+ struct net_device *dev);
/* used instead of hard_start_xmit (not softmac_hard_start_xmit)
* if the IEEE_SOFTMAC_TX_QUEUE feature is used to TX data
@@ -1425,7 +1426,7 @@ struct rtllib_device {
* This function can't sleep.
*/
void (*softmac_data_hard_start_xmit)(struct sk_buff *skb,
- struct net_device *dev, int rate);
+ struct net_device *dev, int rate);
/* ask to the driver to retune the radio.
* This function can sleep. the driver should ensure
@@ -1461,8 +1462,7 @@ struct rtllib_device {
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 (*scan_operation_backup_handler)(struct net_device *dev,
- u8 operation);
+ void (*scan_operation_backup_handler)(struct net_device *dev, u8 operation);
void (*set_hw_reg_handler)(struct net_device *dev, u8 variable, u8 *val);
void (*allow_all_dest_addr_handler)(struct net_device *dev,
@@ -1721,23 +1721,23 @@ int rtllib_wx_get_rts(struct rtllib_device *ieee, struct iw_request_info *info,
#define MAX_RECEIVE_BUFFER_SIZE 9100
void ht_set_connect_bw_mode(struct rtllib_device *ieee,
- enum ht_channel_width bandwidth,
- enum ht_extchnl_offset Offset);
+ enum ht_channel_width bandwidth,
+ enum ht_extchnl_offset Offset);
void ht_update_default_setting(struct rtllib_device *ieee);
void ht_construct_capability_element(struct rtllib_device *ieee,
- u8 *pos_ht_cap, u8 *len,
- u8 is_encrypt, bool assoc);
+ u8 *pos_ht_cap, u8 *len,
+ u8 is_encrypt, bool assoc);
void ht_construct_rt2rt_agg_element(struct rtllib_device *ieee,
- u8 *posRT2RTAgg, u8 *len);
+ u8 *posRT2RTAgg, u8 *len);
void ht_on_assoc_rsp(struct rtllib_device *ieee);
void ht_initialize_ht_info(struct rtllib_device *ieee);
void ht_initialize_bss_desc(struct bss_ht *bss_ht);
void ht_reset_self_and_save_peer_setting(struct rtllib_device *ieee,
- struct rtllib_network *network);
+ struct rtllib_network *network);
void HT_update_self_and_peer_setting(struct rtllib_device *ieee,
struct rtllib_network *network);
u8 ht_get_highest_mcs_rate(struct rtllib_device *ieee, u8 *pMCSRateSet,
- u8 *pMCSFilter);
+ u8 *pMCSFilter);
extern u8 MCS_FILTER_ALL[];
extern u16 MCS_DATA_RATE[2][2][77];
u8 ht_c_check(struct rtllib_device *ieee, u8 *frame);
@@ -1757,10 +1757,10 @@ 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 tx_rx_select, bool add_new_ts);
+ u8 TID, enum tr_select tx_rx_select, bool add_new_ts);
void rtllib_ts_init(struct rtllib_device *ieee);
void rtllib_ts_start_add_ba_process(struct rtllib_device *ieee,
- struct tx_ts_record *pTxTS);
+ struct tx_ts_record *pTxTS);
void remove_peer_ts(struct rtllib_device *ieee, u8 *addr);
void remove_all_ts(struct rtllib_device *ieee);
diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c
index 8fe224a83dd6..5f437c227ecc 100644
--- a/drivers/staging/rtl8192e/rtllib_rx.c
+++ b/drivers/staging/rtl8192e/rtllib_rx.c
@@ -409,12 +409,10 @@ static bool add_reorder_entry(struct rx_ts_record *ts,
while (list->next != &ts->rx_pending_pkt_list) {
if (SN_LESS(reorder_entry->seq_num, ((struct rx_reorder_entry *)
- list_entry(list->next, struct rx_reorder_entry,
- list))->seq_num))
+ list_entry(list->next, struct rx_reorder_entry, list))->seq_num))
list = list->next;
- else if (SN_EQUAL(reorder_entry->seq_num,
- ((struct rx_reorder_entry *)list_entry(list->next,
- struct rx_reorder_entry, list))->seq_num))
+ else if (SN_EQUAL(reorder_entry->seq_num, ((struct rx_reorder_entry *)
+ list_entry(list->next, struct rx_reorder_entry, list))->seq_num))
return false;
else
break;
@@ -600,7 +598,7 @@ static void rx_reorder_indicate_packet(struct rtllib_device *ieee,
if (!list_empty(&ieee->RxReorder_Unused_List)) {
reorder_entry = (struct rx_reorder_entry *)
list_entry(ieee->RxReorder_Unused_List.next,
- struct rx_reorder_entry, list);
+ struct rx_reorder_entry, list);
list_del_init(&reorder_entry->list);
/* Make a reorder entry and insert
@@ -736,7 +734,7 @@ static u8 parse_subframe(struct rtllib_device *ieee, struct sk_buff *skb,
/* just for debug purpose */
seq_num = WLAN_GET_SEQ_SEQ(le16_to_cpu(hdr->seq_ctrl));
if ((RTLLIB_QOS_HAS_SEQ(fc)) &&
- (((union frameqos *)(skb->data + RTLLIB_3ADDR_LEN))->field.reserved))
+ (((union frameqos *)(skb->data + RTLLIB_3ADDR_LEN))->field.reserved))
is_aggregate_frame = true;
if (RTLLIB_QOS_HAS_SEQ(fc))
@@ -876,9 +874,9 @@ static int rtllib_rx_check_duplicate(struct rtllib_device *ieee,
frag = WLAN_GET_SEQ_FRAG(sc);
if (!ieee->ht_info->cur_rx_reorder_enable ||
- !ieee->current_network.qos_data.active ||
- !is_data_frame(skb->data) ||
- is_legacy_data_frame(skb->data)) {
+ !ieee->current_network.qos_data.active ||
+ !is_data_frame(skb->data) ||
+ is_legacy_data_frame(skb->data)) {
if (!ieee80211_is_beacon(hdr->frame_control)) {
if (is_duplicate_packet(ieee, hdr))
return -1;
@@ -887,7 +885,7 @@ static int rtllib_rx_check_duplicate(struct rtllib_device *ieee,
struct rx_ts_record *ts = NULL;
if (rtllib_get_ts(ieee, (struct ts_common_info **)&ts, hdr->addr2,
- (u8)frame_qos_tid((u8 *)(skb->data)), RX_DIR, true)) {
+ (u8)frame_qos_tid((u8 *)(skb->data)), RX_DIR, true)) {
if ((fc & (1 << 11)) && (frag == ts->rx_last_frag_num) &&
(WLAN_GET_SEQ_SEQ(sc) == ts->rx_last_seq_num))
return -1;
@@ -976,7 +974,7 @@ static int rtllib_rx_data_filter(struct rtllib_device *ieee, struct ieee80211_hd
}
static int rtllib_rx_get_crypt(struct rtllib_device *ieee, struct sk_buff *skb,
- struct lib80211_crypt_data **crypt, size_t hdrlen)
+ struct lib80211_crypt_data **crypt, size_t hdrlen)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
u16 fc = le16_to_cpu(hdr->frame_control);
@@ -1008,8 +1006,8 @@ static int rtllib_rx_get_crypt(struct rtllib_device *ieee, struct sk_buff *skb,
}
static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
- struct rtllib_rx_stats *rx_stats,
- struct lib80211_crypt_data *crypt, size_t hdrlen)
+ struct rtllib_rx_stats *rx_stats,
+ struct lib80211_crypt_data *crypt, size_t hdrlen)
{
struct ieee80211_hdr *hdr;
int keyidx = 0;
@@ -1092,7 +1090,7 @@ static int rtllib_rx_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,
* encrypted/authenticated
*/
if ((fc & IEEE80211_FCTL_PROTECTED) &&
- rtllib_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt)) {
+ rtllib_rx_frame_decrypt_msdu(ieee, skb, keyidx, crypt)) {
netdev_info(ieee->dev, "%s: ==>decrypt msdu error\n", __func__);
return -1;
}
@@ -1152,10 +1150,10 @@ static void rtllib_rx_check_leave_lps(struct rtllib_device *ieee, u8 unicast,
}
static void rtllib_rx_indicate_pkt_legacy(struct rtllib_device *ieee,
- struct rtllib_rx_stats *rx_stats,
- struct rtllib_rxb *rxb,
- u8 *dst,
- u8 *src)
+ struct rtllib_rx_stats *rx_stats,
+ struct rtllib_rxb *rxb,
+ u8 *dst,
+ u8 *src)
{
struct net_device *dev = ieee->dev;
u16 ethertype;
@@ -1175,9 +1173,9 @@ static void rtllib_rx_indicate_pkt_legacy(struct rtllib_device *ieee,
*/
ethertype = (sub_skb->data[6] << 8) | sub_skb->data[7];
if (sub_skb->len >= 8 &&
- ((memcmp(sub_skb->data, rfc1042_header, SNAP_SIZE) == 0 &&
- ethertype != ETH_P_AARP && ethertype != ETH_P_IPX) ||
- memcmp(sub_skb->data, bridge_tunnel_header, SNAP_SIZE) == 0)) {
+ ((memcmp(sub_skb->data, rfc1042_header, SNAP_SIZE) == 0 &&
+ ethertype != ETH_P_AARP && ethertype != ETH_P_IPX) ||
+ memcmp(sub_skb->data, bridge_tunnel_header, SNAP_SIZE) == 0)) {
/* remove RFC1042 or Bridge-Tunnel encapsulation
* and replace EtherType
*/
@@ -1220,7 +1218,7 @@ static void rtllib_rx_indicate_pkt_legacy(struct rtllib_device *ieee,
}
static int rtllib_rx_infra_adhoc(struct rtllib_device *ieee, struct sk_buff *skb,
- struct rtllib_rx_stats *rx_stats)
+ struct rtllib_rx_stats *rx_stats)
{
struct net_device *dev = ieee->dev;
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
@@ -1322,8 +1320,7 @@ static int rtllib_rx_infra_adhoc(struct rtllib_device *ieee, struct sk_buff *skb
&& !is_multicast_ether_addr(hdr->addr1)) {
TID = frame_qos_tid(skb->data);
seq_num = WLAN_GET_SEQ_SEQ(sc);
- rtllib_get_ts(ieee, (struct ts_common_info **)&ts, hdr->addr2, TID,
- RX_DIR, true);
+ rtllib_get_ts(ieee, (struct ts_common_info **)&ts, hdr->addr2, TID, RX_DIR, true);
if (TID != 0 && TID != 3)
ieee->bis_any_nonbepkts = true;
}
@@ -1380,7 +1377,7 @@ static int rtllib_rx_infra_adhoc(struct rtllib_device *ieee, struct sk_buff *skb
}
static int rtllib_rx_monitor(struct rtllib_device *ieee, struct sk_buff *skb,
- struct rtllib_rx_stats *rx_stats)
+ struct rtllib_rx_stats *rx_stats)
{
struct ieee80211_hdr *hdr = (struct ieee80211_hdr *)skb->data;
u16 fc = le16_to_cpu(hdr->frame_control);
@@ -1412,7 +1409,7 @@ static int rtllib_rx_monitor(struct rtllib_device *ieee, struct sk_buff *skb,
* This function is called only as a tasklet (software IRQ).
*/
int rtllib_rx(struct rtllib_device *ieee, struct sk_buff *skb,
- struct rtllib_rx_stats *rx_stats)
+ struct rtllib_rx_stats *rx_stats)
{
int ret = 0;
@@ -1576,11 +1573,9 @@ static int rtllib_parse_qos_info_param_IE(struct rtllib_device *ieee,
} else {
struct rtllib_qos_parameter_info param_element;
- rc = rtllib_read_qos_param_element(¶m_element,
- info_element);
+ rc = rtllib_read_qos_param_element(¶m_element, info_element);
if (rc == 0) {
- rtllib_qos_convert_ac_to_parameters(¶m_element,
- &(network->qos_data));
+ rtllib_qos_convert_ac_to_parameters(¶m_element, &(network->qos_data));
network->flags |= NETWORK_HAS_QOS_PARAMETERS;
network->qos_data.param_count =
param_element.info_element.ac_info & 0x0F;
@@ -1693,8 +1688,9 @@ static void rtllib_parse_mife_generic(struct rtllib_device *ieee,
MAX_IE_LEN);
if (*tmp_htcap_len != 0) {
network->bssht.bd_ht_spec_ver = HT_SPEC_VER_EWC;
- network->bssht.bd_ht_cap_len = min_t(u16, *tmp_htcap_len,
- sizeof(network->bssht.bd_ht_cap_buf));
+ network->bssht.bd_ht_cap_len =
+ min_t(u16, *tmp_htcap_len,
+ sizeof(network->bssht.bd_ht_cap_buf));
memcpy(network->bssht.bd_ht_cap_buf,
info_element->data,
network->bssht.bd_ht_cap_len);
@@ -1864,7 +1860,7 @@ static void rtllib_parse_mfie_ht_cap(struct rtllib_info_element *info_element,
if (*tmp_htcap_len != 0) {
ht->bd_ht_spec_ver = HT_SPEC_VER_EWC;
ht->bd_ht_cap_len = min_t(u16, *tmp_htcap_len,
- sizeof(ht->bd_ht_cap_buf));
+ sizeof(ht->bd_ht_cap_buf));
memcpy(ht->bd_ht_cap_buf, info_element->data, ht->bd_ht_cap_len);
ht->bd_support_ht = true;
@@ -1882,10 +1878,10 @@ static void rtllib_parse_mfie_ht_cap(struct rtllib_info_element *info_element,
}
int rtllib_parse_info_param(struct rtllib_device *ieee,
- struct rtllib_info_element *info_element,
- u16 length,
- struct rtllib_network *network,
- struct rtllib_rx_stats *stats)
+ struct rtllib_info_element *info_element,
+ u16 length,
+ struct rtllib_network *network,
+ struct rtllib_rx_stats *stats)
{
u8 i;
short offset;
@@ -2329,9 +2325,9 @@ static inline void update_network(struct rtllib_device *ieee,
dst->wmm_info = src->wmm_info;
if (src->wmm_param[0].ac_aci_acm_aifsn ||
- src->wmm_param[1].ac_aci_acm_aifsn ||
- src->wmm_param[2].ac_aci_acm_aifsn ||
- src->wmm_param[3].ac_aci_acm_aifsn)
+ src->wmm_param[1].ac_aci_acm_aifsn ||
+ src->wmm_param[2].ac_aci_acm_aifsn ||
+ src->wmm_param[3].ac_aci_acm_aifsn)
memcpy(dst->wmm_param, src->wmm_param, WME_AC_PRAM_LEN);
dst->signal_strength = src->signal_strength;
@@ -2449,8 +2445,7 @@ static inline void rtllib_process_probe_response(
*/
spin_lock_irqsave(&ieee->lock, flags);
- if (is_same_network(&ieee->current_network, network,
- (network->ssid_len ? 1 : 0))) {
+ if (is_same_network(&ieee->current_network, network, (network->ssid_len ? 1 : 0))) {
update_network(ieee, &ieee->current_network, network);
if ((ieee->current_network.mode == WIRELESS_MODE_N_24G ||
ieee->current_network.mode == WIRELESS_MODE_G) &&
@@ -2466,8 +2461,7 @@ static inline void rtllib_process_probe_response(
}
}
list_for_each_entry(target, &ieee->network_list, list) {
- if (is_same_network(target, network,
- (target->ssid_len ? 1 : 0)))
+ if (is_same_network(target, network, (target->ssid_len ? 1 : 0)))
break;
if (!oldest || (target->last_scanned < oldest->last_scanned))
oldest = target;
@@ -2527,8 +2521,7 @@ static inline void rtllib_process_probe_response(
spin_unlock_irqrestore(&ieee->lock, flags);
if (ieee80211_is_beacon(frame_ctl) &&
- is_same_network(&ieee->current_network, network,
- (network->ssid_len ? 1 : 0)) &&
+ is_same_network(&ieee->current_network, network, (network->ssid_len ? 1 : 0)) &&
(ieee->link_state == MAC80211_LINKED)) {
ieee->handle_beacon(ieee->dev, beacon, &ieee->current_network);
}
@@ -2553,8 +2546,8 @@ static void rtllib_rx_mgt(struct rtllib_device *ieee,
stats);
if (ieee->sta_sleep || (ieee->ps != RTLLIB_PS_DISABLED &&
- ieee->iw_mode == IW_MODE_INFRA &&
- ieee->link_state == MAC80211_LINKED))
+ ieee->iw_mode == IW_MODE_INFRA &&
+ ieee->link_state == MAC80211_LINKED))
schedule_work(&ieee->ps_task);
} else if (ieee80211_is_probe_resp(header->frame_control)) {
netdev_dbg(ieee->dev, "received PROBE RESPONSE\n");
diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c
index 0fc97c868f81..326b4c422be9 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac.c
@@ -244,8 +244,8 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct rtllib_device *ieee)
* to check it any more.
*/
netdev_info(ieee->dev,
- "%s():insert to waitqueue, queue_index:%d!\n",
- __func__, tcb_desc->queue_index);
+ "%s():insert to waitqueue, queue_index:%d!\n",
+ __func__, tcb_desc->queue_index);
skb_queue_tail(&ieee->skb_waitq[tcb_desc->queue_index],
skb);
} else {
@@ -348,8 +348,7 @@ static inline struct sk_buff *rtllib_probe_req(struct rtllib_device *ieee)
}
/* Enables network monitor mode, all rx packets will be received. */
-void rtllib_enable_net_monitor_mode(struct net_device *dev,
- bool init_state)
+void rtllib_enable_net_monitor_mode(struct net_device *dev, bool init_state)
{
struct rtllib_device *ieee = netdev_priv_rsl(dev);
@@ -719,8 +718,7 @@ rtllib_association_req(struct rtllib_network *beacon,
else
encrypt = 0;
- if ((ieee->rtllib_ap_sec_type &&
- (ieee->rtllib_ap_sec_type(ieee) & SEC_ALG_TKIP)) ||
+ if ((ieee->rtllib_ap_sec_type && (ieee->rtllib_ap_sec_type(ieee) & SEC_ALG_TKIP)) ||
ieee->forced_bg_mode) {
ieee->ht_info->enable_ht = 0;
ieee->mode = WIRELESS_MODE_G;
@@ -730,13 +728,13 @@ rtllib_association_req(struct rtllib_network *beacon,
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);
+ encrypt, true);
if (ieee->ht_info->current_rt2rt_aggregation) {
realtek_ie_buf = ieee->ht_info->sz_rt2rt_agg_buf;
realtek_ie_len =
sizeof(ieee->ht_info->sz_rt2rt_agg_buf);
ht_construct_rt2rt_agg_element(ieee, realtek_ie_buf,
- &realtek_ie_len);
+ &realtek_ie_len);
}
}
@@ -1042,8 +1040,8 @@ static void rtllib_associate_complete_wq(void *data)
{
struct rtllib_device *ieee = (struct rtllib_device *)
container_of(data,
- struct rtllib_device,
- associate_complete_wq);
+ struct rtllib_device,
+ associate_complete_wq);
struct rt_pwr_save_ctrl *psc = &ieee->pwr_save_ctrl;
netdev_info(ieee->dev, "Associated successfully with %pM\n",
@@ -1177,10 +1175,10 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee,
* and the network does broadcast and that those two bssid match
*/
if ((apset && apmatch &&
- ((ssidset && ssidbroad && ssidmatch) ||
- (ssidbroad && !ssidset) || (!ssidbroad && ssidset))) ||
- (!apset && ssidset && ssidbroad && ssidmatch) ||
- (ieee->is_roaming && ssidset && ssidbroad && ssidmatch)) {
+ ((ssidset && ssidbroad && ssidmatch) ||
+ (ssidbroad && !ssidset) || (!ssidbroad && ssidset))) ||
+ (!apset && ssidset && ssidbroad && ssidmatch) ||
+ (ieee->is_roaming && ssidset && ssidbroad && ssidmatch)) {
/* Save the essid so that if it is hidden, it is
* replaced with the essid provided by the user.
*/
@@ -1190,7 +1188,7 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee,
tmp_ssid_len = ieee->current_network.ssid_len;
}
memcpy(&ieee->current_network, net,
- sizeof(ieee->current_network));
+ sizeof(ieee->current_network));
if (!ssidbroad) {
memcpy(ieee->current_network.ssid, tmp_ssid,
tmp_ssid_len);
@@ -1218,7 +1216,7 @@ inline void rtllib_softmac_new_net(struct rtllib_device *ieee,
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;
@@ -1314,10 +1312,10 @@ static inline u16 assoc_parse(struct rtllib_device *ieee, struct sk_buff *skb,
status_code = le16_to_cpu(response_head->status);
if ((status_code == WLAN_STATUS_ASSOC_DENIED_RATES ||
- status_code == WLAN_STATUS_CAPS_UNSUPPORTED) &&
- ((ieee->mode == WIRELESS_MODE_G) &&
- (ieee->current_network.mode == WIRELESS_MODE_N_24G) &&
- (ieee->asoc_retry_count++ < (RT_ASOC_RETRY_LIMIT - 1)))) {
+ status_code == WLAN_STATUS_CAPS_UNSUPPORTED) &&
+ ((ieee->mode == WIRELESS_MODE_G) &&
+ (ieee->current_network.mode == WIRELESS_MODE_N_24G) &&
+ (ieee->asoc_retry_count++ < (RT_ASOC_RETRY_LIMIT - 1)))) {
ieee->ht_info->iot_action |= HT_IOT_ACT_PURE_N_MODE;
} else {
ieee->asoc_retry_count = 0;
@@ -1581,13 +1579,12 @@ rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb,
WLAN_FC_GET_STYPE(frame_ctl));
if ((ieee->softmac_features & IEEE_SOFTMAC_ASSOCIATE) &&
- ieee->link_state == RTLLIB_ASSOCIATING_AUTHENTICATED &&
- (ieee->iw_mode == IW_MODE_INFRA)) {
+ ieee->link_state == RTLLIB_ASSOCIATING_AUTHENTICATED &&
+ (ieee->iw_mode == IW_MODE_INFRA)) {
errcode = assoc_parse(ieee, skb, &aid);
if (!errcode) {
struct rtllib_network *network =
- kzalloc(sizeof(struct rtllib_network),
- GFP_ATOMIC);
+ kzalloc(sizeof(struct rtllib_network), GFP_ATOMIC);
if (!network)
return 1;
@@ -1599,8 +1596,8 @@ rtllib_rx_assoc_resp(struct rtllib_device *ieee, struct sk_buff *skb,
assoc_resp = (struct rtllib_assoc_response_frame *)skb->data;
if (ieee->current_network.qos_data.supported == 1) {
if (rtllib_parse_info_param(ieee, assoc_resp->info_element,
- rx_stats->len - sizeof(*assoc_resp),
- network, rx_stats)) {
+ rx_stats->len - sizeof(*assoc_resp),
+ network, rx_stats)) {
kfree(network);
return 1;
}
@@ -2226,9 +2223,9 @@ u8 rtllib_ap_sec_type(struct rtllib_device *ieee)
return SEC_ALG_WEP;
} else if ((wpa_ie_len != 0)) {
if (((ieee->wpa_ie[0] == 0xdd) &&
- (!memcmp(&ieee->wpa_ie[14], ccmp_ie, 4))) ||
+ (!memcmp(&ieee->wpa_ie[14], ccmp_ie, 4))) ||
((ieee->wpa_ie[0] == 0x30) &&
- (!memcmp(&ieee->wpa_ie[10], ccmp_rsn_ie, 4))))
+ (!memcmp(&ieee->wpa_ie[10], ccmp_rsn_ie, 4))))
return SEC_ALG_CCMP;
else
return SEC_ALG_TKIP;
diff --git a/drivers/staging/rtl8192e/rtllib_softmac_wx.c b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
index c59686d68a33..f66e2a74cdd9 100644
--- a/drivers/staging/rtl8192e/rtllib_softmac_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_softmac_wx.c
@@ -16,7 +16,7 @@
#include "rtllib.h"
int rtllib_wx_set_freq(struct rtllib_device *ieee, struct iw_request_info *a,
- union iwreq_data *wrqu, char *b)
+ union iwreq_data *wrqu, char *b)
{
int ret;
struct iw_freq *fwrq = &wrqu->freq;
@@ -59,8 +59,8 @@ int rtllib_wx_set_freq(struct rtllib_device *ieee, struct iw_request_info *a,
EXPORT_SYMBOL(rtllib_wx_set_freq);
int rtllib_wx_get_freq(struct rtllib_device *ieee,
- struct iw_request_info *a,
- union iwreq_data *wrqu, char *b)
+ struct iw_request_info *a,
+ union iwreq_data *wrqu, char *b)
{
struct iw_freq *fwrq = &wrqu->freq;
@@ -74,8 +74,8 @@ int rtllib_wx_get_freq(struct rtllib_device *ieee,
EXPORT_SYMBOL(rtllib_wx_get_freq);
int rtllib_wx_get_wap(struct rtllib_device *ieee,
- struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
{
unsigned long flags;
@@ -88,8 +88,8 @@ int rtllib_wx_get_wap(struct rtllib_device *ieee,
spin_lock_irqsave(&ieee->lock, flags);
if (ieee->link_state != MAC80211_LINKED &&
- ieee->link_state != MAC80211_LINKED_SCANNING &&
- ieee->wap_set == 0)
+ ieee->link_state != MAC80211_LINKED_SCANNING &&
+ ieee->wap_set == 0)
eth_zero_addr(wrqu->ap_addr.sa_data);
else
@@ -103,9 +103,9 @@ int rtllib_wx_get_wap(struct rtllib_device *ieee,
EXPORT_SYMBOL(rtllib_wx_get_wap);
int rtllib_wx_set_wap(struct rtllib_device *ieee,
- struct iw_request_info *info,
- union iwreq_data *awrq,
- char *extra)
+ struct iw_request_info *info,
+ union iwreq_data *awrq,
+ char *extra)
{
int ret = 0;
unsigned long flags;
@@ -155,7 +155,7 @@ int rtllib_wx_set_wap(struct rtllib_device *ieee,
EXPORT_SYMBOL(rtllib_wx_set_wap);
int rtllib_wx_get_essid(struct rtllib_device *ieee, struct iw_request_info *a,
- union iwreq_data *wrqu, char *b)
+ union iwreq_data *wrqu, char *b)
{
int len, ret = 0;
unsigned long flags;
@@ -167,14 +167,14 @@ int rtllib_wx_get_essid(struct rtllib_device *ieee, struct iw_request_info *a,
spin_lock_irqsave(&ieee->lock, flags);
if (ieee->current_network.ssid[0] == '\0' ||
- ieee->current_network.ssid_len == 0) {
+ ieee->current_network.ssid_len == 0) {
ret = -1;
goto out;
}
if (ieee->link_state != MAC80211_LINKED &&
- ieee->link_state != MAC80211_LINKED_SCANNING &&
- ieee->ssid_set == 0) {
+ ieee->link_state != MAC80211_LINKED_SCANNING &&
+ ieee->ssid_set == 0) {
ret = -1;
goto out;
}
@@ -191,8 +191,8 @@ int rtllib_wx_get_essid(struct rtllib_device *ieee, struct iw_request_info *a,
EXPORT_SYMBOL(rtllib_wx_get_essid);
int rtllib_wx_set_rate(struct rtllib_device *ieee,
- struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
{
u32 target_rate = wrqu->bitrate.value;
@@ -202,13 +202,13 @@ int rtllib_wx_set_rate(struct rtllib_device *ieee,
EXPORT_SYMBOL(rtllib_wx_set_rate);
int rtllib_wx_get_rate(struct rtllib_device *ieee,
- struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
{
u32 tmp_rate;
tmp_rate = tx_count_to_data_rate(ieee,
- ieee->softmac_stats.CurrentShowTxate);
+ ieee->softmac_stats.CurrentShowTxate);
wrqu->bitrate.value = tmp_rate * 500000;
return 0;
@@ -216,14 +216,14 @@ int rtllib_wx_get_rate(struct rtllib_device *ieee,
EXPORT_SYMBOL(rtllib_wx_get_rate);
int rtllib_wx_set_rts(struct rtllib_device *ieee,
- struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
{
if (wrqu->rts.disabled || !wrqu->rts.fixed) {
ieee->rts = DEFAULT_RTS_THRESHOLD;
} else {
if (wrqu->rts.value < MIN_RTS_THRESHOLD ||
- wrqu->rts.value > MAX_RTS_THRESHOLD)
+ wrqu->rts.value > MAX_RTS_THRESHOLD)
return -EINVAL;
ieee->rts = wrqu->rts.value;
}
@@ -232,8 +232,8 @@ int rtllib_wx_set_rts(struct rtllib_device *ieee,
EXPORT_SYMBOL(rtllib_wx_set_rts);
int rtllib_wx_get_rts(struct rtllib_device *ieee,
- struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
{
wrqu->rts.value = ieee->rts;
wrqu->rts.fixed = 0; /* no auto select */
@@ -243,7 +243,7 @@ int rtllib_wx_get_rts(struct rtllib_device *ieee,
EXPORT_SYMBOL(rtllib_wx_get_rts);
int rtllib_wx_set_mode(struct rtllib_device *ieee, struct iw_request_info *a,
- union iwreq_data *wrqu, char *b)
+ union iwreq_data *wrqu, char *b)
{
int set_mode_status = 0;
@@ -359,7 +359,7 @@ void rtllib_wx_sync_scan_wq(void *data)
}
int rtllib_wx_set_scan(struct rtllib_device *ieee, struct iw_request_info *a,
- union iwreq_data *wrqu, char *b)
+ union iwreq_data *wrqu, char *b)
{
int ret = 0;
@@ -447,8 +447,8 @@ EXPORT_SYMBOL(rtllib_wx_get_name);
/* this is mostly stolen from hostap */
int rtllib_wx_set_power(struct rtllib_device *ieee,
- struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
{
int ret = 0;
@@ -499,8 +499,8 @@ EXPORT_SYMBOL(rtllib_wx_set_power);
/* this is stolen from hostap */
int rtllib_wx_get_power(struct rtllib_device *ieee,
- struct iw_request_info *info,
- union iwreq_data *wrqu, char *extra)
+ struct iw_request_info *info,
+ union iwreq_data *wrqu, char *extra)
{
mutex_lock(&ieee->wx_mutex);
diff --git a/drivers/staging/rtl8192e/rtllib_wx.c b/drivers/staging/rtl8192e/rtllib_wx.c
index c730d921463d..b25343f01f8d 100644
--- a/drivers/staging/rtl8192e/rtllib_wx.c
+++ b/drivers/staging/rtl8192e/rtllib_wx.c
@@ -134,8 +134,7 @@ static inline char *rtl819x_translate_scan(struct rtllib_device *ieee,
((ht_cap->short_gi_40mhz) ? 1 : 0) :
((ht_cap->short_gi_20mhz) ? 1 : 0);
- max_mcs = ht_get_highest_mcs_rate(ieee, ht_cap->MCS,
- MCS_FILTER_ALL);
+ max_mcs = ht_get_highest_mcs_rate(ieee, ht_cap->MCS, MCS_FILTER_ALL);
rate = MCS_DATA_RATE[is40M][isShortGI][max_mcs & 0x7f];
if (rate > max_rate)
max_rate = rate;
--
2.34.1
Powered by blists - more mailing lists