u8 *stage, u8 *step, u32 *delay)
{
struct r8192_priv *priv = rtllib_priv(dev);
- struct sw_chnl_cmd PreCommonCmd[MAX_PRECMD_CNT];
+ struct rtllib_device *ieee = priv->rtllib;
u32 PreCommonCmdCnt;
- struct sw_chnl_cmd PostCommonCmd[MAX_POSTCMD_CNT];
u32 PostCommonCmdCnt;
- struct sw_chnl_cmd RfDependCmd[MAX_RFDEPENDCMD_CNT];
u32 RfDependCmdCnt;
struct sw_chnl_cmd *CurrentCmd = NULL;
u8 eRFPath;
{
PreCommonCmdCnt = 0;
- rtl8192_phy_SetSwChnlCmdArray(PreCommonCmd, PreCommonCmdCnt++,
+ rtl8192_phy_SetSwChnlCmdArray(ieee->PreCommonCmd,
+ PreCommonCmdCnt++,
MAX_PRECMD_CNT, CmdID_SetTxPowerLevel,
0, 0, 0);
- rtl8192_phy_SetSwChnlCmdArray(PreCommonCmd, PreCommonCmdCnt++,
+ rtl8192_phy_SetSwChnlCmdArray(ieee->PreCommonCmd,
+ PreCommonCmdCnt++,
MAX_PRECMD_CNT, CmdID_End, 0, 0, 0);
PostCommonCmdCnt = 0;
- rtl8192_phy_SetSwChnlCmdArray(PostCommonCmd, PostCommonCmdCnt++,
+ rtl8192_phy_SetSwChnlCmdArray(ieee->PostCommonCmd,
+ PostCommonCmdCnt++,
MAX_POSTCMD_CNT, CmdID_End, 0, 0, 0);
RfDependCmdCnt = 0;
"8225: %d\n", channel);
return false;
}
- rtl8192_phy_SetSwChnlCmdArray(RfDependCmd,
+ rtl8192_phy_SetSwChnlCmdArray(ieee->RfDependCmd,
RfDependCmdCnt++, MAX_RFDEPENDCMD_CNT,
CmdID_RF_WriteReg, rZebra1_Channel,
RF_CHANNEL_TABLE_ZEBRA[channel], 10);
- rtl8192_phy_SetSwChnlCmdArray(RfDependCmd,
+ rtl8192_phy_SetSwChnlCmdArray(ieee->RfDependCmd,
RfDependCmdCnt++, MAX_RFDEPENDCMD_CNT,
CmdID_End, 0, 0, 0);
break;
" 8256: %d\n", channel);
return false;
}
- rtl8192_phy_SetSwChnlCmdArray(RfDependCmd,
+ rtl8192_phy_SetSwChnlCmdArray(ieee->RfDependCmd,
RfDependCmdCnt++, MAX_RFDEPENDCMD_CNT,
CmdID_RF_WriteReg, rZebra1_Channel, channel,
10);
- rtl8192_phy_SetSwChnlCmdArray(RfDependCmd,
+ rtl8192_phy_SetSwChnlCmdArray(ieee->RfDependCmd,
+
RfDependCmdCnt++,
MAX_RFDEPENDCMD_CNT,
CmdID_End, 0, 0, 0);
do {
switch (*stage) {
case 0:
- CurrentCmd = &PreCommonCmd[*step];
+ CurrentCmd = &ieee->PreCommonCmd[*step];
break;
case 1:
- CurrentCmd = &RfDependCmd[*step];
+ CurrentCmd = &ieee->RfDependCmd[*step];
break;
case 2:
- CurrentCmd = &PostCommonCmd[*step];
+ CurrentCmd = &ieee->PostCommonCmd[*step];
break;
}
#define MAX_DOZE_WAITING_TIMES_9x 64
-#define MAX_PRECMD_CNT 16
-#define MAX_RFDEPENDCMD_CNT 16
-#define MAX_POSTCMD_CNT 16
-
#define AGCTAB_ArrayLength AGCTAB_ArrayLengthPciE
#define MACPHY_ArrayLength MACPHY_ArrayLengthPciE
#define RadioA_ArrayLength RadioA_ArrayLengthPciE
#define Rtl819XPHY_REGArray Rtl8192PciEPHY_REGArray
#define Rtl819XPHY_REG_1T2RArray Rtl8192PciEPHY_REG_1T2RArray
-
-
-enum sw_chnl_cmd_id {
- CmdID_End,
- CmdID_SetTxPowerLevel,
- CmdID_BBRegWrite10,
- CmdID_WritePortUlong,
- CmdID_WritePortUshort,
- CmdID_WritePortUchar,
- CmdID_RF_WriteReg,
-};
-
-/*--------------------------------Define structure----------------------------*/
-struct sw_chnl_cmd {
- enum sw_chnl_cmd_id CmdID;
- u32 Para1;
- u32 Para2;
- u32 msDelay;
-} __packed;
-
extern u32 rtl819XMACPHY_Array_PG[];
extern u32 rtl819XPHY_REG_1T2RArray[];
extern u32 rtl819XAGCTAB_Array[];
struct rx_reorder_entry *pReorderEntry = NULL;
unsigned long flags = 0;
- struct rtllib_rxb *stats_IndicateArray[REORDER_WIN_SIZE];
u8 index = 0;
bool bPktInBuf = false;
RTLLIB_DEBUG(RTLLIB_DL_REORDER, "%s(): Indicate"
" SeqNum: %d\n", __func__,
pReorderEntry->SeqNum);
- stats_IndicateArray[index] =
+ ieee->stats_IndicateArray[index] =
pReorderEntry->prxb;
index++;
flags);
return;
}
- rtllib_indicate_packets(ieee, stats_IndicateArray, index);
+ rtllib_indicate_packets(ieee, ieee->stats_IndicateArray, index);
bPktInBuf = false;
}
#include <linux/netdevice.h>
#include <linux/if_arp.h> /* ARPHRD_ETHER */
+#define MAX_PRECMD_CNT 16
+#define MAX_RFDEPENDCMD_CNT 16
+#define MAX_POSTCMD_CNT 16
+
#ifndef WIRELESS_SPY
#define WIRELESS_SPY
#endif
u8 bIsBTProbRsp;
};
+enum sw_chnl_cmd_id {
+ CmdID_End,
+ CmdID_SetTxPowerLevel,
+ CmdID_BBRegWrite10,
+ CmdID_WritePortUlong,
+ CmdID_WritePortUshort,
+ CmdID_WritePortUchar,
+ CmdID_RF_WriteReg,
+};
+
+struct sw_chnl_cmd {
+ enum sw_chnl_cmd_id CmdID;
+ u32 Para1;
+ u32 Para2;
+ u32 msDelay;
+} __packed;
+
/*--------------------------Define -------------------------------------------*/
#define MGN_1M 0x02
#define MGN_2M 0x04
struct work_struct wx_sync_scan_wq;
struct workqueue_struct *wq;
+ union {
+ struct rtllib_rxb *RfdArray[REORDER_WIN_SIZE];
+ struct rtllib_rxb *stats_IndicateArray[REORDER_WIN_SIZE];
+ struct rtllib_rxb *prxbIndicateArray[REORDER_WIN_SIZE];
+ struct {
+ struct sw_chnl_cmd PreCommonCmd[MAX_PRECMD_CNT];
+ struct sw_chnl_cmd PostCommonCmd[MAX_POSTCMD_CNT];
+ struct sw_chnl_cmd RfDependCmd[MAX_RFDEPENDCMD_CNT];
+ };
+ };
/* Callback functions */
void (*set_security)(struct net_device *dev,
void rtllib_FlushRxTsPendingPkts(struct rtllib_device *ieee, struct rx_ts_record *pTS)
{
struct rx_reorder_entry *pRxReorderEntry;
- struct rtllib_rxb *RfdArray[REORDER_WIN_SIZE];
u8 RfdCnt = 0;
del_timer_sync(&pTS->RxPktPendingTimer);
RTLLIB_DEBUG(RTLLIB_DL_REORDER, "%s(): Indicate SeqNum %d!\n", __func__, pRxReorderEntry->SeqNum);
list_del_init(&pRxReorderEntry->List);
- RfdArray[RfdCnt] = pRxReorderEntry->prxb;
+ ieee->RfdArray[RfdCnt] = pRxReorderEntry->prxb;
RfdCnt = RfdCnt + 1;
list_add_tail(&pRxReorderEntry->List, &ieee->RxReorder_Unused_List);
}
- rtllib_indicate_packets(ieee, RfdArray, RfdCnt);
+ rtllib_indicate_packets(ieee, ieee->RfdArray, RfdCnt);
pTS->RxIndicateSeq = 0xffff;
}
{
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
struct rx_reorder_entry *pReorderEntry = NULL;
- struct rtllib_rxb *prxbIndicateArray[REORDER_WIN_SIZE];
u8 WinSize = pHTInfo->RxReorderWinSize;
u16 WinEnd = 0;
u8 index = 0;
RTLLIB_DEBUG(RTLLIB_DL_REORDER, "Packets indication!! "
"IndicateSeq: %d, NewSeq: %d\n",
pTS->RxIndicateSeq, SeqNum);
- prxbIndicateArray[0] = prxb;
+ ieee->prxbIndicateArray[0] = prxb;
index = 1;
} else {
/* Current packet is going to be inserted into pending list.*/
if (SN_EQUAL(pReorderEntry->SeqNum, pTS->RxIndicateSeq))
pTS->RxIndicateSeq = (pTS->RxIndicateSeq + 1) % 4096;
- prxbIndicateArray[index] = pReorderEntry->prxb;
+ ieee->prxbIndicateArray[index] = pReorderEntry->prxb;
RTLLIB_DEBUG(RTLLIB_DL_REORDER, "%s(): Indicate SeqNum"
" %d!\n", __func__, pReorderEntry->SeqNum);
index++;
flags);
return;
}
- rtllib_indicate_packets(ieee, prxbIndicateArray, index);
+ rtllib_indicate_packets(ieee, ieee->prxbIndicateArray, index);
bPktInBuf = false;
}