staging: rtl8192e: Cleanup checkpatch -f warnings and errors - Part XII
This patch removes all the errors and most of the warnings generated by checkpatch -f. Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
a44325f985
commit
8567829a6c
@@ -86,11 +86,14 @@
|
||||
#define INIT_WORK_RSL(x, y, z) INIT_WORK(x, y)
|
||||
|
||||
#define container_of_work_rsl(x, y, z) container_of(x, y, z)
|
||||
#define container_of_dwork_rsl(x,y,z) container_of(container_of(x, struct delayed_work, work), y, z)
|
||||
#define container_of_dwork_rsl(x, y, z) \
|
||||
container_of(container_of(x, struct delayed_work, work), y, z)
|
||||
|
||||
#define iwe_stream_add_event_rsl(info,start,stop,iwe,len) iwe_stream_add_event(info,start,stop,iwe,len)
|
||||
#define iwe_stream_add_event_rsl(info, start, stop, iwe, len) \
|
||||
iwe_stream_add_event(info, start, stop, iwe, len)
|
||||
|
||||
#define iwe_stream_add_point_rsl(info,start,stop,iwe,p) iwe_stream_add_point(info,start,stop,iwe,p)
|
||||
#define iwe_stream_add_point_rsl(info, start, stop, iwe, p) \
|
||||
iwe_stream_add_point(info, start, stop, iwe, p)
|
||||
|
||||
#define usb_alloc_urb_rsl(x, y) usb_alloc_urb(x, y)
|
||||
#define usb_submit_urb_rsl(x, y) usb_submit_urb(x, y)
|
||||
@@ -139,8 +142,10 @@ static inline void *netdev_priv_rsl(struct net_device *dev)
|
||||
#define RT_RF_PS_LEVEL_ALWAYS_ASPM BIT6
|
||||
#define RT_RF_LPS_DISALBE_2R BIT30
|
||||
#define RT_RF_LPS_LEVEL_ASPM BIT31
|
||||
#define RT_IN_PS_LEVEL(pPSC, _PS_FLAG) ((pPSC->CurPsLevel & _PS_FLAG) ? true : false)
|
||||
#define RT_CLEAR_PS_LEVEL(pPSC, _PS_FLAG) (pPSC->CurPsLevel &= (~(_PS_FLAG)))
|
||||
#define RT_IN_PS_LEVEL(pPSC, _PS_FLAG) \
|
||||
((pPSC->CurPsLevel & _PS_FLAG) ? true : false)
|
||||
#define RT_CLEAR_PS_LEVEL(pPSC, _PS_FLAG) \
|
||||
(pPSC->CurPsLevel &= (~(_PS_FLAG)))
|
||||
#define RT_SET_PS_LEVEL(pPSC, _PS_FLAG) (pPSC->CurPsLevel |= _PS_FLAG)
|
||||
|
||||
/* defined for skb cb field */
|
||||
@@ -311,7 +316,6 @@ enum hal_def_variable {
|
||||
HAL_DEF_USB_IN_TOKEN_REV,
|
||||
};
|
||||
|
||||
|
||||
enum hw_variables {
|
||||
HW_VAR_ETHER_ADDR,
|
||||
HW_VAR_MULTICAST_REG,
|
||||
@@ -411,7 +415,10 @@ enum rt_op_mode {
|
||||
};
|
||||
|
||||
|
||||
#define aSifsTime (((priv->rtllib->current_network.mode == IEEE_A)||(priv->rtllib->current_network.mode == IEEE_N_24G)||(priv->rtllib->current_network.mode == IEEE_N_5G))? 16 : 10)
|
||||
#define aSifsTime \
|
||||
(((priv->rtllib->current_network.mode == IEEE_A) \
|
||||
|| (priv->rtllib->current_network.mode == IEEE_N_24G) \
|
||||
|| (priv->rtllib->current_network.mode == IEEE_N_5G)) ? 16 : 10)
|
||||
|
||||
#define MGMT_QUEUE_NUM 5
|
||||
|
||||
@@ -453,7 +460,8 @@ enum rt_op_mode {
|
||||
|
||||
#define MAX_IE_LEN 0xff
|
||||
#define RT_ASSERT_RET(_Exp) do {} while (0)
|
||||
#define RT_ASSERT_RET_VALUE(_Exp,Ret) do {} while(0)
|
||||
#define RT_ASSERT_RET_VALUE(_Exp, Ret) \
|
||||
do {} while (0)
|
||||
|
||||
struct ieee_param {
|
||||
u32 cmd;
|
||||
@@ -588,7 +596,9 @@ struct ieee_param {
|
||||
#define FC_QOS_BIT BIT7
|
||||
#define IsDataFrame(pdu) (((pdu[0] & 0x0C) == 0x08) ? true : false)
|
||||
#define IsLegacyDataFrame(pdu) (IsDataFrame(pdu) && (!(pdu[0]&FC_QOS_BIT)))
|
||||
#define IsQoSDataFrame(pframe) ((*(u16*)pframe&(RTLLIB_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA)) == (RTLLIB_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA))
|
||||
#define IsQoSDataFrame(pframe) \
|
||||
((*(u16 *)pframe&(RTLLIB_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA)) == \
|
||||
(RTLLIB_STYPE_QOS_DATA|RTLLIB_FTYPE_DATA))
|
||||
#define Frame_Order(pframe) (*(u16 *)pframe&RTLLIB_FCTL_ORDER)
|
||||
#define SN_LESS(a, b) (((a-b)&0x800) != 0)
|
||||
#define SN_EQUAL(a, b) (a == b)
|
||||
@@ -670,25 +680,29 @@ enum wireless_network_type {
|
||||
/* debug macros */
|
||||
extern u32 rtllib_debug_level;
|
||||
#define RTLLIB_DEBUG(level, fmt, args...) \
|
||||
do { if (rtllib_debug_level & (level)) \
|
||||
printk(KERN_DEBUG "rtllib: " fmt, ## args); } while (0)
|
||||
do { \
|
||||
if (rtllib_debug_level & (level)) \
|
||||
printk(KERN_DEBUG "rtllib: " fmt, ## args); \
|
||||
} while (0)
|
||||
|
||||
#define RTLLIB_DEBUG_DATA(level, data, datalen) \
|
||||
do{ if ((rtllib_debug_level & (level)) == (level)) \
|
||||
{ \
|
||||
do { \
|
||||
if ((rtllib_debug_level & (level)) == (level)) { \
|
||||
int i; \
|
||||
u8 *pdata = (u8 *)data; \
|
||||
printk(KERN_DEBUG "rtllib: %s()\n", __func__); \
|
||||
for (i=0; i<(int)(datalen); i++) \
|
||||
{ \
|
||||
for (i = 0; i < (int)(datalen); i++) { \
|
||||
printk("%2.2x ", pdata[i]); \
|
||||
if ((i+1)%16 == 0) printk("\n"); \
|
||||
if ((i+1)%16 == 0) \
|
||||
printk("\n"); \
|
||||
} \
|
||||
printk("\n"); \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
#define MAC_FMT "%02x:%02x:%02x:%02x:%02x:%02x"
|
||||
#define MAC_ARG(x) ((u8*)(x))[0],((u8*)(x))[1],((u8*)(x))[2],((u8*)(x))[3],((u8*)(x))[4],((u8*)(x))[5]
|
||||
#define MAC_ARG(x) ((u8 *)(x))[0], ((u8 *)(x))[1], ((u8 *)(x))[2], \
|
||||
((u8 *)(x))[3], ((u8 *)(x))[4], ((u8 *)(x))[5]
|
||||
|
||||
/*
|
||||
* To use the debug system;
|
||||
@@ -753,22 +767,21 @@ do { if (rtllib_debug_level & (level)) \
|
||||
|
||||
/* Added by Annie, 2005-11-22. */
|
||||
#define MAX_STR_LEN 64
|
||||
/* I want to see ASCII 33 to 126 only. Otherwise, I print '?'. Annie, 2005-11-22.*/
|
||||
/* I want to see ASCII 33 to 126 only. Otherwise, I print '?'. */
|
||||
#define PRINTABLE(_ch) (_ch > '!' && _ch < '~')
|
||||
#define RTLLIB_PRINT_STR(_Comp, _TitleString, _Ptr, _Len) \
|
||||
if ((_Comp) & level) \
|
||||
{ \
|
||||
if ((_Comp) & level) { \
|
||||
int __i; \
|
||||
u8 struct buffer[MAX_STR_LEN]; \
|
||||
int length = (_Len < MAX_STR_LEN) ? _Len : (MAX_STR_LEN-1) ;\
|
||||
memset(struct buffer, 0, MAX_STR_LEN); \
|
||||
memcpy(struct buffer, (u8 *)_Ptr, length); \
|
||||
for ( __i=0; __i<MAX_STR_LEN; __i++ ) \
|
||||
{ \
|
||||
if ( !PRINTABLE(struct buffer[__i]) ) struct buffer[__i] = '?'; \
|
||||
for (__i = 0; __i < MAX_STR_LEN; __i++) { \
|
||||
if (!PRINTABLE(struct buffer[__i])) \
|
||||
struct buffer[__i] = '?'; \
|
||||
} \
|
||||
struct buffer[length] = '\0'; \
|
||||
printk("Rtl819x: "); \
|
||||
printk(KERN_INFO "Rtl819x: "); \
|
||||
printk(_TitleString); \
|
||||
printk(": %d, <%s>\n", _Len, struct buffer); \
|
||||
}
|
||||
@@ -795,7 +808,7 @@ struct rtllib_snap_hdr {
|
||||
u8 ctrl; /* always 0x03 */
|
||||
u8 oui[P80211_OUI_LEN]; /* organizational universal id */
|
||||
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
enum _REG_PREAMBLE_MODE {
|
||||
PREAMBLE_LONG = 1,
|
||||
@@ -992,7 +1005,6 @@ struct ieee_ibss_seq {
|
||||
* information for frames received. Not setting these will not cause
|
||||
* any adverse affects. */
|
||||
struct rtllib_rx_stats {
|
||||
#if 1
|
||||
u64 mac_time;
|
||||
s8 rssi;
|
||||
u8 signal;
|
||||
@@ -1049,8 +1061,6 @@ struct rtllib_rx_stats {
|
||||
char cck_adc_pwdb[4];
|
||||
u16 Seq_Num;
|
||||
u8 nTotalAggPkt;
|
||||
#endif
|
||||
|
||||
};
|
||||
|
||||
/* IEEE 802.11 requires that STA supports concurrent reception of at least
|
||||
@@ -1134,7 +1144,7 @@ struct rtllib_security {
|
||||
u8 keys[WEP_KEYS][SCM_KEY_LEN];
|
||||
u8 level;
|
||||
u16 flags;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
|
||||
/*
|
||||
@@ -1190,20 +1200,20 @@ struct rtllib_pspoll_hdr {
|
||||
__le16 aid;
|
||||
u8 bssid[ETH_ALEN];
|
||||
u8 ta[ETH_ALEN];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_hdr {
|
||||
__le16 frame_ctl;
|
||||
__le16 duration_id;
|
||||
u8 payload[0];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_hdr_1addr {
|
||||
__le16 frame_ctl;
|
||||
__le16 duration_id;
|
||||
u8 addr1[ETH_ALEN];
|
||||
u8 payload[0];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_hdr_2addr {
|
||||
__le16 frame_ctl;
|
||||
@@ -1211,7 +1221,7 @@ struct rtllib_hdr_2addr {
|
||||
u8 addr1[ETH_ALEN];
|
||||
u8 addr2[ETH_ALEN];
|
||||
u8 payload[0];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_hdr_3addr {
|
||||
__le16 frame_ctl;
|
||||
@@ -1221,7 +1231,7 @@ struct rtllib_hdr_3addr {
|
||||
u8 addr3[ETH_ALEN];
|
||||
__le16 seq_ctl;
|
||||
u8 payload[0];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_hdr_4addr {
|
||||
__le16 frame_ctl;
|
||||
@@ -1232,7 +1242,7 @@ struct rtllib_hdr_4addr {
|
||||
__le16 seq_ctl;
|
||||
u8 addr4[ETH_ALEN];
|
||||
u8 payload[0];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_hdr_3addrqos {
|
||||
__le16 frame_ctl;
|
||||
@@ -1243,7 +1253,7 @@ struct rtllib_hdr_3addrqos {
|
||||
__le16 seq_ctl;
|
||||
__le16 qos_ctl;
|
||||
u8 payload[0];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_hdr_4addrqos {
|
||||
__le16 frame_ctl;
|
||||
@@ -1255,13 +1265,13 @@ struct rtllib_hdr_4addrqos {
|
||||
u8 addr4[ETH_ALEN];
|
||||
__le16 qos_ctl;
|
||||
u8 payload[0];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_info_element {
|
||||
u8 id;
|
||||
u8 len;
|
||||
u8 data[0];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_authentication {
|
||||
struct rtllib_hdr_3addr header;
|
||||
@@ -1270,23 +1280,23 @@ struct rtllib_authentication {
|
||||
__le16 status;
|
||||
/*challenge*/
|
||||
struct rtllib_info_element info_element[0];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_disauth {
|
||||
struct rtllib_hdr_3addr header;
|
||||
__le16 reason;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_disassoc {
|
||||
struct rtllib_hdr_3addr header;
|
||||
__le16 reason;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_probe_request {
|
||||
struct rtllib_hdr_3addr header;
|
||||
/* SSID, supported rates */
|
||||
struct rtllib_info_element info_element[0];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_probe_response {
|
||||
struct rtllib_hdr_3addr header;
|
||||
@@ -1296,7 +1306,7 @@ struct rtllib_probe_response {
|
||||
/* SSID, supported rates, FH params, DS params,
|
||||
* CF params, IBSS params, TIM (if beacon), RSN */
|
||||
struct rtllib_info_element info_element[0];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
/* Alias beacon for probe_response */
|
||||
#define rtllib_beacon rtllib_probe_response
|
||||
@@ -1307,7 +1317,7 @@ struct rtllib_assoc_request_frame {
|
||||
__le16 listen_interval;
|
||||
/* SSID, supported rates, RSN */
|
||||
struct rtllib_info_element info_element[0];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_reassoc_request_frame {
|
||||
struct rtllib_hdr_3addr header;
|
||||
@@ -1316,7 +1326,7 @@ struct rtllib_reassoc_request_frame {
|
||||
u8 current_ap[ETH_ALEN];
|
||||
/* SSID, supported rates, RSN */
|
||||
struct rtllib_info_element info_element[0];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_assoc_response_frame {
|
||||
struct rtllib_hdr_3addr header;
|
||||
@@ -1324,7 +1334,7 @@ struct rtllib_assoc_response_frame {
|
||||
__le16 status;
|
||||
__le16 aid;
|
||||
struct rtllib_info_element info_element[0]; /* supported rates */
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_txb {
|
||||
u8 nr_frags;
|
||||
@@ -1341,7 +1351,7 @@ struct rtllib_txb {
|
||||
struct rtllib_drv_agg_txb {
|
||||
u8 nr_drv_agg_frames;
|
||||
struct sk_buff *tx_agg_frames[MAX_TX_AGG_COUNT];
|
||||
}__attribute__((packed));
|
||||
} __packed;
|
||||
|
||||
#define MAX_SUBFRAME_COUNT 64
|
||||
struct rtllib_rxb {
|
||||
@@ -1349,7 +1359,7 @@ struct rtllib_rxb {
|
||||
struct sk_buff *subframes[MAX_SUBFRAME_COUNT];
|
||||
u8 dst[ETH_ALEN];
|
||||
u8 src[ETH_ALEN];
|
||||
}__attribute__((packed));
|
||||
} __packed;
|
||||
|
||||
union frameqos {
|
||||
u16 shortdata;
|
||||
@@ -1409,7 +1419,7 @@ union frameqos {
|
||||
#define QOS_OUI_PARAM_SUB_TYPE 1
|
||||
#define QOS_VERSION_1 1
|
||||
#define QOS_AIFSN_MIN_VALUE 2
|
||||
#if 1
|
||||
|
||||
struct rtllib_qos_information_element {
|
||||
u8 elementID;
|
||||
u8 length;
|
||||
@@ -1418,19 +1428,19 @@ struct rtllib_qos_information_element {
|
||||
u8 qui_subtype;
|
||||
u8 version;
|
||||
u8 ac_info;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_qos_ac_parameter {
|
||||
u8 aci_aifsn;
|
||||
u8 ecw_min_max;
|
||||
__le16 tx_op_limit;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_qos_parameter_info {
|
||||
struct rtllib_qos_information_element info_element;
|
||||
u8 reserved;
|
||||
struct rtllib_qos_ac_parameter ac_params_record[QOS_QUEUE_NUM];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_qos_parameters {
|
||||
__le16 cw_min[QOS_QUEUE_NUM];
|
||||
@@ -1438,7 +1448,7 @@ struct rtllib_qos_parameters {
|
||||
u8 aifs[QOS_QUEUE_NUM];
|
||||
u8 flag[QOS_QUEUE_NUM];
|
||||
__le16 tx_op_limit[QOS_QUEUE_NUM];
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_qos_data {
|
||||
struct rtllib_qos_parameters parameters;
|
||||
@@ -1452,7 +1462,7 @@ struct rtllib_qos_data {
|
||||
struct rtllib_tim_parameters {
|
||||
u8 tim_count;
|
||||
u8 tim_period;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_wmm_ac_param {
|
||||
u8 ac_aci_acm_aifsn;
|
||||
@@ -1464,7 +1474,7 @@ struct rtllib_wmm_ts_info {
|
||||
u8 ac_dir_tid;
|
||||
u8 ac_up_psb;
|
||||
u8 reserved;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_wmm_tspec_elem {
|
||||
struct rtllib_wmm_ts_info ts_info;
|
||||
@@ -1483,8 +1493,8 @@ struct rtllib_wmm_tspec_elem {
|
||||
u32 min_phy_rate;
|
||||
u16 surp_band_allow;
|
||||
u16 medium_time;
|
||||
}__attribute__((packed));
|
||||
#endif
|
||||
} __packed;
|
||||
|
||||
enum eap_type {
|
||||
EAP_PACKET = 0,
|
||||
EAPOL_START,
|
||||
@@ -1503,7 +1513,8 @@ static const char *eap_types[] = {
|
||||
|
||||
static inline const char *eap_get_type(int type)
|
||||
{
|
||||
return ((u32)type >= ARRAY_SIZE(eap_types)) ? "Unknown" : eap_types[type];
|
||||
return ((u32)type >= ARRAY_SIZE(eap_types)) ? "Unknown" :
|
||||
eap_types[type];
|
||||
}
|
||||
static inline u8 Frame_QoSTID(u8 *buf)
|
||||
{
|
||||
@@ -1511,7 +1522,8 @@ static inline u8 Frame_QoSTID(u8* buf)
|
||||
u16 fc;
|
||||
hdr = (struct rtllib_hdr_3addr *)buf;
|
||||
fc = le16_to_cpu(hdr->frame_ctl);
|
||||
return (u8)((union frameqos *)(buf + (((fc & RTLLIB_FCTL_TODS)&&(fc & RTLLIB_FCTL_FROMDS))? 30 : 24)))->field.tid;
|
||||
return (u8)((union frameqos *)(buf + (((fc & RTLLIB_FCTL_TODS) &&
|
||||
(fc & RTLLIB_FCTL_FROMDS)) ? 30 : 24)))->field.tid;
|
||||
}
|
||||
|
||||
|
||||
@@ -1521,7 +1533,7 @@ struct eapol {
|
||||
u8 version;
|
||||
u8 type;
|
||||
u16 length;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
struct rtllib_softmac_stats {
|
||||
unsigned int rx_ass_ok;
|
||||
@@ -1551,7 +1563,7 @@ struct rtllib_softmac_stats{
|
||||
struct rtllib_info_element_hdr {
|
||||
u8 id;
|
||||
u8 len;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
|
||||
/*
|
||||
* These are the data types that can make up management packets
|
||||
@@ -1564,7 +1576,7 @@ struct rtllib_info_element_hdr {
|
||||
u16 listen_interval;
|
||||
struct {
|
||||
u16 association_id:14, reserved:2;
|
||||
} __attribute__ ((packed));
|
||||
} __packed;
|
||||
u32 time_stamp[2];
|
||||
u16 reason;
|
||||
u16 status;
|
||||
@@ -1611,13 +1623,14 @@ enum {WMM_all_frame, WMM_two_frame, WMM_four_frame, WMM_six_frame};
|
||||
0)
|
||||
|
||||
#define ETHER_ADDR_LEN 6 /* length of an Ethernet address */
|
||||
#define ETHERNET_HEADER_SIZE 14 /* length of two Ethernet address plus ether type*/
|
||||
#define ETHERNET_HEADER_SIZE 14 /* length of two Ethernet address
|
||||
* plus ether type*/
|
||||
|
||||
struct ether_header {
|
||||
u8 ether_dhost[ETHER_ADDR_LEN];
|
||||
u8 ether_shost[ETHER_ADDR_LEN];
|
||||
u16 ether_type;
|
||||
} __attribute__((packed));
|
||||
} __packed;
|
||||
|
||||
#ifndef ETHERTYPE_PAE
|
||||
#define ETHERTYPE_PAE 0x888e /* EAPOL PAE/802.1x */
|
||||
@@ -1770,7 +1783,9 @@ enum rtllib_state {
|
||||
#define RTLLIB_52GHZ_CHANNELS (RTLLIB_52GHZ_MAX_CHANNEL - \
|
||||
RTLLIB_52GHZ_MIN_CHANNEL + 1)
|
||||
#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 )
|
||||
#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
|
||||
struct tx_pending {
|
||||
int frag;
|
||||
@@ -2499,31 +2514,45 @@ struct rtllib_device {
|
||||
void (*sta_wake_up)(struct net_device *dev);
|
||||
void (*enter_sleep_state)(struct net_device *dev, u64 time);
|
||||
short (*ps_is_queue_empty)(struct net_device *dev);
|
||||
int (*handle_beacon) (struct net_device * dev, struct rtllib_beacon * beacon, struct rtllib_network * network);
|
||||
int (*handle_assoc_response) (struct net_device * dev, struct rtllib_assoc_response_frame * resp, struct rtllib_network * network);
|
||||
int (*handle_beacon)(struct net_device *dev,
|
||||
struct rtllib_beacon *beacon,
|
||||
struct rtllib_network *network);
|
||||
int (*handle_assoc_response)(struct net_device *dev,
|
||||
struct rtllib_assoc_response_frame *resp,
|
||||
struct rtllib_network *network);
|
||||
|
||||
|
||||
/* check whether Tx hw resouce available */
|
||||
short (*check_nic_enough_desc)(struct net_device *dev, int queue_index);
|
||||
short (*get_nic_desc_num)(struct net_device *dev, int queue_index);
|
||||
void (*SetBWModeHandler)(struct net_device *dev, enum ht_channel_width Bandwidth, enum ht_extchnl_offset Offset);
|
||||
void (*SetBWModeHandler)(struct net_device *dev,
|
||||
enum ht_channel_width Bandwidth,
|
||||
enum ht_extchnl_offset Offset);
|
||||
bool (*GetNmodeSupportBySecCfg)(struct net_device *dev);
|
||||
void (*SetWirelessMode)(struct net_device *dev, u8 wireless_mode);
|
||||
bool (*GetHalfNmodeSupportByAPsHandler)(struct net_device *dev);
|
||||
u8 (*rtllib_ap_sec_type)(struct rtllib_device *ieee);
|
||||
void (*HalUsbRxAggrHandler)(struct net_device *dev, bool Value);
|
||||
void (*InitialGainHandler)(struct net_device *dev, u8 Operation);
|
||||
bool (*SetFwCmdHandler)(struct net_device *dev, enum fw_cmd_io_type FwCmdIO);
|
||||
void (*UpdateHalRAMaskHandler)(struct net_device* dev, bool bMulticast, u8 macId, u8 MimoPs, u8 WirelessMode, u8 bCurTxBW40MHz, u8 rssi_level);
|
||||
void (*UpdateBeaconInterruptHandler)(struct net_device* dev, bool start);
|
||||
void (*UpdateInterruptMaskHandler)(struct net_device* dev, u32 AddMSR, u32 RemoveMSR);
|
||||
bool (*SetFwCmdHandler)(struct net_device *dev,
|
||||
enum fw_cmd_io_type FwCmdIO);
|
||||
void (*UpdateHalRAMaskHandler)(struct net_device *dev, bool bMulticast,
|
||||
u8 macId, u8 MimoPs, u8 WirelessMode,
|
||||
u8 bCurTxBW40MHz, u8 rssi_level);
|
||||
void (*UpdateBeaconInterruptHandler)(struct net_device *dev,
|
||||
bool start);
|
||||
void (*UpdateInterruptMaskHandler)(struct net_device *dev, u32 AddMSR,
|
||||
u32 RemoveMSR);
|
||||
u16 (*rtl_11n_user_show_rates)(struct net_device *dev);
|
||||
void (*ScanOperationBackupHandler)(struct net_device *dev, u8 Operation);
|
||||
void (*LedControlHandler)(struct net_device * dev, enum led_ctl_mode LedAction);
|
||||
void (*ScanOperationBackupHandler)(struct net_device *dev,
|
||||
u8 Operation);
|
||||
void (*LedControlHandler)(struct net_device *dev,
|
||||
enum led_ctl_mode LedAction);
|
||||
void (*SetHwRegHandler)(struct net_device *dev, u8 variable, u8 *val);
|
||||
void (*GetHwRegHandler)(struct net_device *dev, u8 variable, u8 *val);
|
||||
|
||||
void (*AllowAllDestAddrHandler)(struct net_device *dev, bool bAllowAllDA, bool WriteIntoReg);
|
||||
void (*AllowAllDestAddrHandler)(struct net_device *dev,
|
||||
bool bAllowAllDA, bool WriteIntoReg);
|
||||
|
||||
void (*rtllib_ips_leave_wq) (struct net_device *dev);
|
||||
void (*rtllib_ips_leave)(struct net_device *dev);
|
||||
@@ -2748,13 +2777,16 @@ extern int rtllib_wx_set_gen_ie(struct rtllib_device *ieee, u8 *ie, size_t len);
|
||||
/* rtllib_softmac.c */
|
||||
extern short rtllib_is_54g(struct rtllib_network *net);
|
||||
extern short rtllib_is_shortslot(struct rtllib_network net);
|
||||
extern int rtllib_rx_frame_softmac(struct rtllib_device *ieee, struct sk_buff *skb,
|
||||
extern int rtllib_rx_frame_softmac(struct rtllib_device *ieee,
|
||||
struct sk_buff *skb,
|
||||
struct rtllib_rx_stats *rx_stats, u16 type,
|
||||
u16 stype);
|
||||
extern void rtllib_softmac_new_net(struct rtllib_device *ieee, struct rtllib_network *net);
|
||||
extern void rtllib_softmac_new_net(struct rtllib_device *ieee,
|
||||
struct rtllib_network *net);
|
||||
|
||||
void SendDisassociation(struct rtllib_device *ieee, bool deauth, u16 asRsn);
|
||||
extern void rtllib_softmac_xmit(struct rtllib_txb *txb, struct rtllib_device *ieee);
|
||||
extern void rtllib_softmac_xmit(struct rtllib_txb *txb,
|
||||
struct rtllib_device *ieee);
|
||||
|
||||
extern void rtllib_stop_send_beacons(struct rtllib_device *ieee);
|
||||
extern void notify_wx_assoc_event(struct rtllib_device *ieee);
|
||||
@@ -2772,21 +2804,28 @@ extern void rtllib_stop_scan_syncro(struct rtllib_device *ieee);
|
||||
extern void rtllib_start_scan_syncro(struct rtllib_device *ieee, u8 is_mesh);
|
||||
extern inline struct sk_buff *rtllib_probe_req(struct rtllib_device *ieee);
|
||||
extern u8 MgntQuery_MgntFrameTxRate(struct rtllib_device *ieee);
|
||||
extern void rtllib_sta_ps_send_null_frame(struct rtllib_device *ieee, short pwr);
|
||||
extern void rtllib_sta_ps_send_null_frame(struct rtllib_device *ieee,
|
||||
short pwr);
|
||||
extern void rtllib_sta_wakeup(struct rtllib_device *ieee, short nl);
|
||||
extern void rtllib_sta_ps_send_pspoll_frame(struct rtllib_device *ieee);
|
||||
extern void rtllib_check_all_nets(struct rtllib_device *ieee);
|
||||
extern void rtllib_start_protocol(struct rtllib_device *ieee);
|
||||
extern void rtllib_stop_protocol(struct rtllib_device *ieee, u8 shutdown);
|
||||
|
||||
extern void rtllib_EnableNetMonitorMode(struct net_device* dev, bool bInitState);
|
||||
extern void rtllib_DisableNetMonitorMode(struct net_device* dev, bool bInitState);
|
||||
extern void rtllib_EnableIntelPromiscuousMode(struct net_device* dev, bool bInitState);
|
||||
extern void rtllib_DisableIntelPromiscuousMode(struct net_device* dev, bool bInitState);
|
||||
extern void rtllib_EnableNetMonitorMode(struct net_device *dev,
|
||||
bool bInitState);
|
||||
extern void rtllib_DisableNetMonitorMode(struct net_device *dev,
|
||||
bool bInitState);
|
||||
extern void rtllib_EnableIntelPromiscuousMode(struct net_device *dev,
|
||||
bool bInitState);
|
||||
extern void rtllib_DisableIntelPromiscuousMode(struct net_device *dev,
|
||||
bool bInitState);
|
||||
extern void rtllib_send_probe_requests(struct rtllib_device *ieee, u8 is_mesh);
|
||||
|
||||
extern void rtllib_softmac_stop_protocol(struct rtllib_device *ieee, u8 mesh_flag, u8 shutdown);
|
||||
extern void rtllib_softmac_start_protocol(struct rtllib_device *ieee,u8 mesh_flag);
|
||||
extern void rtllib_softmac_stop_protocol(struct rtllib_device *ieee,
|
||||
u8 mesh_flag, u8 shutdown);
|
||||
extern void rtllib_softmac_start_protocol(struct rtllib_device *ieee,
|
||||
u8 mesh_flag);
|
||||
|
||||
extern void rtllib_reset_queue(struct rtllib_device *ieee);
|
||||
extern void rtllib_wake_queue(struct rtllib_device *ieee);
|
||||
@@ -2796,13 +2835,16 @@ extern void rtllib_stop_all_queues(struct rtllib_device *ieee);
|
||||
extern struct sk_buff *rtllib_get_beacon(struct rtllib_device *ieee);
|
||||
extern void rtllib_start_send_beacons(struct rtllib_device *ieee);
|
||||
extern void rtllib_stop_send_beacons(struct rtllib_device *ieee);
|
||||
extern int rtllib_wpa_supplicant_ioctl(struct rtllib_device *ieee, struct iw_point *p, u8 is_mesh);
|
||||
extern int rtllib_wpa_supplicant_ioctl(struct rtllib_device *ieee,
|
||||
struct iw_point *p, u8 is_mesh);
|
||||
|
||||
extern void notify_wx_assoc_event(struct rtllib_device *ieee);
|
||||
extern void rtllib_ps_tx_ack(struct rtllib_device *ieee, short success);
|
||||
|
||||
extern void softmac_mgmt_xmit(struct sk_buff *skb, struct rtllib_device *ieee);
|
||||
extern u16 rtllib_query_seqnum(struct rtllib_device*ieee, struct sk_buff* skb, u8* dst);
|
||||
extern void softmac_mgmt_xmit(struct sk_buff *skb,
|
||||
struct rtllib_device *ieee);
|
||||
extern u16 rtllib_query_seqnum(struct rtllib_device *ieee,
|
||||
struct sk_buff *skb, u8 *dst);
|
||||
extern u8 rtllib_ap_sec_type(struct rtllib_device *ieee);
|
||||
|
||||
/* rtllib_crypt_ccmp&tkip&wep.c */
|
||||
@@ -2821,7 +2863,9 @@ extern int rtllib_wx_set_wap(struct rtllib_device *ieee,
|
||||
union iwreq_data *awrq,
|
||||
char *extra);
|
||||
|
||||
extern int rtllib_wx_get_essid(struct rtllib_device *ieee, struct iw_request_info *a,union iwreq_data *wrqu,char *b);
|
||||
extern int rtllib_wx_get_essid(struct rtllib_device *ieee,
|
||||
struct iw_request_info *a,
|
||||
union iwreq_data *wrqu, char *b);
|
||||
|
||||
extern int rtllib_wx_set_rate(struct rtllib_device *ieee,
|
||||
struct iw_request_info *info,
|
||||
@@ -2831,23 +2875,28 @@ extern int rtllib_wx_get_rate(struct rtllib_device *ieee,
|
||||
struct iw_request_info *info,
|
||||
union iwreq_data *wrqu, char *extra);
|
||||
|
||||
extern int rtllib_wx_set_mode(struct rtllib_device *ieee, struct iw_request_info *a,
|
||||
extern int rtllib_wx_set_mode(struct rtllib_device *ieee,
|
||||
struct iw_request_info *a,
|
||||
union iwreq_data *wrqu, char *b);
|
||||
|
||||
extern int rtllib_wx_set_scan(struct rtllib_device *ieee, struct iw_request_info *a,
|
||||
extern int rtllib_wx_set_scan(struct rtllib_device *ieee,
|
||||
struct iw_request_info *a,
|
||||
union iwreq_data *wrqu, char *b);
|
||||
|
||||
extern int rtllib_wx_set_essid(struct rtllib_device *ieee,
|
||||
struct iw_request_info *a,
|
||||
union iwreq_data *wrqu, char *extra);
|
||||
|
||||
extern int rtllib_wx_get_mode(struct rtllib_device *ieee, struct iw_request_info *a,
|
||||
extern int rtllib_wx_get_mode(struct rtllib_device *ieee,
|
||||
struct iw_request_info *a,
|
||||
union iwreq_data *wrqu, char *b);
|
||||
|
||||
extern int rtllib_wx_set_freq(struct rtllib_device *ieee, struct iw_request_info *a,
|
||||
extern int rtllib_wx_set_freq(struct rtllib_device *ieee,
|
||||
struct iw_request_info *a,
|
||||
union iwreq_data *wrqu, char *b);
|
||||
|
||||
extern int rtllib_wx_get_freq(struct rtllib_device *ieee, struct iw_request_info *a,
|
||||
extern int rtllib_wx_get_freq(struct rtllib_device *ieee,
|
||||
struct iw_request_info *a,
|
||||
union iwreq_data *wrqu, char *b);
|
||||
extern void rtllib_wx_sync_scan_wq(void *data);
|
||||
|
||||
@@ -2878,17 +2927,26 @@ extern int rtllib_wx_get_rts(struct rtllib_device *ieee,
|
||||
extern void HTDebugHTCapability(u8 *CapIE, u8 *TitleString);
|
||||
extern void HTDebugHTInfo(u8 *InfoIE, u8 *TitleString);
|
||||
|
||||
void HTSetConnectBwMode(struct rtllib_device* ieee, enum ht_channel_width Bandwidth, enum ht_extchnl_offset Offset);
|
||||
void HTSetConnectBwMode(struct rtllib_device *ieee,
|
||||
enum ht_channel_width Bandwidth,
|
||||
enum ht_extchnl_offset Offset);
|
||||
extern void HTUpdateDefaultSetting(struct rtllib_device *ieee);
|
||||
extern void HTConstructCapabilityElement(struct rtllib_device* ieee, u8* posHTCap, u8* len, u8 isEncrypt,bool bAssoc);
|
||||
extern void HTConstructInfoElement(struct rtllib_device* ieee, u8* posHTInfo, u8* len, u8 isEncrypt);
|
||||
extern void HTConstructRT2RTAggElement(struct rtllib_device* ieee, u8* posRT2RTAgg, u8* len);
|
||||
extern void HTConstructCapabilityElement(struct rtllib_device *ieee,
|
||||
u8 *posHTCap, u8 *len,
|
||||
u8 isEncrypt, bool bAssoc);
|
||||
extern void HTConstructInfoElement(struct rtllib_device *ieee,
|
||||
u8 *posHTInfo, u8 *len, u8 isEncrypt);
|
||||
extern void HTConstructRT2RTAggElement(struct rtllib_device *ieee,
|
||||
u8 *posRT2RTAgg, u8* len);
|
||||
extern void HTOnAssocRsp(struct rtllib_device *ieee);
|
||||
extern void HTInitializeHTInfo(struct rtllib_device *ieee);
|
||||
extern void HTInitializeBssDesc(struct bss_ht *pBssHT);
|
||||
extern void HTResetSelfAndSavePeerSetting(struct rtllib_device* ieee, struct rtllib_network * pNetwork);
|
||||
extern void HTUpdateSelfAndPeerSetting(struct rtllib_device* ieee, struct rtllib_network * pNetwork);
|
||||
extern u8 HTGetHighestMCSRate(struct rtllib_device* ieee, u8* pMCSRateSet, u8* pMCSFilter);
|
||||
extern void HTResetSelfAndSavePeerSetting(struct rtllib_device *ieee,
|
||||
struct rtllib_network *pNetwork);
|
||||
extern void HTUpdateSelfAndPeerSetting(struct rtllib_device *ieee,
|
||||
struct rtllib_network *pNetwork);
|
||||
extern u8 HTGetHighestMCSRate(struct rtllib_device *ieee, u8 *pMCSRateSet,
|
||||
u8 *pMCSFilter);
|
||||
extern u8 MCS_FILTER_ALL[];
|
||||
extern u16 MCS_DATA_RATE[2][2][77] ;
|
||||
extern u8 HTCCheck(struct rtllib_device *ieee, u8 *pFrame);
|
||||
@@ -2900,8 +2958,11 @@ extern u16 TxCountToDataRate( struct rtllib_device* ieee, u8 nDataRate);
|
||||
extern int rtllib_rx_ADDBAReq(struct rtllib_device *ieee, struct sk_buff *skb);
|
||||
extern int rtllib_rx_ADDBARsp(struct rtllib_device *ieee, struct sk_buff *skb);
|
||||
extern int rtllib_rx_DELBA(struct rtllib_device *ieee, struct sk_buff *skb);
|
||||
extern void TsInitAddBA( struct rtllib_device* ieee, struct tx_ts_record *pTS, u8 Policy, u8 bOverwritePending);
|
||||
extern void TsInitDelBA( struct rtllib_device* ieee, struct ts_common_info *pTsCommonInfo, enum tr_select TxRxSelect);
|
||||
extern void TsInitAddBA(struct rtllib_device *ieee, struct tx_ts_record *pTS,
|
||||
u8 Policy, u8 bOverwritePending);
|
||||
extern void TsInitDelBA(struct rtllib_device *ieee,
|
||||
struct ts_common_info *pTsCommonInfo,
|
||||
enum tr_select TxRxSelect);
|
||||
extern void BaSetupTimeOut(unsigned long data);
|
||||
extern void TxBaInactTimeout(unsigned long data);
|
||||
extern void RxBaInactTimeout(unsigned long data);
|
||||
@@ -2915,7 +2976,8 @@ extern bool GetTs(
|
||||
bool bAddNewTs
|
||||
);
|
||||
extern void TSInitialize(struct rtllib_device *ieee);
|
||||
extern void TsStartAddBaProcess(struct rtllib_device* ieee, struct tx_ts_record *pTxTS);
|
||||
extern void TsStartAddBaProcess(struct rtllib_device *ieee,
|
||||
struct tx_ts_record *pTxTS);
|
||||
extern void RemovePeerTS(struct rtllib_device *ieee, u8 *Addr);
|
||||
extern void RemoveAllTS(struct rtllib_device *ieee);
|
||||
void rtllib_softmac_scan_syncro(struct rtllib_device *ieee, u8 is_mesh);
|
||||
@@ -2932,7 +2994,8 @@ extern inline int rtllib_get_scans(struct rtllib_device *ieee)
|
||||
return ieee->scans;
|
||||
}
|
||||
|
||||
static inline const char *escape_essid(const char *essid, u8 essid_len) {
|
||||
static inline const char *escape_essid(const char *essid, u8 essid_len)
|
||||
{
|
||||
static char escaped[IW_ESSID_MAX_SIZE * 2 + 1];
|
||||
const char *s = essid;
|
||||
char *d = escaped;
|
||||
@@ -2956,7 +3019,9 @@ static inline const char *escape_essid(const char *essid, u8 essid_len) {
|
||||
return escaped;
|
||||
}
|
||||
|
||||
#define CONVERT_RATE(_ieee, _MGN_RATE) (_MGN_RATE<MGN_MCS0)?(_MGN_RATE):(HTMcsToDataRate(_ieee, (u8)_MGN_RATE))
|
||||
#define CONVERT_RATE(_ieee, _MGN_RATE) \
|
||||
((_MGN_RATE < MGN_MCS0) ? (_MGN_RATE) : \
|
||||
(HTMcsToDataRate(_ieee, (u8)_MGN_RATE)))
|
||||
|
||||
/* fun with the built-in rtllib stack... */
|
||||
int rtllib_init(void);
|
||||
@@ -2971,7 +3036,8 @@ int rtllib_crypto_wep_init(void);
|
||||
void rtllib_crypto_wep_exit(void);
|
||||
|
||||
void rtllib_MgntDisconnectIBSS(struct rtllib_device *rtllib);
|
||||
void rtllib_MlmeDisassociateRequest(struct rtllib_device* rtllib, u8* asSta,u8 asRsn);
|
||||
void rtllib_MlmeDisassociateRequest(struct rtllib_device *rtllib, u8 *asSta,
|
||||
u8 asRsn);
|
||||
void rtllib_MgntDisconnectAP(struct rtllib_device *rtllib, u8 asRsn);
|
||||
bool rtllib_MgntDisconnect(struct rtllib_device *rtllib, u8 asRsn);
|
||||
|
||||
@@ -2980,7 +3046,8 @@ bool rtllib_MgntDisconnect(struct rtllib_device* rtllib,u8 asRsn);
|
||||
* ieee handler to refer to it.
|
||||
*/
|
||||
extern void rtllib_update_active_chan_map(struct rtllib_device *ieee);
|
||||
extern void rtllib_FlushRxTsPendingPkts(struct rtllib_device *ieee, struct rx_ts_record *pTS);
|
||||
extern void rtllib_FlushRxTsPendingPkts(struct rtllib_device *ieee,
|
||||
struct rx_ts_record *pTS);
|
||||
extern int rtllib_data_xmit(struct sk_buff *skb, struct net_device *dev);
|
||||
extern int rtllib_parse_info_param(struct rtllib_device *ieee,
|
||||
struct rtllib_info_element *info_element,
|
||||
@@ -2988,8 +3055,10 @@ extern int rtllib_parse_info_param(struct rtllib_device *ieee,
|
||||
struct rtllib_network *network,
|
||||
struct rtllib_rx_stats *stats);
|
||||
|
||||
void rtllib_indicate_packets(struct rtllib_device *ieee, struct rtllib_rxb** prxbIndicateArray,u8 index);
|
||||
extern u8 HTFilterMCSRate( struct rtllib_device* ieee, u8* pSupportMCS, u8* pOperateMCS);
|
||||
void rtllib_indicate_packets(struct rtllib_device *ieee,
|
||||
struct rtllib_rxb **prxbIndicateArray, u8 index);
|
||||
extern u8 HTFilterMCSRate(struct rtllib_device *ieee, u8 *pSupportMCS,
|
||||
u8 *pOperateMCS);
|
||||
extern void HTUseDefaultSetting(struct rtllib_device *ieee);
|
||||
#define RT_ASOC_RETRY_LIMIT 5
|
||||
u8 MgntQuery_TxRateExcludeCCKRates(struct rtllib_device *ieee);
|
||||
@@ -3039,7 +3108,7 @@ extern void rtllib_TURBO_Info(struct rtllib_device *ieee, u8 **tag_p);
|
||||
static inline void dump_buf(u8 *buf, u32 len)
|
||||
{
|
||||
u32 i;
|
||||
printk("-----------------Len %d----------------\n", len);
|
||||
printk(KERN_INFO "-----------------Len %d----------------\n", len);
|
||||
for (i = 0; i < len; i++)
|
||||
printk("%2.2x-", *(buf+i));
|
||||
printk("\n");
|
||||
|
@@ -48,7 +48,7 @@
|
||||
#include <linux/version.h>
|
||||
#include <linux/wireless.h>
|
||||
#include <linux/etherdevice.h>
|
||||
#include <asm/uaccess.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <net/arp.h>
|
||||
|
||||
#include "rtllib.h"
|
||||
@@ -98,7 +98,8 @@ static inline void rtllib_networks_initialize(struct rtllib_device *ieee)
|
||||
INIT_LIST_HEAD(&ieee->network_free_list);
|
||||
INIT_LIST_HEAD(&ieee->network_list);
|
||||
for (i = 0; i < MAX_NETWORK_COUNT; i++)
|
||||
list_add_tail(&ieee->networks[i].list, &ieee->network_free_list);
|
||||
list_add_tail(&ieee->networks[i].list,
|
||||
&ieee->network_free_list);
|
||||
}
|
||||
|
||||
struct net_device *alloc_rtllib(int sizeof_priv)
|
||||
@@ -162,9 +163,8 @@ struct net_device *alloc_rtllib(int sizeof_priv)
|
||||
memset(ieee->swcamtable, 0, sizeof(struct sw_cam_table) * 32);
|
||||
rtllib_softmac_init(ieee);
|
||||
|
||||
ieee->pHTInfo = (struct rt_hi_throughput*)kzalloc(sizeof(struct rt_hi_throughput), GFP_KERNEL);
|
||||
if (ieee->pHTInfo == NULL)
|
||||
{
|
||||
ieee->pHTInfo = kzalloc(sizeof(struct rt_hi_throughput), GFP_KERNEL);
|
||||
if (ieee->pHTInfo == NULL) {
|
||||
RTLLIB_DEBUG(RTLLIB_DL_ERR, "can't alloc memory for HTInfo\n");
|
||||
return NULL;
|
||||
}
|
||||
@@ -192,10 +192,10 @@ struct net_device *alloc_rtllib(int sizeof_priv)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void free_rtllib(struct net_device *dev)
|
||||
{
|
||||
struct rtllib_device *ieee = (struct rtllib_device *)netdev_priv_rsl(dev);
|
||||
struct rtllib_device *ieee = (struct rtllib_device *)
|
||||
netdev_priv_rsl(dev);
|
||||
int i;
|
||||
if (ieee->pHTInfo != NULL) {
|
||||
kfree(ieee->pHTInfo);
|
||||
@@ -219,11 +219,11 @@ void free_rtllib(struct net_device *dev)
|
||||
free_netdev(dev);
|
||||
}
|
||||
|
||||
u32 rtllib_debug_level = 0;
|
||||
u32 rtllib_debug_level;
|
||||
static int debug = \
|
||||
RTLLIB_DL_ERR
|
||||
;
|
||||
struct proc_dir_entry *rtllib_proc = NULL;
|
||||
struct proc_dir_entry *rtllib_proc;
|
||||
|
||||
static int show_debug_level(char *page, char **start, off_t offset,
|
||||
int count, int *eof, void *data)
|
||||
|
@@ -286,7 +286,6 @@ 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, struct cb_desc * tcb_desc)
|
||||
{
|
||||
struct rt_hi_throughput *pHTInfo = ieee->pHTInfo;
|
||||
|
Reference in New Issue
Block a user