diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-05 14:50:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-10-05 14:50:51 -0700 |
commit | 41844e36206be90cd4d962ea49b0abc3612a99d0 (patch) | |
tree | ce0b3a3403bc6abdb28f52779d0d7b57a51a5c86 /drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | |
parent | 5691f0e9a3e7855832d5fd094801bf600347c2d0 (diff) | |
parent | fc1e2c8ea85e109acf09e74789e9b852f6eed251 (diff) | |
download | op-kernel-dev-41844e36206be90cd4d962ea49b0abc3612a99d0.zip op-kernel-dev-41844e36206be90cd4d962ea49b0abc3612a99d0.tar.gz |
Merge tag 'staging-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging and IIO updates from Greg KH:
"Here is the big staging and IIO driver pull request for 4.9-rc1.
There are a lot of patches in here, the majority due to the
drivers/staging/greybus/ subsystem being merged in with full
development history that went back a few years, in order to preserve
the work that those developers did over time.
Lots and lots of tiny cleanups happened in the tree as well, due to
the Outreachy application process and lots of other developers showing
up for the first time to clean code up. Along with those changes, we
deleted a wireless driver, and added a raspberrypi driver (currently
marked broken), and lots of new iio drivers.
Overall the tree still shrunk with more lines removed than added,
about 10 thousand lines removed in total. Full details are in the very
long shortlog below.
All of this has been in the linux-next tree with no issues. There will
be some merge problems with other subsystem trees, but those are all
minor problems and shouldn't be hard to work out when they happen
(MAINTAINERS and some lustre build problems with the IB tree)"
And furter from me asking for clarification about greybus:
"Right now there is a phone from Motorola shipping with this code (a
slightly older version, but the same tree), so even though Ara is not
alive in the same form, the functionality is happening. We are working
with the developers of that phone to merge the newer stuff in with
their fork so they can use the upstream version in future versions of
their phone product line.
Toshiba has at least one chip shipping in their catalog that
needs/uses this protocol over a Unipro link, and rumor has it that
there might be more in the future.
There are also other users of the greybus protocols, there is a talk
next week at ELC that shows how it is being used across a network
connection to control a device, and previous ELC talks have showed the
protocol stack being used over USB to drive embedded Linux boards.
I've also talked to some people who are starting to work to add a host
controller driver to control arduinos as the greybus PHY protocols are
very useful to control a serial/i2c/spio/whatever device across a
random physical link, as it is a way to have a self-describing device
be attached to a host without needing manual configuration.
So yes, people are using it, and there is still the chance that it
will show up in a phone/laptop/tablet/whatever from Google in the
future as well, the tech isn't dead, even if the original large phone
project happens to be"
* tag 'staging-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (3703 commits)
Staging: fbtft: Fix bug in fbtft-core
staging: rtl8188eu: fix double unlock error in rtw_resume_process()
staging:r8188eu: remove GEN_MLME_EXT_HANDLER macro
staging:r8188eu: remove GEN_DRV_CMD_HANDLER macro
staging:r8188eu: remove GEN_EVT_CODE macro
staging:r8188eu: remove GEN_CMD_CODE macro
staging:r8188eu: remove pkt_newalloc member of the recv_buf structure
staging:r8188eu: remove rtw_handle_dualmac declaration
staging:r8188eu: remove (RGTRY|BSSID)_(OFT|SZ) macros
staging:r8188eu: change rtl8188e_process_phy_info function argument type
Staging: fsl-mc: Remove blank lines
Staging: fsl-mc: Fix unaligned * in block comments
Staging: comedi: Align the * in block comments
Staging : ks7010 : Fix block comments warninig
Staging: vt6655: Remove explicit NULL comparison using Coccinelle
staging: rtl8188eu: core: rtw_xmit: Use macros instead of constants
staging: rtl8188eu: core: rtw_xmit: Move constant of the right side
staging: dgnc: Fix lines longer than 80 characters
Staging: dgnc: constify attribute_group structures
Staging: most: hdm-dim2: constify attribute_group structures
...
Diffstat (limited to 'drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c')
-rw-r--r-- | drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c | 96 |
1 files changed, 47 insertions, 49 deletions
diff --git a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c index 2422c02..d0f59b7 100644 --- a/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c +++ b/drivers/staging/rtl8188eu/hal/rtl8188e_cmd.c @@ -60,7 +60,6 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 ElementID, u32 CmdLen, u8 *p u8 h2c_box_num; u32 msgbox_addr; u32 msgbox_ex_addr; - struct hal_data_8188e *haldata = GET_HAL_DATA(adapt); u8 cmd_idx, ext_cmd_len; u32 h2c_cmd = 0; u32 h2c_cmd_ex = 0; @@ -81,7 +80,7 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 ElementID, u32 CmdLen, u8 *p /* pay attention to if race condition happened in H2C cmd setting. */ do { - h2c_box_num = haldata->LastHMEBoxNum; + h2c_box_num = adapt->HalData->LastHMEBoxNum; if (!_is_fw_read_cmd_down(adapt, h2c_box_num)) { DBG_88E(" fw read cmd failed...\n"); @@ -110,7 +109,8 @@ static s32 FillH2CCmd_88E(struct adapter *adapt, u8 ElementID, u32 CmdLen, u8 *p } bcmd_down = true; - haldata->LastHMEBoxNum = (h2c_box_num+1) % RTL88E_MAX_H2C_BOX_NUMS; + adapt->HalData->LastHMEBoxNum = + (h2c_box_num+1) % RTL88E_MAX_H2C_BOX_NUMS; } while ((!bcmd_down) && (retry_cnts--)); @@ -126,9 +126,9 @@ exit: /* bitmap[28:31]= Rate Adaptive id */ /* arg[0:4] = macid */ /* arg[5] = Short GI */ -void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi_level) +void rtw_hal_add_ra_tid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi_level) { - struct hal_data_8188e *haldata = GET_HAL_DATA(pAdapter); + struct odm_dm_struct *odmpriv = &pAdapter->HalData->odmpriv; u8 macid, init_rate, raid, shortGIrate = false; @@ -138,7 +138,7 @@ void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi bitmap &= 0x0fffffff; if (rssi_level != DM_RATR_STA_INIT) - bitmap = ODM_Get_Rate_Bitmap(&haldata->odmpriv, macid, bitmap, rssi_level); + bitmap = ODM_Get_Rate_Bitmap(odmpriv, macid, bitmap, rssi_level); bitmap |= ((raid<<28)&0xf0000000); @@ -156,7 +156,7 @@ void rtl8188e_Add_RateATid(struct adapter *pAdapter, u32 bitmap, u8 arg, u8 rssi DBG_88E("%s=> mac_id:%d, raid:%d, ra_bitmap=0x%x, shortGIrate=0x%02x\n", __func__, macid, raid, bitmap, shortGIrate); - ODM_RA_UpdateRateInfo_8188E(&(haldata->odmpriv), macid, raid, bitmap, shortGIrate); + ODM_RA_UpdateRateInfo_8188E(odmpriv, macid, raid, bitmap, shortGIrate); } void rtl8188e_set_FwPwrMode_cmd(struct adapter *adapt, u8 Mode) @@ -219,7 +219,7 @@ 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); @@ -227,20 +227,20 @@ static void ConstructBeacon(struct adapter *adapt, u8 *pframe, u32 *pLength) struct wlan_bssid_ex *cur_network = &(pmlmeinfo->network); u8 bc_addr[] = {0xff, 0xff, 0xff, 0xff, 0xff, 0xff}; - pwlanhdr = (struct rtw_ieee80211_hdr *)pframe; + pwlanhdr = (struct ieee80211_hdr *)pframe; - fctrl = &(pwlanhdr->frame_ctl); + fctrl = &pwlanhdr->frame_control; *(fctrl) = 0; - memcpy(pwlanhdr->addr1, bc_addr, ETH_ALEN); - memcpy(pwlanhdr->addr2, myid(&(adapt->eeprompriv)), ETH_ALEN); - memcpy(pwlanhdr->addr3, cur_network->MacAddress, ETH_ALEN); + ether_addr_copy(pwlanhdr->addr1, bc_addr); + ether_addr_copy(pwlanhdr->addr2, myid(&(adapt->eeprompriv))); + ether_addr_copy(pwlanhdr->addr3, cur_network->MacAddress); 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; @@ -304,16 +304,16 @@ _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; struct wlan_bssid_ex *pnetwork = &(pmlmeinfo->network); - 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); @@ -322,10 +322,10 @@ static void ConstructPSPoll(struct adapter *adapt, u8 *pframe, u32 *pLength) SetDuration(pframe, (pmlmeinfo->aid | 0xc000)); /* BSSID. */ - memcpy(pwlanhdr->addr1, pnetwork->MacAddress, ETH_ALEN); + ether_addr_copy(pwlanhdr->addr1, pnetwork->MacAddress); /* TA. */ - memcpy(pwlanhdr->addr2, myid(&(adapt->eeprompriv)), ETH_ALEN); + ether_addr_copy(pwlanhdr->addr2, myid(&(adapt->eeprompriv))); *pLength = 16; } @@ -338,7 +338,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; @@ -347,9 +347,9 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe, struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct wlan_bssid_ex *pnetwork = &(pmlmeinfo->network); - 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); @@ -357,40 +357,40 @@ static void ConstructNullFunctionData(struct adapter *adapt, u8 *pframe, switch (cur_network->network.InfrastructureMode) { case Ndis802_11Infrastructure: SetToDs(fctrl); - memcpy(pwlanhdr->addr1, pnetwork->MacAddress, ETH_ALEN); - memcpy(pwlanhdr->addr2, myid(&(adapt->eeprompriv)), ETH_ALEN); - memcpy(pwlanhdr->addr3, StaAddr, ETH_ALEN); + ether_addr_copy(pwlanhdr->addr1, pnetwork->MacAddress); + ether_addr_copy(pwlanhdr->addr2, myid(&(adapt->eeprompriv))); + ether_addr_copy(pwlanhdr->addr3, StaAddr); break; case Ndis802_11APMode: SetFrDs(fctrl); - memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN); - memcpy(pwlanhdr->addr2, pnetwork->MacAddress, ETH_ALEN); - memcpy(pwlanhdr->addr3, myid(&(adapt->eeprompriv)), ETH_ALEN); + ether_addr_copy(pwlanhdr->addr1, StaAddr); + ether_addr_copy(pwlanhdr->addr2, pnetwork->MacAddress); + ether_addr_copy(pwlanhdr->addr3, myid(&(adapt->eeprompriv))); break; case Ndis802_11IBSS: default: - memcpy(pwlanhdr->addr1, StaAddr, ETH_ALEN); - memcpy(pwlanhdr->addr2, myid(&(adapt->eeprompriv)), ETH_ALEN); - memcpy(pwlanhdr->addr3, pnetwork->MacAddress, ETH_ALEN); + ether_addr_copy(pwlanhdr->addr1, StaAddr); + ether_addr_copy(pwlanhdr->addr2, myid(&(adapt->eeprompriv))); + ether_addr_copy(pwlanhdr->addr3, pnetwork->MacAddress); break; } 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_hdr_3addr); } *pLength = pktlen; @@ -398,7 +398,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; @@ -406,21 +406,21 @@ 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); - memcpy(pwlanhdr->addr3, bssid, ETH_ALEN); + ether_addr_copy(pwlanhdr->addr1, StaAddr); + ether_addr_copy(pwlanhdr->addr2, mac); + ether_addr_copy(pwlanhdr->addr3, bssid); 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) @@ -445,7 +445,6 @@ static void ConstructProbeRsp(struct adapter *adapt, u8 *pframe, u32 *pLength, u /* 2009.10.15 by tynli. */ static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished) { - struct hal_data_8188e *haldata; struct xmit_frame *pmgntframe; struct pkt_attrib *pattrib; struct xmit_priv *pxmitpriv; @@ -467,7 +466,6 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished) return; } - haldata = GET_HAL_DATA(adapt); pxmitpriv = &adapt->xmitpriv; pmlmeext = &adapt->mlmeextpriv; pmlmeinfo = &pmlmeext->mlmext_info; @@ -487,7 +485,7 @@ static void SetFwRsvdPagePkt(struct adapter *adapt, bool bDLFinished) if (PageNeed == 1) PageNeed += 1; PageNum += PageNeed; - haldata->FwRsvdPageStartOffset = PageNum; + adapt->HalData->FwRsvdPageStartOffset = PageNum; BufIndex += PageNeed*128; @@ -554,7 +552,7 @@ exit: void rtl8188e_set_FwJoinBssReport_cmd(struct adapter *adapt, u8 mstatus) { - struct hal_data_8188e *haldata = GET_HAL_DATA(adapt); + struct hal_data_8188e *haldata = adapt->HalData; struct mlme_ext_priv *pmlmeext = &(adapt->mlmeextpriv); struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); bool bSendBeacon = false; |