Signed-off-by: Larry Finger <Larry.Finger@xxxxxxxxxxxx> --- drivers/staging/rtl8192e/r8192E_cmdpkt.c | 4 +- drivers/staging/rtl8192e/r8192E_dev.c | 8 +- drivers/staging/rtl8192e/r8192E_dev.h | 6 +- drivers/staging/rtl8192e/r8192E_firmware.c | 10 ++-- drivers/staging/rtl8192e/r8192E_phy.c | 3 +- drivers/staging/rtl8192e/rtl819x_TSProc.c | 14 +++-- drivers/staging/rtl8192e/rtl_core.c | 38 ++++++---- drivers/staging/rtl8192e/rtl_core.h | 7 +- drivers/staging/rtl8192e/rtl_dm.c | 9 ++- drivers/staging/rtl8192e/rtl_ps.c | 15 +++-- drivers/staging/rtl8192e/rtl_wx.c | 12 ++- drivers/staging/rtl8192e/rtllib.h | 93 +++++++++++++------------- drivers/staging/rtl8192e/rtllib_crypt_ccmp.c | 6 +- drivers/staging/rtl8192e/rtllib_crypt_tkip.c | 6 +- drivers/staging/rtl8192e/rtllib_crypt_wep.c | 6 +- drivers/staging/rtl8192e/rtllib_module.c | 2 +- drivers/staging/rtl8192e/rtllib_rx.c | 37 ++++++---- drivers/staging/rtl8192e/rtllib_softmac.c | 15 +++-- drivers/staging/rtl8192e/rtllib_tx.c | 28 +++++--- 19 files changed, 185 insertions(+), 134 deletions(-) diff --git a/drivers/staging/rtl8192e/r8192E_cmdpkt.c b/drivers/staging/rtl8192e/r8192E_cmdpkt.c index 4d006ad..4f4de6a 100644 --- a/drivers/staging/rtl8192e/r8192E_cmdpkt.c +++ b/drivers/staging/rtl8192e/r8192E_cmdpkt.c @@ -48,7 +48,7 @@ struct rt_firmware *pfirmware = priv->pFirmware; struct sk_buff *skb; unsigned char *seg_ptr; - cb_desc *tcb_desc; + struct cb_desc *tcb_desc; u8 bLastIniPkt; struct TX_FWINFO_8190PCI *pTxFwInfo = NULL; @@ -75,7 +75,7 @@ } memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev)); - tcb_desc = (cb_desc*)(skb->cb + MAX_DEV_ADDR_SIZE); + tcb_desc = (struct cb_desc*)(skb->cb + MAX_DEV_ADDR_SIZE); tcb_desc->queue_index = TXCMD_QUEUE; tcb_desc->bCmdOrInit = DESC_PACKET_TYPE_NORMAL; tcb_desc->bLastIniPkt = bLastIniPkt; diff --git a/drivers/staging/rtl8192e/r8192E_dev.c b/drivers/staging/rtl8192e/r8192E_dev.c index bc8ca2a..d0bba38 100644 --- a/drivers/staging/rtl8192e/r8192E_dev.c +++ b/drivers/staging/rtl8192e/r8192E_dev.c @@ -1157,7 +1157,7 @@ u8 rtl8192_MapHwQueueToFirmwareQueue(u8 QueueID, u8 priority) void rtl8192_tx_fill_desc(struct net_device *dev, struct tx_desc *pdesc, - cb_desc *cb_desc, struct sk_buff *skb) + struct cb_desc *cb_desc, struct sk_buff *skb) { struct r8192_priv *priv = rtllib_priv(dev); dma_addr_t mapping = pci_map_single(priv->pdev, skb->data, skb->len, PCI_DMA_TODEVICE); @@ -1258,9 +1258,9 @@ void rtl8192_tx_fill_desc(struct net_device *dev, struct tx_desc *pdesc, pdesc->TxBuffAddr = cpu_to_le32(mapping); } -void rtl8192_tx_fill_cmd_desc(struct net_device* dev, +void rtl8192_tx_fill_cmd_desc(struct net_device *dev, struct tx_desc_cmd *entry, - cb_desc * cb_desc, struct sk_buff* skb) + struct cb_desc *cb_desc, struct sk_buff *skb) { struct r8192_priv *priv = rtllib_priv(dev); dma_addr_t mapping = pci_map_single(priv->pdev, skb->data, skb->len, PCI_DMA_TODEVICE); @@ -2269,7 +2269,7 @@ bool rtl8192_GetHalfNmodeSupportByAPs(struct net_device* dev) return Reval; } -u8 rtl8192_QueryIsShort(u8 TxHT, u8 TxRate, cb_desc *tcb_desc) +u8 rtl8192_QueryIsShort(u8 TxHT, u8 TxRate, struct cb_desc *tcb_desc) { u8 tmp_Short; diff --git a/drivers/staging/rtl8192e/r8192E_dev.h b/drivers/staging/rtl8192e/r8192E_dev.h index bb64efc..783b247 100644 --- a/drivers/staging/rtl8192e/r8192E_dev.h +++ b/drivers/staging/rtl8192e/r8192E_dev.h @@ -27,7 +27,7 @@ #include "r8190P_def.h" -u8 rtl8192_QueryIsShort(u8 TxHT, u8 TxRate, cb_desc *tcb_desc); +u8 rtl8192_QueryIsShort(u8 TxHT, u8 TxRate, struct cb_desc *tcb_desc); bool rtl8192_GetHalfNmodeSupportByAPs(struct net_device* dev); bool rtl8192_GetNmodeSupportBySecCfg(struct net_device *dev); bool rtl8192_HalTxCheckStuck(struct net_device *dev); @@ -46,10 +46,10 @@ bool rtl8192_adapter_start(struct net_device *dev); void rtl8192_link_change(struct net_device *dev); void rtl8192_AllowAllDestAddr(struct net_device* dev, bool bAllowAllDA, bool WriteIntoReg); void rtl8192_tx_fill_desc(struct net_device *dev, struct tx_desc *pdesc, - cb_desc * cb_desc, struct sk_buff* skb); + struct cb_desc * cb_desc, struct sk_buff* skb); void rtl8192_tx_fill_cmd_desc(struct net_device* dev, struct tx_desc_cmd *entry, - cb_desc * cb_desc, struct sk_buff* skb); + struct cb_desc * cb_desc, struct sk_buff* skb); bool rtl8192_rx_query_status_desc(struct net_device *dev, struct rtllib_rx_stats *stats, struct rx_desc *pdesc, struct sk_buff* skb); diff --git a/drivers/staging/rtl8192e/r8192E_firmware.c b/drivers/staging/rtl8192e/r8192E_firmware.c index ce0c2a6..19192cb 100644 --- a/drivers/staging/rtl8192e/r8192E_firmware.c +++ b/drivers/staging/rtl8192e/r8192E_firmware.c @@ -41,8 +41,8 @@ bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buff struct rt_firmware *pfirmware = priv->pFirmware; struct sk_buff *skb; - unsigned char *seg_ptr; - cb_desc *tcb_desc; + unsigned char *seg_ptr; + struct cb_desc *tcb_desc; u8 bLastIniPkt; firmware_init_param(dev); @@ -60,7 +60,7 @@ bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buff skb = dev_alloc_skb(frag_length + 4); memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev)); - tcb_desc = (cb_desc*)(skb->cb + MAX_DEV_ADDR_SIZE); + tcb_desc = (struct cb_desc*)(skb->cb + MAX_DEV_ADDR_SIZE); tcb_desc->queue_index = TXCMD_QUEUE; tcb_desc->bCmdOrInit = DESC_PACKET_TYPE_INIT; tcb_desc->bLastIniPkt = bLastIniPkt; @@ -103,14 +103,14 @@ fwSendNullPacket( bool rtStatus = true; struct r8192_priv *priv = rtllib_priv(dev); struct sk_buff *skb; - cb_desc *tcb_desc; + struct cb_desc *tcb_desc; unsigned char *ptr_buf; bool bLastInitPacket = false; skb = dev_alloc_skb(Length+ 4); memcpy((unsigned char *)(skb->cb),&dev,sizeof(dev)); - tcb_desc = (cb_desc*)(skb->cb + MAX_DEV_ADDR_SIZE); + tcb_desc = (struct cb_desc*)(skb->cb + MAX_DEV_ADDR_SIZE); tcb_desc->queue_index = TXCMD_QUEUE; tcb_desc->bCmdOrInit = DESC_PACKET_TYPE_INIT; tcb_desc->bLastIniPkt = bLastInitPacket; diff --git a/drivers/staging/rtl8192e/r8192E_phy.c b/drivers/staging/rtl8192e/r8192E_phy.c index ed72fd6..e6101db 100644 --- a/drivers/staging/rtl8192e/r8192E_phy.c +++ b/drivers/staging/rtl8192e/r8192E_phy.c @@ -1394,7 +1394,8 @@ bool SetRFPowerState8190(struct net_device *dev, enum RT_RF_POWER_STATE eRFPowerState) { struct r8192_priv *priv = rtllib_priv(dev); - PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); + struct RT_POWER_SAVE_CONTROL *pPSC = (struct RT_POWER_SAVE_CONTROL *) + (&(priv->rtllib->PowerSaveControl)); bool bResult = true; u8 i = 0, QueueID = 0; struct rtl8192_tx_ring *ring = NULL; diff --git a/drivers/staging/rtl8192e/rtl819x_TSProc.c b/drivers/staging/rtl8192e/rtl819x_TSProc.c index e7db0be..6b25085 100644 --- a/drivers/staging/rtl8192e/rtl819x_TSProc.c +++ b/drivers/staging/rtl8192e/rtl819x_TSProc.c @@ -34,7 +34,7 @@ void RxPktPendingTimeout(unsigned long data) PRX_TS_RECORD pRxTs = (PRX_TS_RECORD)data; struct rtllib_device *ieee = container_of(pRxTs, struct rtllib_device, RxTsRecord[pRxTs->num]); - PRX_REORDER_ENTRY pReorderEntry = NULL; + struct RX_REORDER_ENTRY *pReorderEntry = NULL; unsigned long flags = 0; struct rtllib_rxb *stats_IndicateArray[REORDER_WIN_SIZE]; @@ -46,7 +46,9 @@ void RxPktPendingTimeout(unsigned long data) { while(!list_empty(&pRxTs->RxPendingPktList)) { - pReorderEntry = (PRX_REORDER_ENTRY)list_entry(pRxTs->RxPendingPktList.prev,RX_REORDER_ENTRY,List); + pReorderEntry = (struct RX_REORDER_ENTRY *) + list_entry(pRxTs->RxPendingPktList.prev, + struct RX_REORDER_ENTRY, List); if (index == 0) pRxTs->RxIndicateSeq = pReorderEntry->SeqNum; @@ -135,7 +137,7 @@ void TSInitialize(struct rtllib_device *ieee) { PTX_TS_RECORD pTxTS = ieee->TxTsRecord; PRX_TS_RECORD pRxTS = ieee->RxTsRecord; - PRX_REORDER_ENTRY pRxReorderEntry = ieee->RxReorderEntry; + struct RX_REORDER_ENTRY *pRxReorderEntry = ieee->RxReorderEntry; u8 count = 0; RTLLIB_DEBUG(RTLLIB_DL_TS, "==========>%s()\n", __func__); INIT_LIST_HEAD(&ieee->Tx_TS_Admit_List); @@ -440,14 +442,16 @@ void RemoveTsEntry(struct rtllib_device *ieee, PTS_COMMON_INFO pTs, if (TxRxSelect == RX_DIR) { - PRX_REORDER_ENTRY pRxReorderEntry; + struct RX_REORDER_ENTRY *pRxReorderEntry; PRX_TS_RECORD pRxTS = (PRX_TS_RECORD)pTs; if (timer_pending(&pRxTS->RxPktPendingTimer)) del_timer_sync(&pRxTS->RxPktPendingTimer); while(!list_empty(&pRxTS->RxPendingPktList)){ - pRxReorderEntry = (PRX_REORDER_ENTRY)list_entry(pRxTS->RxPendingPktList.prev,RX_REORDER_ENTRY,List); + pRxReorderEntry = (struct RX_REORDER_ENTRY *)list_entry + (pRxTS->RxPendingPktList.prev, + struct RX_REORDER_ENTRY, List); RTLLIB_DEBUG(RTLLIB_DL_REORDER,"%s(): Delete SeqNum %d!\n",__func__, pRxReorderEntry->SeqNum); list_del_init(&pRxReorderEntry->List); { diff --git a/drivers/staging/rtl8192e/rtl_core.c b/drivers/staging/rtl8192e/rtl_core.c index 28a3ca9..b82bb44 100644 --- a/drivers/staging/rtl8192e/rtl_core.c +++ b/drivers/staging/rtl8192e/rtl_core.c @@ -798,7 +798,7 @@ void rtl8192_prepare_beacon(struct r8192_priv *priv) { struct net_device *dev = priv->rtllib->dev; struct sk_buff *pskb = NULL, *pnewskb = NULL; - cb_desc *tcb_desc = NULL; + struct cb_desc *tcb_desc = NULL; struct rtl8192_tx_ring *ring = NULL; struct tx_desc *pdesc = NULL; @@ -811,7 +811,7 @@ void rtl8192_prepare_beacon(struct r8192_priv *priv) if (!pnewskb) return; - tcb_desc = (cb_desc *)(pnewskb->cb + 8); + tcb_desc = (struct cb_desc *)(pnewskb->cb + 8); tcb_desc->queue_index = BEACON_QUEUE; tcb_desc->data_rate = 2; tcb_desc->RATRIndex = 7; @@ -1003,7 +1003,8 @@ void rtl8192_SetWirelessMode(struct net_device* dev, u8 wireless_mode) int _rtl8192_sta_up(struct net_device *dev,bool is_silent_reset) { struct r8192_priv *priv = rtllib_priv(dev); - PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); + struct RT_POWER_SAVE_CONTROL *pPSC = (struct RT_POWER_SAVE_CONTROL *) + (&(priv->rtllib->PowerSaveControl)); bool init_status = true; priv->bDriverIsGoingToUnload = false; priv->bdisable_nic = false; @@ -1071,7 +1072,7 @@ int rtl8192_sta_down(struct net_device *dev, bool shutdownrf) kfree(priv->rtllib->wpa_ie); priv->rtllib->wpa_ie = NULL; CamResetAllEntry(dev); - memset(priv->rtllib->swcamtable,0,sizeof(SW_CAM_TABLE)*32); + memset(priv->rtllib->swcamtable, 0, sizeof(struct SW_CAM_TABLE) * 32); rtl8192_irq_disable(dev); del_timer_sync(&priv->watch_dog_timer); @@ -1153,7 +1154,8 @@ static void rtl8192_init_priv_handler(struct net_device* dev) static void rtl8192_init_priv_constant(struct net_device* dev) { struct r8192_priv *priv = rtllib_priv(dev); - PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); + struct RT_POWER_SAVE_CONTROL *pPSC = (struct RT_POWER_SAVE_CONTROL *) + (&(priv->rtllib->PowerSaveControl)); pPSC->RegMaxLPSAwakeIntvl = 5; @@ -1224,7 +1226,7 @@ static void rtl8192_init_priv_variable(struct net_device* dev) priv->bForcedSilentReset = 0; priv->bDisableNormalResetCheck = false; priv->force_reset = false; - memset(priv->rtllib->swcamtable,0,sizeof(SW_CAM_TABLE)*32); + memset(priv->rtllib->swcamtable, 0, sizeof(struct SW_CAM_TABLE) * 32); memset(&priv->InterruptLog,0,sizeof(struct LOG_INTERRUPT_8190)); priv->RxCounter = 0; @@ -1424,7 +1426,7 @@ enum RESET_TYPE rtl819x_TxCheckStuck(struct net_device *dev) bool bCheckFwTxCnt = false; struct rtl8192_tx_ring *ring = NULL; struct sk_buff* skb = NULL; - cb_desc * tcb_desc = NULL; + struct cb_desc * tcb_desc = NULL; unsigned long flags = 0; switch (priv->rtllib->ps) @@ -1455,7 +1457,8 @@ enum RESET_TYPE rtl819x_TxCheckStuck(struct net_device *dev) else { skb = (&ring->queue)->next; - tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); + tcb_desc = (struct cb_desc *)(skb->cb + + MAX_DEV_ADDR_SIZE); tcb_desc->nStuckCount++; bCheckFwTxCnt = true; if (tcb_desc->nStuckCount > 1) @@ -1679,7 +1682,8 @@ void rtl819x_watchdog_wqcallback(void *data) enum RESET_TYPE ResetType = RESET_TYPE_NORESET; static u8 check_reset_cnt = 0; unsigned long flags; - PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); + struct RT_POWER_SAVE_CONTROL *pPSC = (struct RT_POWER_SAVE_CONTROL *) + (&(priv->rtllib->PowerSaveControl)); bool bBusyTraffic = false; bool bHigherBusyTraffic = false; bool bHigherBusyRxTraffic = false; @@ -1909,7 +1913,8 @@ void rtl8192_hard_data_xmit(struct sk_buff *skb, struct net_device *dev, int rat { struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); int ret; - cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); + struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + + MAX_DEV_ADDR_SIZE); u8 queue_index = tcb_desc->queue_index; if ((priv->rtllib->eRFPowerState == eRfOff) || IS_NIC_DOWN(priv) || priv->bResetInProgress){ @@ -1940,7 +1945,8 @@ int rtl8192_hard_start_xmit(struct sk_buff *skb,struct net_device *dev) { struct r8192_priv *priv = (struct r8192_priv *)rtllib_priv(dev); int ret; - cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); + struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + + MAX_DEV_ADDR_SIZE); u8 queue_index = tcb_desc->queue_index; if (queue_index != TXCMD_QUEUE){ @@ -2007,7 +2013,7 @@ void rtl8192_tx_cmd(struct net_device *dev, struct sk_buff *skb) struct rtl8192_tx_ring *ring; struct tx_desc_cmd *entry; unsigned int idx; - cb_desc *tcb_desc; + struct cb_desc *tcb_desc; unsigned long flags; spin_lock_irqsave(&priv->irq_th_lock,flags); @@ -2016,7 +2022,7 @@ void rtl8192_tx_cmd(struct net_device *dev, struct sk_buff *skb) idx = (ring->idx + skb_queue_len(&ring->queue)) % ring->entries; entry = (struct tx_desc_cmd *) &ring->desc[idx]; - tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); + tcb_desc = (struct cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); priv->ops->tx_fill_cmd_descriptor(dev, entry, tcb_desc, skb); @@ -2031,7 +2037,8 @@ short rtl8192_tx(struct net_device *dev, struct sk_buff* skb) struct r8192_priv *priv = rtllib_priv(dev); struct rtl8192_tx_ring *ring; unsigned long flags; - cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); + struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + + MAX_DEV_ADDR_SIZE); struct tx_desc *pdesc = NULL; struct rtllib_hdr_1addr * header = NULL; u16 fc=0, type=0,stype=0; @@ -3138,7 +3145,8 @@ bool NicIFEnableNIC(struct net_device* dev) { bool init_status = true; struct r8192_priv* priv = rtllib_priv(dev); - PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); + struct RT_POWER_SAVE_CONTROL *pPSC = (struct RT_POWER_SAVE_CONTROL *) + (&(priv->rtllib->PowerSaveControl)); if (IS_NIC_DOWN(priv)){ RT_TRACE(COMP_ERR, "ERR!!! %s(): Driver is already down!\n",__func__); diff --git a/drivers/staging/rtl8192e/rtl_core.h b/drivers/staging/rtl8192e/rtl_core.h index 8a0a674..0451190 100644 --- a/drivers/staging/rtl8192e/rtl_core.h +++ b/drivers/staging/rtl8192e/rtl_core.h @@ -532,10 +532,11 @@ struct rtl819x_ops{ void (*link_change)(struct net_device* dev); void (*tx_fill_descriptor)(struct net_device *dev, struct tx_desc *tx_desc, - cb_desc * cb_desc, struct sk_buff *skb); + struct cb_desc * cb_desc, + struct sk_buff *skb); void (* tx_fill_cmd_descriptor)(struct net_device* dev, struct tx_desc_cmd *entry, - cb_desc * cb_desc, + struct cb_desc * cb_desc, struct sk_buff *skb); bool (*rx_query_status_descriptor)(struct net_device *dev, struct rtllib_rx_stats *stats, @@ -602,7 +603,7 @@ typedef struct r8192_priv enum IC_INFERIORITY_8192S IC_Class; enum HT_CHANNEL_WIDTH CurrentChannelBW; struct BB_REGISTER_DEFINITION PHYRegDef[4]; - rate_adaptive rate_adaptive; + struct rate_adaptive rate_adaptive; ccktxbbgain_struct cck_txbbgain_table[CCKTxBBGainTableLength]; ccktxbbgain_struct cck_txbbgain_ch14_table[CCKTxBBGainTableLength]; diff --git a/drivers/staging/rtl8192e/rtl_dm.c b/drivers/staging/rtl8192e/rtl_dm.c index d551fd3..d8a1397 100644 --- a/drivers/staging/rtl8192e/rtl_dm.c +++ b/drivers/staging/rtl8192e/rtl_dm.c @@ -251,7 +251,8 @@ extern void init_rate_adaptive(struct net_device * dev) { struct r8192_priv *priv = rtllib_priv(dev); - prate_adaptive pra = (prate_adaptive)&priv->rate_adaptive; + struct rate_adaptive *pra = (struct rate_adaptive *) + &priv->rate_adaptive; pra->ratr_state = DM_RATR_STA_MAX; pra->high2low_rssi_thresh_for_ra = RateAdaptiveTH_High; @@ -295,7 +296,8 @@ static void dm_check_rate_adaptive(struct net_device * dev) { struct r8192_priv *priv = rtllib_priv(dev); struct RT_HIGH_THROUGHPUT *pHTInfo = priv->rtllib->pHTInfo; - prate_adaptive pra = (prate_adaptive)&priv->rate_adaptive; + struct rate_adaptive *pra = (struct rate_adaptive *) + &priv->rate_adaptive; u32 currentRATR, targetRATR = 0; u32 LowRSSIThreshForRA = 0, HighRSSIThreshForRA = 0; bool bshort_gi_enabled = false; @@ -1801,7 +1803,8 @@ dm_change_rxpath_selection_setting( s32 DM_Value) { struct r8192_priv *priv = rtllib_priv(dev); - prate_adaptive pRA = (prate_adaptive)&(priv->rate_adaptive); + struct rate_adaptive *pRA = (struct rate_adaptive *) + &(priv->rate_adaptive); if (DM_Type == 0) diff --git a/drivers/staging/rtl8192e/rtl_ps.c b/drivers/staging/rtl8192e/rtl_ps.c index bc6d8c1..83aec3c 100644 --- a/drivers/staging/rtl8192e/rtl_ps.c +++ b/drivers/staging/rtl8192e/rtl_ps.c @@ -116,7 +116,8 @@ void rtl8192_hw_to_sleep(struct net_device *dev, u32 th, u32 tl) void InactivePsWorkItemCallback(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); - PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); + struct RT_POWER_SAVE_CONTROL *pPSC = (struct RT_POWER_SAVE_CONTROL *) + (&(priv->rtllib->PowerSaveControl)); RT_TRACE(COMP_PS, "InactivePsWorkItemCallback() ---------> \n"); pPSC->bSwRfProcessing = true; @@ -133,7 +134,8 @@ void IPSEnter(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); - PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); + struct RT_POWER_SAVE_CONTROL *pPSC = (struct RT_POWER_SAVE_CONTROL *) + (&(priv->rtllib->PowerSaveControl)); enum RT_RF_POWER_STATE rtState; if (pPSC->bInactivePs) @@ -156,7 +158,8 @@ void IPSLeave(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); - PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); + struct RT_POWER_SAVE_CONTROL *pPSC = (struct RT_POWER_SAVE_CONTROL *) + (&(priv->rtllib->PowerSaveControl)); enum RT_RF_POWER_STATE rtState; if (pPSC->bInactivePs) @@ -240,7 +243,8 @@ bool MgntActSet_802_11_PowerSaveMode(struct net_device *dev, u8 rtPsMode) void LeisurePSEnter(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); - PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); + struct RT_POWER_SAVE_CONTROL *pPSC = (struct RT_POWER_SAVE_CONTROL *) + (&(priv->rtllib->PowerSaveControl)); RT_TRACE(COMP_PS, "LeisurePSEnter()...\n"); RT_TRACE(COMP_PS, "pPSC->bLeisurePs = %d, ieee->ps = %d,pPSC->LpsIdleCount is %d,RT_CHECK_FOR_HANG_PERIOD is %d\n", @@ -272,7 +276,8 @@ void LeisurePSEnter(struct net_device *dev) void LeisurePSLeave(struct net_device *dev) { struct r8192_priv *priv = rtllib_priv(dev); - PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); + struct RT_POWER_SAVE_CONTROL *pPSC = (struct RT_POWER_SAVE_CONTROL *) + (&(priv->rtllib->PowerSaveControl)); RT_TRACE(COMP_PS, "LeisurePSLeave()...\n"); diff --git a/drivers/staging/rtl8192e/rtl_wx.c b/drivers/staging/rtl8192e/rtl_wx.c index 84789aa..1bc980d 100644 --- a/drivers/staging/rtl8192e/rtl_wx.c +++ b/drivers/staging/rtl8192e/rtl_wx.c @@ -218,7 +218,8 @@ static int r8192_wx_adapter_power_status(struct net_device *dev, union iwreq_data *wrqu, char *extra) { struct r8192_priv *priv = rtllib_priv(dev); - PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); + struct RT_POWER_SAVE_CONTROL *pPSC = (struct RT_POWER_SAVE_CONTROL *) + (&(priv->rtllib->PowerSaveControl)); struct rtllib_device* ieee = priv->rtllib; down(&priv->wx_sem); @@ -266,7 +267,8 @@ static int r8192se_wx_set_lps_awake_interval(struct net_device *dev, union iwreq_data *wrqu, char *extra) { struct r8192_priv *priv = rtllib_priv(dev); - PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(priv->rtllib->PowerSaveControl)); + struct RT_POWER_SAVE_CONTROL *pPSC = (struct RT_POWER_SAVE_CONTROL *) + (&(priv->rtllib->PowerSaveControl)); down(&priv->wx_sem); @@ -764,7 +766,8 @@ static int r8192_wx_set_enc(struct net_device *dev, if (wrqu->encoding.flags & IW_ENCODE_DISABLED) { ieee->pairwise_key_type = ieee->group_key_type = KEY_TYPE_NA; CamResetAllEntry(dev); - memset(priv->rtllib->swcamtable,0,sizeof(SW_CAM_TABLE)*32); + memset(priv->rtllib->swcamtable, 0, + sizeof(struct SW_CAM_TABLE) * 32); goto end_hw_sec; } if (wrqu->encoding.length!=0){ @@ -989,7 +992,8 @@ static int r8192_wx_set_enc_ext(struct net_device *dev, { ieee->pairwise_key_type = ieee->group_key_type = KEY_TYPE_NA; CamResetAllEntry(dev); - memset(priv->rtllib->swcamtable,0,sizeof(SW_CAM_TABLE)*32); + memset(priv->rtllib->swcamtable, 0, + sizeof(struct SW_CAM_TABLE) * 32); goto end_hw_sec; } alg = (ext->alg == IW_ENCODE_ALG_CCMP)?KEY_TYPE_CCMP:ext->alg; diff --git a/drivers/staging/rtl8192e/rtllib.h b/drivers/staging/rtl8192e/rtllib.h index ee03bd8..4737b2d 100644 --- a/drivers/staging/rtl8192e/rtllib.h +++ b/drivers/staging/rtl8192e/rtllib.h @@ -78,11 +78,12 @@ #define EXPORT_SYMBOL_RSL(x) EXPORT_SYMBOL(x) - typedef struct delayed_work delayed_work_struct_rsl; + #define delayed_work_struct_rsl struct delayed_work + #define queue_delayed_work_rsl(x,y,z) queue_delayed_work(x,y,z) #define INIT_DELAYED_WORK_RSL(x,y,z) INIT_DELAYED_WORK(x,y) - typedef struct work_struct work_struct_rsl; + #define work_struct_rsl struct work_struct #define queue_work_rsl(x,y) queue_work(x,y) #define INIT_WORK_RSL(x,y,z) INIT_WORK(x,y) @@ -146,7 +147,7 @@ static inline void *netdev_priv_rsl(struct net_device *dev) /* defined for skb cb field */ /* At most 28 byte */ -typedef struct cb_desc { +struct cb_desc { /* Tx Desc Related flags (8-9) */ u8 bLastIniPkt:1; u8 bCmdOrInit:1; @@ -201,7 +202,7 @@ typedef struct cb_desc { u8 bBTTxPacket; u8 bIsBTProbRsp; -}cb_desc, *pcb_desc; +}; /*--------------------------Define -------------------------------------------*/ #define MGN_1M 0x02 @@ -455,7 +456,7 @@ enum RT_OP_MODE { #define RT_ASSERT_RET(_Exp) do {} while(0) #define RT_ASSERT_RET_VALUE(_Exp,Ret) do {} while(0) -typedef struct ieee_param { +struct ieee_param { u32 cmd; u8 sta_addr[ETH_ALEN]; union { @@ -482,7 +483,7 @@ typedef struct ieee_param { u8 key[0]; } crypt; } u; -}ieee_param; +}; #if WIRELESS_EXT < 17 @@ -1773,29 +1774,27 @@ enum rtllib_state { #ifndef eqMacAddr #define eqMacAddr(a,b) ( ((a)[0]==(b)[0] && (a)[1]==(b)[1] && (a)[2]==(b)[2] && (a)[3]==(b)[3] && (a)[4]==(b)[4] && (a)[5]==(b)[5]) ? 1:0 ) #endif -typedef struct tx_pending_t{ + +struct tx_pending_t { int frag; struct rtllib_txb *txb; -}tx_pending_t; +}; -typedef struct _bandwidth_autoswitch -{ +struct bandwidth_autoswitch { long threshold_20Mhzto40Mhz; long threshold_40Mhzto20Mhz; bool bforced_tx20Mhz; bool bautoswitch_enable; -}bandwidth_autoswitch,*pbandwidth_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 rtllib_rxb* prxb; -} RX_REORDER_ENTRY, *PRX_REORDER_ENTRY; +}; enum Fsync_State { Default_Fsync, @@ -1823,9 +1822,10 @@ enum RT_JOIN_ACTION { RT_NO_ACTION = 4, }; -typedef struct _IbssParms{ +struct IbssParms { u16 atimWin; -}IbssParms, *PIbssParms; +}; + #define MAX_NUM_RATES 264 enum RT_RF_POWER_STATE { @@ -1834,7 +1834,7 @@ enum RT_RF_POWER_STATE { eRfOff }; -#define MAX_SUPPORT_WOL_PATTERN_NUM 8 +#define MAX_SUPPORT_WOL_NUM 8 #define MAX_WOL_BIT_MASK_SIZE 16 #define MAX_WOL_PATTERN_SIZE 128 @@ -1847,17 +1847,15 @@ enum WOLPATTERN_TYPE { eNoDefined, }; -typedef struct _RT_PM_WOL_PATTERN_INFO -{ +struct RT_PM_WOL_PATTERN_INFO { u32 PatternId; u32 Mask[4]; u16 CrcRemainder; u8 WFMIndex; enum WOLPATTERN_TYPE PatternType; -}RT_PM_WOL_PATTERN_INFO, *PRT_PM_WOL_PATTERN_INFO; +}; -typedef struct _RT_POWER_SAVE_CONTROL -{ +struct RT_POWER_SAVE_CONTROL { bool bInactivePs; bool bIPSModeBackup; @@ -1888,7 +1886,7 @@ typedef struct _RT_POWER_SAVE_CONTROL OCTET_STRING tmpSuppRateSet; u8 tmpSuppRateBuf[MAX_NUM_RATES]; bool bTmpSuppRate; - IbssParms tmpIbpm; + struct IbssParms tmpIbpm; bool bTmpIbpm; bool bLeisurePs; @@ -1912,11 +1910,11 @@ typedef struct _RT_POWER_SAVE_CONTROL u8 RegAMDPciASPM; u8 oWLANMode; - RT_PM_WOL_PATTERN_INFO PmWoLPatternInfo[MAX_SUPPORT_WOL_PATTERN_NUM]; + struct RT_PM_WOL_PATTERN_INFO PmWoLPatternInfo[MAX_SUPPORT_WOL_NUM]; -}RT_POWER_SAVE_CONTROL,*PRT_POWER_SAVE_CONTROL; +}; -typedef u32 RT_RF_CHANGE_SOURCE; +#define RT_RF_CHANGE_SOURCE u32 #define RF_CHANGE_BY_SW BIT31 #define RF_CHANGE_BY_HW BIT30 #define RF_CHANGE_BY_PS BIT29 @@ -1981,7 +1979,7 @@ enum FW_CMD_IO_TYPE { }; #define RT_MAX_LD_SLOT_NUM 10 -typedef struct _RT_LINK_DETECT_T{ +struct RT_LINK_DETECT_T { u32 NumRecvBcnInPeriod; u32 NumRecvDataInPeriod; @@ -2001,9 +1999,9 @@ typedef struct _RT_LINK_DETECT_T{ u32 NumTxUnicastOkInPeriod; u32 LastNumTxUnicast; u32 LastNumRxUnicast; -}RT_LINK_DETECT_T, *PRT_LINK_DETECT_T; +}; -typedef struct _SW_CAM_TABLE{ +struct SW_CAM_TABLE { u8 macaddr[6]; bool bused; @@ -2012,10 +2010,11 @@ typedef struct _SW_CAM_TABLE{ u8 useDK; u8 key_index; -}SW_CAM_TABLE,*PSW_CAM_TABLE; +}; + #define TOTAL_CAM_ENTRY 32 -typedef struct _rate_adaptive -{ + +struct rate_adaptive { u8 rate_adaptive_disabled; u8 ratr_state; u16 reserve; @@ -2037,7 +2036,7 @@ typedef struct _rate_adaptive u32 last_ratr; u8 PreRATRState; -} rate_adaptive, *prate_adaptive; +}; enum RATR_TABLE_MODE_8192S { RATR_INX_WIRELESS_NGB = 0, @@ -2052,20 +2051,20 @@ enum RATR_TABLE_MODE_8192S { }; #define NUM_PMKID_CACHE 16 -typedef struct _RT_PMKID_LIST -{ + +struct RT_PMKID_LIST { u8 bUsed; u8 Bssid[6]; u8 PMKID[16]; u8 SsidBuf[33]; u8* ssid_octet; u16 ssid_length; -} RT_PMKID_LIST, *PRT_PMKID_LIST; +}; -typedef struct _RT_INTEL_PROMISCUOUS_MODE_INFO { +struct RT_INTEL_PROMISCUOUS_MODE_INFO { bool bPromiscuousOn; bool bFilterSourceStationFrame; -} RT_INTEL_PROMISCUOUS_MODE_INFO, *PRT_INTEL_PROMISCUOUS_MODE_INFO; +}; /*************** DRIVER STATUS *****/ @@ -2161,7 +2160,7 @@ struct rtllib_device { struct list_head Rx_TS_Pending_List; struct list_head Rx_TS_Unused_List; RX_TS_RECORD RxTsRecord[TOTAL_TS_NUM]; - RX_REORDER_ENTRY RxReorderEntry[128]; + struct RX_REORDER_ENTRY RxReorderEntry[128]; struct list_head RxReorder_Unused_List; u8 ForcedPriority; @@ -2180,7 +2179,7 @@ struct rtllib_device { int iw_mode; /* operating mode (IW_MODE_*) */ bool bNetPromiscuousMode; - RT_INTEL_PROMISCUOUS_MODE_INFO IntelPromiscuousModeInfo; + struct RT_INTEL_PROMISCUOUS_MODE_INFO IntelPromiscuousModeInfo; struct iw_spy_data spy_data; @@ -2230,14 +2229,14 @@ struct rtllib_device { struct rtllib_crypt_data *crypt[WEP_KEYS]; int tx_keyidx; /* default TX key index (crypt[tx_keyidx]) */ - SW_CAM_TABLE swcamtable[TOTAL_CAM_ENTRY]; + struct SW_CAM_TABLE swcamtable[TOTAL_CAM_ENTRY]; struct timer_list crypt_deinit_timer; int crypt_quiesced; int bcrx_sta_key; /* use individual keys to override default keys even * with RX of broad/multicast frames */ - RT_PMKID_LIST PMKIDList[NUM_PMKID_CACHE]; + struct RT_PMKID_LIST PMKIDList[NUM_PMKID_CACHE]; /* Fragmentation structures */ struct rtllib_frag_entry frag_cache[17][RTLLIB_FRAG_CACHE_LEN]; @@ -2383,12 +2382,12 @@ struct rtllib_device { u32 fsync_seconddiff_ratethreshold; enum Fsync_State fsync_state; bool bis_any_nonbepkts; - bandwidth_autoswitch bandwidth_auto_switch; + struct bandwidth_autoswitch bandwidth_auto_switch; bool FwRWRF; - RT_LINK_DETECT_T LinkDetectInfo; + struct RT_LINK_DETECT_T LinkDetectInfo; bool bIsAggregateFrame; - RT_POWER_SAVE_CONTROL PowerSaveControl; + struct RT_POWER_SAVE_CONTROL PowerSaveControl; u8 amsdu_in_process; /* used if IEEE_SOFTMAC_TX_QUEUE is set */ diff --git a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c index ef17c99..c7c6a59 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c +++ b/drivers/staging/rtl8192e/rtllib_crypt_ccmp.c @@ -192,7 +192,8 @@ static int rtllib_ccmp_encrypt(struct sk_buff *skb, int hdr_len, void *priv) int data_len, i; u8 *pos; struct rtllib_hdr_4addr *hdr; - cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); + struct cb_desc *tcb_desc = (struct cb_desc *) + (skb->cb + MAX_DEV_ADDR_SIZE); if (skb_headroom(skb) < CCMP_HDR_LEN || skb_tailroom(skb) < CCMP_MIC_LEN || skb->len < hdr_len) @@ -262,7 +263,8 @@ static int rtllib_ccmp_decrypt(struct sk_buff *skb, int hdr_len, void *priv) struct rtllib_ccmp_data *key = priv; u8 keyidx, *pos; struct rtllib_hdr_4addr *hdr; - cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); + struct cb_desc *tcb_desc = (struct cb_desc *) + (skb->cb + MAX_DEV_ADDR_SIZE); u8 pn[6]; if (skb->len < hdr_len + CCMP_HDR_LEN + CCMP_MIC_LEN) { diff --git a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c index 8918aa5..0969bb6 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt_tkip.c +++ b/drivers/staging/rtl8192e/rtllib_crypt_tkip.c @@ -303,7 +303,8 @@ static int rtllib_tkip_encrypt(struct sk_buff *skb, int hdr_len, void *priv) int len; u8 *pos; struct rtllib_hdr_4addr *hdr; - cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); + struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + + MAX_DEV_ADDR_SIZE); struct blkcipher_desc desc = {.tfm = tkey->tx_tfm_arc4}; int ret = 0; u8 rc4key[16], *icv; @@ -384,7 +385,8 @@ static int rtllib_tkip_decrypt(struct sk_buff *skb, int hdr_len, void *priv) u32 iv32; u16 iv16; struct rtllib_hdr_4addr *hdr; - cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); + struct cb_desc *tcb_desc = (struct cb_desc *) + (skb->cb + MAX_DEV_ADDR_SIZE); struct blkcipher_desc desc = {.tfm = tkey->rx_tfm_arc4}; u8 rc4key[16]; u8 icv[4]; diff --git a/drivers/staging/rtl8192e/rtllib_crypt_wep.c b/drivers/staging/rtl8192e/rtllib_crypt_wep.c index 201e2ec..780e0ee4 100644 --- a/drivers/staging/rtl8192e/rtllib_crypt_wep.c +++ b/drivers/staging/rtl8192e/rtllib_crypt_wep.c @@ -101,7 +101,8 @@ static int prism2_wep_encrypt(struct sk_buff *skb, int hdr_len, void *priv) u32 klen, len; u8 key[WEP_KEY_LEN + 3]; u8 *pos; - cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); + struct cb_desc *tcb_desc = (struct cb_desc *) + (skb->cb + MAX_DEV_ADDR_SIZE); struct blkcipher_desc desc = {.tfm = wep->tx_tfm}; u32 crc; u8 *icv; @@ -170,7 +171,8 @@ static int prism2_wep_decrypt(struct sk_buff *skb, int hdr_len, void *priv) u32 klen, plen; u8 key[WEP_KEY_LEN + 3]; u8 keyidx, *pos; - cb_desc *tcb_desc = (cb_desc *)(skb->cb + MAX_DEV_ADDR_SIZE); + struct cb_desc *tcb_desc = (struct cb_desc *) + (skb->cb + MAX_DEV_ADDR_SIZE); struct blkcipher_desc desc = {.tfm = wep->rx_tfm}; u32 crc; u8 icv[4]; diff --git a/drivers/staging/rtl8192e/rtllib_module.c b/drivers/staging/rtl8192e/rtllib_module.c index edba7567..f492ab4 100644 --- a/drivers/staging/rtl8192e/rtllib_module.c +++ b/drivers/staging/rtl8192e/rtllib_module.c @@ -159,7 +159,7 @@ struct net_device *alloc_rtllib(int sizeof_priv) ieee->raw_tx = 0; ieee->hwsec_active = 0; - memset(ieee->swcamtable,0,sizeof(SW_CAM_TABLE)*32); + memset(ieee->swcamtable, 0, sizeof(struct SW_CAM_TABLE) * 32); rtllib_softmac_init(ieee); ieee->pHTInfo = kzalloc(sizeof(struct RT_HIGH_THROUGHPUT), GFP_KERNEL); diff --git a/drivers/staging/rtl8192e/rtllib_rx.c b/drivers/staging/rtl8192e/rtllib_rx.c index a14b604..4de0784 100644 --- a/drivers/staging/rtl8192e/rtllib_rx.c +++ b/drivers/staging/rtl8192e/rtllib_rx.c @@ -291,7 +291,8 @@ rtllib_rx_frame_decrypt(struct rtllib_device* ieee, struct sk_buff *skb, if (ieee->hwsec_active) { - cb_desc *tcb_desc = (cb_desc *)(skb->cb+ MAX_DEV_ADDR_SIZE); + struct cb_desc *tcb_desc = (struct cb_desc *) + (skb->cb+ MAX_DEV_ADDR_SIZE); tcb_desc->bHwSec = 1; if (ieee->need_sw_enc) @@ -332,7 +333,8 @@ rtllib_rx_frame_decrypt_msdu(struct rtllib_device* ieee, struct sk_buff *skb, return 0; if (ieee->hwsec_active) { - cb_desc *tcb_desc = (cb_desc *)(skb->cb+ MAX_DEV_ADDR_SIZE); + struct cb_desc *tcb_desc = (struct cb_desc *) + (skb->cb+ MAX_DEV_ADDR_SIZE); tcb_desc->bHwSec = 1; if (ieee->need_sw_enc) @@ -445,21 +447,22 @@ drop: return 1; } -bool -AddReorderEntry( - PRX_TS_RECORD pTS, - PRX_REORDER_ENTRY pReorderEntry - ) + +bool AddReorderEntry(PRX_TS_RECORD pTS, + struct RX_REORDER_ENTRY *pReorderEntry) { struct list_head *pList = &pTS->RxPendingPktList; while(pList->next != &pTS->RxPendingPktList) { - 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; } @@ -529,7 +532,7 @@ void rtllib_indicate_packets(struct rtllib_device *ieee, struct rtllib_rxb** prx void rtllib_FlushRxTsPendingPkts(struct rtllib_device *ieee, PRX_TS_RECORD pTS) { - PRX_REORDER_ENTRY pRxReorderEntry; + struct RX_REORDER_ENTRY *pRxReorderEntry; struct rtllib_rxb* RfdArray[REORDER_WIN_SIZE]; u8 RfdCnt = 0; @@ -542,7 +545,9 @@ rtllib_FlushRxTsPendingPkts(struct rtllib_device *ieee, PRX_TS_RECORD pTS) break; } - pRxReorderEntry = (PRX_REORDER_ENTRY)list_entry(pTS->RxPendingPktList.prev,RX_REORDER_ENTRY,List); + pRxReorderEntry = (struct RX_REORDER_ENTRY *)list_entry + (pTS->RxPendingPktList.prev, + struct RX_REORDER_ENTRY, List); RTLLIB_DEBUG(RTLLIB_DL_REORDER,"%s(): Indicate SeqNum %d!\n",__func__, pRxReorderEntry->SeqNum); list_del_init(&pRxReorderEntry->List); @@ -563,7 +568,7 @@ void RxReorderIndicatePacket( struct rtllib_device *ieee, u16 SeqNum) { struct RT_HIGH_THROUGHPUT *pHTInfo = ieee->pHTInfo; - PRX_REORDER_ENTRY pReorderEntry = NULL; + struct RX_REORDER_ENTRY *pReorderEntry = NULL; struct rtllib_rxb* prxbIndicateArray[REORDER_WIN_SIZE]; u8 WinSize = pHTInfo->RxReorderWinSize; u16 WinEnd = 0; @@ -633,7 +638,9 @@ void RxReorderIndicatePacket( struct rtllib_device *ieee, } else { /* Current packet is going to be inserted into pending list.*/ 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.*/ @@ -679,7 +686,9 @@ void RxReorderIndicatePacket( struct rtllib_device *ieee, while(!list_empty(&pTS->RxPendingPktList)) { RTLLIB_DEBUG(RTLLIB_DL_REORDER,"%s(): start RREORDER indicate\n",__func__); - pReorderEntry = (PRX_REORDER_ENTRY)list_entry(pTS->RxPendingPktList.prev,RX_REORDER_ENTRY,List); + pReorderEntry = (struct RX_REORDER_ENTRY *) + list_entry(pTS->RxPendingPktList.prev, + struct RX_REORDER_ENTRY, List); if ( SN_LESS(pReorderEntry->SeqNum, pTS->RxIndicateSeq) || SN_EQUAL(pReorderEntry->SeqNum, pTS->RxIndicateSeq)) { diff --git a/drivers/staging/rtl8192e/rtllib_softmac.c b/drivers/staging/rtl8192e/rtllib_softmac.c index db59316..eb5e068 100644 --- a/drivers/staging/rtl8192e/rtllib_softmac.c +++ b/drivers/staging/rtl8192e/rtllib_softmac.c @@ -242,7 +242,7 @@ inline void softmac_mgmt_xmit(struct sk_buff *skb, struct rtllib_device *ieee) struct rtllib_hdr_3addr *header= (struct rtllib_hdr_3addr *) skb->data; - cb_desc *tcb_desc = (cb_desc *)(skb->cb + 8); + struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + 8); spin_lock_irqsave(&ieee->lock, flags); /* called with 2nd param 0, no mgmt lock required */ @@ -311,7 +311,7 @@ inline void softmac_ps_mgmt_xmit(struct sk_buff *skb, struct rtllib_hdr_3addr *header = (struct rtllib_hdr_3addr *) skb->data; u16 fc,type,stype; - cb_desc *tcb_desc = (cb_desc *)(skb->cb + 8); + struct cb_desc *tcb_desc = (struct cb_desc *)(skb->cb + 8); fc = header->frame_ctl; type = WLAN_FC_GET_TYPE(fc); @@ -1577,7 +1577,8 @@ void rtllib_associate_step2(struct rtllib_device *ieee) void rtllib_associate_complete_wq(void *data) { struct rtllib_device *ieee = (struct rtllib_device *)container_of_work_rsl(data, struct rtllib_device, associate_complete_wq); - PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(ieee->PowerSaveControl)); + struct RT_POWER_SAVE_CONTROL *pPSC = (struct RT_POWER_SAVE_CONTROL *) + (&(ieee->PowerSaveControl)); printk(KERN_INFO "Associated successfully\n"); if (ieee->is_silent_reset == 0){ printk("normal associate\n"); @@ -2041,7 +2042,8 @@ short rtllib_sta_ps_sleep(struct rtllib_device *ieee, u32 *time_h, u32 *time_l) { int timeout = ieee->ps_timeout; u8 dtim; - PRT_POWER_SAVE_CONTROL pPSC = (PRT_POWER_SAVE_CONTROL)(&(ieee->PowerSaveControl)); + struct RT_POWER_SAVE_CONTROL *pPSC = (struct RT_POWER_SAVE_CONTROL *) + (&(ieee->PowerSaveControl)); /*if (ieee->ps == RTLLIB_PS_DISABLED || ieee->iw_mode != IW_MODE_INFRA || ieee->state != RTLLIB_LINKED) @@ -2552,7 +2554,7 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee) unsigned int queue_index = txb->queue_index; unsigned long flags; int i; - cb_desc *tcb_desc = NULL; + struct cb_desc *tcb_desc = NULL; unsigned long queue_len = 0; spin_lock_irqsave(&ieee->lock,flags); @@ -2561,7 +2563,8 @@ void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee) rtllib_sta_wakeup(ieee,0); /* update the tx status */ - tcb_desc = (cb_desc *)(txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE); + tcb_desc = (struct cb_desc *)(txb->fragments[0]->cb + + MAX_DEV_ADDR_SIZE); if (tcb_desc->bMulticast) { ieee->stats.multicast++; } diff --git a/drivers/staging/rtl8192e/rtllib_tx.c b/drivers/staging/rtl8192e/rtllib_tx.c index 82ca245..2caf156 100644 --- a/drivers/staging/rtl8192e/rtllib_tx.c +++ b/drivers/staging/rtl8192e/rtllib_tx.c @@ -287,7 +287,8 @@ rtllib_classify(struct sk_buff *skb, u8 bIsAmsdu) } #define SN_LESS(a, b) (((a-b)&0x800)!=0) -void rtllib_tx_query_agg_cap(struct rtllib_device* ieee, struct sk_buff* skb, cb_desc* tcb_desc) +void rtllib_tx_query_agg_cap(struct rtllib_device *ieee, + struct sk_buff *skb, struct cb_desc *tcb_desc) { struct RT_HIGH_THROUGHPUT *pHTInfo = ieee->pHTInfo; PTX_TS_RECORD pTxTs = NULL; @@ -358,7 +359,8 @@ FORCED_AGG_SETTING: return; } -extern void rtllib_qurey_ShortPreambleMode(struct rtllib_device* ieee, cb_desc* tcb_desc) +extern void rtllib_qurey_ShortPreambleMode(struct rtllib_device *ieee, + struct cb_desc *tcb_desc) { tcb_desc->bUseShortPreamble = false; if (tcb_desc->data_rate == 2) @@ -372,8 +374,8 @@ extern void rtllib_qurey_ShortPreambleMode(struct rtllib_device* ieee, cb_desc* return; } -extern void -rtllib_query_HTCapShortGI(struct rtllib_device *ieee, cb_desc *tcb_desc) +extern void rtllib_query_HTCapShortGI(struct rtllib_device *ieee, + struct cb_desc *tcb_desc) { struct RT_HIGH_THROUGHPUT *pHTInfo = ieee->pHTInfo; @@ -394,7 +396,8 @@ rtllib_query_HTCapShortGI(struct rtllib_device *ieee, cb_desc *tcb_desc) tcb_desc->bUseShortGI = true; } -void rtllib_query_BandwidthMode(struct rtllib_device* ieee, cb_desc *tcb_desc) +void rtllib_query_BandwidthMode(struct rtllib_device *ieee, + struct cb_desc *tcb_desc) { struct RT_HIGH_THROUGHPUT *pHTInfo = ieee->pHTInfo; @@ -413,7 +416,8 @@ void rtllib_query_BandwidthMode(struct rtllib_device* ieee, cb_desc *tcb_desc) return; } -void rtllib_query_protectionmode(struct rtllib_device* ieee, cb_desc* tcb_desc, struct sk_buff* skb) +void rtllib_query_protectionmode(struct rtllib_device *ieee, + struct cb_desc *tcb_desc, struct sk_buff *skb) { tcb_desc->bRTSSTBC = false; tcb_desc->bRTSUseShortGI = false; @@ -513,7 +517,8 @@ NO_PROTECTION: } -void rtllib_txrate_selectmode(struct rtllib_device* ieee, cb_desc* tcb_desc) +void rtllib_txrate_selectmode(struct rtllib_device *ieee, + struct cb_desc *tcb_desc) { if (ieee->bTxDisableRateFallBack) tcb_desc->bTxDisableRateFallBack = true; @@ -586,7 +591,7 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) u8 dest[ETH_ALEN], src[ETH_ALEN]; int qos_actived = ieee->current_network.qos_data.active; struct rtllib_crypt_data* crypt = NULL; - cb_desc *tcb_desc; + struct cb_desc *tcb_desc; u8 bIsMulticast = false; u8 IsAmsdu = false; @@ -778,7 +783,8 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) for (i = 0; i < nr_frags; i++) { skb_frag = txb->fragments[i]; - tcb_desc = (cb_desc *)(skb_frag->cb + MAX_DEV_ADDR_SIZE); + tcb_desc = (struct cb_desc *)(skb_frag->cb + + MAX_DEV_ADDR_SIZE); if (qos_actived){ skb_frag->priority = skb->priority; tcb_desc->queue_index = UP2AC(skb->priority); @@ -873,7 +879,9 @@ int rtllib_xmit_inter(struct sk_buff *skb, struct net_device *dev) success: if (txb) { - cb_desc *tcb_desc = (cb_desc *)(txb->fragments[0]->cb + MAX_DEV_ADDR_SIZE); + struct cb_desc *tcb_desc = (struct cb_desc *) + (txb->fragments[0]->cb + + MAX_DEV_ADDR_SIZE); tcb_desc->bTxEnableFwCalcDur = 1; tcb_desc->priority = skb->priority; -- 1.7.3.4 _______________________________________________ devel mailing list devel@xxxxxxxxxxxxxxxxxxxxxx http://driverdev.linuxdriverproject.org/mailman/listinfo/devel