Staging: rtl8192e: Maintenance renames and cleanup
v2 cover Staging: rtl8192e: Maintenance renames and cleanup
This patch series v2 attacks CamelCase variable renames, removes un-used variables and adjusts alignment issues found in rtllib_rx.c and rtllib_tx.c.
NOTE: Patch #9 doesn't completely resolve CamelCase violation as the correct abreviation of megahertz is MHz as called out by Dan Carpenter.
Thank you in advance to all reviewers.
~Tree
Changes since v1:
#09: Change bforced_tx20Mhz to forced_tx_20MHz, and update commit message #21: Update subject prefix with 'Staging: rtl8192e:'
#22: Update subject prefix with 'Staging: rtl8192e:'
#23: Update subject prefix with 'Staging: rtl8192e:'
#24: Update subject prefix with 'Staging: rtl8192e:'
Tree Davies (24):
Staging: rtl8192e: Rename variable bHwSec
Staging: rtl8192e: Rename variable bIsMulticast
Staging: rtl8192e: Rename variable HTCurrentOperaRate
Staging: rtl8192e: Rename variable HTOpMode
Staging: rtl8192e: Rename variable bRTSEnable
Staging: rtl8192e: Rename variable bRTSBW
Staging: rtl8192e: Rename variable bCTSEnable
Staging: rtl8192e: Rename variable bRTSUseShortGI
Staging: rtl8192e: Rename variable bforced_tx20Mhz
Staging: rtl8192e: Rename variable bPacketBW
Staging: rtl8192e: Rename variable bBroadcast
Staging: rtl8192e: Rename variable CntAfterLink
Staging: rtl8192e: Rename variable bUseShortGI
Staging: rtl8192e: Rename function TsStartAddBaProcess()
Staging: rtl8192e: Fix alignment to match open parenthesis
Staging: rtl8192e: Rename function rtllib_query_BandwidthMode
Staging: rtl8192e: Rename function rtllib_query_ShortPreambleMode
Staging: rtl8192e: Rename function rtllib_query_HTCapShortGI
Staging: rtl8192e: Rename variable bUseShortPreamble
Staging: rtl8192e: Rename variable bRTSSTBC
Staging: rtl8192e: Remove parameter bIsAmsdu from rtllib_classify()
Staging: rtl8192e: Remove variable IsAmsdu from rtllib_xmit_inter()
Staging: rtl8192e: Fix alignment to match open parenthesis in
rtllib_tx.c
Staging: rtl8192e: Fix alignment to match open parenthesis in
rtllib_rx.c
.../staging/rtl8192e/rtl8192e/r8192E_dev.c | 16 +-- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 +- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 8 +- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 2 +- drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +- drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 28 ++-- drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 4 +- drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 10 +- drivers/staging/rtl8192e/rtllib_crypt_wep.c | 4 +- drivers/staging/rtl8192e/rtllib_rx.c | 45 +++--- drivers/staging/rtl8192e/rtllib_tx.c | 131 +++++++++--------- 12 files changed, 126 insertions(+), 132 deletions(-)
Signature · 1 line
2.30.2
PATCH v2 1/24 Staging: rtl8192e: Rename variable bHwSec
Rename variable bHwSec to hw_sec
to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 4 ++-- drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 10 +++++----- drivers/staging/rtl8192e/rtllib_crypt_wep.c | 4 ++-- drivers/staging/rtl8192e/rtllib_rx.c | 8 ++++---- drivers/staging/rtl8192e/rtllib_tx.c | 6 +++--- 7 files changed, 18 insertions(+), 18 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +1 -1
@@ -934,7 +934,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc, pdesc->NoEnc =1 ; pdesc->SecType =0x0 ; -if (cb_desc->bHwSec) { +if (cb_desc->hw_sec) {static u8 tmp;if (!tmp)
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -105,7 +105,7 @@ struct cb_desc { u8 bCmdOrInit:1; u8 tx_dis_rate_fallback:1; u8 tx_use_drv_assinged_rate:1; - u8 bHwSec:1; + u8 hw_sec:1;u8 nStuckCount;
drivers/staging/rtl8192e/rtllib_crypt_ccmp.c +2 -2
@@ -182,7 +182,7 @@ static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) *pos++ = key->tx_pn[0 ]; hdr = (struct ieee80211_hdr *)skb->data; -if (!tcb_desc->bHwSec) { +if (!tcb_desc->hw_sec) {struct aead_request *req;struct scatterlist sg[2 ];u8 *aad = key->tx_aad;
@@ -265,7 +265,7 @@ static int rtllib_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) key->dot11rsna_stats_ccmp_replays++;return -4 ; } -if (!tcb_desc->bHwSec) { +if (!tcb_desc->hw_sec) {size_t data_len = skb->len - hdr_len -CCMP_HDR_LEN ;struct aead_request *req;struct scatterlist sg[2 ];
drivers/staging/rtl8192e/rtllib_crypt_tkip.c +5 -5
@@ -268,7 +268,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) hdr = (struct ieee80211_hdr *)skb->data; -if (!tcb_desc->bHwSec) { +if (!tcb_desc->hw_sec) {if (!tkey->tx_phase1_done) {tkip_mixing_phase1 (tkey->tx_ttak, tkey->key, hdr->addr2, tkey->tx_iv32);
@@ -285,7 +285,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv)memmove (pos, pos +8 , hdr_len); pos += hdr_len; -if (tcb_desc->bHwSec) { +if (tcb_desc->hw_sec) { *pos++ =Hi8 (tkey->tx_iv16); *pos++ = (Hi8 (tkey->tx_iv16) |0x20 ) &0x7F ; *pos++ =Lo8 (tkey->tx_iv16);
@@ -301,7 +301,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) *pos++ = (tkey->tx_iv32 >>16 ) &0xff ; *pos++ = (tkey->tx_iv32 >>24 ) &0xff ; -if (!tcb_desc->bHwSec) { +if (!tcb_desc->hw_sec) { icv =skb_put (skb,4 ); crc = ~crc32_le (~0 , pos, len); icv[0 ] = crc;
@@ -319,7 +319,7 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) tkey->tx_iv32++; } -if (!tcb_desc->bHwSec) +if (!tcb_desc->hw_sec)return ret;return 0 ; }
@@ -371,7 +371,7 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) iv32 = pos[4 ] | (pos[5 ] <<8 ) | (pos[6 ] <<16 ) | (pos[7 ] <<24 ); pos +=8 ; -if (!tcb_desc->bHwSec || (skb->cb[0 ] ==1 )) { +if (!tcb_desc->hw_sec || (skb->cb[0 ] ==1 )) {if ((iv32 < tkey->rx_iv32 || (iv32 == tkey->rx_iv32 && iv16 <= tkey->rx_iv16)) && tkey->initialized) {
drivers/staging/rtl8192e/rtllib_crypt_wep.c +2 -2
@@ -102,7 +102,7 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv)/* Copy rest of the WEP key (the secret part) */ memcpy (key +3 , wep->key, wep->key_len); -if (!tcb_desc->bHwSec) { +if (!tcb_desc->hw_sec) {/* Append little-endian CRC32 and encrypt it to produce ICV */ crc = ~crc32_le (~0 , pos, len); icv =skb_put (skb,4 );
@@ -155,7 +155,7 @@ static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv)/* Apply RC4 to data and compute CRC32 over decrypted data */ plen = skb->len - hdr_len -8 ; -if (!tcb_desc->bHwSec) { +if (!tcb_desc->hw_sec) {arc4_setkey (&wep->rx_ctx_arc4, key, klen);arc4_crypt (&wep->rx_ctx_arc4, pos, pos, plen +4 );
drivers/staging/rtl8192e/rtllib_rx.c +4 -4
@@ -282,10 +282,10 @@ rtllib_rx_frame_decrypt(struct rtllib_device *ieee, struct sk_buff *skb,struct cb_desc *tcb_desc = (struct cb_desc *) (skb->cb +MAX_DEV_ADDR_SIZE ); - tcb_desc->bHwSec =1 ; + tcb_desc->hw_sec =1 ;if (ieee->need_sw_enc) - tcb_desc->bHwSec =0 ; + tcb_desc->hw_sec =0 ; } hdr = (struct ieee80211_hdr *)skb->data;
@@ -321,10 +321,10 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device *ieee, struct sk_buff *skb,struct cb_desc *tcb_desc = (struct cb_desc *) (skb->cb +MAX_DEV_ADDR_SIZE ); - tcb_desc->bHwSec =1 ; + tcb_desc->hw_sec =1 ;if (ieee->need_sw_enc) - tcb_desc->bHwSec =0 ; + tcb_desc->hw_sec =0 ; } hdr = (struct ieee80211_hdr *)skb->data;
drivers/staging/rtl8192e/rtllib_tx.c +3 -3
@@ -751,14 +751,14 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)if (encrypt) {if (ieee->hwsec_active) - tcb_desc->bHwSec =1 ; + tcb_desc->hw_sec =1 ;else - tcb_desc->bHwSec =0 ; + tcb_desc->hw_sec =0 ;skb_reserve (skb_frag, crypt->ops->extra_mpdu_prefix_len + crypt->ops->extra_msdu_prefix_len); }else { - tcb_desc->bHwSec =0 ; + tcb_desc->hw_sec =0 ; } frag_hdr =skb_put_data (skb_frag, &header, hdr_len);
Signature · 1 line
2.30.2
PATCH v2 2/24 Staging: rtl8192e: Rename variable bIsMulticast
In reply to Tree DaviesRename variable bIsMulticast to is_multicast
to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtllib_tx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192e/rtllib_tx.c +5 -5
@@ -538,7 +538,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)u8 src[ETH_ALEN ];struct lib80211_crypt_data *crypt =NULL ;struct cb_desc *tcb_desc; -u8 bIsMulticast = false; +u8 is_multicast = false;u8 IsAmsdu = false;bool bdhcp = false;
@@ -655,14 +655,14 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)ether_addr_copy (header.addr3, dest); } - bIsMulticast =is_multicast_ether_addr (header.addr1); + is_multicast =is_multicast_ether_addr (header.addr1); header.frame_control =cpu_to_le16 (fc);/* Determine fragmentation size based on destination (multicast * and broadcast are not fragmented) */ -if (bIsMulticast) { +if (is_multicast) { frag_size =MAX_FRAG_THRESHOLD ; qos_ctl |=QOS_CTL_NOTCONTAIN_ACK ; }else {
@@ -774,7 +774,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)/* The last fragment has the remaining length */ bytes = bytes_last_frag; } -if ((qos_activated) && (!bIsMulticast)) { +if ((qos_activated) && (!is_multicast)) { frag_hdr->seq_ctrl =cpu_to_le16 (rtllib_query_seqnum (ieee, skb_frag, header.addr1));
@@ -809,7 +809,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)skb_put (skb_frag,4 ); } -if ((qos_activated) && (!bIsMulticast)) { +if ((qos_activated) && (!is_multicast)) {if (ieee->seq_ctrl[UP2AC (skb->priority) +1 ] ==0xFFF ) ieee->seq_ctrl[UP2AC (skb->priority) +1 ] =0 ;else
Signature · 1 line
2.30.2
PATCH v2 3/24 Staging: rtl8192e: Rename variable HTCurrentOperaRate
In reply to Tree DaviesRename variable HTCurrentOperaRate to ht_curr_op_rate to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_tx.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192e/rtl819x_HTProc.c +1 -1
@@ -496,7 +496,7 @@ void ht_on_assoc_rsp(struct rtllib_device *ieee) ieee->HTHighestOperaRate =ht_get_highest_mcs_rate (ieee, ieee->dot11ht_oper_rate_set, pMcsFilter); - ieee->HTCurrentOperaRate = ieee->HTHighestOperaRate; + ieee->ht_curr_op_rate = ieee->HTHighestOperaRate; ht_info->current_op_mode = pPeerHTInfo->opt_mode; }
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -1198,7 +1198,7 @@ struct rtllib_device {u8 reg_dot11tx_ht_oper_rate_set[16 ];u8 dot11ht_oper_rate_set[16 ];u8 reg_ht_supp_rate_set[16 ]; -u8 HTCurrentOperaRate; +u8 ht_curr_op_rate;u8 HTHighestOperaRate;u8 tx_dis_rate_fallback;u8 tx_use_drv_assinged_rate;
drivers/staging/rtl8192e/rtllib_tx.c +2 -2
@@ -510,8 +510,8 @@ static u8 rtllib_current_rate(struct rtllib_device *ieee)if (ieee->mode &IEEE_MODE_MASK )return ieee->rate; -if (ieee->HTCurrentOperaRate) -return ieee->HTCurrentOperaRate; +if (ieee->ht_curr_op_rate) +return ieee->ht_curr_op_rate;else return ieee->rate &0x7F ; }
Signature · 1 line
2.30.2
PATCH v2 4/24 Staging: rtl8192e: Rename variable HTOpMode
In reply to Tree DaviesRename variable HTOpMode to ht_op_mode
to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtllib_tx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192e/rtllib_tx.c +4 -4
@@ -417,11 +417,11 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,break ; }if (ht_info->current_ht_support && ht_info->enable_ht) { -u8 HTOpMode = ht_info->current_op_mode; +u8 ht_op_mode = ht_info->current_op_mode; -if ((ht_info->cur_bw_40mhz && (HTOpMode ==2 || - HTOpMode ==3 )) || - (!ht_info->cur_bw_40mhz && HTOpMode ==3 )) { +if ((ht_info->cur_bw_40mhz && (ht_op_mode ==2 || + ht_op_mode ==3 )) || + (!ht_info->cur_bw_40mhz && ht_op_mode ==3 )) { tcb_desc->rts_rate =MGN_24M ; tcb_desc->bRTSEnable = true;break ;
Signature · 1 line
2.30.2
PATCH v2 5/24 Staging: rtl8192e: Rename variable bRTSEnable
In reply to Tree DaviesRename variable bRTSEnable to rts_enable
to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_tx.c | 18 +++++++++--------- 3 files changed, 11 insertions(+), 11 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +1 -1
@@ -892,7 +892,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc, pTxFwInfo->RxAMD =0 ; } - pTxFwInfo->RtsEnable = (cb_desc->bRTSEnable) ?1 :0 ; + pTxFwInfo->RtsEnable = (cb_desc->rts_enable) ?1 :0 ; pTxFwInfo->CtsEnable = (cb_desc->bCTSEnable) ?1 :0 ; pTxFwInfo->RtsSTBC = (cb_desc->bRTSSTBC) ?1 :0 ; pTxFwInfo->RtsHT = (cb_desc->rts_rate &0x80 ) ?1 :0 ;
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -111,7 +111,7 @@ struct cb_desc {/* Tx Firmware Related flags (10-11)*/ u8 bCTSEnable:1; - u8 bRTSEnable:1; + u8 rts_enable:1; u8 bUseShortGI:1; u8 bUseShortPreamble:1; u8 tx_enable_fw_calc_dur:1;
drivers/staging/rtl8192e/rtllib_tx.c +9 -9
@@ -386,10 +386,10 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,if (ieee->mode <WIRELESS_MODE_N_24G ) {if (skb->len > ieee->rts) { - tcb_desc->bRTSEnable = true; + tcb_desc->rts_enable = true; tcb_desc->rts_rate =MGN_24M ; }else if (ieee->current_network.buseprotection) { - tcb_desc->bRTSEnable = true; + tcb_desc->rts_enable = true; tcb_desc->bCTSEnable = true; tcb_desc->rts_rate =MGN_24M ; }
@@ -402,16 +402,16 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,if (ht_info->iot_action &HT_IOT_ACT_FORCED_CTS2SELF ) { tcb_desc->bCTSEnable = true; tcb_desc->rts_rate =MGN_24M ; - tcb_desc->bRTSEnable = true; + tcb_desc->rts_enable = true;break ; }else if (ht_info->iot_action & (HT_IOT_ACT_FORCED_RTS |HT_IOT_ACT_PURE_N_MODE )) { - tcb_desc->bRTSEnable = true; + tcb_desc->rts_enable = true; tcb_desc->rts_rate =MGN_24M ;break ; }if (ieee->current_network.buseprotection) { - tcb_desc->bRTSEnable = true; + tcb_desc->rts_enable = true; tcb_desc->bCTSEnable = true; tcb_desc->rts_rate =MGN_24M ;break ;
@@ -423,18 +423,18 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee, ht_op_mode == 3)) || (!ht_info->cur_bw_40mhz && ht_op_mode == 3)) { tcb_desc->rts_rate =MGN_24M ; - tcb_desc->bRTSEnable = true; + tcb_desc->rts_enable = true;break ; } }if (skb->len > ieee->rts) { tcb_desc->rts_rate =MGN_24M ; - tcb_desc->bRTSEnable = true; + tcb_desc->rts_enable = true;break ; }if (tcb_desc->ampdu_enable) { tcb_desc->rts_rate =MGN_24M ; - tcb_desc->bRTSEnable = false; + tcb_desc->rts_enable = false;break ; } goto NO_PROTECTION;
@@ -443,7 +443,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee, tcb_desc->bUseShortPreamble = true;return ; NO_PROTECTION: - tcb_desc->bRTSEnable = false; + tcb_desc->rts_enable = false; tcb_desc->bCTSEnable = false; tcb_desc->rts_rate =0 ; tcb_desc->RTSSC =0 ;
Signature · 1 line
2.30.2
PATCH v2 6/24 Staging: rtl8192e: Rename variable bRTSBW
In reply to Tree DaviesRename variable bRTSBW to rts_bw
to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_tx.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -119,7 +119,7 @@ struct cb_desc { u8 bRTSSTBC:1; u8 RTSSC:1; - u8 bRTSBW:1; + u8 rts_bw:1; u8 bPacketBW:1; u8 rts_use_short_preamble:1; u8 bRTSUseShortGI:1;
drivers/staging/rtl8192e/rtllib_tx.c +2 -2
@@ -376,7 +376,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee, tcb_desc->bRTSUseShortGI = false; tcb_desc->bCTSEnable = false; tcb_desc->RTSSC =0 ; - tcb_desc->bRTSBW = false; + tcb_desc->rts_bw = false;if (tcb_desc->bBroadcast || tcb_desc->multicast)return ;
@@ -447,7 +447,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee, tcb_desc->bCTSEnable = false; tcb_desc->rts_rate =0 ; tcb_desc->RTSSC =0 ; - tcb_desc->bRTSBW = false; + tcb_desc->rts_bw = false; } static void rtllib_txrate_selectmode(struct rtllib_device *ieee,
Signature · 1 line
2.30.2
PATCH v2 7/24 Staging: rtl8192e: Rename variable bCTSEnable
In reply to Tree DaviesRename variable bCTSEnable to cts_enable
to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_tx.c | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +1 -1
@@ -893,7 +893,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc, } pTxFwInfo->RtsEnable = (cb_desc->rts_enable) ?1 :0 ; - pTxFwInfo->CtsEnable = (cb_desc->bCTSEnable) ?1 :0 ; + pTxFwInfo->CtsEnable = (cb_desc->cts_enable) ?1 :0 ; pTxFwInfo->RtsSTBC = (cb_desc->bRTSSTBC) ?1 :0 ; pTxFwInfo->RtsHT = (cb_desc->rts_rate &0x80 ) ?1 :0 ; pTxFwInfo->RtsRate =_rtl92e_rate_mgn_to_hw (cb_desc->rts_rate);
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -110,7 +110,7 @@ struct cb_desc {u8 nStuckCount;/* Tx Firmware Related flags (10-11)*/ - u8 bCTSEnable:1; + u8 cts_enable:1; u8 rts_enable:1; u8 bUseShortGI:1; u8 bUseShortPreamble:1;
drivers/staging/rtl8192e/rtllib_tx.c +5 -5
@@ -374,7 +374,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee, tcb_desc->bRTSSTBC = false; tcb_desc->bRTSUseShortGI = false; - tcb_desc->bCTSEnable = false; + tcb_desc->cts_enable = false; tcb_desc->RTSSC =0 ; tcb_desc->rts_bw = false;
@@ -390,7 +390,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee, tcb_desc->rts_rate =MGN_24M ; }else if (ieee->current_network.buseprotection) { tcb_desc->rts_enable = true; - tcb_desc->bCTSEnable = true; + tcb_desc->cts_enable = true; tcb_desc->rts_rate =MGN_24M ; }return ;
@@ -400,7 +400,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,while (true) {if (ht_info->iot_action &HT_IOT_ACT_FORCED_CTS2SELF ) { - tcb_desc->bCTSEnable = true; + tcb_desc->cts_enable = true; tcb_desc->rts_rate =MGN_24M ; tcb_desc->rts_enable = true;break ;
@@ -412,7 +412,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee, }if (ieee->current_network.buseprotection) { tcb_desc->rts_enable = true; - tcb_desc->bCTSEnable = true; + tcb_desc->cts_enable = true; tcb_desc->rts_rate =MGN_24M ;break ; }
@@ -444,7 +444,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,return ; NO_PROTECTION: tcb_desc->rts_enable = false; - tcb_desc->bCTSEnable = false; + tcb_desc->cts_enable = false; tcb_desc->rts_rate =0 ; tcb_desc->RTSSC =0 ; tcb_desc->rts_bw = false;
Signature · 1 line
2.30.2
PATCH v2 8/24 Staging: rtl8192e: Rename variable bRTSUseShortGI
In reply to Tree DaviesRename variable bRTSUseShortGI to rts_use_short_gi to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_tx.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +1 -1
@@ -901,7 +901,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc, pTxFwInfo->RtsSubcarrier = cb_desc->RTSSC; pTxFwInfo->RtsShort = (pTxFwInfo->RtsHT ==0 ) ? (cb_desc->rts_use_short_preamble ?1 :0 ) : - (cb_desc->bRTSUseShortGI ?1 :0 ); + (cb_desc->rts_use_short_gi ?1 :0 );if (priv->current_chnl_bw ==HT_CHANNEL_WIDTH_20_40 ) {if (cb_desc->bPacketBW) { pTxFwInfo->TxBandwidth =1 ;
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -122,7 +122,7 @@ struct cb_desc { u8 rts_bw:1; u8 bPacketBW:1; u8 rts_use_short_preamble:1; - u8 bRTSUseShortGI:1; + u8 rts_use_short_gi:1; u8 multicast:1; u8 bBroadcast:1; u8 drv_agg_enable:1;
drivers/staging/rtl8192e/rtllib_tx.c +1 -1
@@ -373,7 +373,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,struct rt_hi_throughput *ht_info; tcb_desc->bRTSSTBC = false; - tcb_desc->bRTSUseShortGI = false; + tcb_desc->rts_use_short_gi = false; tcb_desc->cts_enable = false; tcb_desc->RTSSC =0 ; tcb_desc->rts_bw = false;
Signature · 1 line
2.30.2
PATCH v2 9/24 Staging: rtl8192e: Rename variable bforced_tx20Mhz
In reply to Tree DaviesRename variable bforced_tx20Mhz to forced_tx_20MHz to remove hungarian notation and make it snake_case.
---
v2: Change bforced_tx20Mhz to forced_tx_20MHz, and update commit message
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 8 ++++---- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_tx.c | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_dm.c +4 -4
@@ -377,7 +377,7 @@ static void _rtl92e_dm_init_bandwidth_autoswitch(struct net_device *dev) priv->rtllib->bandwidth_auto_switch.threshold_20Mhzto40Mhz =BW_AUTO_SWITCH_LOW_HIGH ; priv->rtllib->bandwidth_auto_switch.threshold_40Mhzto20Mhz =BW_AUTO_SWITCH_HIGH_LOW ; - priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz = false; + priv->rtllib->bandwidth_auto_switch.forced_tx_20MHz = false; priv->rtllib->bandwidth_auto_switch.bautoswitch_enable = false; }
@@ -388,14 +388,14 @@ static void _rtl92e_dm_bandwidth_autoswitch(struct net_device *dev)if (priv->current_chnl_bw ==HT_CHANNEL_WIDTH_20 || !priv->rtllib->bandwidth_auto_switch.bautoswitch_enable)return ; -if (!priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz) { +if (!priv->rtllib->bandwidth_auto_switch.forced_tx_20MHz) {if (priv->undecorated_smoothed_pwdb <= priv->rtllib->bandwidth_auto_switch.threshold_40Mhzto20Mhz) - priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz = true; + priv->rtllib->bandwidth_auto_switch.forced_tx_20MHz = true; }else {if (priv->undecorated_smoothed_pwdb >= priv->rtllib->bandwidth_auto_switch.threshold_20Mhzto40Mhz) - priv->rtllib->bandwidth_auto_switch.bforced_tx20Mhz = false; + priv->rtllib->bandwidth_auto_switch.forced_tx_20MHz = false; } }
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -1018,7 +1018,7 @@ struct tx_pending {struct bandwidth_autoswitch {long threshold_20Mhzto40Mhz;long threshold_40Mhzto20Mhz; -bool bforced_tx20Mhz; +bool forced_tx_20MHz;bool bautoswitch_enable; };
drivers/staging/rtl8192e/rtllib_tx.c +1 -1
@@ -362,7 +362,7 @@ static void rtllib_query_BandwidthMode(struct rtllib_device *ieee,if ((tcb_desc->data_rate &0x80 ) ==0 )return ;if (ht_info->cur_bw_40mhz && ht_info->cur_tx_bw40mhz && - !ieee->bandwidth_auto_switch.bforced_tx20Mhz) + !ieee->bandwidth_auto_switch.forced_tx_20MHz) tcb_desc->bPacketBW = true; }
Signature · 1 line
2.30.2
PATCH v2 10/24 Staging: rtl8192e: Rename variable bPacketBW
In reply to Tree DaviesRename variable bPacketBW to packet_bw
to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_tx.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +1 -1
@@ -903,7 +903,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc, (cb_desc->rts_use_short_preamble ? 1 : 0) : (cb_desc->rts_use_short_gi ?1 :0 );if (priv->current_chnl_bw ==HT_CHANNEL_WIDTH_20_40 ) { -if (cb_desc->bPacketBW) { +if (cb_desc->packet_bw) { pTxFwInfo->TxBandwidth =1 ; pTxFwInfo->TxSubCarrier =0 ; }else {
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -120,7 +120,7 @@ struct cb_desc { u8 RTSSC:1; u8 rts_bw:1; - u8 bPacketBW:1; + u8 packet_bw:1; u8 rts_use_short_preamble:1; u8 rts_use_short_gi:1; u8 multicast:1;
drivers/staging/rtl8192e/rtllib_tx.c +2 -2
@@ -351,7 +351,7 @@ static void rtllib_query_BandwidthMode(struct rtllib_device *ieee, {struct rt_hi_throughput *ht_info = ieee->ht_info; - tcb_desc->bPacketBW = false; + tcb_desc->packet_bw = false;if (!ht_info->current_ht_support || !ht_info->enable_ht)return ;
@@ -363,7 +363,7 @@ static void rtllib_query_BandwidthMode(struct rtllib_device *ieee,return ;if (ht_info->cur_bw_40mhz && ht_info->cur_tx_bw40mhz && !ieee->bandwidth_auto_switch.forced_tx_20MHz) - tcb_desc->bPacketBW = true; + tcb_desc->packet_bw = true; } static void rtllib_query_protectionmode(struct rtllib_device *ieee,
Signature · 1 line
2.30.2
PATCH v2 11/24 Staging: rtl8192e: Rename variable bBroadcast
In reply to Tree DaviesRename variable bBroadcast to broadcast
to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_tx.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -124,7 +124,7 @@ struct cb_desc { u8 rts_use_short_preamble:1; u8 rts_use_short_gi:1; u8 multicast:1; - u8 bBroadcast:1; + u8 broadcast:1; u8 drv_agg_enable:1; u8 reserved2:1;
drivers/staging/rtl8192e/rtllib_tx.c +4 -4
@@ -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->multicast || tcb_desc->bBroadcast) +if (tcb_desc->multicast || tcb_desc->broadcast)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->rts_bw = false; -if (tcb_desc->bBroadcast || tcb_desc->multicast) +if (tcb_desc->broadcast || tcb_desc->multicast)return ;if (is_broadcast_ether_addr (skb->data +16 ))
@@ -845,9 +845,9 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)if (is_multicast_ether_addr (header.addr1)) tcb_desc->multicast =1 ;if (is_broadcast_ether_addr (header.addr1)) - tcb_desc->bBroadcast =1 ; + tcb_desc->broadcast =1 ;rtllib_txrate_selectmode (ieee, tcb_desc); -if (tcb_desc->multicast || tcb_desc->bBroadcast) +if (tcb_desc->multicast || tcb_desc->broadcast) tcb_desc->data_rate = ieee->basic_rate;else tcb_desc->data_rate =rtllib_current_rate (ieee);
Signature · 1 line
2.30.2
PATCH v2 12/24 Staging: rtl8192e: Rename variable CntAfterLink
In reply to Tree DaviesRename variable CntAfterLink to cnt_after_link
to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 +++--- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_tx.c | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-)
drivers/staging/rtl8192e/rtl8192e/rtl_core.c +3 -3
@@ -951,10 +951,10 @@ static void _rtl92e_watchdog_wq_cb(void *data)return ;if (priv->rtllib->link_state >=MAC80211_LINKED ) { -if (priv->rtllib->CntAfterLink <2 ) - priv->rtllib->CntAfterLink++; +if (priv->rtllib->cnt_after_link <2 ) + priv->rtllib->cnt_after_link++; }else { - priv->rtllib->CntAfterLink =0 ; + priv->rtllib->cnt_after_link =0 ; }rtl92e_dm_watchdog (dev);
drivers/staging/rtl8192e/rtl8192e/rtl_wx.c +1 -1
@@ -241,7 +241,7 @@ static int _rtl92e_wx_set_scan(struct net_device *dev, (ieee->link_state <= RTLLIB_ASSOCIATING_AUTHENTICATED))return 0 ;if ((priv->rtllib->link_state ==MAC80211_LINKED ) && - (priv->rtllib->CntAfterLink <2 )) + (priv->rtllib->cnt_after_link <2 ))return 0 ; }
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -1168,7 +1168,7 @@ struct rtllib_device {bool disable_mgnt_queue;unsigned long status; -u8 CntAfterLink; +u8 cnt_after_link;enum rt_op_mode op_mode;
drivers/staging/rtl8192e/rtllib_tx.c +1 -1
@@ -280,7 +280,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,if (is_multicast_ether_addr (hdr->addr1))return ; -if (tcb_desc->bdhcp || ieee->CntAfterLink <2 ) +if (tcb_desc->bdhcp || ieee->cnt_after_link <2 )return ;if (ht_info->iot_action &HT_IOT_ACT_TX_NO_AGGREGATION )
Signature · 1 line
2.30.2
PATCH v2 13/24 Staging: rtl8192e: Rename variable bUseShortGI
In reply to Tree DaviesRename variable bUseShortGI to use_short_gi
to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_tx.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +1 -1
@@ -859,7 +859,7 @@ static u8 _rtl92e_query_is_short(u8 TxHT, u8 TxRate, struct cb_desc *tcb_desc) {u8 tmp_Short; - tmp_Short = (TxHT ==1 ) ? ((tcb_desc->bUseShortGI) ?1 :0 ) : + tmp_Short = (TxHT ==1 ) ? ((tcb_desc->use_short_gi) ?1 :0 ) : ((tcb_desc->bUseShortPreamble) ?1 :0 );if (TxHT ==1 && TxRate !=DESC90_RATEMCS15 ) tmp_Short =0 ;
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -112,7 +112,7 @@ struct cb_desc {/* Tx Firmware Related flags (10-11)*/ u8 cts_enable:1; u8 rts_enable:1; - u8 bUseShortGI:1; + u8 use_short_gi:1; u8 bUseShortPreamble:1; u8 tx_enable_fw_calc_dur:1; u8 ampdu_enable:1;
drivers/staging/rtl8192e/rtllib_tx.c +3 -3
@@ -335,15 +335,15 @@ static void rtllib_query_HTCapShortGI(struct rtllib_device *ieee, {struct rt_hi_throughput *ht_info = ieee->ht_info; - tcb_desc->bUseShortGI = false; + tcb_desc->use_short_gi = false;if (!ht_info->current_ht_support || !ht_info->enable_ht)return ;if (ht_info->cur_bw_40mhz && ht_info->cur_short_gi_40mhz) - tcb_desc->bUseShortGI = true; + tcb_desc->use_short_gi = true;else if (!ht_info->cur_bw_40mhz && ht_info->cur_short_gi_20mhz) - tcb_desc->bUseShortGI = true; + tcb_desc->use_short_gi = true; } static void rtllib_query_BandwidthMode(struct rtllib_device *ieee,
Signature · 1 line
2.30.2
PATCH v2 14/24 Staging: rtl8192e: Rename function TsStartAddBaProcess()
In reply to Tree DaviesRename variable TsStartAddBaProcess tortllib_ts_start_add_ba_process to fix checkpatch
warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_tx.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192e/rtl819x_TSProc.c +1 -1
@@ -431,7 +431,7 @@ void remove_all_ts(struct rtllib_device *ieee) } } -void TsStartAddBaProcess (struct rtllib_device *ieee,struct tx_ts_record *pTxTS) +void rtllib_ts_start_add_ba_process (struct rtllib_device *ieee,struct tx_ts_record *pTxTS) {if (pTxTS->add_ba_req_in_progress == false) { pTxTS->add_ba_req_in_progress = true;
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -1770,7 +1770,7 @@ 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 bAddNewTs);void rtllib_ts_init (struct rtllib_device *ieee); -void TsStartAddBaProcess (struct rtllib_device *ieee, +void rtllib_ts_start_add_ba_process (struct rtllib_device *ieee,struct tx_ts_record *pTxTS);void remove_peer_ts (struct rtllib_device *ieee,u8 *addr);void remove_all_ts (struct rtllib_device *ieee);
drivers/staging/rtl8192e/rtllib_tx.c +1 -1
@@ -301,7 +301,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee, }else if (tcb_desc->bdhcp ==1 ) { ; }else if (!ts->disable_add_ba) { -TsStartAddBaProcess (ieee, ts); +rtllib_ts_start_add_ba_process (ieee, ts); }return ; }else if (!ts->using_ba) {
Signature · 1 line
2.30.2
PATCH v2 15/24 Staging: rtl8192e: Fix alignment to match open parenthesis
In reply to Tree DaviesAdded tabs and spaces to fix warning:
Alignment should match open parenthesis
---
v2: No Change
drivers/staging/rtl8192e/rtllib_tx.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192e/rtllib_tx.c +5 -5
@@ -290,7 +290,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,return ;if (ht_info->current_ampdu_enable) {if (!rtllib_get_ts (ieee, (struct ts_common_info **)(&ts), hdr->addr1, - skb->priority,TX_DIR , true)) { + skb->priority,TX_DIR , true)) {netdev_info (ieee->dev,"%s: can't get TS\n" , __func__);return ; }
@@ -420,7 +420,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee,u8 ht_op_mode = ht_info->current_op_mode;if ((ht_info->cur_bw_40mhz && (ht_op_mode ==2 || - ht_op_mode ==3 )) || + ht_op_mode ==3 )) || (!ht_info->cur_bw_40mhz && ht_op_mode ==3 )) { tcb_desc->rts_rate =MGN_24M ; tcb_desc->rts_enable = true;
@@ -476,7 +476,7 @@ static u16 rtllib_query_seqnum(struct rtllib_device *ieee, struct sk_buff *skb,struct tx_ts_record *ts =NULL ;if (!rtllib_get_ts (ieee, (struct ts_common_info **)(&ts), dst, - skb->priority,TX_DIR , true)) + skb->priority,TX_DIR , true))return 0 ; seqnum = ts->tx_cur_seq; ts->tx_cur_seq = (ts->tx_cur_seq +1 ) %4096 ;
@@ -548,8 +548,8 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)* creating it... */ if (!(ieee->softmac_features &IEEE_SOFTMAC_TX_QUEUE ) || - ((!ieee->softmac_data_hard_start_xmit && - (ieee->softmac_features &IEEE_SOFTMAC_TX_QUEUE )))) { + ((!ieee->softmac_data_hard_start_xmit && + (ieee->softmac_features &IEEE_SOFTMAC_TX_QUEUE )))) {netdev_warn (ieee->dev,"No xmit handler.\n" ); goto success; }
Signature · 1 line
2.30.2
PATCH v2 16/24 Staging: rtl8192e: Rename function rtllib_query_BandwidthMode
In reply to Tree DaviesRename function rtllib_query_BandwidthMode to rtllib_query_bandwidth_mode to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtllib_tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/rtllib_tx.c +2 -2
@@ -346,7 +346,7 @@ static void rtllib_query_HTCapShortGI(struct rtllib_device *ieee, tcb_desc->use_short_gi = true; } -static void rtllib_query_BandwidthMode (struct rtllib_device *ieee, +static void rtllib_query_bandwidth_mode (struct rtllib_device *ieee,struct cb_desc *tcb_desc) {struct rt_hi_throughput *ht_info = ieee->ht_info;
@@ -872,7 +872,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)rtllib_tx_query_agg_cap (ieee, txb->fragments[0 ], tcb_desc);rtllib_query_HTCapShortGI (ieee, tcb_desc); -rtllib_query_BandwidthMode (ieee, tcb_desc); +rtllib_query_bandwidth_mode (ieee, tcb_desc);rtllib_query_protectionmode (ieee, tcb_desc, txb->fragments[0 ]); }
Signature · 1 line
2.30.2
PATCH v2 17/24 Staging: rtl8192e: Rename function rtllib_query_ShortPreambleMode
In reply to Tree DaviesRename function rtllib_query_ShortPreambleMode to rtllib_query_short_preamble_mode to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtllib_tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/rtllib_tx.c +2 -2
@@ -319,7 +319,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee, } } -static void rtllib_query_ShortPreambleMode (struct rtllib_device *ieee, +static void rtllib_query_short_preamble_mode (struct rtllib_device *ieee,struct cb_desc *tcb_desc) { tcb_desc->bUseShortPreamble = false;
@@ -868,7 +868,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) tcb_desc->bdhcp =1 ; } -rtllib_query_ShortPreambleMode (ieee, tcb_desc); +rtllib_query_short_preamble_mode (ieee, tcb_desc);rtllib_tx_query_agg_cap (ieee, txb->fragments[0 ], tcb_desc);rtllib_query_HTCapShortGI (ieee, tcb_desc);
Signature · 1 line
2.30.2
PATCH v2 18/24 Staging: rtl8192e: Rename function rtllib_query_HTCapShortGI
In reply to Tree DaviesRename function rtllib_query_HTCapShortGI to rtllib_query_ht_cap_short_gi to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtllib_tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/rtllib_tx.c +2 -2
@@ -330,7 +330,7 @@ static void rtllib_query_short_preamble_mode(struct rtllib_device *ieee, tcb_desc->bUseShortPreamble = true; } -static void rtllib_query_HTCapShortGI (struct rtllib_device *ieee, +static void rtllib_query_ht_cap_short_gi (struct rtllib_device *ieee,struct cb_desc *tcb_desc) {struct rt_hi_throughput *ht_info = ieee->ht_info;
@@ -871,7 +871,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)rtllib_query_short_preamble_mode (ieee, tcb_desc);rtllib_tx_query_agg_cap (ieee, txb->fragments[0 ], tcb_desc); -rtllib_query_HTCapShortGI (ieee, tcb_desc); +rtllib_query_ht_cap_short_gi (ieee, tcb_desc);rtllib_query_bandwidth_mode (ieee, tcb_desc);rtllib_query_protectionmode (ieee, tcb_desc, txb->fragments[0 ]);
Signature · 1 line
2.30.2
PATCH v2 19/24 Staging: rtl8192e: Rename variable bUseShortPreamble
In reply to Tree DaviesRename variable bUseShortPreamble to use_short_preamble to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_tx.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +1 -1
@@ -860,7 +860,7 @@ static u8 _rtl92e_query_is_short(u8 TxHT, u8 TxRate, struct cb_desc *tcb_desc)u8 tmp_Short; tmp_Short = (TxHT ==1 ) ? ((tcb_desc->use_short_gi) ?1 :0 ) : - ((tcb_desc->bUseShortPreamble) ?1 :0 ); + ((tcb_desc->use_short_preamble) ?1 :0 );if (TxHT ==1 && TxRate !=DESC90_RATEMCS15 ) tmp_Short =0 ;
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -113,7 +113,7 @@ struct cb_desc { u8 cts_enable:1; u8 rts_enable:1; u8 use_short_gi:1; - u8 bUseShortPreamble:1; + u8 use_short_preamble:1; u8 tx_enable_fw_calc_dur:1; u8 ampdu_enable:1; u8 bRTSSTBC:1;
drivers/staging/rtl8192e/rtllib_tx.c +3 -3
@@ -322,12 +322,12 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee,static void rtllib_query_short_preamble_mode (struct rtllib_device *ieee,struct cb_desc *tcb_desc) { - tcb_desc->bUseShortPreamble = false; + tcb_desc->use_short_preamble = false;if (tcb_desc->data_rate ==2 )return ;else if (ieee->current_network.capability &WLAN_CAPABILITY_SHORT_PREAMBLE ) - tcb_desc->bUseShortPreamble = true; + tcb_desc->use_short_preamble = true; } static void rtllib_query_ht_cap_short_gi(struct rtllib_device *ieee,
@@ -440,7 +440,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee, goto NO_PROTECTION; }if (ieee->current_network.capability &WLAN_CAPABILITY_SHORT_PREAMBLE ) - tcb_desc->bUseShortPreamble = true; + tcb_desc->use_short_preamble = true;return ; NO_PROTECTION: tcb_desc->rts_enable = false;
Signature · 1 line
2.30.2
PATCH v2 20/24 Staging: rtl8192e: Rename variable bRTSSTBC
In reply to Tree DaviesRename variable bRTSSTBC to rtsstbc
to fix checkpatch warning Avoid CamelCase.
---
v2: No Change
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 2 +- drivers/staging/rtl8192e/rtllib_tx.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192e/rtl8192e/r8192E_dev.c +1 -1
@@ -894,7 +894,7 @@ void rtl92e_fill_tx_desc(struct net_device *dev, struct tx_desc *pdesc, pTxFwInfo->RtsEnable = (cb_desc->rts_enable) ?1 :0 ; pTxFwInfo->CtsEnable = (cb_desc->cts_enable) ?1 :0 ; - pTxFwInfo->RtsSTBC = (cb_desc->bRTSSTBC) ?1 :0 ; + pTxFwInfo->RtsSTBC = (cb_desc->rtsstbc) ?1 :0 ; pTxFwInfo->RtsHT = (cb_desc->rts_rate &0x80 ) ?1 :0 ; pTxFwInfo->RtsRate =_rtl92e_rate_mgn_to_hw (cb_desc->rts_rate); pTxFwInfo->RtsBandwidth =0 ;
drivers/staging/rtl8192e/rtllib.h +1 -1
@@ -116,7 +116,7 @@ struct cb_desc { u8 use_short_preamble:1; u8 tx_enable_fw_calc_dur:1; u8 ampdu_enable:1; - u8 bRTSSTBC:1; + u8 rtsstbc:1; u8 RTSSC:1; u8 rts_bw:1;
drivers/staging/rtl8192e/rtllib_tx.c +1 -1
@@ -372,7 +372,7 @@ static void rtllib_query_protectionmode(struct rtllib_device *ieee, {struct rt_hi_throughput *ht_info; - tcb_desc->bRTSSTBC = false; + tcb_desc->rtsstbc = false; tcb_desc->rts_use_short_gi = false; tcb_desc->cts_enable = false; tcb_desc->RTSSC =0 ;
Signature · 1 line
2.30.2
PATCH v2 21/24 Staging: rtl8192e: Remove parameter bIsAmsdu from rtllib_classify()
In reply to Tree DaviesRemove argument, bIsAmsdu from rtllib_classify() as it is never used.
---
v2: Update subject prefix with 'Staging: rtl8192e:'
drivers/staging/rtl8192e/rtllib_tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/staging/rtl8192e/rtllib_tx.c +2 -2
@@ -228,7 +228,7 @@ static struct rtllib_txb *rtllib_alloc_txb(int nr_frags, int txb_size,return NULL ; } -static int rtllib_classify (struct sk_buff *skb,u8 bIsAmsdu) +static int rtllib_classify (struct sk_buff *skb) {struct ethhdr *eth;struct iphdr *ip;
@@ -607,7 +607,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) } } - skb->priority =rtllib_classify (skb, IsAmsdu); + skb->priority =rtllib_classify (skb); crypt = ieee->crypt_info.crypt[ieee->crypt_info.tx_keyidx]; encrypt = !(ether_type ==ETH_P_PAE && ieee->ieee802_1x) && crypt && crypt->ops; if (!encrypt && ieee->ieee802_1x &&
Signature · 1 line
2.30.2
PATCH v2 22/24 Staging: rtl8192e: Remove variable IsAmsdu from rtllib_xmit_inter()
In reply to Tree DaviesRemove boolean variable, IsAmsdu, and code which does not execute because it is never set to true.
---
v2: Update subject prefix with 'Staging: rtl8192e:'
drivers/staging/rtl8192e/rtllib_tx.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
drivers/staging/rtl8192e/rtllib_tx.c +1 -6
@@ -539,7 +539,6 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)struct lib80211_crypt_data *crypt =NULL ;struct cb_desc *tcb_desc;u8 is_multicast = false; -u8 IsAmsdu = false;bool bdhcp = false;spin_lock_irqsave (&ieee->lock, flags);
@@ -648,11 +647,7 @@ static int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev)ether_addr_copy (header.addr1, ieee->current_network.bssid);ether_addr_copy (header.addr2, src); -if (IsAmsdu) -ether_addr_copy (header.addr3, - ieee->current_network.bssid); -else -ether_addr_copy (header.addr3, dest); +ether_addr_copy (header.addr3, dest); } is_multicast =is_multicast_ether_addr (header.addr1);
Signature · 1 line
2.30.2
PATCH v2 23/24 Staging: rtl8192e: Fix alignment to match open parenthesis in rtllib_tx.c
In reply to Tree DaviesAdd spaces and tabs to fix warning: Alignment should match open parenthesis.
---
v2: Update subject prefix with 'Staging: rtl8192e:'
drivers/staging/rtl8192e/rtllib_tx.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/staging/rtl8192e/rtllib_tx.c +3 -3
@@ -320,7 +320,7 @@ static void rtllib_tx_query_agg_cap(struct rtllib_device *ieee, }static void rtllib_query_short_preamble_mode (struct rtllib_device *ieee, -struct cb_desc *tcb_desc) +struct cb_desc *tcb_desc) { tcb_desc->use_short_preamble = false;if (tcb_desc->data_rate ==2 )
@@ -331,7 +331,7 @@ static void rtllib_query_short_preamble_mode(struct rtllib_device *ieee, }static void rtllib_query_ht_cap_short_gi (struct rtllib_device *ieee, -struct cb_desc *tcb_desc) +struct cb_desc *tcb_desc) {struct rt_hi_throughput *ht_info = ieee->ht_info;
@@ -347,7 +347,7 @@ static void rtllib_query_ht_cap_short_gi(struct rtllib_device *ieee, }static void rtllib_query_bandwidth_mode (struct rtllib_device *ieee, -struct cb_desc *tcb_desc) +struct cb_desc *tcb_desc) {struct rt_hi_throughput *ht_info = ieee->ht_info;
Signature · 1 line
2.30.2
PATCH v2 24/24 Staging: rtl8192e: Fix alignment to match open parenthesis in rtllib_rx.c
In reply to Tree DaviesAdd spaces and tabs to fix warning: Alignment should match open parenthesis.
---
v2: Update subject prefix with 'Staging: rtl8192e:'
drivers/staging/rtl8192e/rtllib_rx.c | 37 ++++++++++++++-------------- 1 file changed, 18 insertions(+), 19 deletions(-)
drivers/staging/rtl8192e/rtllib_rx.c +18 -19
@@ -55,7 +55,7 @@ static inline void rtllib_monitor_rx(struct rtllib_device *ieee,/* Called only as a tasklet (software IRQ) */ static struct rtllib_frag_entry *rtllib_frag_cache_find (struct rtllib_device *ieee,unsigned int seq, -unsigned int frag,u8 tid,u8 *src,u8 *dst) +unsigned int frag,u8 tid,u8 *src,u8 *dst) {struct rtllib_frag_entry *entry;int i;
@@ -84,7 +84,7 @@ rtllib_frag_cache_find(struct rtllib_device *ieee, unsigned int seq,/* Called only as a tasklet (software IRQ) */ static struct sk_buff *rtllib_frag_cache_get (struct rtllib_device *ieee, -struct ieee80211_hdr *hdr) +struct ieee80211_hdr *hdr) {struct sk_buff *skb =NULL ;u16 fc =le16_to_cpu (hdr->frame_control);
@@ -143,7 +143,7 @@ rtllib_frag_cache_get(struct rtllib_device *ieee,* should have already been received */ entry =rtllib_frag_cache_find (ieee, seq, frag, tid, hdr->addr2, - hdr->addr1); + hdr->addr1);if (entry) { entry->last_frag = frag; skb = entry->skb;
@@ -155,7 +155,7 @@ rtllib_frag_cache_get(struct rtllib_device *ieee,/* Called only as a tasklet (software IRQ) */ static int rtllib_frag_cache_invalidate (struct rtllib_device *ieee, -struct ieee80211_hdr *hdr) +struct ieee80211_hdr *hdr) {u16 fc =le16_to_cpu (hdr->frame_control);u16 sc =le16_to_cpu (hdr->seq_ctrl);
@@ -181,7 +181,7 @@ static int rtllib_frag_cache_invalidate(struct rtllib_device *ieee, } entry =rtllib_frag_cache_find (ieee, seq,-1 , tid, hdr->addr2, - hdr->addr1); + hdr->addr1);if (!entry) { netdev_dbg(ieee->dev,
@@ -202,8 +202,7 @@ static int rtllib_frag_cache_invalidate(struct rtllib_device *ieee,*/ static inline int rtllib_rx_frame_mgmt (struct rtllib_device *ieee,struct sk_buff *skb, -struct rtllib_rx_stats *rx_stats,u16 type, -u16 stype) +struct rtllib_rx_stats *rx_stats,u16 type,u16 stype) {/* On the struct stats definition there is written that * this is not mandatory.... but seems that the probe
@@ -228,7 +227,7 @@ rtllib_rx_frame_mgmt(struct rtllib_device *ieee, struct sk_buff *skb,/* Called by rtllib_rx_frame_decrypt */ static int rtllib_is_eapol_frame (struct rtllib_device *ieee, -struct sk_buff *skb,size_t hdrlen) +struct sk_buff *skb,size_t hdrlen) {struct net_device *dev = ieee->dev;u16 fc, ethertype;
@@ -346,7 +345,7 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device *ieee, struct sk_buff *skb,/* this function is stolen from ipw2200 driver*/ #define IEEE_PACKET_RETRY_TIME (5 * HZ)static int is_duplicate_packet (struct rtllib_device *ieee, -struct ieee80211_hdr *header) +struct ieee80211_hdr *header) {u16 fc =le16_to_cpu (header->frame_control);u16 sc =le16_to_cpu (header->seq_ctrl);
@@ -404,7 +403,7 @@ static int is_duplicate_packet(struct rtllib_device *ieee, }static bool add_reorder_entry (struct rx_ts_record *ts, -struct rx_reorder_entry *pReorderEntry) +struct rx_reorder_entry *pReorderEntry) {struct list_head *list = &ts->rx_pending_pkt_list;
@@ -521,8 +520,8 @@ void rtllib_flush_rx_ts_pending_pkts(struct rtllib_device *ieee, }static void rx_reorder_indicate_packet (struct rtllib_device *ieee, -struct rtllib_rxb *prxb, -struct rx_ts_record *ts,u16 SeqNum) +struct rtllib_rxb *prxb, +struct rx_ts_record *ts,u16 SeqNum) {struct rt_hi_throughput *ht_info = ieee->ht_info;struct rx_reorder_entry *pReorderEntry =NULL ;
@@ -1911,7 +1910,7 @@ int rtllib_parse_info_param(struct rtllib_device *ieee,switch (info_element->id) {case MFIE_TYPE_SSID :if (rtllib_is_empty_essid (info_element->data, - info_element->len)) { + info_element->len)) { network->flags |=NETWORK_EMPTY_ESSID ;break ; }
@@ -2190,10 +2189,10 @@ static inline int rtllib_network_init( network->wzc_ie_len =0 ;if (rtllib_parse_info_param (ieee, - beacon->info_element, - (stats->len -sizeof (*beacon)), - network, - stats)) + beacon->info_element, + (stats->len -sizeof (*beacon)), + network, + stats))return 1 ; network->mode =0 ;
@@ -2559,7 +2558,7 @@ static void rtllib_rx_mgt(struct rtllib_device *ieee,schedule_work (&ieee->ps_task); }else if (ieee80211_is_probe_resp (header->frame_control)) {netdev_dbg (ieee->dev,"received PROBE RESPONSE\n" ); -rtllib_process_probe_response (ieee, - (struct rtllib_probe_response *)header, stats); +rtllib_process_probe_response (ieee, (struct rtllib_probe_response *)header, + stats); } }
Signature · 1 line
2.30.2
Quoted 6 lines · Tree Davies
This patch series v2 attacks CamelCase variable renames, removes un-used variables and adjusts alignment issues found in
rtllib_rx.candrtllib_tx.c.NOTE: Patch #9 doesn't completely resolve CamelCase violation as the correct abreviation of megahertz is MHz as called out by Dan Carpenter.
Thanks!
regards,
dan carpenter
Quoted 45 lines · Tree Davies
This patch series v2 attacks CamelCase variable renames, removes un-used variables and adjusts alignment issues found in
rtllib_rx.candrtllib_tx.c.NOTE: Patch #9 doesn't completely resolve CamelCase violation as the correct abreviation of megahertz is MHz as called out by Dan Carpenter.
Thank you in advance to all reviewers.
~TreeChanges since v1:
#09: Changebforced_tx20Mhztoforced_tx_20MHz, and update commit message #21: Update subject prefix with 'Staging: rtl8192e:'
#22: Update subject prefix with 'Staging: rtl8192e:'
#23: Update subject prefix with 'Staging: rtl8192e:'
#24: Update subject prefix with 'Staging: rtl8192e:'Tree Davies (24):
Staging: rtl8192e: Rename variable bHwSec
Staging: rtl8192e: Rename variable bIsMulticast
Staging: rtl8192e: Rename variable HTCurrentOperaRate
Staging: rtl8192e: Rename variable HTOpMode
Staging: rtl8192e: Rename variable bRTSEnable
Staging: rtl8192e: Rename variable bRTSBW
Staging: rtl8192e: Rename variable bCTSEnable
Staging: rtl8192e: Rename variable bRTSUseShortGI
Staging: rtl8192e: Rename variablebforced_tx20Mhz
Staging: rtl8192e: Rename variable bPacketBW
Staging: rtl8192e: Rename variable bBroadcast
Staging: rtl8192e: Rename variable CntAfterLink
Staging: rtl8192e: Rename variable bUseShortGI
Staging: rtl8192e: Rename functionTsStartAddBaProcess()
Staging: rtl8192e: Fix alignment to match open parenthesis
Staging: rtl8192e: Rename functionrtllib_query_BandwidthMode
Staging: rtl8192e: Rename functionrtllib_query_ShortPreambleMode
Staging: rtl8192e: Rename functionrtllib_query_HTCapShortGI
Staging: rtl8192e: Rename variable bUseShortPreamble
Staging: rtl8192e: Rename variable bRTSSTBC
Staging: rtl8192e: Remove parameter bIsAmsdu fromrtllib_classify()
Staging: rtl8192e: Remove variable IsAmsdu fromrtllib_xmit_inter()
Staging: rtl8192e: Fix alignment to match open parenthesis in
rtllib_tx.c
Staging: rtl8192e: Fix alignment to match open parenthesis in
rtllib_rx.c
Quoted 14 lines
.../staging/rtl8192e/rtl8192e/r8192E_dev.c | 16 +-- drivers/staging/rtl8192e/rtl8192e/rtl_core.c | 6 +- drivers/staging/rtl8192e/rtl8192e/rtl_dm.c | 8 +- drivers/staging/rtl8192e/rtl8192e/rtl_wx.c | 2 +- drivers/staging/rtl8192e/rtl819x_HTProc.c | 2 +- drivers/staging/rtl8192e/rtl819x_TSProc.c | 2 +- drivers/staging/rtl8192e/rtllib.h | 28 ++-- drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 4 +- drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 10 +- drivers/staging/rtl8192e/rtllib_crypt_wep.c | 4 +- drivers/staging/rtl8192e/rtllib_rx.c | 45 +++--- drivers/staging/rtl8192e/rtllib_tx.c | 131 +++++++++--------- 12 files changed, 126 insertions(+), 132 deletions(-)