Commit 507a755d authored by Larry Finger's avatar Larry Finger Committed by Greg Kroah-Hartman

staging: r8723au: Fix endian errors for frame control

The following locations in the code treat the frame control as u16 rather than
the correct __le16:

drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2471:15:    expected unsigned short *fctrl
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2644:15:    expected unsigned short *fctrl
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2849:15:    expected unsigned short *fctrl
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:2994:15:    expected unsigned short *fctrl
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3308:15:    expected unsigned short *fctrl
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3578:15:    expected unsigned short *fctrl
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3699:15:    expected unsigned short *fctrl
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3821:15:    expected unsigned short *fctrl
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:3932:15:    expected unsigned short *fctrl
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4004:15:    expected unsigned short [usertype] *fctrl
drivers/staging/rtl8723au/core/rtw_mlme_ext.c:4194:15:    expected unsigned short *fctrl
drivers/staging/rtl8723au/core/rtw_xmit.c:911:23:    expected unsigned short [usertype] *fctrl
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:216:15:    expected unsigned short [usertype] *fctrl
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:313:15:    expected unsigned short [usertype] *fctrl
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:350:15:    expected unsigned short [usertype] *fctrl
drivers/staging/rtl8723au/hal/rtl8723a_cmd.c:419:15:    expected unsigned short [usertype] *fctrl
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:314:15:    expected unsigned short *fctrl
drivers/staging/rtl8723au/os_dep/ioctl_cfg80211.c:2357:15:    expected unsigned short *fctrl
Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6a235443
...@@ -2435,7 +2435,7 @@ void issue_beacon23a(struct rtw_adapter *padapter, int timeout_ms) ...@@ -2435,7 +2435,7 @@ void issue_beacon23a(struct rtw_adapter *padapter, int timeout_ms)
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; __le16 *fctrl;
unsigned int rate_len; unsigned int rate_len;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
...@@ -2603,7 +2603,7 @@ void issue_probersp23a(struct rtw_adapter *padapter, unsigned char *da, ...@@ -2603,7 +2603,7 @@ void issue_probersp23a(struct rtw_adapter *padapter, unsigned char *da,
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; __le16 *fctrl;
unsigned char *mac, *bssid; unsigned char *mac, *bssid;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
#ifdef CONFIG_8723AU_AP_MODE #ifdef CONFIG_8723AU_AP_MODE
...@@ -2820,7 +2820,7 @@ static int _issue_probereq23a(struct rtw_adapter *padapter, ...@@ -2820,7 +2820,7 @@ static int _issue_probereq23a(struct rtw_adapter *padapter,
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; __le16 *fctrl;
unsigned char *mac; unsigned char *mac;
unsigned char bssrate[NumRates]; unsigned char bssrate[NumRates];
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
...@@ -2846,7 +2846,7 @@ static int _issue_probereq23a(struct rtw_adapter *padapter, ...@@ -2846,7 +2846,7 @@ static int _issue_probereq23a(struct rtw_adapter *padapter,
mac = myid(&padapter->eeprompriv); mac = myid(&padapter->eeprompriv);
fctrl = &pwlanhdr->frame_control; fctrl = &pwlanhdr->frame_control;
*fctrl = 0; *fctrl = 0;
if (da) { if (da) {
...@@ -2971,7 +2971,7 @@ void issue_auth23a(struct rtw_adapter *padapter, struct sta_info *psta, ...@@ -2971,7 +2971,7 @@ void issue_auth23a(struct rtw_adapter *padapter, struct sta_info *psta,
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; __le16 *fctrl;
unsigned int val32; unsigned int val32;
unsigned short val16; unsigned short val16;
int use_shared_key = 0; int use_shared_key = 0;
...@@ -3280,7 +3280,7 @@ void issue_assocreq23a(struct rtw_adapter *padapter) ...@@ -3280,7 +3280,7 @@ void issue_assocreq23a(struct rtw_adapter *padapter)
unsigned char *pframe; unsigned char *pframe;
const u8 *p; const u8 *p;
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; __le16 *fctrl;
unsigned int i, j, index = 0; unsigned int i, j, index = 0;
unsigned char rf_type, bssrate[NumRates], sta_bssrate[NumRates]; unsigned char rf_type, bssrate[NumRates], sta_bssrate[NumRates];
struct ndis_802_11_var_ies *pIE; struct ndis_802_11_var_ies *pIE;
...@@ -3548,7 +3548,7 @@ static int _issue_nulldata23a(struct rtw_adapter *padapter, unsigned char *da, ...@@ -3548,7 +3548,7 @@ static int _issue_nulldata23a(struct rtw_adapter *padapter, unsigned char *da,
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; __le16 *fctrl;
struct xmit_priv *pxmitpriv; struct xmit_priv *pxmitpriv;
struct mlme_ext_priv *pmlmeext; struct mlme_ext_priv *pmlmeext;
struct mlme_ext_info *pmlmeinfo; struct mlme_ext_info *pmlmeinfo;
...@@ -3671,7 +3671,8 @@ static int _issue_qos_nulldata23a(struct rtw_adapter *padapter, ...@@ -3671,7 +3671,8 @@ static int _issue_qos_nulldata23a(struct rtw_adapter *padapter,
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl, *qc; __le16 *fctrl;
u16 *qc;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
...@@ -3797,7 +3798,7 @@ static int _issue_deauth23a(struct rtw_adapter *padapter, unsigned char *da, ...@@ -3797,7 +3798,7 @@ static int _issue_deauth23a(struct rtw_adapter *padapter, unsigned char *da,
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; __le16 *fctrl;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
...@@ -3908,7 +3909,7 @@ void issue_action_spct_ch_switch23a(struct rtw_adapter *padapter, ...@@ -3908,7 +3909,7 @@ void issue_action_spct_ch_switch23a(struct rtw_adapter *padapter,
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
unsigned char *pframe; unsigned char *pframe;
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; __le16 *fctrl;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
u8 category, action; u8 category, action;
...@@ -3975,7 +3976,7 @@ void issue_action_BA23a(struct rtw_adapter *padapter, ...@@ -3975,7 +3976,7 @@ void issue_action_BA23a(struct rtw_adapter *padapter,
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
u8 *pframe; u8 *pframe;
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u16 *fctrl; __le16 *fctrl;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
...@@ -4155,7 +4156,7 @@ static void issue_action_BSSCoexistPacket(struct rtw_adapter *padapter) ...@@ -4155,7 +4156,7 @@ static void issue_action_BSSCoexistPacket(struct rtw_adapter *padapter)
struct pkt_attrib *pattrib; struct pkt_attrib *pattrib;
u8 *pframe; u8 *pframe;
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; __le16 *fctrl;
struct wlan_network *pnetwork; struct wlan_network *pnetwork;
struct xmit_priv *pxmitpriv = &padapter->xmitpriv; struct xmit_priv *pxmitpriv = &padapter->xmitpriv;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
......
...@@ -908,7 +908,7 @@ s32 rtw_make_wlanhdr23a(struct rtw_adapter *padapter, u8 *hdr, ...@@ -908,7 +908,7 @@ s32 rtw_make_wlanhdr23a(struct rtw_adapter *padapter, u8 *hdr,
struct qos_priv *pqospriv = &pmlmepriv->qospriv; struct qos_priv *pqospriv = &pmlmepriv->qospriv;
u8 qos_option = false; u8 qos_option = false;
int res = _SUCCESS; int res = _SUCCESS;
u16 *fctrl = &pwlanhdr->frame_control; __le16 *fctrl = &pwlanhdr->frame_control;
struct sta_info *psta; struct sta_info *psta;
......
...@@ -202,7 +202,7 @@ void rtl8723a_set_FwPwrMode_cmd(struct rtw_adapter *padapter, u8 Mode) ...@@ -202,7 +202,7 @@ void rtl8723a_set_FwPwrMode_cmd(struct rtw_adapter *padapter, u8 Mode)
static void ConstructBeacon(struct rtw_adapter *padapter, u8 *pframe, u32 *pLength) static void ConstructBeacon(struct rtw_adapter *padapter, u8 *pframe, u32 *pLength)
{ {
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u16 *fctrl; __le16 *fctrl;
u32 rate_len, pktlen; u32 rate_len, pktlen;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
...@@ -303,7 +303,7 @@ static void ConstructBeacon(struct rtw_adapter *padapter, u8 *pframe, u32 *pLeng ...@@ -303,7 +303,7 @@ static void ConstructBeacon(struct rtw_adapter *padapter, u8 *pframe, u32 *pLeng
static void ConstructPSPoll(struct rtw_adapter *padapter, u8 *pframe, u32 *pLength) static void ConstructPSPoll(struct rtw_adapter *padapter, u8 *pframe, u32 *pLength)
{ {
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u16 *fctrl; __le16 *fctrl;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
...@@ -338,7 +338,7 @@ static void ConstructNullFunctionData( ...@@ -338,7 +338,7 @@ static void ConstructNullFunctionData(
u8 bForcePowerSave) u8 bForcePowerSave)
{ {
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u16 *fctrl; __le16 *fctrl;
u32 pktlen; u32 pktlen;
struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct wlan_network *cur_network = &pmlmepriv->cur_network; struct wlan_network *cur_network = &pmlmepriv->cur_network;
...@@ -402,7 +402,7 @@ static void ConstructNullFunctionData( ...@@ -402,7 +402,7 @@ static void ConstructNullFunctionData(
static void ConstructProbeRsp(struct rtw_adapter *padapter, u8 *pframe, u32 *pLength, u8 *StaAddr, bool bHideSSID) static void ConstructProbeRsp(struct rtw_adapter *padapter, u8 *pframe, u32 *pLength, u8 *StaAddr, bool bHideSSID)
{ {
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
u16 *fctrl; __le16 *fctrl;
u8 *mac, *bssid; u8 *mac, *bssid;
u32 pktlen; u32 pktlen;
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
......
...@@ -262,7 +262,7 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter, ...@@ -262,7 +262,7 @@ static int rtw_cfg80211_inform_bss(struct rtw_adapter *padapter,
u8 buf[MAX_BSSINFO_LEN], *pbuf; u8 buf[MAX_BSSINFO_LEN], *pbuf;
size_t len; size_t len;
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; __le16 *fctrl;
struct wireless_dev *wdev = padapter->rtw_wdev; struct wireless_dev *wdev = padapter->rtw_wdev;
struct wiphy *wiphy = wdev->wiphy; struct wiphy *wiphy = wdev->wiphy;
...@@ -2332,7 +2332,7 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter, ...@@ -2332,7 +2332,7 @@ void rtw_cfg80211_indicate_sta_disassoc(struct rtw_adapter *padapter,
u8 *pmgmt_frame; u8 *pmgmt_frame;
uint frame_len; uint frame_len;
struct ieee80211_hdr *pwlanhdr; struct ieee80211_hdr *pwlanhdr;
unsigned short *fctrl; __le16 *fctrl;
u8 mgmt_buf[128] = { 0 }; u8 mgmt_buf[128] = { 0 };
struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv;
struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info;
......
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