mirror of
https://github.com/lwfinger/rtl8188eu.git
synced 2025-06-30 19:06:01 +00:00
rtl8188eu: Change "){" to ") {"
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
parent
c137ff21e5
commit
0a97479cee
46 changed files with 464 additions and 464 deletions
|
@ -389,7 +389,7 @@ static char *translate_scan(struct adapter *padapter,
|
|||
|
||||
cap = le16_to_cpu(le_cap);
|
||||
|
||||
if (cap & (WLAN_CAPABILITY_IBSS |WLAN_CAPABILITY_BSS)){
|
||||
if (cap & (WLAN_CAPABILITY_IBSS |WLAN_CAPABILITY_BSS)) {
|
||||
if (cap & WLAN_CAPABILITY_BSS)
|
||||
iwe.u.mode = IW_MODE_MASTER;
|
||||
else
|
||||
|
@ -684,7 +684,7 @@ static int wpa_set_encryption(struct net_device *dev, struct ieee_param *param,
|
|||
wep_key_len = wep_key_len <= 5 ? 5 : 13;
|
||||
wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
|
||||
pwep =(struct ndis_802_11_wep *) rtw_malloc(wep_total_len);
|
||||
if (pwep == NULL){
|
||||
if (pwep == NULL) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,(" wpa_set_encryption: pwep allocate fail !!!\n"));
|
||||
goto exit;
|
||||
}
|
||||
|
@ -849,7 +849,7 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char *pie, unsigned short ie
|
|||
struct wifidirect_info* pwdinfo = &padapter->wdinfo;
|
||||
#endif /* CONFIG_P2P */
|
||||
|
||||
if ((ielen > MAX_WPA_IE_LEN) || (pie == NULL)){
|
||||
if ((ielen > MAX_WPA_IE_LEN) || (pie == NULL)) {
|
||||
_clr_fwstate_(&padapter->mlmepriv, WIFI_UNDER_WPS);
|
||||
if (pie == NULL)
|
||||
return ret;
|
||||
|
@ -859,7 +859,7 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char *pie, unsigned short ie
|
|||
|
||||
if (ielen) {
|
||||
buf = rtw_zmalloc(ielen);
|
||||
if (buf == NULL){
|
||||
if (buf == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -875,7 +875,7 @@ static int rtw_set_wpa_ie(struct adapter *padapter, char *pie, unsigned short ie
|
|||
}
|
||||
|
||||
pos = buf;
|
||||
if (ielen < RSN_HEADER_LEN){
|
||||
if (ielen < RSN_HEADER_LEN) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,("Ie len too short %d\n", ielen));
|
||||
ret = -1;
|
||||
goto exit;
|
||||
|
@ -1109,7 +1109,7 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (padapter->hw_init_completed==false){
|
||||
if (padapter->hw_init_completed==false) {
|
||||
ret = -EPERM;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1140,7 +1140,7 @@ static int rtw_wx_set_mode(struct net_device *dev, struct iw_request_info *a,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (rtw_set_802_11_infrastructure_mode(padapter, networkType) ==false){
|
||||
if (rtw_set_802_11_infrastructure_mode(padapter, networkType) ==false) {
|
||||
|
||||
ret = -EPERM;
|
||||
goto exit;
|
||||
|
@ -1394,13 +1394,13 @@ static int rtw_wx_set_wap(struct net_device *dev,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (!padapter->bup){
|
||||
if (!padapter->bup) {
|
||||
ret = -1;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
|
||||
if (temp->sa_family != ARPHRD_ETHER){
|
||||
if (temp->sa_family != ARPHRD_ETHER) {
|
||||
ret = -EINVAL;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1553,12 +1553,12 @@ static int rtw_wx_set_scan(struct net_device *dev, struct iw_request_info *a,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (!padapter->bup){
|
||||
if (!padapter->bup) {
|
||||
ret = -1;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
if (padapter->hw_init_completed==false){
|
||||
if (padapter->hw_init_completed==false) {
|
||||
ret = -1;
|
||||
goto exit;
|
||||
}
|
||||
|
@ -1860,15 +1860,15 @@ static int rtw_wx_set_essid(struct net_device *dev,
|
|||
goto exit;
|
||||
}
|
||||
|
||||
if (!padapter->bup){
|
||||
if (!padapter->bup) {
|
||||
ret = -1;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
#if WIRELESS_EXT <= 20
|
||||
if ((wrqu->essid.length-1) > IW_ESSID_MAX_SIZE){
|
||||
if ((wrqu->essid.length-1) > IW_ESSID_MAX_SIZE) {
|
||||
#else
|
||||
if (wrqu->essid.length > IW_ESSID_MAX_SIZE){
|
||||
if (wrqu->essid.length > IW_ESSID_MAX_SIZE) {
|
||||
#endif
|
||||
ret= -E2BIG;
|
||||
goto exit;
|
||||
|
@ -2026,13 +2026,13 @@ static int rtw_wx_set_rate(struct net_device *dev,
|
|||
RT_TRACE(_module_rtl871x_mlme_c_,_drv_info_,(" rtw_wx_set_rate\n"));
|
||||
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_info_,("target_rate = %d, fixed = %d\n",target_rate,fixed));
|
||||
|
||||
if (target_rate == -1){
|
||||
if (target_rate == -1) {
|
||||
ratevalue = 11;
|
||||
goto set_rate;
|
||||
}
|
||||
target_rate = target_rate/100000;
|
||||
|
||||
switch (target_rate){
|
||||
switch (target_rate) {
|
||||
case 10:
|
||||
ratevalue = 0;
|
||||
break;
|
||||
|
@ -2091,7 +2091,7 @@ set_rate:
|
|||
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_info_,("datarate_inx=%d\n",datarates[i]));
|
||||
}
|
||||
|
||||
if ( rtw_setdatarate_cmd(padapter, datarates) !=_SUCCESS){
|
||||
if ( rtw_setdatarate_cmd(padapter, datarates) !=_SUCCESS) {
|
||||
RT_TRACE(_module_rtl871x_ioctl_os_c,_drv_err_,("rtw_wx_set_rate Fail!!!\n"));
|
||||
ret = -1;
|
||||
}
|
||||
|
@ -2473,7 +2473,7 @@ static int rtw_wx_set_auth(struct net_device *dev,
|
|||
/* then it needn't reset it; */
|
||||
}
|
||||
|
||||
if (param->value){
|
||||
if (param->value) {
|
||||
padapter->securitypriv.ndisencryptstatus = Ndis802_11EncryptionDisabled;
|
||||
padapter->securitypriv.dot11PrivacyAlgrthm=_NO_PRIVACY_;
|
||||
padapter->securitypriv.dot118021XGrpPrivacy=_NO_PRIVACY_;
|
||||
|
@ -2818,7 +2818,7 @@ static int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info,
|
|||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
struct iw_point *p = &wrqu->data;
|
||||
|
||||
if ( (!p->length) || (!p->pointer)){
|
||||
if ( (!p->length) || (!p->pointer)) {
|
||||
ret = -EINVAL;
|
||||
goto _rtw_drvext_hdl_exit;
|
||||
}
|
||||
|
@ -2827,7 +2827,7 @@ static int rtw_drvext_hdl(struct net_device *dev, struct iw_request_info *info,
|
|||
bset = (u8)(p->flags&0xFFFF);
|
||||
len = p->length;
|
||||
pparmbuf = (u8*)rtw_malloc(len);
|
||||
if (pparmbuf == NULL){
|
||||
if (pparmbuf == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto _rtw_drvext_hdl_exit;
|
||||
}
|
||||
|
@ -3030,7 +3030,7 @@ static int rtw_mp_ioctl_hdl(struct net_device *dev, struct iw_request_info *info
|
|||
bset = (u8)(p->flags & 0xFFFF);
|
||||
len = p->length;
|
||||
pparmbuf = (u8*)rtw_malloc(len);
|
||||
if (pparmbuf == NULL){
|
||||
if (pparmbuf == NULL) {
|
||||
ret = -ENOMEM;
|
||||
goto _rtw_mp_ioctl_hdl_exit;
|
||||
}
|
||||
|
@ -5625,7 +5625,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
break;
|
||||
}
|
||||
|
||||
for (i=0;i<blink_num;i++){
|
||||
for (i=0;i<blink_num;i++) {
|
||||
rtw_IOL_append_WB_cmd(xmit_frame, reg, 0x00,0xff);
|
||||
rtw_IOL_append_DELAY_MS_cmd(xmit_frame, blink_delay_ms);
|
||||
rtw_IOL_append_WB_cmd(xmit_frame, reg, 0x08,0xff);
|
||||
|
@ -5652,7 +5652,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
break;
|
||||
}
|
||||
|
||||
for (i=0;i<write_num;i++){
|
||||
for (i=0;i<write_num;i++) {
|
||||
rtw_IOL_append_WB_cmd(xmit_frame, reg, i+start_value,0xFF);
|
||||
}
|
||||
if (_SUCCESS != rtw_IOL_exec_cmds_sync(padapter, xmit_frame, 5000,0))
|
||||
|
@ -5684,7 +5684,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
break;
|
||||
}
|
||||
|
||||
for (i=0;i<write_num;i++){
|
||||
for (i=0;i<write_num;i++) {
|
||||
rtw_IOL_append_WW_cmd(xmit_frame, reg, i+start_value,0xFFFF);
|
||||
}
|
||||
if (_SUCCESS !=rtw_IOL_exec_cmds_sync(padapter, xmit_frame, 5000,0))
|
||||
|
@ -5716,7 +5716,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
break;
|
||||
}
|
||||
|
||||
for (i=0;i<write_num;i++){
|
||||
for (i=0;i<write_num;i++) {
|
||||
rtw_IOL_append_WD_cmd(xmit_frame, reg, i+start_value,0xFFFFFFFF);
|
||||
}
|
||||
if (_SUCCESS !=rtw_IOL_exec_cmds_sync(padapter, xmit_frame, 5000,0))
|
||||
|
@ -5919,7 +5919,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
psta = LIST_CONTAINOR(plist, struct sta_info, hash_list);
|
||||
|
||||
plist = get_next(plist);
|
||||
if (arg == 0xff){
|
||||
if (arg == 0xff) {
|
||||
psta->rx_bk_cnt =0;
|
||||
psta->rx_be_cnt =0;
|
||||
psta->rx_vo_cnt =0;
|
||||
|
@ -5954,12 +5954,12 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
|
||||
case 0x0c:/* dump rx/tx packet */
|
||||
{
|
||||
if (arg == 0){
|
||||
if (arg == 0) {
|
||||
DBG_871X("dump rx packet (%d)\n",extra_arg);
|
||||
/* pHalData->bDumpRxPkt =extra_arg; */
|
||||
rtw_hal_set_def_var(padapter, HAL_DEF_DBG_DUMP_RXPKT, &(extra_arg));
|
||||
}
|
||||
else if (arg==1){
|
||||
else if (arg==1) {
|
||||
DBG_871X("dump tx packet (%d)\n",extra_arg);
|
||||
rtw_hal_set_def_var(padapter, HAL_DEF_DBG_DUMP_TXPKT, &(extra_arg));
|
||||
}
|
||||
|
@ -5967,7 +5967,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
break;
|
||||
case 0x0f:
|
||||
{
|
||||
if (extra_arg == 0){
|
||||
if (extra_arg == 0) {
|
||||
DBG_871X("###### silent reset test.......#####\n");
|
||||
rtw_hal_sreset_reset(padapter);
|
||||
} else {
|
||||
|
@ -6030,7 +6030,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
break;
|
||||
case 0x16:
|
||||
{
|
||||
if (arg == 0xff){
|
||||
if (arg == 0xff) {
|
||||
rtw_odm_dbg_comp_msg(padapter);
|
||||
}
|
||||
else{
|
||||
|
@ -6077,13 +6077,13 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
break;
|
||||
case 0xdd:/* registers dump , 0 for mac reg,1 for bb reg, 2 for rf reg */
|
||||
{
|
||||
if (extra_arg== 0){
|
||||
if (extra_arg== 0) {
|
||||
mac_reg_dump(padapter);
|
||||
}
|
||||
else if (extra_arg==1){
|
||||
else if (extra_arg==1) {
|
||||
bb_reg_dump(padapter);
|
||||
}
|
||||
else if (extra_arg==2){
|
||||
else if (extra_arg==2) {
|
||||
rf_reg_dump(padapter);
|
||||
}
|
||||
|
||||
|
@ -6094,7 +6094,7 @@ static int rtw_dbg_port(struct net_device *dev,
|
|||
{
|
||||
u32 odm_flag;
|
||||
|
||||
if (0xf==extra_arg){
|
||||
if (0xf==extra_arg) {
|
||||
rtw_hal_get_def_var(padapter, HAL_DEF_DBG_DM_FUNC,&odm_flag);
|
||||
DBG_871X(" === DMFlag(0x%08x) ===\n",odm_flag);
|
||||
DBG_871X("extra_arg = 0 - disable all dynamic func\n");
|
||||
|
@ -6175,7 +6175,7 @@ static int wpa_set_param(struct net_device *dev, u8 name, u32 value)
|
|||
u32 flags;
|
||||
struct adapter *padapter = (struct adapter *)rtw_netdev_priv(dev);
|
||||
|
||||
switch (name){
|
||||
switch (name) {
|
||||
case IEEE_PARAM_WPA_ENABLED:
|
||||
padapter->securitypriv.dot11AuthAlgrthm= dot11AuthAlgrthm_8021X; /* 802.1x */
|
||||
|
||||
|
@ -6261,7 +6261,7 @@ static int wpa_supplicant_ioctl(struct net_device *dev, struct iw_point *p)
|
|||
|
||||
/* down(&ieee->wx_sem); */
|
||||
|
||||
if (p->length < sizeof(struct ieee_param) || !p->pointer){
|
||||
if (p->length < sizeof(struct ieee_param) || !p->pointer) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
@ -6328,13 +6328,13 @@ static u8 set_pairwise_key(struct adapter *padapter, struct sta_info *psta)
|
|||
u8 res=_SUCCESS;
|
||||
|
||||
ph2c = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if ( ph2c == NULL){
|
||||
if ( ph2c == NULL) {
|
||||
res= _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
|
||||
psetstakey_para = (struct set_stakey_parm*)rtw_zmalloc(sizeof(struct set_stakey_parm));
|
||||
if (psetstakey_para== NULL){
|
||||
if (psetstakey_para== NULL) {
|
||||
rtw_mfree((u8 *) ph2c, sizeof(struct cmd_obj));
|
||||
res=_FAIL;
|
||||
goto exit;
|
||||
|
@ -6369,12 +6369,12 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid)
|
|||
DBG_871X("%s\n", __FUNCTION__);
|
||||
|
||||
pcmd = (struct cmd_obj*)rtw_zmalloc(sizeof(struct cmd_obj));
|
||||
if (pcmd== NULL){
|
||||
if (pcmd== NULL) {
|
||||
res= _FAIL;
|
||||
goto exit;
|
||||
}
|
||||
psetkeyparm=(struct setkey_parm*)rtw_zmalloc(sizeof(struct setkey_parm));
|
||||
if (psetkeyparm== NULL){
|
||||
if (psetkeyparm== NULL) {
|
||||
rtw_mfree((unsigned char *)pcmd, sizeof(struct cmd_obj));
|
||||
res= _FAIL;
|
||||
goto exit;
|
||||
|
@ -6521,7 +6521,7 @@ static int rtw_set_encryption(struct net_device *dev, struct ieee_param *param,
|
|||
wep_key_len = wep_key_len <= 5 ? 5 : 13;
|
||||
wep_total_len = wep_key_len + FIELD_OFFSET(struct ndis_802_11_wep, KeyMaterial);
|
||||
pwep =(struct ndis_802_11_wep *)rtw_malloc(wep_total_len);
|
||||
if (pwep == NULL){
|
||||
if (pwep == NULL) {
|
||||
DBG_871X(" r871x_set_encryption: pwep allocate fail !!!\n");
|
||||
goto exit;
|
||||
}
|
||||
|
@ -7277,14 +7277,14 @@ static int rtw_hostapd_ioctl(struct net_device *dev, struct iw_point *p)
|
|||
* so, we just check hw_init_completed
|
||||
*/
|
||||
|
||||
if (padapter->hw_init_completed==false){
|
||||
if (padapter->hw_init_completed==false) {
|
||||
ret = -EPERM;
|
||||
goto out;
|
||||
}
|
||||
|
||||
|
||||
/* if (p->length < sizeof(struct ieee_param) || !p->pointer){ */
|
||||
if (!p->pointer){
|
||||
/* if (p->length < sizeof(struct ieee_param) || !p->pointer) { */
|
||||
if (!p->pointer) {
|
||||
ret = -EINVAL;
|
||||
goto out;
|
||||
}
|
||||
|
@ -7501,7 +7501,7 @@ static int rtw_wx_set_priv(struct net_device *dev,
|
|||
|
||||
if ( len >= WEXT_CSCAN_HEADER_SIZE
|
||||
&& _rtw_memcmp(ext, WEXT_CSCAN_HEADER, WEXT_CSCAN_HEADER_SIZE) == true
|
||||
){
|
||||
) {
|
||||
ret = rtw_wx_set_scan(dev, info, awrq, ext);
|
||||
goto FREE_EXT;
|
||||
}
|
||||
|
@ -7686,7 +7686,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
|
|||
}
|
||||
padapter->registrypriv.fw_iol = 0;/* 0:Disable, 1:enable, 2:by usb speed */
|
||||
|
||||
if (strcmp(tmp[0], "status") == 0){
|
||||
if (strcmp(tmp[0], "status") == 0) {
|
||||
sprintf(extra, "Load File efuse=%s,Load File MAC=%s",(pEEPROM->bloadfile_fail_flag? "FAIL" : "OK"),(pEEPROM->bloadmac_fail_flag? "FAIL" : "OK"));
|
||||
goto exit;
|
||||
}
|
||||
|
@ -7797,7 +7797,7 @@ static int rtw_mp_efuse_get(struct net_device *dev,
|
|||
if ((i & 0xF) == 0xF) {
|
||||
sprintf(extra, "%s\n", extra);
|
||||
}
|
||||
else if ((i & 0x7) == 0x7){
|
||||
else if ((i & 0x7) == 0x7) {
|
||||
sprintf(extra, "%s\t", extra);
|
||||
} else {
|
||||
sprintf(extra, "%s ", extra);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue