staging:rtl8192u: Refactor union delba_param_set - Style
authorJohn Whitmore <johnfwhitmore@gmail.com>
Tue, 21 Aug 2018 17:15:29 +0000 (18:15 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 27 Aug 2018 17:24:30 +0000 (19:24 +0200)
remove member 'charData' from the union delba_param_set, as it is not
used in code. The remaining member variables have all been renamed to
clear the checkpatch issue with CamelCase naming.

shortData  to short_data
Reserved   to reserved
Initiator  to initiator
TID        to tid

These changes are all coding style changes which should have no
impact on runtime code execution.

Signed-off-by: John Whitmore <johnfwhitmore@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/rtl8192u/ieee80211/rtl819x_BA.h
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c

index 10e81c3..008fe72 100644 (file)
@@ -41,12 +41,11 @@ union ba_param_set {
 };
 
 union delba_param_set {
-       u8 charData[2];
-       u16 shortData;
+       u16 short_data;
        struct {
-               u16 Reserved:11;
-               u16 Initiator:1;
-               u16 TID:4;
+               u16 reserved:11;
+               u16 initiator:1;
+               u16 tid:4;
        } field;
 };
 
index 931123f..e504d1e 100644 (file)
@@ -201,8 +201,8 @@ static struct sk_buff *ieee80211_DELBA(
 
        memset(&DelbaParamSet, 0, 2);
 
-       DelbaParamSet.field.Initiator   = (TxRxSelect == TX_DIR) ? 1 : 0;
-       DelbaParamSet.field.TID = pBA->BaParamSet.field.tid;
+       DelbaParamSet.field.initiator   = (TxRxSelect == TX_DIR) ? 1 : 0;
+       DelbaParamSet.field.tid = pBA->BaParamSet.field.tid;
 
        skb = dev_alloc_skb(len + sizeof(struct rtl_80211_hdr_3addr)); //need to add something others? FIXME
        if (!skb) {
@@ -226,7 +226,7 @@ static struct sk_buff *ieee80211_DELBA(
 
        // DELBA Parameter Set
 
-       put_unaligned_le16(DelbaParamSet.shortData, tag);
+       put_unaligned_le16(DelbaParamSet.short_data, tag);
        tag += 2;
        // Reason Code
 
@@ -565,14 +565,14 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)
        dst = &delba->addr2[0];
        pDelBaParamSet = (union delba_param_set *)&delba->payload[2];
 
-       if (pDelBaParamSet->field.Initiator == 1) {
+       if (pDelBaParamSet->field.initiator == 1) {
                struct rx_ts_record *pRxTs;
 
                if (!GetTs(
                                ieee,
                                (struct ts_common_info **)&pRxTs,
                                dst,
-                               (u8)pDelBaParamSet->field.TID,
+                               (u8)pDelBaParamSet->field.tid,
                                RX_DIR,
                                false)) {
                        IEEE80211_DEBUG(IEEE80211_DL_ERR,  "can't get TS for RXTS in %s()\n", __func__);
@@ -587,7 +587,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)
                        ieee,
                        (struct ts_common_info **)&pTxTs,
                        dst,
-                       (u8)pDelBaParamSet->field.TID,
+                       (u8)pDelBaParamSet->field.tid,
                        TX_DIR,
                        false)) {
                        IEEE80211_DEBUG(IEEE80211_DL_ERR,  "can't get TS for TXTS in %s()\n", __func__);