Remove typedef from struct.
Rename struct.
Rename uses.
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
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;
}
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;
}
-void rtl8192_tx_fill_desc(struct net_device* dev, struct tx_desc * pdesc, cb_desc * cb_desc, struct sk_buff* skb)
+void rtl8192_tx_fill_desc(struct net_device* dev, struct tx_desc * pdesc, 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);
}
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);
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;
#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);
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,
+void rtl8192_tx_fill_desc(struct net_device* dev, struct tx_desc * pdesc, 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);
void rtl8192_halt_adapter(struct net_device *dev, bool reset);
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;
firmware_init_param(dev);
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;
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;
{
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;
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;
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)
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)
{
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){
{
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){
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);
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);
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;
void (* init_before_adapter_start)(struct net_device* dev);
bool (* initialize_adapter)(struct net_device* dev);
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);
- void (* tx_fill_cmd_descriptor)(struct net_device* dev, struct tx_desc_cmd * entry, cb_desc * cb_desc, struct sk_buff *skb);
+ void (* tx_fill_descriptor)(struct net_device* dev, struct tx_desc *tx_desc, struct cb_desc *cb_desc, struct sk_buff *skb);
+ void (* tx_fill_cmd_descriptor)(struct net_device* dev, struct tx_desc_cmd * entry, struct cb_desc *cb_desc, struct sk_buff *skb);
bool (* rx_query_status_descriptor)(struct net_device* dev, struct rtllib_rx_stats* stats, struct rx_desc *pdesc, struct sk_buff* skb);
bool (* rx_command_packet_handler)(struct net_device *dev, struct sk_buff* skb, struct rx_desc *pdesc);
void (* stop_adapter)(struct net_device *dev, bool reset);
/* 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;
u8 bBTTxPacket;
u8 bIsBTProbRsp;
-}cb_desc, *pcb_desc;
+};//, *pcb_desc;
/*--------------------------Define -------------------------------------------*/
#define MGN_1M 0x02
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)
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) {
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;
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];
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;
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];
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)
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)
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 */
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);
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);
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++;
}
}
#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_hi_throughput *pHTInfo = ieee->pHTInfo;
struct tx_ts_record *pTxTs = NULL;
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)
}
extern void
-rtllib_query_HTCapShortGI(struct rtllib_device *ieee, cb_desc *tcb_desc)
+rtllib_query_HTCapShortGI(struct rtllib_device *ieee, struct cb_desc *tcb_desc)
{
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
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_hi_throughput *pHTInfo = ieee->pHTInfo;
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;
}
-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;
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;
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);
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;