Commit d54239a4 authored by Jes Sorensen's avatar Jes Sorensen Committed by Greg Kroah-Hartman

staging: rtl8723au: rtw_mlme_ext.c: Fix up some of the bad formatting

Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 25da2290
...@@ -120,46 +120,84 @@ static unsigned char REALTEK_96B_IE[] = {0x00, 0xe0, 0x4c, 0x02, 0x01, 0x20}; ...@@ -120,46 +120,84 @@ static unsigned char REALTEK_96B_IE[] = {0x00, 0xe0, 0x4c, 0x02, 0x01, 0x20};
MCS rate definitions MCS rate definitions
*********************************************************/ *********************************************************/
unsigned char MCS_rate_2R23A[16] = { unsigned char MCS_rate_2R23A[16] = {
0xff, 0xff, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; 0xff, 0xff, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
unsigned char MCS_rate_1R23A[16] = { unsigned char MCS_rate_1R23A[16] = {
0xff, 0x00, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0}; 0xff, 0x00, 0x0, 0x0, 0x01, 0x0, 0x0, 0x0,
0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0};
/******************************************************** /********************************************************
ChannelPlan definitions ChannelPlan definitions
*********************************************************/ *********************************************************/
static struct 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 */ /* 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, 12, 13}, 13},
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 11}, /* 0x02, RT_CHANNEL_DOMAIN_2G_FCC1 */ /* 0x01, RT_CHANNEL_DOMAIN_2G_ETSI1 */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, 14}, /* 0x03, RT_CHANNEL_DOMAIN_2G_MIKK1 */ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13}, 13},
{{10, 11, 12, 13}, 4}, /* 0x04, RT_CHANNEL_DOMAIN_2G_ETSI2 */ /* 0x02, RT_CHANNEL_DOMAIN_2G_FCC1 */
{{}, 0}, /* 0x05, RT_CHANNEL_DOMAIN_2G_NULL */ {{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}, 11},
/* 0x03, RT_CHANNEL_DOMAIN_2G_MIKK1 */
{{1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}, 14},
/* 0x04, RT_CHANNEL_DOMAIN_2G_ETSI2 */
{{10, 11, 12, 13}, 4},
/* 0x05, RT_CHANNEL_DOMAIN_2G_NULL */
{{}, 0},
}; };
static struct 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 */ /* 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 */ {{}, 0},
{{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 */ /* 0x01, RT_CHANNEL_DOMAIN_5G_ETSI1 */
{{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 149, 153, 157, 161, 165}, 22}, /* 0x03, RT_CHANNEL_DOMAIN_5G_ETSI3 */ {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
{{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}, /* 0x04, RT_CHANNEL_DOMAIN_5G_FCC1 */ 116, 120, 124, 128, 132, 136, 140}, 19},
{{36, 40, 44, 48, 149, 153, 157, 161, 165}, 9}, /* 0x05, RT_CHANNEL_DOMAIN_5G_FCC2 */ /* 0x02, RT_CHANNEL_DOMAIN_5G_ETSI2 */
{{36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165}, 13}, /* 0x06, RT_CHANNEL_DOMAIN_5G_FCC3 */ {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
{{36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161}, 12}, /* 0x07, RT_CHANNEL_DOMAIN_5G_FCC4 */ 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165}, 24},
{{149, 153, 157, 161, 165}, 5}, /* 0x08, RT_CHANNEL_DOMAIN_5G_FCC5 */ /* 0x03, RT_CHANNEL_DOMAIN_5G_ETSI3 */
{{36, 40, 44, 48, 52, 56, 60, 64}, 8}, /* 0x09, RT_CHANNEL_DOMAIN_5G_FCC6 */ {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
{{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 136, 140, 149, 153, 157, 161, 165}, 20}, /* 0x0A, RT_CHANNEL_DOMAIN_5G_FCC7_IC1 */ 116, 120, 124, 128, 132, 149, 153, 157, 161, 165}, 22},
{{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 149, 153, 157, 161, 165}, 20}, /* 0x0B, RT_CHANNEL_DOMAIN_5G_KCC1 */ /* 0x04, RT_CHANNEL_DOMAIN_5G_FCC1 */
{{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140}, 19}, /* 0x0C, RT_CHANNEL_DOMAIN_5G_MKK1 */ {{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
{{36, 40, 44, 48, 52, 56, 60, 64}, 8}, /* 0x0D, RT_CHANNEL_DOMAIN_5G_MKK2 */ 116, 120, 124, 128, 132, 136, 140, 149, 153, 157, 161, 165}, 24},
{{100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140}, 11}, /* 0x0E, RT_CHANNEL_DOMAIN_5G_MKK3 */ /* 0x05, RT_CHANNEL_DOMAIN_5G_FCC2 */
{{56, 60, 64, 100, 104, 108, 112, 116, 136, 140, 149, 153, 157, 161, 165}, 15}, /* 0x0F, RT_CHANNEL_DOMAIN_5G_NCC1 */ {{36, 40, 44, 48, 149, 153, 157, 161, 165}, 9},
{{56, 60, 64, 149, 153, 157, 161, 165}, 8}, /* 0x10, RT_CHANNEL_DOMAIN_5G_NCC2 */ /* 0x06, RT_CHANNEL_DOMAIN_5G_FCC3 */
{{36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161, 165}, 13},
/* Driver self defined for old channel plan Compatible , Remember to modify if have new channel plan definition ===== */ /* 0x07, RT_CHANNEL_DOMAIN_5G_FCC4 */
{{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112, 116, 132, 136, 140, 149, 153, 157, 161, 165}, 21}, /* 0x11, RT_CHANNEL_DOMAIN_5G_FCC */ {{36, 40, 44, 48, 52, 56, 60, 64, 149, 153, 157, 161}, 12},
{{36, 40, 44, 48}, 4}, /* 0x12, RT_CHANNEL_DOMAIN_5G_JAPAN_NO_DFS */ /* 0x08, RT_CHANNEL_DOMAIN_5G_FCC5 */
{{36, 40, 44, 48, 149, 153, 157, 161}, 8}, /* 0x13, RT_CHANNEL_DOMAIN_5G_FCC4_NO_DFS */ {{149, 153, 157, 161, 165}, 5},
/* 0x09, RT_CHANNEL_DOMAIN_5G_FCC6 */
{{36, 40, 44, 48, 52, 56, 60, 64}, 8},
/* 0x0A, RT_CHANNEL_DOMAIN_5G_FCC7_IC1 */
{{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
116, 136, 140, 149, 153, 157, 161, 165}, 20},
/* 0x0B, RT_CHANNEL_DOMAIN_5G_KCC1 */
{{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
116, 120, 124, 149, 153, 157, 161, 165}, 20},
/* 0x0C, RT_CHANNEL_DOMAIN_5G_MKK1 */
{{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
116, 120, 124, 128, 132, 136, 140}, 19},
/* 0x0D, RT_CHANNEL_DOMAIN_5G_MKK2 */
{{36, 40, 44, 48, 52, 56, 60, 64}, 8},
/* 0x0E, RT_CHANNEL_DOMAIN_5G_MKK3 */
{{100, 104, 108, 112, 116, 120, 124, 128, 132, 136, 140}, 11},
/* 0x0F, RT_CHANNEL_DOMAIN_5G_NCC1 */
{{56, 60, 64, 100, 104, 108, 112, 116, 136, 140, 149,
153, 157, 161, 165}, 15},
/* 0x10, RT_CHANNEL_DOMAIN_5G_NCC2 */
{{56, 60, 64, 149, 153, 157, 161, 165}, 8},
/* Driver self defined for old channel plan Compatible,
Remember to modify if have new channel plan definition ===== */
/* 0x11, RT_CHANNEL_DOMAIN_5G_FCC */
{{36, 40, 44, 48, 52, 56, 60, 64, 100, 104, 108, 112,
116, 132, 136, 140, 149, 153, 157, 161, 165}, 21},
/* 0x12, RT_CHANNEL_DOMAIN_5G_JAPAN_NO_DFS */
{{36, 40, 44, 48}, 4},
/* 0x13, RT_CHANNEL_DOMAIN_5G_FCC4_NO_DFS */
{{36, 40, 44, 48, 149, 153, 157, 161}, 8},
}; };
static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = { static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
...@@ -233,7 +271,8 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = { ...@@ -233,7 +271,8 @@ static struct rt_channel_plan_map RTW_ChannelPlanMap[RT_CHANNEL_DOMAIN_MAX] = {
{0x03, 0x00}, /* 0x41, RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN_2G */ {0x03, 0x00}, /* 0x41, RT_CHANNEL_DOMAIN_GLOBAL_DOAMIN_2G */
}; };
static struct 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 */
static void dummy_event_callback(struct rtw_adapter *adapter, const u8 *pbuf) static void dummy_event_callback(struct rtw_adapter *adapter, const u8 *pbuf)
{ {
...@@ -250,8 +289,7 @@ static struct fwevent wlanevents[] = ...@@ -250,8 +289,7 @@ static struct fwevent wlanevents[] =
{0, NULL}, {0, NULL},
{0, NULL}, {0, NULL},
{0, &rtw_survey_event_cb23a}, /*8*/ {0, &rtw_survey_event_cb23a}, /*8*/
{sizeof (struct surveydone_event), &rtw_surveydone_event_callback23a}, /*9*/ {sizeof (struct surveydone_event), &rtw_surveydone_event_callback23a},
{0, &rtw23a_joinbss_event_cb}, /*10*/ {0, &rtw23a_joinbss_event_cb}, /*10*/
{sizeof(struct stassoc_event), &rtw_stassoc_event_callback23a}, {sizeof(struct stassoc_event), &rtw_stassoc_event_callback23a},
{sizeof(struct stadel_event), &rtw_stadel_event_callback23a}, {sizeof(struct stadel_event), &rtw_stadel_event_callback23a},
...@@ -391,8 +429,8 @@ static int has_channel(struct rt_channel_info *channel_set, ...@@ -391,8 +429,8 @@ static int has_channel(struct rt_channel_info *channel_set,
static void init_channel_list(struct rtw_adapter *padapter, static void init_channel_list(struct rtw_adapter *padapter,
struct rt_channel_info *channel_set, struct rt_channel_info *channel_set,
u8 chanset_size, u8 chanset_size,
struct p2p_channels *channel_list) { struct p2p_channels *channel_list)
{
struct p2p_oper_class_map op_class[] = { struct p2p_oper_class_map op_class[] = {
{ IEEE80211G, 81, 1, 13, 1, BW20 }, { IEEE80211G, 81, 1, 13, 1, BW20 },
{ IEEE80211G, 82, 14, 14, 1, BW20 }, { IEEE80211G, 82, 14, 14, 1, BW20 },
...@@ -4383,8 +4421,9 @@ bool IsLegal5GChannel(struct rtw_adapter *Adapter, u8 channel) ...@@ -4383,8 +4421,9 @@ bool IsLegal5GChannel(struct rtw_adapter *Adapter, u8 channel)
int i = 0; int i = 0;
u8 Channel_5G[45] = {36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, u8 Channel_5G[45] = {36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58,
60, 62, 64, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118, 120, 122, 60, 62, 64, 100, 102, 104, 106, 108, 110, 112,
124, 126, 128, 130, 132, 134, 136, 138, 140, 149, 151, 153, 155, 157, 159, 114, 116, 118, 120, 122, 124, 126, 128, 130, 132,
134, 136, 138, 140, 149, 151, 153, 155, 157, 159,
161, 163, 165}; 161, 163, 165};
for (i = 0; i < sizeof(Channel_5G); i++) for (i = 0; i < sizeof(Channel_5G); i++)
if (channel == Channel_5G[i]) if (channel == Channel_5G[i])
...@@ -4789,8 +4828,10 @@ static void start_clnt_auth(struct rtw_adapter* padapter) ...@@ -4789,8 +4828,10 @@ static void start_clnt_auth(struct rtw_adapter* padapter)
/* AP may: 1)not response auth or 2)deauth us after link is complete */ /* AP may: 1)not response auth or 2)deauth us after link is complete */
/* issue deauth before issuing auth to deal with the situation */ /* issue deauth before issuing auth to deal with the situation */
/* Commented by Albert 2012/07/21 */ /* Commented by Albert 2012/07/21 */
/* For the Win8 P2P connection, it will be hard to have a successful connection if this Wi-Fi doesn't connect to it. */ /* For the Win8 P2P connection, it will be hard to have a
issue_deauth23a(padapter, (&pmlmeinfo->network)->MacAddress, WLAN_REASON_DEAUTH_LEAVING); successful connection if this Wi-Fi doesn't connect to it. */
issue_deauth23a(padapter, (&pmlmeinfo->network)->MacAddress,
WLAN_REASON_DEAUTH_LEAVING);
DBG_8723A_LEVEL(_drv_always_, "start auth\n"); DBG_8723A_LEVEL(_drv_always_, "start auth\n");
issue_auth(padapter, NULL, 0); issue_auth(padapter, NULL, 0);
...@@ -5074,7 +5115,8 @@ Following are the functions to report events ...@@ -5074,7 +5115,8 @@ Following are the functions to report events
*****************************************************************************/ *****************************************************************************/
void report_survey_event23a(struct rtw_adapter *padapter, struct recv_frame *precv_frame) void report_survey_event23a(struct rtw_adapter *padapter,
struct recv_frame *precv_frame)
{ {
struct cmd_obj *pcmd_obj; struct cmd_obj *pcmd_obj;
u8 *pevtcmd; u8 *pevtcmd;
...@@ -5224,7 +5266,8 @@ void report_join_res23a(struct rtw_adapter *padapter, int res) ...@@ -5224,7 +5266,8 @@ void report_join_res23a(struct rtw_adapter *padapter, int res)
return; return;
} }
void report_del_sta_event23a(struct rtw_adapter *padapter, unsigned char* MacAddr, unsigned short reason) void report_del_sta_event23a(struct rtw_adapter *padapter,
unsigned char* MacAddr, unsigned short reason)
{ {
struct cmd_obj *pcmd_obj; struct cmd_obj *pcmd_obj;
u8 *pevtcmd; u8 *pevtcmd;
...@@ -5280,7 +5323,8 @@ void report_del_sta_event23a(struct rtw_adapter *padapter, unsigned char* MacAdd ...@@ -5280,7 +5323,8 @@ void report_del_sta_event23a(struct rtw_adapter *padapter, unsigned char* MacAdd
return; return;
} }
void report_add_sta_event23a(struct rtw_adapter *padapter, unsigned char* MacAddr, int cam_idx) void report_add_sta_event23a(struct rtw_adapter *padapter,
unsigned char* MacAddr, int cam_idx)
{ {
struct cmd_obj *pcmd_obj; struct cmd_obj *pcmd_obj;
u8 *pevtcmd; u8 *pevtcmd;
...@@ -5377,7 +5421,8 @@ void update_sta_info23a(struct rtw_adapter *padapter, struct sta_info *psta) ...@@ -5377,7 +5421,8 @@ void update_sta_info23a(struct rtw_adapter *padapter, struct sta_info *psta)
psta->state = _FW_LINKED; psta->state = _FW_LINKED;
} }
void mlmeext_joinbss_event_callback23a(struct rtw_adapter *padapter, int join_res) void mlmeext_joinbss_event_callback23a(struct rtw_adapter *padapter,
int join_res)
{ {
struct sta_info *psta, *psta_bmc; struct sta_info *psta, *psta_bmc;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
...@@ -5459,7 +5504,8 @@ void mlmeext_joinbss_event_callback23a(struct rtw_adapter *padapter, int join_re ...@@ -5459,7 +5504,8 @@ void mlmeext_joinbss_event_callback23a(struct rtw_adapter *padapter, int join_re
DBG_8723A("=>%s\n", __func__); DBG_8723A("=>%s\n", __func__);
} }
void mlmeext_sta_add_event_callback23a(struct rtw_adapter *padapter, struct sta_info *psta) void mlmeext_sta_add_event_callback23a(struct rtw_adapter *padapter,
struct sta_info *psta)
{ {
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment