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/core/rtw_wlan_util.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/core/rtw_wlan_util.c')
-rw-r--r-- | drivers/staging/rtl8188eu/core/rtw_wlan_util.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c index 4410fe8..2a65ac7 100644 --- a/drivers/staging/rtl8188eu/core/rtw_wlan_util.c +++ b/drivers/staging/rtl8188eu/core/rtw_wlan_util.c @@ -341,9 +341,6 @@ void set_channel_bwmode(struct adapter *padapter, unsigned char channel, unsigne { u8 center_ch; - if (padapter->bNotifyChannelChange) - DBG_88E("[%s] ch = %d, offset = %d, bwmode = %d\n", __func__, channel, channel_offset, bwmode); - if ((bwmode == HT_CHANNEL_WIDTH_20) || (channel_offset == HAL_PRIME_CHNL_OFFSET_DONT_CARE)) { /* SelectChannel(padapter, channel); */ @@ -716,6 +713,7 @@ void HT_caps_handler(struct adapter *padapter, struct ndis_802_11_var_ie *pIE) struct mlme_ext_info *pmlmeinfo = &(pmlmeext->mlmext_info); struct mlme_priv *pmlmepriv = &padapter->mlmepriv; struct ht_priv *phtpriv = &pmlmepriv->htpriv; + u8 *HT_cap = (u8 *)(&pmlmeinfo->HT_caps); if (pIE == NULL) return; @@ -728,20 +726,20 @@ void HT_caps_handler(struct adapter *padapter, struct ndis_802_11_var_ie *pIE) for (i = 0; i < (pIE->Length); i++) { if (i != 2) { /* Got the endian issue here. */ - pmlmeinfo->HT_caps.u.HT_cap[i] &= (pIE->data[i]); + HT_cap[i] &= (pIE->data[i]); } else { /* modify from fw by Thomas 2010/11/17 */ - if ((pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x3) > (pIE->data[i] & 0x3)) + if ((pmlmeinfo->HT_caps.ampdu_params_info & 0x3) > (pIE->data[i] & 0x3)) max_AMPDU_len = pIE->data[i] & 0x3; else - max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x3; + max_AMPDU_len = pmlmeinfo->HT_caps.ampdu_params_info & 0x3; - if ((pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x1c) > (pIE->data[i] & 0x1c)) - min_MPDU_spacing = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x1c; + if ((pmlmeinfo->HT_caps.ampdu_params_info & 0x1c) > (pIE->data[i] & 0x1c)) + min_MPDU_spacing = pmlmeinfo->HT_caps.ampdu_params_info & 0x1c; else min_MPDU_spacing = pIE->data[i] & 0x1c; - pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para = max_AMPDU_len | min_MPDU_spacing; + pmlmeinfo->HT_caps.ampdu_params_info = max_AMPDU_len | min_MPDU_spacing; } } @@ -750,9 +748,9 @@ void HT_caps_handler(struct adapter *padapter, struct ndis_802_11_var_ie *pIE) /* update the MCS rates */ for (i = 0; i < 16; i++) { if ((rf_type == RF_1T1R) || (rf_type == RF_1T2R)) - pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &= MCS_rate_1R[i]; + ((u8 *)&pmlmeinfo->HT_caps.mcs)[i] &= MCS_rate_1R[i]; else - pmlmeinfo->HT_caps.u.HT_cap_element.MCS_rate[i] &= MCS_rate_2R[i]; + ((u8 *)&pmlmeinfo->HT_caps.mcs)[i] &= MCS_rate_2R[i]; } } @@ -798,9 +796,9 @@ void HTOnAssocRsp(struct adapter *padapter) AMPDU_para [1:0]:Max AMPDU Len => 0:8k , 1:16k, 2:32k, 3:64k AMPDU_para [4:2]:Min MPDU Start Spacing */ - max_AMPDU_len = pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x03; + max_AMPDU_len = pmlmeinfo->HT_caps.ampdu_params_info & 0x03; - min_MPDU_spacing = (pmlmeinfo->HT_caps.u.HT_cap_element.AMPDU_para & 0x1c) >> 2; + min_MPDU_spacing = (pmlmeinfo->HT_caps.ampdu_params_info & 0x1c) >> 2; rtw_hal_set_hwreg(padapter, HW_VAR_AMPDU_MIN_SPACE, (u8 *)(&min_MPDU_spacing)); @@ -872,7 +870,6 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len) u32 wpa_ielen = 0; u8 *pbssid = GetAddr3Ptr(pframe); struct HT_info_element *pht_info = NULL; - struct rtw_ieee80211_ht_cap *pht_cap = NULL; u32 bcn_channel; unsigned short ht_cap_info; unsigned char ht_info_infos_0; @@ -881,7 +878,7 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len) if (is_client_associated_to_ap(Adapter) == false) return true; - len = packet_len - sizeof(struct rtw_ieee80211_hdr_3addr); + len = packet_len - sizeof(struct ieee80211_hdr_3addr); if (len > MAX_IE_SZ) { DBG_88E("%s IE too long for survey event\n", __func__); @@ -907,14 +904,16 @@ int rtw_check_bcn_info(struct adapter *Adapter, u8 *pframe, u32 packet_len) /* below is to copy the information element */ bssid->IELength = len; - memcpy(bssid->IEs, (pframe + sizeof(struct rtw_ieee80211_hdr_3addr)), bssid->IELength); + memcpy(bssid->IEs, (pframe + sizeof(struct ieee80211_hdr_3addr)), bssid->IELength); /* check bw and channel offset */ /* parsing HT_CAP_IE */ p = rtw_get_ie(bssid->IEs + _FIXED_IE_LENGTH_, _HT_CAPABILITY_IE_, &len, bssid->IELength - _FIXED_IE_LENGTH_); if (p && len > 0) { - pht_cap = (struct rtw_ieee80211_ht_cap *)(p + 2); - ht_cap_info = pht_cap->cap_info; + struct ieee80211_ht_cap *ht_cap = + (struct ieee80211_ht_cap *)(p + 2); + + ht_cap_info = le16_to_cpu(ht_cap->cap_info); } else { ht_cap_info = 0; } @@ -1243,16 +1242,17 @@ unsigned int update_supported_rate(unsigned char *ptn, unsigned int ptn_sz) return mask; } -unsigned int update_MSC_rate(struct HT_caps_element *pHT_caps) +unsigned int update_MSC_rate(struct ieee80211_ht_cap *pHT_caps) { unsigned int mask = 0; - mask = (pHT_caps->u.HT_cap_element.MCS_rate[0] << 12) | (pHT_caps->u.HT_cap_element.MCS_rate[1] << 20); + mask = (pHT_caps->mcs.rx_mask[0] << 12) | + (pHT_caps->mcs.rx_mask[1] << 20); return mask; } -int support_short_GI(struct adapter *padapter, struct HT_caps_element *pHT_caps) +int support_short_GI(struct adapter *padapter, struct ieee80211_ht_cap *pHT_caps) { unsigned char bit_offset; struct mlme_ext_priv *pmlmeext = &padapter->mlmeextpriv; @@ -1266,7 +1266,7 @@ int support_short_GI(struct adapter *padapter, struct HT_caps_element *pHT_caps) bit_offset = (pmlmeext->cur_bwmode & HT_CHANNEL_WIDTH_40) ? 6 : 5; - if (__le16_to_cpu(pHT_caps->u.HT_cap_element.HT_caps_info) & (0x1 << bit_offset)) + if (__le16_to_cpu(pHT_caps->cap_info) & (0x1 << bit_offset)) return _SUCCESS; else return _FAIL; @@ -1508,7 +1508,7 @@ void update_wireless_mode(struct adapter *padapter) SIFS_Timer = 0x0a0a0808;/* 0x0808 -> for CCK, 0x0a0a -> for OFDM */ /* change this value if having IOT issues. */ - padapter->HalFunc.SetHwRegHandler(padapter, HW_VAR_RESP_SIFS, (u8 *)&SIFS_Timer); + rtw_hal_set_hwreg(padapter, HW_VAR_RESP_SIFS, (u8 *)&SIFS_Timer); if (pmlmeext->cur_wireless_mode & WIRELESS_11B) update_mgnt_tx_rate(padapter, IEEE80211_CCK_RATE_1MB); @@ -1584,7 +1584,7 @@ void update_TSF(struct mlme_ext_priv *pmlmeext, u8 *pframe, uint len) u8 *pIE; __le32 *pbuf; - pIE = pframe + sizeof(struct rtw_ieee80211_hdr_3addr); + pIE = pframe + sizeof(struct ieee80211_hdr_3addr); pbuf = (__le32 *)pIE; pmlmeext->TSFValue = le32_to_cpu(*(pbuf+1)); |