rtl8188eu: Change "){" to ") {"

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
This commit is contained in:
Larry Finger 2015-08-15 13:24:16 -05:00
parent c137ff21e5
commit 0a97479cee
46 changed files with 464 additions and 464 deletions

View file

@ -342,7 +342,7 @@ struct cfg80211_bss *rtw_cfg80211_inform_bss(struct adapter *padapter, struct wl
/* DBG_8192C("%s\n", __func__); */
bssinf_len = pnetwork->network.IELength+sizeof (struct rtw_ieee80211_hdr_3addr);
if (bssinf_len > MAX_BSSINFO_LEN){
if (bssinf_len > MAX_BSSINFO_LEN) {
DBG_871X("%s IE Length too long > %d byte\n",__FUNCTION__,MAX_BSSINFO_LEN);
goto exit;
}
@ -754,13 +754,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;
@ -795,12 +795,12 @@ static int set_group_key(struct adapter *padapter, u8 *key, u8 alg, int keyid)
DBG_8192C("%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;
@ -2046,7 +2046,7 @@ static int cfg80211_rtw_scan(struct wiphy *wiphy
goto check_need_indicate_scan_done;
}
if (rtw_is_scan_deny(padapter)){
if (rtw_is_scan_deny(padapter)) {
DBG_871X(FUNC_ADPT_FMT ": scan deny\n", FUNC_ADPT_ARG(padapter));
need_indicate_scan_done = true;
goto check_need_indicate_scan_done;
@ -2255,7 +2255,7 @@ static int rtw_cfg80211_set_wpa_ie(struct adapter *padapter, u8 *pie, size_t iel
}
buf = rtw_zmalloc(ielen);
if (buf == NULL){
if (buf == NULL) {
ret = -ENOMEM;
goto exit;
}
@ -2271,7 +2271,7 @@ static int rtw_cfg80211_set_wpa_ie(struct adapter *padapter, u8 *pie, size_t iel
}
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;
@ -2481,7 +2481,7 @@ static int cfg80211_rtw_join_ibss(struct wiphy *wiphy, struct net_device *ndev,
goto exit;
}
if (params->ssid_len > IW_ESSID_MAX_SIZE){
if (params->ssid_len > IW_ESSID_MAX_SIZE) {
ret= -E2BIG;
goto exit;
@ -2567,7 +2567,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
goto exit;
}
if (sme->ssid_len > IW_ESSID_MAX_SIZE){
if (sme->ssid_len > IW_ESSID_MAX_SIZE) {
ret= -E2BIG;
goto exit;
@ -2642,7 +2642,7 @@ static int cfg80211_rtw_connect(struct wiphy *wiphy, struct net_device *ndev,
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(" wpa_set_encryption: pwep allocate fail !!!\n");
ret = -ENOMEM;
goto exit;

View file

@ -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);

View file

@ -196,7 +196,7 @@ void rtw_report_sec_ie(struct adapter *adapter,u8 authmode,u8 *sec_ie)
len = sec_ie[1]+2;
len = (len < IW_CUSTOM_MAX) ? len:IW_CUSTOM_MAX;
for (i=0;i<len;i++){
for (i=0;i<len;i++) {
p+=sprintf(p,"%02x",sec_ie[i]);
}

View file

@ -1086,7 +1086,7 @@ int _netdev_open(struct net_device *pnetdev)
RT_TRACE(_module_os_intfs_c_,_drv_info_,("+871x_drv - dev_open\n"));
DBG_871X("+871x_drv - drv_open, bup=%d\n", padapter->bup);
if (pwrctrlpriv->ps_flag == true){
if (pwrctrlpriv->ps_flag == true) {
padapter->net_closed = false;
goto netdev_open_normal_process;
}
@ -1293,7 +1293,7 @@ static int netdev_close(struct net_device *pnetdev)
}
padapter->net_closed = true;
if (adapter_to_pwrctl(padapter)->rf_pwrstate == rf_on){
if (adapter_to_pwrctl(padapter)->rf_pwrstate == rf_on) {
DBG_871X("(2)871x_drv - drv_close, bup=%d, hw_init_completed=%d\n", padapter->bup, padapter->hw_init_completed);
/* s1. */
@ -1637,7 +1637,7 @@ static int rtw_suspend_free_assoc_resource(struct adapter *padapter)
DBG_871X("==> "FUNC_ADPT_FMT" entry....\n", FUNC_ADPT_ARG(padapter));
rtw_cancel_all_timer(padapter);
if (pnetdev){
if (pnetdev) {
netif_carrier_off(pnetdev);
rtw_netif_stop_queue(pnetdev);
}
@ -1662,7 +1662,7 @@ static int rtw_suspend_free_assoc_resource(struct adapter *padapter)
rtw_sta_flush(padapter);
}
#endif
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) ){
if (check_fwstate(pmlmepriv, WIFI_STATION_STATE) ) {
/* s2-2. indicate disconnect to os */
rtw_indicate_disconnect(padapter);
}

View file

@ -34,7 +34,7 @@
* Translate the OS dependent @param error_code to OS independent RTW_STATUS_CODE
* @return: one of RTW_STATUS_CODE
*/
inline int RTW_STATUS_CODE(int error_code){
inline int RTW_STATUS_CODE(int error_code) {
if (error_code >=0)
return _SUCCESS;
@ -997,7 +997,7 @@ static int retriveFromFile(char *path, u8* buf, u32 sz)
struct file *fp;
if (path && buf) {
if ( 0 == (ret=openFile(&fp,path, O_RDONLY, 0)) ){
if ( 0 == (ret=openFile(&fp,path, O_RDONLY, 0)) ) {
DBG_871X("%s openFile path:%s fp=%p\n",__FUNCTION__, path ,fp);
oldfs = get_fs(); set_fs(get_ds());

View file

@ -79,7 +79,7 @@ int rtw_os_recvbuf_resource_alloc(struct adapter *padapter, struct recv_buf *pre
precvbuf->irp_pending = false;
precvbuf->purb = usb_alloc_urb(0, GFP_KERNEL);
if (precvbuf->purb == NULL){
if (precvbuf->purb == NULL) {
res = _FAIL;
}

View file

@ -356,7 +356,7 @@ int rtw_android_priv_cmd(struct net_device *net, struct ifreq *ifr, int cmd)
goto exit;
}
if (!access_ok(VERIFY_READ, (const void __user *)priv_cmd.buf, priv_cmd.total_len)){
if (!access_ok(VERIFY_READ, (const void __user *)priv_cmd.buf, priv_cmd.total_len)) {
DBG_871X("%s: failed to access memory\n", __FUNCTION__);
ret = -EFAULT;
goto exit;

View file

@ -627,7 +627,7 @@ static int rtw_suspend(struct usb_interface *pusb_intf, pm_message_t message)
DBG_871X("==> %s (%s:%d)\n",__FUNCTION__, current->comm, current->pid);
if (!padapter->bup){
if (!padapter->bup) {
u8 bMacPwrCtrlOn = false;
rtw_hal_get_hwreg(padapter, HW_VAR_APFM_ON_MAC, &bMacPwrCtrlOn);
if (bMacPwrCtrlOn)
@ -679,7 +679,7 @@ static int rtw_resume(struct usb_interface *pusb_intf)
struct pwrctrl_priv *pwrpriv = dvobj_to_pwrctl(dvobj);
int ret = 0;
if (pwrpriv->bInternalAutoSuspend ){
if (pwrpriv->bInternalAutoSuspend ) {
ret = rtw_resume_process(padapter);
} else {
if (rtw_is_earlysuspend_registered(pwrpriv)) {
@ -725,7 +725,7 @@ int rtw_resume_process(struct adapter *padapter)
#endif
DBG_871X("pwrpriv->bAutoResume (%x)\n",pwrpriv->bAutoResume );
if ( true == pwrpriv->bAutoResume ){
if ( true == pwrpriv->bAutoResume ) {
pwrpriv->bInternalAutoSuspend = false;
pwrpriv->bAutoResume=false;
DBG_871X("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n",pwrpriv->bAutoResume,pwrpriv->bInternalAutoSuspend );
@ -754,7 +754,7 @@ int rtw_resume_process(struct adapter *padapter)
#endif
#ifdef CONFIG_BT_COEXIST
DBG_871X("pwrpriv->bAutoResume (%x)\n",pwrpriv->bAutoResume );
if ( true == pwrpriv->bAutoResume ){
if ( true == pwrpriv->bAutoResume ) {
pwrpriv->bInternalAutoSuspend = false;
pwrpriv->bAutoResume=false;
DBG_871X("pwrpriv->bAutoResume (%x) pwrpriv->bInternalAutoSuspend(%x)\n",pwrpriv->bAutoResume,pwrpriv->bInternalAutoSuspend );
@ -810,7 +810,7 @@ void autosuspend_enter(struct adapter* padapter)
usb_autosuspend_device(dvobj->pusbdev, 1);
#endif
#else /* ifndef CONFIG_BT_COEXIST */
if (1==pwrpriv->autopm_cnt){
if (1==pwrpriv->autopm_cnt) {
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,35))
usb_enable_autosuspend(dvobj->pusbdev);
#else
@ -873,7 +873,7 @@ int autoresume_enter(struct adapter* padapter)
#endif
#else /* ifndef CONFIG_BT_COEXIST */
pwrpriv->bAutoResume=true;
if (0==pwrpriv->autopm_cnt){
if (0==pwrpriv->autopm_cnt) {
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,33))
if (usb_autopm_get_interface(dvobj->pusbintf) < 0)
{
@ -990,7 +990,7 @@ static struct adapter *rtw_usb_if1_init(struct dvobj_priv *dvobj,
#ifdef CONFIG_AUTOSUSPEND
if ( padapter->registrypriv.power_mgnt != PS_MODE_ACTIVE )
{
if (padapter->registrypriv.usbss_enable ){ /* autosuspend (2s delay) */
if (padapter->registrypriv.usbss_enable ) { /* autosuspend (2s delay) */
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,38))
dvobj->pusbdev->dev.power.autosuspend_delay = 0 * HZ;/* 15 * HZ; idle-delay time */
#else
@ -1090,7 +1090,7 @@ static void rtw_usb_if1_deinit(struct adapter *if1)
}
#ifdef CONFIG_BT_COEXIST
if (1 == pwrctl->autopm_cnt){
if (1 == pwrctl->autopm_cnt) {
#if (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,33))
usb_autopm_put_interface(adapter_to_dvobj(if1)->pusbintf);
#elif (LINUX_VERSION_CODE>=KERNEL_VERSION(2,6,20))