diff options
Diffstat (limited to 'drivers/staging/r8188eu/hal/rtl8188e_cmd.c')
-rw-r--r-- | drivers/staging/r8188eu/hal/rtl8188e_cmd.c | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c index f1464e4ba429..475650dc7301 100644 --- a/drivers/staging/r8188eu/hal/rtl8188e_cmd.c +++ b/drivers/staging/r8188eu/hal/rtl8188e_cmd.c @@ -199,16 +199,16 @@ void rtl8188e_set_FwMediaStatus_cmd(struct adapter *adapt, __le16 mstatus_rpt) static void ConstructBeacon(struct adapter *adapt, u8 *pframe, u32 *pLength) { - struct rtw_ieee80211_hdr *pwlanhdr; + struct ieee80211_hdr *pwlanhdr; __le16 *fctrl; u32 rate_len, pktlen; struct mlme_ext_priv *pmlmeext = &adapt->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct wlan_bssid_ex *cur_network = &pmlmeinfo->network; - pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; + pwlanhdr = (struct ieee80211_hdr *)pframe; - fctrl = &pwlanhdr->frame_ctl; + fctrl = &pwlanhdr->frame_control; *(fctrl) = 0; eth_broadcast_addr(pwlanhdr->addr1); @@ -218,8 +218,8 @@ static void ConstructBeacon(struct adapter *adapt, u8 *pframe, u32 *pLength) SetSeqNum(pwlanhdr, 0/*pmlmeext->mgnt_seq*/); SetFrameSubType(pframe, WIFI_BEACON); - pframe += sizeof(struct rtw_ieee80211_hdr_3addr); - pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); + pframe += sizeof(struct ieee80211_hdr_3addr); + pktlen = sizeof(struct ieee80211_hdr_3addr); /* timestamp will be inserted by hardware */ pframe += 8; @@ -281,15 +281,15 @@ _ConstructBeacon: static void ConstructPSPoll(struct adapter *adapt, u8 *pframe, u32 *pLength) { - struct rtw_ieee80211_hdr *pwlanhdr; + struct ieee80211_hdr *pwlanhdr; struct mlme_ext_priv *pmlmeext = &adapt->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; __le16 *fctrl; - pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; + pwlanhdr = (struct ieee80211_hdr *)pframe; /* Frame control. */ - fctrl = &pwlanhdr->frame_ctl; + fctrl = &pwlanhdr->frame_control; *(fctrl) = 0; SetPwrMgt(fctrl); SetFrameSubType(pframe, WIFI_PSPOLL); @@ -314,7 +314,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe, u8 bEosp, u8 bForcePowerSave) { - struct rtw_ieee80211_hdr *pwlanhdr; + struct ieee80211_hdr *pwlanhdr; __le16 *fctrl; u32 pktlen; struct mlme_priv *pmlmepriv = &adapt->mlmepriv; @@ -322,9 +322,9 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe, struct mlme_ext_priv *pmlmeext = &adapt->mlmeextpriv; struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; - pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; + pwlanhdr = (struct ieee80211_hdr *)pframe; - fctrl = &pwlanhdr->frame_ctl; + fctrl = &pwlanhdr->frame_control; *(fctrl) = 0; if (bForcePowerSave) SetPwrMgt(fctrl); @@ -353,19 +353,19 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe, SetSeqNum(pwlanhdr, 0); if (bQoS) { - struct rtw_ieee80211_hdr_3addr_qos *pwlanqoshdr; + struct ieee80211_qos_hdr *pwlanqoshdr; SetFrameSubType(pframe, WIFI_QOS_DATA_NULL); - pwlanqoshdr = (struct rtw_ieee80211_hdr_3addr_qos *)pframe; - SetPriority(&pwlanqoshdr->qc, AC); - SetEOSP(&pwlanqoshdr->qc, bEosp); + pwlanqoshdr = (struct ieee80211_qos_hdr *)pframe; + SetPriority(&pwlanqoshdr->qos_ctrl, AC); + SetEOSP(&pwlanqoshdr->qos_ctrl, bEosp); - pktlen = sizeof(struct rtw_ieee80211_hdr_3addr_qos); + pktlen = sizeof(struct ieee80211_qos_hdr); } else { SetFrameSubType(pframe, WIFI_DATA_NULL); - pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); + pktlen = sizeof(struct ieee80211_qos_hdr); } *pLength = pktlen; @@ -373,7 +373,7 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe, static void ConstructProbeRsp(struct adapter *adapt, u8 *pframe, u32 *pLength, u8 *StaAddr, bool bHideSSID) { - struct rtw_ieee80211_hdr *pwlanhdr; + struct ieee80211_hdr *pwlanhdr; __le16 *fctrl; u8 *mac, *bssid; u32 pktlen; @@ -381,12 +381,12 @@ static void ConstructProbeRsp(struct adapter *adapt, u8 *pframe, u32 *pLength, u struct mlme_ext_info *pmlmeinfo = &pmlmeext->mlmext_info; struct wlan_bssid_ex *cur_network = &pmlmeinfo->network; - pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; + pwlanhdr = (struct ieee80211_hdr *)pframe; mac = myid(&adapt->eeprompriv); bssid = cur_network->MacAddress; - fctrl = &pwlanhdr->frame_ctl; + fctrl = &pwlanhdr->frame_control; *(fctrl) = 0; memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN); memcpy(pwlanhdr->addr2, mac, ETH_ALEN); @@ -395,7 +395,7 @@ static void ConstructProbeRsp(struct adapter *adapt, u8 *pframe, u32 *pLength, u SetSeqNum(pwlanhdr, 0); SetFrameSubType(fctrl, WIFI_PROBERSP); - pktlen = sizeof(struct rtw_ieee80211_hdr_3addr); + pktlen = sizeof(struct ieee80211_hdr_3addr); pframe += pktlen; if (cur_network->IELength > MAX_IE_SZ) @@ -557,8 +557,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *adapt, u8 mstatus) rtw_write8(adapt, REG_FWHW_TXQ_CTRL + 2, (haldata->RegFwHwTxQCtrl & (~BIT(6)))); haldata->RegFwHwTxQCtrl &= (~BIT(6)); - /* Clear beacon valid check bit. */ - SetHwReg8188EU(adapt, HW_VAR_BCN_VALID, NULL); + clear_beacon_valid_bit(adapt); DLBcnCount = 0; poll = 0; do { @@ -569,7 +568,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *adapt, u8 mstatus) yield(); /* mdelay(10); */ /* check rsvd page download OK. */ - GetHwReg8188EU(adapt, HW_VAR_BCN_VALID, (u8 *)(&bcn_valid)); + bcn_valid = get_beacon_valid_bit(adapt); poll++; } while (!bcn_valid && (poll % 10) != 0 && !adapt->bSurpriseRemoved && !adapt->bDriverStopped); } while (!bcn_valid && DLBcnCount <= 100 && !adapt->bSurpriseRemoved && !adapt->bDriverStopped); @@ -597,7 +596,7 @@ void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *adapt, u8 mstatus) /* Update RSVD page location H2C to Fw. */ if (bcn_valid) - SetHwReg8188EU(adapt, HW_VAR_BCN_VALID, NULL); + clear_beacon_valid_bit(adapt); /* Do not enable HW DMA BCN or it will cause Pcie interface hang by timing issue. 2011.11.24. by tynli. */ /* Clear CR[8] or beacon packet will not be send to TxBuf anymore. */ |