- * You should have received a copy of the GNU General Public License along with
- * this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
- *
- *
-static u8 SNAP_ETH_TYPE_IPX[2] = {0x81, 0x37};
-
-static u8 SNAP_ETH_TYPE_APPLETALK_AARP[2] = {0x80, 0xf3};
-static u8 SNAP_ETH_TYPE_APPLETALK_DDP[2] = {0x80, 0x9b};
-static u8 SNAP_ETH_TYPE_TDLS[2] = {0x89, 0x0d};
-static u8 SNAP_HDR_APPLETALK_DDP[3] = {0x08, 0x00, 0x07}; // Datagram Delivery Protocol
-
-static u8 oui_8021h[] = {0x00, 0x00, 0xf8};
-static u8 oui_rfc1042[]= {0x00,0x00,0x00};
-
-static u8 rtw_rfc1042_header[] =
-{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0x00 };
-/* Bridge-Tunnel header (for EtherTypes ETH_P_AARP and ETH_P_IPX) */
-static u8 rtw_bridge_tunnel_header[] =
-{ 0xaa, 0xaa, 0x03, 0x00, 0x00, 0xf8 };
+extern u8 rtw_rfc1042_header[];
+extern u8 rtw_bridge_tunnel_header[];
- unsigned short tid0_rxseq;
- unsigned short tid1_rxseq;
- unsigned short tid2_rxseq;
- unsigned short tid3_rxseq;
- unsigned short tid4_rxseq;
- unsigned short tid5_rxseq;
- unsigned short tid6_rxseq;
- unsigned short tid7_rxseq;
- unsigned short tid8_rxseq;
- unsigned short tid9_rxseq;
- unsigned short tid10_rxseq;
- unsigned short tid11_rxseq;
- unsigned short tid12_rxseq;
- unsigned short tid13_rxseq;
- unsigned short tid14_rxseq;
- unsigned short tid15_rxseq;
+ unsigned short tid0_rxseq;
+ unsigned short tid1_rxseq;
+ unsigned short tid2_rxseq;
+ unsigned short tid3_rxseq;
+ unsigned short tid4_rxseq;
+ unsigned short tid5_rxseq;
+ unsigned short tid6_rxseq;
+ unsigned short tid7_rxseq;
+ unsigned short tid8_rxseq;
+ unsigned short tid9_rxseq;
+ unsigned short tid10_rxseq;
+ unsigned short tid11_rxseq;
+ unsigned short tid12_rxseq;
+ unsigned short tid13_rxseq;
+ unsigned short tid14_rxseq;
+ unsigned short tid15_rxseq;
- u32 elements[100]; //array to store values
- u32 index; //index to current array to store
- u32 total_num; //num of valid elements
- u32 total_val; //sum of valid elements
+ u32 elements[100]; /* array to store values */
+ u32 index; /* index to current array to store */
+ u32 total_num; /* num of valid elements */
+ u32 total_val; /* sum of valid elements */
- u8 update_req; //used to indicate
- u8 avg_val; //avg of valid elements
- u32 total_num; //num of valid elements
- u32 total_val; //sum of valid elements
+ u8 update_req; /* used to indicate */
+ u8 avg_val; /* avg of valid elements */
+ u32 total_num; /* num of valid elements */
+ u32 total_val; /* sum of valid elements */
-/*
-typedef struct _ODM_Phy_Status_Info_
-{
- //
- // Be care, if you want to add any element please insert between
- // RxPWDBAll & SignalStrength.
- //
- u1Byte RxPWDBAll;
-
- u1Byte SignalQuality; // in 0-100 index.
- s8 RxMIMOSignalQuality[4]; //per-path's EVM
- u1Byte RxMIMOEVMdbm[4]; //per-path's EVM dbm
-
- u1Byte RxMIMOSignalStrength[4];// in 0~100 index
- s8 RxPower; // in dBm Translate from PWdB
- s8 RecvSignalPower; // Real power in dBm for this packet, no beautification and aggregation. Keep this raw info to be used for the other procedures.
- u1Byte BTRxRSSIPercentage;
- u1Byte SignalStrength; // in 0-100 index.
+ u8 SignalQuality; /* in 0-100 index. */
+ s8 RxMIMOSignalQuality[4]; /* per-path's EVM */
+ u8 RxMIMOEVMdbm[4]; /* per-path's EVM dbm */
- u1Byte RxSNR[4]; //per-path's SNR
- u1Byte BandWidth;
- u1Byte btCoexPwrAdjust;
-}ODM_PHY_INFO_T,*PODM_PHY_INFO_T;
-*/
-
-struct phy_info
-{
- u8 RxPWDBAll;
-
- u8 SignalQuality; // in 0-100 index.
- s8 RxMIMOSignalQuality[4]; //per-path's EVM
- u8 RxMIMOEVMdbm[4]; //per-path's EVM dbm
-
- u8 RxMIMOSignalStrength[4];// in 0~100 index
+ u16 Cfo_short[4]; /* per-path's Cfo_short */
+ u16 Cfo_tail[4]; /* per-path's Cfo_tail */
- u16 Cfo_short[4]; // per-path's Cfo_short
- u16 Cfo_tail[4]; // per-path's Cfo_tail
+ s8 RxPower; /* in dBm Translate from PWdB */
+ s8 RecvSignalPower;/* Real power in dBm for this packet, no beautification and aggregation. Keep this raw info to be used for the other procedures. */
+ u8 BTRxRSSIPercentage;
+ u8 SignalStrength; /* in 0-100 index. */
- s8 RxPower; // in dBm Translate from PWdB
- s8 RecvSignalPower;// Real power in dBm for this packet, no beautification and aggregation. Keep this raw info to be used for the other procedures.
- u8 BTRxRSSIPercentage;
- u8 SignalStrength; // in 0-100 index.
-
- s8 RxPwr[4]; //per-path's pwdb
- u8 RxSNR[4]; //per-path's SNR
- u8 BandWidth;
- u8 btCoexPwrAdjust;
+ s8 RxPwr[4]; /* per-path's pwdb */
+ u8 RxSNR[4]; /* per-path's SNR */
+ u8 BandWidth;
+ u8 btCoexPwrAdjust;
- u16 pkt_len;
- u8 physt;
- u8 drvinfo_sz;
- u8 shift_sz;
- u8 hdrlen; //the WLAN Header Len
- u8 to_fr_ds;
- u8 amsdu;
- u8 qos;
- u8 priority;
- u8 pw_save;
- u8 mdata;
- u16 seq_num;
- u8 frag_num;
- u8 mfrag;
- u8 order;
- u8 privacy; //in frame_ctrl field
- u8 bdecrypted;
- u8 encrypt; //when 0 indicate no encrypt. when non-zero, indicate the encrypt algorith
- u8 iv_len;
- u8 icv_len;
- u8 crc_err;
- u8 icv_err;
-
- u16 eth_type;
-
- u8 dst[ETH_ALEN];
- u8 src[ETH_ALEN];
- u8 ta[ETH_ALEN];
- u8 ra[ETH_ALEN];
- u8 bssid[ETH_ALEN];
-
- u8 ack_policy;
-
-//#ifdef CONFIG_TCP_CSUM_OFFLOAD_RX
- u8 tcpchk_valid; // 0: invalid, 1: valid
- u8 ip_chkrpt; //0: incorrect, 1: correct
- u8 tcp_chkrpt; //0: incorrect, 1: correct
-//#endif
- u8 key_index;
-
- u8 data_rate;
- u8 sgi;
- u8 pkt_rpt_type;
- u32 MacIDValidEntry[2]; // 64 bits present 64 entry.
+ u16 pkt_len;
+ u8 physt;
+ u8 drvinfo_sz;
+ u8 shift_sz;
+ u8 hdrlen; /* the WLAN Header Len */
+ u8 to_fr_ds;
+ u8 amsdu;
+ u8 qos;
+ u8 priority;
+ u8 pw_save;
+ u8 mdata;
+ u16 seq_num;
+ u8 frag_num;
+ u8 mfrag;
+ u8 order;
+ u8 privacy; /* in frame_ctrl field */
+ u8 bdecrypted;
+ u8 encrypt; /* when 0 indicate no encrypt. when non-zero, indicate the encrypt algorith */
+ u8 iv_len;
+ u8 icv_len;
+ u8 crc_err;
+ u8 icv_err;
+
+ u16 eth_type;
+
+ u8 dst[ETH_ALEN];
+ u8 src[ETH_ALEN];
+ u8 ta[ETH_ALEN];
+ u8 ra[ETH_ALEN];
+ u8 bssid[ETH_ALEN];
+
+ u8 ack_policy;
+
+/* ifdef CONFIG_TCP_CSUM_OFFLOAD_RX */
+ u8 tcpchk_valid; /* 0: invalid, 1: valid */
+ u8 ip_chkrpt; /* 0: incorrect, 1: correct */
+ u8 tcp_chkrpt; /* 0: incorrect, 1: correct */
+/* endif */
+ u8 key_index;
+
+ u8 data_rate;
+ u8 sgi;
+ u8 pkt_rpt_type;
+ u32 MacIDValidEntry[2]; /* 64 bits present 64 entry. */
-//These definition is used for Rx packet reordering.
-#define SN_LESS(a, b) (((a-b)&0x800)!=0)
+/* These definition is used for Rx packet reordering. */
+#define SN_LESS(a, b) (((a-b)&0x800)!= 0)
-//#define REORDER_WIN_SIZE 128
-//#define REORDER_ENTRY_NUM 128
-#define REORDER_WAIT_TIME (50) // (ms)
+/* define REORDER_WIN_SIZE 128 */
+/* define REORDER_ENTRY_NUM 128 */
+#define REORDER_WAIT_TIME (50) /* (ms) */
-
- //_queue blk_strms[MAX_RX_NUMBLKS]; // keeping the block ack frame until return ack
- _queue free_recv_queue;
- _queue recv_pending_queue;
- _queue uc_swdec_pending_queue;
-
-
+ struct __queue free_recv_queue;
+ struct __queue recv_pending_queue;
+ struct __queue uc_swdec_pending_queue;
#ifdef CONFIG_RX_INDICATE_QUEUE
struct task rx_indicate_tasklet;
struct ifqueue rx_indicate_queue;
#ifdef CONFIG_RX_INDICATE_QUEUE
struct task rx_indicate_tasklet;
struct ifqueue rx_indicate_queue;
- u8 *precv_buf; // 4 alignment
- _queue free_recv_buf_queue;
- u32 free_recv_buf_queue_cnt;
+ u8 *precv_buf; /* 4 alignment */
+ struct __queue free_recv_buf_queue;
+ u32 free_recv_buf_queue_cnt;
- //For display the phy informatiom
- u8 is_signal_dbg; // for debug
- u8 signal_strength_dbg; // for debug
+ /* For display the phy informatiom */
+ u8 is_signal_dbg; /* for debug */
+ u8 signal_strength_dbg; /* for debug */
- //_queue blk_strms[MAX_RX_NUMBLKS];
- _queue defrag_q; //keeping the fragment frame until defrag
+ /* struct __queue blk_strms[MAX_RX_NUMBLKS]; */
+ struct __queue defrag_q; /* keeping the fragment frame until defrag */
-typedef enum _RX_PACKET_TYPE{
- NORMAL_RX,//Normal rx packet
- TX_REPORT1,//CCX
- TX_REPORT2,//TX RPT
- HIS_REPORT,// USB HISR RPT
+enum RX_PACKET_TYPE {
+ NORMAL_RX,/* Normal rx packet */
+ TX_REPORT1,/* CCX */
+ TX_REPORT2,/* TX RPT */
+ HIS_REPORT,/* USB HISR RPT */
-extern union recv_frame *_rtw_alloc_recvframe (_queue *pfree_recv_queue); //get a free recv_frame from pfree_recv_queue
-extern union recv_frame *rtw_alloc_recvframe (_queue *pfree_recv_queue); //get a free recv_frame from pfree_recv_queue
-extern int rtw_free_recvframe(union recv_frame *precvframe, _queue *pfree_recv_queue);
+extern union recv_frame *_rtw_alloc_recvframe (struct __queue *pfree_recv_queue); /* get a free recv_frame from pfree_recv_queue */
+extern union recv_frame *rtw_alloc_recvframe (struct __queue *pfree_recv_queue); /* get a free recv_frame from pfree_recv_queue */
+extern int rtw_free_recvframe(union recv_frame *precvframe, struct __queue *pfree_recv_queue);
-extern int _rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue);
-extern int rtw_enqueue_recvframe(union recv_frame *precvframe, _queue *queue);
+extern int _rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue);
+extern int rtw_enqueue_recvframe(union recv_frame *precvframe, struct __queue *queue);
-extern void rtw_free_recvframe_queue(_queue *pframequeue, _queue *pfree_recv_queue);
-u32 rtw_free_uc_swdec_pending_queue(_adapter *adapter);
+extern void rtw_free_recvframe_queue(struct __queue *pframequeue, struct __queue *pfree_recv_queue);
+u32 rtw_free_uc_swdec_pending_queue(struct adapter *adapter);
-sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, _queue *queue);
-sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, _queue *queue);
-struct recv_buf *rtw_dequeue_recvbuf (_queue *queue);
+sint rtw_enqueue_recvbuf_to_head(struct recv_buf *precvbuf, struct __queue *queue);
+sint rtw_enqueue_recvbuf(struct recv_buf *precvbuf, struct __queue *queue);
+struct recv_buf *rtw_dequeue_recvbuf (struct __queue *queue);
void rtw_reordering_ctrl_timeout_handler(void *pcontext);
__inline static u8 *get_rxmem(union recv_frame *precvframe)
{
void rtw_reordering_ctrl_timeout_handler(void *pcontext);
__inline static u8 *get_rxmem(union recv_frame *precvframe)
{
- //used for append sz bytes from ptr to rx_tail, update rx_tail and return the updated rx_tail to the caller
- //after putting, rx_tail must be still larger than rx_end.
+ /* used for append sz bytes from ptr to rx_tail, update rx_tail and return the updated rx_tail to the caller */
+ /* after putting, rx_tail must be still larger than rx_end. */
- //used for extract sz bytes from rx_end, update rx_end and return the updated rx_end to the caller
- //after pulling, rx_end must be still larger than rx_data.
+ /* used for extract sz bytes from rx_end, update rx_end and return the updated rx_end to the caller */
+ /* after pulling, rx_end must be still larger than rx_data. */
- //due to the design of 2048 bytes alignment of recv_frame, we can reference the union recv_frame
- //from any given member of recv_frame.
- // rxmem indicates the any member/address in recv_frame
+ /* due to the design of 2048 bytes alignment of recv_frame, we can reference the union recv_frame */
+ /* from any given member of recv_frame. */
+ /* rxmem indicates the any member/address in recv_frame */