This inline function checks that the pointer is not NULL and then returns
the rx_data member. Unfortunately, all 3 callers of this function have
dereferenced that pointer before this routine is called. As the check for
NULL is useless, eliminate the routine.
Reported-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
auth_alg = adapter->securitypriv.dot11AuthAlgrthm;
- ptr = get_recvframe_data(precv_frame);
+ ptr = precv_frame->rx_data;
pfhdr = precv_frame;
pattrib = &pfhdr->attrib;
psta_addr = pattrib->ta;
int ret = _SUCCESS;
struct adapter *adapter = precvframe->adapter;
struct mlme_priv *pmlmepriv = &adapter->mlmepriv;
-
- u8 *ptr = get_recvframe_data(precvframe); /* point to frame_ctrl field */
+ u8 *ptr = precvframe->rx_data;
struct rx_pkt_attrib *pattrib = &precvframe->attrib;
-
if (pattrib->encrypt)
recvframe_pull_tail(precvframe, pattrib->icv_len);
pkt_info.bPacketToSelf = false;
pkt_info.bPacketBeacon = false;
- wlanhdr = get_recvframe_data(precvframe);
+ wlanhdr = precvframe->rx_data;
pkt_info.bPacketMatchBSSID = ((!IsFrameTypeCtrl(wlanhdr)) &&
!pattrib->icv_err && !pattrib->crc_err &&
return get_rxmem(precvframe);
}
-static inline u8 *get_recvframe_data(struct recv_frame *precvframe)
-{
- /* always return rx_data */
- if (precvframe == NULL)
- return NULL;
-
- return precvframe->rx_data;
-}
-
static inline u8 *recvframe_push(struct recv_frame *precvframe, int sz)
{
/* append data before rx_data */