Commit 7721483c authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Greg Kroah-Hartman

staging: rtl8712: mp_start_test(): Change return values

Change return values of function mp_start_test() from _SUCCESS/_FAIL to
0/-ENOMEM and modify call sites accordingly.
Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f5e5eaef
...@@ -153,7 +153,7 @@ static int mp_start_test(struct _adapter *padapter) ...@@ -153,7 +153,7 @@ static int mp_start_test(struct _adapter *padapter)
struct sta_info *psta; struct sta_info *psta;
unsigned long length; unsigned long length;
unsigned long irqL; unsigned long irqL;
int res = _SUCCESS; int res = 0;
/* 3 1. initialize a new struct wlan_bssid_ex */ /* 3 1. initialize a new struct wlan_bssid_ex */
memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN); memcpy(bssid.MacAddress, pmppriv->network_macaddr, ETH_ALEN);
...@@ -187,7 +187,7 @@ static int mp_start_test(struct _adapter *padapter) ...@@ -187,7 +187,7 @@ static int mp_start_test(struct _adapter *padapter)
r8712_free_stainfo(padapter, psta); r8712_free_stainfo(padapter, psta);
psta = r8712_alloc_stainfo(&padapter->stapriv, bssid.MacAddress); psta = r8712_alloc_stainfo(&padapter->stapriv, bssid.MacAddress);
if (psta == NULL) { if (psta == NULL) {
res = _FAIL; res = -ENOMEM;
goto end_of_mp_start_test; goto end_of_mp_start_test;
} }
/* 3 3. join pseudo AdHoc */ /* 3 3. join pseudo AdHoc */
...@@ -262,7 +262,7 @@ uint oid_rt_pro_start_test_hdl(struct oid_par_priv *poid_par_priv) ...@@ -262,7 +262,7 @@ uint oid_rt_pro_start_test_hdl(struct oid_par_priv *poid_par_priv)
return RNDIS_STATUS_NOT_ACCEPTED; return RNDIS_STATUS_NOT_ACCEPTED;
mode = *((u32 *)poid_par_priv->information_buf); mode = *((u32 *)poid_par_priv->information_buf);
Adapter->mppriv.mode = mode;/* 1 for loopback*/ Adapter->mppriv.mode = mode;/* 1 for loopback*/
if (mp_start_test(Adapter) == _FAIL) if (mp_start_test(Adapter))
status = RNDIS_STATUS_NOT_ACCEPTED; status = RNDIS_STATUS_NOT_ACCEPTED;
r8712_write8(Adapter, MSR, 1); /* Link in ad hoc network, 0x1025004C */ r8712_write8(Adapter, MSR, 1); /* Link in ad hoc network, 0x1025004C */
r8712_write8(Adapter, RCR, 0); /* RCR : disable all pkt, 0x10250048 */ r8712_write8(Adapter, RCR, 0); /* RCR : disable all pkt, 0x10250048 */
......
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