OSDN Git Service

staging:rtl8192u: Remove typedef and rename RX_TS_RECORD - Style
authorJohn Whitmore <johnfwhitmore@gmail.com>
Fri, 27 Jul 2018 17:31:13 +0000 (18:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 29 Jul 2018 08:15:52 +0000 (10:15 +0200)
Remove the typedef from structure RX_TS_RECORD, this change clears the
checkpatch issue with creation of new types.

Additionally the structure is renamed from RX_TS_RECORD to rx_ts_record.
Whilst this is not raised as a checkpatch error structures are meant to
be named in lower case.

These changes are 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/ieee80211.h
drivers/staging/rtl8192u/ieee80211/ieee80211_rx.c
drivers/staging/rtl8192u/ieee80211/rtl819x_BAProc.c
drivers/staging/rtl8192u/ieee80211/rtl819x_TS.h
drivers/staging/rtl8192u/ieee80211/rtl819x_TSProc.c

index aecb697..326a1e4 100644 (file)
@@ -1651,7 +1651,7 @@ struct ieee80211_device {
        struct list_head                Rx_TS_Admit_List;
        struct list_head                Rx_TS_Pending_List;
        struct list_head                Rx_TS_Unused_List;
-       RX_TS_RECORD            RxTsRecord[TOTAL_TS_NUM];
+       struct rx_ts_record             RxTsRecord[TOTAL_TS_NUM];
 //#ifdef TO_DO_LIST
        RX_REORDER_ENTRY        RxReorderEntry[128];
        struct list_head                RxReorder_Unused_List;
index a84de8c..037bd5d 100644 (file)
@@ -508,7 +508,7 @@ drop:
        return 1;
 }
 
-static bool AddReorderEntry(PRX_TS_RECORD pTS, PRX_REORDER_ENTRY pReorderEntry)
+static bool AddReorderEntry(struct rx_ts_record *pTS, PRX_REORDER_ENTRY pReorderEntry)
 {
        struct list_head *pList = &pTS->RxPendingPktList;
        while(pList->next != &pTS->RxPendingPktList)
@@ -586,7 +586,7 @@ void ieee80211_indicate_packets(struct ieee80211_device *ieee, struct ieee80211_
 
 static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
                                    struct ieee80211_rxb *prxb,
-                                   PRX_TS_RECORD pTS, u16 SeqNum)
+                                   struct rx_ts_record *pTS, u16 SeqNum)
 {
        PRT_HIGH_THROUGHPUT     pHTInfo = ieee->pHTInfo;
        PRX_REORDER_ENTRY       pReorderEntry = NULL;
@@ -898,7 +898,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
        //added by amy for reorder
        u8      TID = 0;
        u16     SeqNum = 0;
-       PRX_TS_RECORD pTS = NULL;
+       struct rx_ts_record *pTS = NULL;
        //bool bIsAggregateFrame = false;
        //added by amy for reorder
 #ifdef NOT_YET
@@ -1017,7 +1017,7 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb,
        }
        else
        {
-               PRX_TS_RECORD pRxTS = NULL;
+               struct rx_ts_record *pRxTS = NULL;
                        //IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): QOS ENABLE AND RECEIVE QOS DATA , we will get Ts, tid:%d\n",__func__, tid);
                if(GetTs(
                                ieee,
index 01bf9f3..c2a51a6 100644 (file)
@@ -64,11 +64,11 @@ static u8 TxTsDeleteBA(struct ieee80211_device *ieee, struct tx_ts_record *pTxTs
 /********************************************************************************************************************
  *function: deactivete BA entry in Tx Ts, and send DELBA.
  *   input:
- *          PRX_TS_RECORD              pRxTs //Rx Ts which is to deactivate BA entry.
+ *          struct rx_ts_record  *pRxTs //Rx Ts which is to deactivate BA entry.
  *  output:  none
- *  notice:  As PRX_TS_RECORD structure will be defined in QOS, so wait to be merged. //FIXME, same with above
+ *  notice:  As struct rx_ts_record * structure will be defined in QOS, so wait to be merged. //FIXME, same with above
  ********************************************************************************************************************/
-static u8 RxTsDeleteBA(struct ieee80211_device *ieee, PRX_TS_RECORD pRxTs)
+static u8 RxTsDeleteBA(struct ieee80211_device *ieee, struct rx_ts_record *pRxTs)
 {
        PBA_RECORD              pBa = &pRxTs->RxAdmittedBARecord;
        u8                      bSendDELBA = false;
@@ -325,7 +325,7 @@ int ieee80211_rx_ADDBAReq(struct ieee80211_device *ieee, struct sk_buff *skb)
        PBA_PARAM_SET   pBaParamSet = NULL;
        u16 *pBaTimeoutVal = NULL;
        PSEQUENCE_CONTROL pBaStartSeqCtrl = NULL;
-       PRX_TS_RECORD   pTS = NULL;
+       struct rx_ts_record  *pTS = NULL;
 
        if (skb->len < sizeof(struct rtl_80211_hdr_3addr) + 9) {
                IEEE80211_DEBUG(IEEE80211_DL_ERR,
@@ -566,7 +566,7 @@ int ieee80211_rx_DELBA(struct ieee80211_device *ieee, struct sk_buff *skb)
        pDelBaParamSet = (PDELBA_PARAM_SET)&delba->payload[2];
 
        if (pDelBaParamSet->field.Initiator == 1) {
-               PRX_TS_RECORD   pRxTs;
+               struct rx_ts_record *pRxTs;
 
                if (!GetTs(
                                ieee,
@@ -651,7 +651,7 @@ TsInitDelBA(struct ieee80211_device *ieee, struct ts_common_info *pTsCommonInfo,
                                TxRxSelect,
                                DELBA_REASON_END_BA);
        } else if (TxRxSelect == RX_DIR) {
-               PRX_TS_RECORD   pRxTs = (PRX_TS_RECORD)pTsCommonInfo;
+               struct rx_ts_record *pRxTs = (struct rx_ts_record *)pTsCommonInfo;
                if (RxTsDeleteBA(ieee, pRxTs))
                        ieee80211_send_DELBA(
                                ieee,
@@ -663,7 +663,7 @@ TsInitDelBA(struct ieee80211_device *ieee, struct ts_common_info *pTsCommonInfo,
 }
 /********************************************************************************************************************
  *function:  BA setup timer
- *   input:  unsigned long      data           //acturally we send struct tx_ts_record or RX_TS_RECORD to these timer
+ *   input:  unsigned long      data           //acturally we send struct tx_ts_record or struct rx_ts_record to these timer
  *  return:  NULL
  *  notice:
  ********************************************************************************************************************/
@@ -691,7 +691,7 @@ void TxBaInactTimeout(struct timer_list *t)
 
 void RxBaInactTimeout(struct timer_list *t)
 {
-       PRX_TS_RECORD   pRxTs = from_timer(pRxTs, t, RxAdmittedBARecord.Timer);
+       struct rx_ts_record *pRxTs = from_timer(pRxTs, t, RxAdmittedBARecord.Timer);
        struct ieee80211_device *ieee = container_of(pRxTs, struct ieee80211_device, RxTsRecord[pRxTs->num]);
 
        RxTsDeleteBA(ieee, pRxTs);
index b878ff5..53203e6 100644 (file)
@@ -39,7 +39,7 @@ struct tx_ts_record {
        u8                              num;
 };
 
-typedef struct _RX_TS_RECORD {
+struct rx_ts_record {
        struct ts_common_info           ts_common_info;
        u16                             RxIndicateSeq;
        u16                             RxTimeoutIndicateSeq;
@@ -50,7 +50,7 @@ typedef struct _RX_TS_RECORD {
        u8                              RxLastFragNum;
        u8                              num;
 /*     QOS_DL_RECORD           DLRecord; */
-} RX_TS_RECORD, *PRX_TS_RECORD;
+};
 
 
 #endif
index 399e97c..8728048 100644 (file)
@@ -19,13 +19,13 @@ static void TsInactTimeout(struct timer_list *unused)
 
 /********************************************************************************************************************
  *function:  I still not understand this function, so wait for further implementation
- *   input:  unsigned long      data           //acturally we send struct tx_ts_record or RX_TS_RECORD to these timer
+ *   input:  unsigned long      data           //acturally we send struct tx_ts_record or struct rx_ts_record to these timer
  *  return:  NULL
  *  notice:
  ********************************************************************************************************************/
 static void RxPktPendingTimeout(struct timer_list *t)
 {
-       PRX_TS_RECORD   pRxTs = from_timer(pRxTs, t, RxPktPendingTimer);
+       struct rx_ts_record     *pRxTs = from_timer(pRxTs, t, RxPktPendingTimer);
        struct ieee80211_device *ieee = container_of(pRxTs, struct ieee80211_device, RxTsRecord[pRxTs->num]);
 
        PRX_REORDER_ENTRY       pReorderEntry = NULL;
@@ -86,7 +86,7 @@ static void RxPktPendingTimeout(struct timer_list *t)
 
 /********************************************************************************************************************
  *function:  Add BA timer function
- *   input:  unsigned long      data           //acturally we send struct tx_ts_record or RX_TS_RECORD to these timer
+ *   input:  unsigned long      data           //acturally we send struct tx_ts_record or struct rx_ts_record to these timer
  *  return:  NULL
  *  notice:
  ********************************************************************************************************************/
@@ -121,7 +121,7 @@ static void ResetTxTsEntry(struct tx_ts_record *pTS)
        ResetBaEntry(&pTS->tx_pending_ba_record);
 }
 
-static void ResetRxTsEntry(PRX_TS_RECORD pTS)
+static void ResetRxTsEntry(struct rx_ts_record *pTS)
 {
        ResetTsCommonInfo(&pTS->ts_common_info);
        pTS->RxIndicateSeq = 0xffff; // This indicate the RxIndicateSeq is not used now!!
@@ -132,7 +132,7 @@ static void ResetRxTsEntry(PRX_TS_RECORD pTS)
 void TSInitialize(struct ieee80211_device *ieee)
 {
        struct tx_ts_record     *pTxTS  = ieee->TxTsRecord;
-       PRX_TS_RECORD           pRxTS  = ieee->RxTsRecord;
+       struct rx_ts_record     *pRxTS  = ieee->RxTsRecord;
        PRX_REORDER_ENTRY       pRxReorderEntry = ieee->RxReorderEntry;
        u8                              count = 0;
        IEEE80211_DEBUG(IEEE80211_DL_TS, "==========>%s()\n", __func__);
@@ -377,7 +377,7 @@ bool GetTs(
                                        struct tx_ts_record *tmp = container_of(*ppTS, struct tx_ts_record, ts_common_info);
                                        ResetTxTsEntry(tmp);
                                } else {
-                                       PRX_TS_RECORD tmp = container_of(*ppTS, RX_TS_RECORD, ts_common_info);
+                                       struct rx_ts_record *tmp = container_of(*ppTS, struct rx_ts_record, ts_common_info);
                                        ResetRxTsEntry(tmp);
                                }
 
@@ -419,7 +419,7 @@ static void RemoveTsEntry(struct ieee80211_device *ieee, struct ts_common_info *
        if(TxRxSelect == RX_DIR) {
 //#ifdef TO_DO_LIST
                PRX_REORDER_ENTRY       pRxReorderEntry;
-               PRX_TS_RECORD           pRxTS = (PRX_TS_RECORD)pTs;
+               struct rx_ts_record     *pRxTS = (struct rx_ts_record *)pTs;
                if(timer_pending(&pRxTS->RxPktPendingTimer))
                        del_timer_sync(&pRxTS->RxPktPendingTimer);