Commit 6c826500 authored by Nishka Dasgupta's avatar Nishka Dasgupta Committed by Greg Kroah-Hartman

staging: rtl8712: Change return values of r8712_createbss_cmd()

Change return values of r8712_createbss_cmd from _SUCCESS and _FAIL to 0
and -ENOMEM respectively.
Change return type of the function from unsigned to int to reflect this.
Change call site to check for 0 instead of _SUCCESS.
Signed-off-by: default avatarNishka Dasgupta <nishkadg.linux@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1f1e1301
...@@ -409,7 +409,7 @@ void r8712_readtssi_cmdrsp_callback(struct _adapter *padapter, ...@@ -409,7 +409,7 @@ void r8712_readtssi_cmdrsp_callback(struct _adapter *padapter,
padapter->mppriv.workparam.bcompleted = true; padapter->mppriv.workparam.bcompleted = true;
} }
u8 r8712_createbss_cmd(struct _adapter *padapter) int r8712_createbss_cmd(struct _adapter *padapter)
{ {
struct cmd_obj *pcmd; struct cmd_obj *pcmd;
struct cmd_priv *pcmdpriv = &padapter->cmdpriv; struct cmd_priv *pcmdpriv = &padapter->cmdpriv;
...@@ -419,7 +419,7 @@ u8 r8712_createbss_cmd(struct _adapter *padapter) ...@@ -419,7 +419,7 @@ u8 r8712_createbss_cmd(struct _adapter *padapter)
padapter->ledpriv.LedControlHandler(padapter, LED_CTL_START_TO_LINK); padapter->ledpriv.LedControlHandler(padapter, LED_CTL_START_TO_LINK);
pcmd = kmalloc(sizeof(*pcmd), GFP_ATOMIC); pcmd = kmalloc(sizeof(*pcmd), GFP_ATOMIC);
if (!pcmd) if (!pcmd)
return _FAIL; return -ENOMEM;
INIT_LIST_HEAD(&pcmd->list); INIT_LIST_HEAD(&pcmd->list);
pcmd->cmdcode = _CreateBss_CMD_; pcmd->cmdcode = _CreateBss_CMD_;
pcmd->parmbuf = (unsigned char *)pdev_network; pcmd->parmbuf = (unsigned char *)pdev_network;
...@@ -431,7 +431,7 @@ u8 r8712_createbss_cmd(struct _adapter *padapter) ...@@ -431,7 +431,7 @@ u8 r8712_createbss_cmd(struct _adapter *padapter)
pdev_network->IELength = pdev_network->IELength; pdev_network->IELength = pdev_network->IELength;
pdev_network->Ssid.SsidLength = pdev_network->Ssid.SsidLength; pdev_network->Ssid.SsidLength = pdev_network->Ssid.SsidLength;
r8712_enqueue_cmd(pcmdpriv, pcmd); r8712_enqueue_cmd(pcmdpriv, pcmd);
return _SUCCESS; return 0;
} }
u8 r8712_joinbss_cmd(struct _adapter *padapter, struct wlan_network *pnetwork) u8 r8712_joinbss_cmd(struct _adapter *padapter, struct wlan_network *pnetwork)
......
...@@ -712,7 +712,7 @@ u8 r8712_setMacAddr_cmd(struct _adapter *padapter, u8 *mac_addr); ...@@ -712,7 +712,7 @@ u8 r8712_setMacAddr_cmd(struct _adapter *padapter, u8 *mac_addr);
u8 r8712_setassocsta_cmd(struct _adapter *padapter, u8 *mac_addr); u8 r8712_setassocsta_cmd(struct _adapter *padapter, u8 *mac_addr);
u8 r8712_sitesurvey_cmd(struct _adapter *padapter, u8 r8712_sitesurvey_cmd(struct _adapter *padapter,
struct ndis_802_11_ssid *pssid); struct ndis_802_11_ssid *pssid);
u8 r8712_createbss_cmd(struct _adapter *padapter); int r8712_createbss_cmd(struct _adapter *padapter);
u8 r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key); u8 r8712_setstakey_cmd(struct _adapter *padapter, u8 *psta, u8 unicast_key);
u8 r8712_joinbss_cmd(struct _adapter *padapter, u8 r8712_joinbss_cmd(struct _adapter *padapter,
struct wlan_network *pnetwork); struct wlan_network *pnetwork);
......
...@@ -84,7 +84,7 @@ static u8 do_join(struct _adapter *padapter) ...@@ -84,7 +84,7 @@ static u8 do_join(struct _adapter *padapter)
sizeof(struct ndis_802_11_ssid)); sizeof(struct ndis_802_11_ssid));
r8712_update_registrypriv_dev_network(padapter); r8712_update_registrypriv_dev_network(padapter);
r8712_generate_random_ibss(pibss); r8712_generate_random_ibss(pibss);
if (r8712_createbss_cmd(padapter) != _SUCCESS) if (r8712_createbss_cmd(padapter))
return false; return false;
pmlmepriv->to_join = false; pmlmepriv->to_join = false;
} else { } else {
......
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