staging: rtl8712: make_wlanhdr(): Change return values and type

Change return values of make_wlanhdr from _SUCCESS/_FAIL to 0/-EINVAL.
Modify call site to check for non-zero return values instead of _FAIL.
Change return type from sint to int.

Signed-off-by: Nishka Dasgupta <nishkadg.linux@gmail.com>
Link: https://lore.kernel.org/r/20190809052353.5308-4-nishkadg.linux@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Nishka Dasgupta 2019-08-09 10:53:46 +05:30 committed by Greg Kroah-Hartman
parent b013c5b8dd
commit 0d478943e3
1 changed files with 5 additions and 5 deletions

View File

@ -469,8 +469,8 @@ static sint xmitframe_swencrypt(struct _adapter *padapter,
return _SUCCESS;
}
static sint make_wlanhdr(struct _adapter *padapter, u8 *hdr,
struct pkt_attrib *pattrib)
static int make_wlanhdr(struct _adapter *padapter, u8 *hdr,
struct pkt_attrib *pattrib)
{
u16 *qc;
@ -509,7 +509,7 @@ static sint make_wlanhdr(struct _adapter *padapter, u8 *hdr,
memcpy(pwlanhdr->addr3, get_bssid(pmlmepriv),
ETH_ALEN);
} else {
return _FAIL;
return -EINVAL;
}
if (pattrib->encrypt)
@ -547,7 +547,7 @@ static sint make_wlanhdr(struct _adapter *padapter, u8 *hdr,
}
}
}
return _SUCCESS;
return 0;
}
static sint r8712_put_snap(u8 *data, u16 h_proto)
@ -605,7 +605,7 @@ sint r8712_xmitframe_coalesce(struct _adapter *padapter, _pkt *pkt,
pbuf_start = pxmitframe->buf_addr;
ptxdesc = pbuf_start;
mem_start = pbuf_start + TXDESC_OFFSET;
if (make_wlanhdr(padapter, mem_start, pattrib) == _FAIL)
if (make_wlanhdr(padapter, mem_start, pattrib))
return _FAIL;
_r8712_open_pktfile(pkt, &pktfile);
_r8712_pktfile_read(&pktfile, NULL, (uint) pattrib->pkt_hdrlen);