staging: rtl8192u: Remove typedef for struct _RX_REORDER_ENTRY
authorBhanusree Pola <bhanusreemahesh@gmail.com>
Mon, 11 Mar 2019 15:41:39 +0000 (21:11 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 18 Mar 2019 06:05:23 +0000 (07:05 +0100)
-Avoid typedefs for structure types to maintain kernel coding style.
-Remove typedefs RX_REORDER_ENTRY  and *PRX_REORDER_ENTRY  of struct _RX_REORDER_ENTRY .
-Change Structure name _RX_REORDER_ENTRY  to rx_reorder_entry to maintain Linux kernel Coding Style.
-Replace occurences of RX_REORDER_ENTRY  to struct rx_reorder_entry.
-Replace occurences of PRX_REORDER_ENTRY  to struct rx_reorder_entry *.

Signed-off-by: Bhanusree Pola <bhanusreemahesh@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_TSProc.c

index fc24df42ca8d19dc4d61fe5534b5ab0c4f4e755c..ad5a3ae148041b84b6a6831f0761a72336c563c5 100644 (file)
@@ -1474,11 +1474,11 @@ struct bandwidth_autoswitch {
 
 #define REORDER_WIN_SIZE       128
 #define REORDER_ENTRY_NUM      128
-typedef struct _RX_REORDER_ENTRY {
+struct rx_reorder_entry {
        struct list_head        List;
        u16                     SeqNum;
        struct ieee80211_rxb *prxb;
-} RX_REORDER_ENTRY, *PRX_REORDER_ENTRY;
+};
 //added by amy for order
 typedef enum _Fsync_State {
        Default_Fsync,
@@ -1654,7 +1654,7 @@ struct ieee80211_device {
        struct list_head                Rx_TS_Unused_List;
        struct rx_ts_record             RxTsRecord[TOTAL_TS_NUM];
 //#ifdef TO_DO_LIST
-       RX_REORDER_ENTRY        RxReorderEntry[128];
+       struct rx_reorder_entry RxReorderEntry[128];
        struct list_head                RxReorder_Unused_List;
 //#endif
        // Qos related. Added by Annie, 2005-11-01.
index 5147f7c01e316c2c0f4d4a3a65a1c63898966e92..c2483da9394ee678deb0e686e734b0f21b32844c 100644 (file)
@@ -508,16 +508,16 @@ drop:
        return 1;
 }
 
-static bool AddReorderEntry(struct rx_ts_record *pTS, PRX_REORDER_ENTRY pReorderEntry)
+static bool AddReorderEntry(struct rx_ts_record *pTS, struct rx_reorder_entry *pReorderEntry)
 {
        struct list_head *pList = &pTS->rx_pending_pkt_list;
        while(pList->next != &pTS->rx_pending_pkt_list)
        {
-               if( SN_LESS(pReorderEntry->SeqNum, ((PRX_REORDER_ENTRY)list_entry(pList->next,RX_REORDER_ENTRY,List))->SeqNum) )
+               if( SN_LESS(pReorderEntry->SeqNum, ((struct rx_reorder_entry *)list_entry(pList->next, struct rx_reorder_entry, List))->SeqNum) )
                {
                        pList = pList->next;
                }
-               else if( SN_EQUAL(pReorderEntry->SeqNum, ((PRX_REORDER_ENTRY)list_entry(pList->next,RX_REORDER_ENTRY,List))->SeqNum) )
+               else if( SN_EQUAL(pReorderEntry->SeqNum, ((struct rx_reorder_entry *)list_entry(pList->next, struct rx_reorder_entry, List))->SeqNum) )
                {
                        return false;
                }
@@ -589,7 +589,7 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
                                    struct rx_ts_record *pTS, u16 SeqNum)
 {
        PRT_HIGH_THROUGHPUT     pHTInfo = ieee->pHTInfo;
-       PRX_REORDER_ENTRY       pReorderEntry = NULL;
+       struct rx_reorder_entry *pReorderEntry = NULL;
        struct ieee80211_rxb **prxbIndicateArray;
        u8                      WinSize = pHTInfo->RxReorderWinSize;
        u16                     WinEnd = (pTS->rx_indicate_seq + WinSize - 1) % 4096;
@@ -663,7 +663,7 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
                /* Current packet is going to be inserted into pending list.*/
                //IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): We RX no ordered packed, insert to ordered list\n",__func__);
                if(!list_empty(&ieee->RxReorder_Unused_List)) {
-                       pReorderEntry = (PRX_REORDER_ENTRY)list_entry(ieee->RxReorder_Unused_List.next,RX_REORDER_ENTRY,List);
+                       pReorderEntry = (struct rx_reorder_entry *)list_entry(ieee->RxReorder_Unused_List.next, struct rx_reorder_entry, List);
                        list_del_init(&pReorderEntry->List);
 
                        /* Make a reorder entry and insert into a the packet list.*/
@@ -709,7 +709,7 @@ static void RxReorderIndicatePacket(struct ieee80211_device *ieee,
        /* Check if there is any packet need indicate.*/
        while(!list_empty(&pTS->rx_pending_pkt_list)) {
                IEEE80211_DEBUG(IEEE80211_DL_REORDER,"%s(): start RREORDER indicate\n",__func__);
-               pReorderEntry = (PRX_REORDER_ENTRY)list_entry(pTS->rx_pending_pkt_list.prev,RX_REORDER_ENTRY,List);
+               pReorderEntry = (struct rx_reorder_entry *)list_entry(pTS->rx_pending_pkt_list.prev, struct rx_reorder_entry, List);
                if (SN_LESS(pReorderEntry->SeqNum, pTS->rx_indicate_seq) ||
                    SN_EQUAL(pReorderEntry->SeqNum, pTS->rx_indicate_seq))
                {
index c76715ffa08bb76bf95de73f03ddddc32b170423..aefa37b285b35c597587cebaaa482555b41d1045 100644 (file)
@@ -28,7 +28,7 @@ static void RxPktPendingTimeout(struct timer_list *t)
        struct rx_ts_record     *pRxTs = from_timer(pRxTs, t, rx_pkt_pending_timer);
        struct ieee80211_device *ieee = container_of(pRxTs, struct ieee80211_device, RxTsRecord[pRxTs->num]);
 
-       PRX_REORDER_ENTRY       pReorderEntry = NULL;
+       struct rx_reorder_entry *pReorderEntry = NULL;
 
        //u32 flags = 0;
        unsigned long flags = 0;
@@ -40,7 +40,7 @@ static void RxPktPendingTimeout(struct timer_list *t)
        if(pRxTs->rx_timeout_indicate_seq != 0xffff) {
                // Indicate the pending packets sequentially according to SeqNum until meet the gap.
                while(!list_empty(&pRxTs->rx_pending_pkt_list)) {
-                       pReorderEntry = (PRX_REORDER_ENTRY)list_entry(pRxTs->rx_pending_pkt_list.prev, RX_REORDER_ENTRY, List);
+                       pReorderEntry = (struct rx_reorder_entry *)list_entry(pRxTs->rx_pending_pkt_list.prev, struct rx_reorder_entry, List);
                        if(index == 0)
                                pRxTs->rx_indicate_seq = pReorderEntry->SeqNum;
 
@@ -133,7 +133,7 @@ void TSInitialize(struct ieee80211_device *ieee)
 {
        struct tx_ts_record     *pTxTS  = ieee->TxTsRecord;
        struct rx_ts_record     *pRxTS  = ieee->RxTsRecord;
-       PRX_REORDER_ENTRY       pRxReorderEntry = ieee->RxReorderEntry;
+       struct rx_reorder_entry *pRxReorderEntry = ieee->RxReorderEntry;
        u8                              count = 0;
        IEEE80211_DEBUG(IEEE80211_DL_TS, "==========>%s()\n", __func__);
        // Initialize Tx TS related info.
@@ -418,7 +418,7 @@ static void RemoveTsEntry(struct ieee80211_device *ieee, struct ts_common_info *
 
        if(TxRxSelect == RX_DIR) {
 //#ifdef TO_DO_LIST
-               PRX_REORDER_ENTRY       pRxReorderEntry;
+               struct rx_reorder_entry *pRxReorderEntry;
                struct rx_ts_record     *pRxTS = (struct rx_ts_record *)pTs;
                if(timer_pending(&pRxTS->rx_pkt_pending_timer))
                        del_timer_sync(&pRxTS->rx_pkt_pending_timer);
@@ -426,7 +426,7 @@ static void RemoveTsEntry(struct ieee80211_device *ieee, struct ts_common_info *
                while(!list_empty(&pRxTS->rx_pending_pkt_list)) {
                        spin_lock_irqsave(&(ieee->reorder_spinlock), flags);
                        //pRxReorderEntry = list_entry(&pRxTS->rx_pending_pkt_list.prev,RX_REORDER_ENTRY,List);
-                       pRxReorderEntry = (PRX_REORDER_ENTRY)list_entry(pRxTS->rx_pending_pkt_list.prev, RX_REORDER_ENTRY, List);
+                       pRxReorderEntry = (struct rx_reorder_entry *)list_entry(pRxTS->rx_pending_pkt_list.prev, struct rx_reorder_entry, List);
                        list_del_init(&pRxReorderEntry->List);
                        {
                                int i = 0;