diff --git a/core/rtw_mlme.c b/core/rtw_mlme.c index 0c42b78..11f3451 100644 --- a/core/rtw_mlme.c +++ b/core/rtw_mlme.c @@ -2837,7 +2837,7 @@ void rtw_joinbss_reset(struct adapter *padapter) unsigned int rtw_restructure_ht_ie(struct adapter *padapter, u8 *in_ie, u8 *out_ie, uint in_len, uint *pout_len) { u32 ielen, out_len; - HT_CAP_AMPDU_FACTOR max_rx_ampdu_factor; + enum HT_CAP_AMPDU_FACTOR max_rx_ampdu_factor; unsigned char *p, *pframe; struct rtw_ieee80211_ht_cap ht_capie; unsigned char WMM_IE[] = {0x00, 0x50, 0xf2, 0x02, 0x00, 0x01, 0x00}; diff --git a/core/rtw_mlme_ext.c b/core/rtw_mlme_ext.c index 85708c4..57592b9 100644 --- a/core/rtw_mlme_ext.c +++ b/core/rtw_mlme_ext.c @@ -105,7 +105,7 @@ unsigned char MCS_rate_1R[16] = {0xff, 0x00, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0, 0x0, ChannelPlan definitions *********************************************************/ -static RT_CHANNEL_PLAN_2G RTW_ChannelPlan2G[RT_CHANNEL_DOMAIN_2G_MAX] = { +static struct rt_channel_plan_2g RTW_ChannelPlan2G[RT_CHANNEL_DOMAIN_2G_MAX] = { {{1,2,3,4,5,6,7,8,9,10,11,12,13},13}, /* 0x00, RT_CHANNEL_DOMAIN_2G_WORLD , Passive scan CH 12, 13 */ {{1,2,3,4,5,6,7,8,9,10,11,12,13},13}, /* 0x01, RT_CHANNEL_DOMAIN_2G_ETSI1 */ {{1,2,3,4,5,6,7,8,9,10,11},11}, /* 0x02, RT_CHANNEL_DOMAIN_2G_FCC1 */ @@ -114,7 +114,7 @@ static RT_CHANNEL_PLAN_2G RTW_ChannelPlan2G[RT_CHANNEL_DOMAIN_2G_MAX] = { {{},0}, /* 0x05, RT_CHANNEL_DOMAIN_2G_NULL */ }; -static RT_CHANNEL_PLAN_5G RTW_ChannelPlan5G[RT_CHANNEL_DOMAIN_5G_MAX] = { +static struct rt_channel_plan_5g RTW_ChannelPlan5G[RT_CHANNEL_DOMAIN_5G_MAX] = { {{},0}, /* 0x00, RT_CHANNEL_DOMAIN_5G_NULL */ {{36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140},19}, /* 0x01, RT_CHANNEL_DOMAIN_5G_ETSI1 */ {{36,40,44,48,52,56,60,64,100,104,108,112,116,120,124,128,132,136,140,149,153,157,161,165},24}, /* 0x02, RT_CHANNEL_DOMAIN_5G_ETSI2 */ @@ -139,7 +139,7 @@ static RT_CHANNEL_PLAN_5G RTW_ChannelPlan5G[RT_CHANNEL_DOMAIN_5G_MAX] = { {{36,40,44,48,149,153,157,161},8}, /* 0x13, RT_CHANNEL_DOMAIN_5G_FCC4_NO_DFS */ }; -static RT_CHANNEL_PLAN_MAP RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = { +static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = { /* 0x00 ~ 0x1F , Old Define ===== */ {0x02,0x11}, /* 0x00, RT_CHANNEL_DOMAIN_FCC */ {0x02,0x0A}, /* 0x01, RT_CHANNEL_DOMAIN_IC */ @@ -210,7 +210,7 @@ static RT_CHANNEL_PLAN_MAP RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = { {0x03,0x00}, /* 0x41, RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN_2G */ }; -static RT_CHANNEL_PLAN_MAP RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE = {0x03,0x02}; /* use the conbination for max channel numbers */ +static struct rt_channel_plan_map RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE = {0x03,0x02}; /* use the conbination for max channel numbers */ /* * Search the @param channel_num in given @param channel_set @@ -219,7 +219,7 @@ static RT_CHANNEL_PLAN_MAP RTW_CHANNEL_PLAN_MAP_REALTEK_DEFINE = {0x03,0x02}; /* * * return the index of channel_num in channel_set, -1 if not found */ -int rtw_ch_set_search_ch(RT_CHANNEL_INFO *ch_set, const u32 ch) +int rtw_ch_set_search_ch(struct rt_channel_info *ch_set, const u32 ch) { int i; for(i=0;ch_set[i].ChannelNum!=0;i++){ @@ -306,7 +306,7 @@ static void init_mlme_ext_priv_value(struct adapter* padapter) pmlmeext->action_public_dialog_token = 0xff; } -static int has_channel(RT_CHANNEL_INFO *channel_set, +static int has_channel(struct rt_channel_info *channel_set, u8 chanset_size, u8 chan) { int i; @@ -320,7 +320,7 @@ static int has_channel(RT_CHANNEL_INFO *channel_set, return 0; } -static void init_channel_list(struct adapter *padapter, RT_CHANNEL_INFO *channel_set, +static void init_channel_list(struct adapter *padapter, struct rt_channel_info *channel_set, u8 chanset_size, struct p2p_channels *channel_list) { @@ -372,13 +372,13 @@ static void init_channel_list(struct adapter *padapter, RT_CHANNEL_INFO *channel } -static u8 init_channel_set(struct adapter* padapter, u8 ChannelPlan, RT_CHANNEL_INFO *channel_set) +static u8 init_channel_set(struct adapter* padapter, u8 ChannelPlan, struct rt_channel_info *channel_set) { u8 index,chanset_size = 0; u8 b5GBand = false, b2_4GBand = false; u8 Index2G = 0, Index5G=0; - memset(channel_set, 0, sizeof(RT_CHANNEL_INFO)*MAX_CHANNEL_NUM); + memset(channel_set, 0, sizeof(struct rt_channel_info)*MAX_CHANNEL_NUM); if(ChannelPlan >= RT_CHANNEL_DOMAIN_MAX && ChannelPlan != RT_CHANNEL_DOMAIN_REALTEK_DEFINE) { @@ -7597,7 +7597,7 @@ static void issue_action_BA(struct adapter *padapter, unsigned char *raddr, u16 reason_code; u16 BA_timeout_value; u16 BA_starting_seqctrl; - HT_CAP_AMPDU_FACTOR max_rx_ampdu_factor; + enum HT_CAP_AMPDU_FACTOR max_rx_ampdu_factor; struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; u8 *pframe; @@ -8694,7 +8694,7 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid { struct registry_priv *pregistrypriv; struct mlme_ext_priv *pmlmeext; - RT_CHANNEL_INFO *chplan_new; + struct rt_channel_info *chplan_new; u8 channel; u8 i; @@ -8708,8 +8708,8 @@ static void process_80211d(struct adapter *padapter, struct wlan_bssid_ex *bssid { u8 *ie, *p; u32 len; - RT_CHANNEL_PLAN chplan_ap; - RT_CHANNEL_INFO chplan_sta[MAX_CHANNEL_NUM]; + struct rt_channel_plan chplan_ap; + struct rt_channel_info chplan_sta[MAX_CHANNEL_NUM]; u8 country[4]; u8 fcn; /* first channel number */ u8 noc; /* number of channel */ diff --git a/include/rtw_mlme_ext.h b/include/rtw_mlme_ext.h index 89c3265..e16198b 100644 --- a/include/rtw_mlme_ext.h +++ b/include/rtw_mlme_ext.h @@ -111,10 +111,9 @@ extern unsigned char REALTEK_96B_IE[]; // We just add new channel plan when the new channel plan is different from any of the following // channel plan. // If you just wnat to customize the acitions(scan period or join actions) about one of the channel plan, -// customize them in RT_CHANNEL_INFO in the RT_CHANNEL_LIST. +// customize them in struct rt_channel_info in the RT_CHANNEL_LIST. // -typedef enum _RT_CHANNEL_DOMAIN -{ +enum rt_channel_domain { //===== old channel plan mapping =====// RT_CHANNEL_DOMAIN_FCC = 0x00, RT_CHANNEL_DOMAIN_IC = 0x01, @@ -164,10 +163,9 @@ typedef enum _RT_CHANNEL_DOMAIN //===== Add new channel plan above this line===============// RT_CHANNEL_DOMAIN_MAX, RT_CHANNEL_DOMAIN_REALTEK_DEFINE = 0x7F, -}RT_CHANNEL_DOMAIN, *PRT_CHANNEL_DOMAIN; +}; -typedef enum _RT_CHANNEL_DOMAIN_2G -{ +enum RT_CHANNEL_DOMAIN_2G { RT_CHANNEL_DOMAIN_2G_WORLD = 0x00, //Worldwird 13 RT_CHANNEL_DOMAIN_2G_ETSI1 = 0x01, //Europe RT_CHANNEL_DOMAIN_2G_FCC1 = 0x02, //US @@ -176,10 +174,9 @@ typedef enum _RT_CHANNEL_DOMAIN_2G RT_CHANNEL_DOMAIN_2G_NULL = 0x05, //===== Add new channel plan above this line===============// RT_CHANNEL_DOMAIN_2G_MAX, -}RT_CHANNEL_DOMAIN_2G, *PRT_CHANNEL_DOMAIN_2G; +}; -typedef enum _RT_CHANNEL_DOMAIN_5G -{ +enum RT_CHANNEL_DOMAIN_5G { RT_CHANNEL_DOMAIN_5G_NULL = 0x00, RT_CHANNEL_DOMAIN_5G_ETSI1 = 0x01, //Europe RT_CHANNEL_DOMAIN_5G_ETSI2 = 0x02, //Australia, New Zealand @@ -203,36 +200,32 @@ typedef enum _RT_CHANNEL_DOMAIN_5G RT_CHANNEL_DOMAIN_5G_JAPAN_NO_DFS = 0x12, RT_CHANNEL_DOMAIN_5G_FCC4_NO_DFS = 0x13, RT_CHANNEL_DOMAIN_5G_MAX, -}RT_CHANNEL_DOMAIN_5G, *PRT_CHANNEL_DOMAIN_5G; +}; #define rtw_is_channel_plan_valid(chplan) (chplan