summaryrefslogtreecommitdiff
path: root/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@google.com>2020-06-09 22:48:48 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-06-16 22:26:18 +0300
commit3ee97e220648257e8a89c98c2a5cd5f989956168 (patch)
tree170c7107d7daad00f835595c787595ce96324b70 /drivers/staging/rtl8712/rtl871x_ioctl_linux.c
parentce59858bbc104ab5afddbd3e00edcdaed134ac68 (diff)
downloadlinux-3ee97e220648257e8a89c98c2a5cd5f989956168.tar.xz
staging: rtl8712: switch to common ieee80211 headers
This patch switches to <linux/ieee80211.h> and <net/cfg80211.h> and deletes a lot of duplicate definitions plus many unused ones. Non obvious changes: - struct ieee80211_ht_cap is different enough that I preferred to keep (and rename) it for now. - mcs_rate in translate_scan was not read after being set, so I deleted that part rather than using the renamed struct - WLAN_CAPABILITY_BSS is replaced with WLAN_CAPABILITY_ESS which is the corresponding one with same value Signed-off-by: Pascal Terjan <pterjan@google.com> Link: https://lore.kernel.org/r/20200609194848.166130-1-pterjan@google.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/rtl8712/rtl871x_ioctl_linux.c')
-rw-r--r--drivers/staging/rtl8712/rtl871x_ioctl_linux.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
index 363b82e3e7c6..36c89cde525d 100644
--- a/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
+++ b/drivers/staging/rtl8712/rtl871x_ioctl_linux.c
@@ -211,11 +211,10 @@ static char *translate_scan(struct _adapter *padapter,
char *start, char *stop)
{
struct iw_event iwe;
- struct ieee80211_ht_cap *pht_capie;
char *current_val;
s8 *p;
u32 i = 0, ht_ielen = 0;
- u16 cap, ht_cap = false, mcs_rate;
+ u16 cap, ht_cap = false;
u8 rssi;
if ((pnetwork->network.Configuration.DSConfig < 1) ||
@@ -241,8 +240,6 @@ static char *translate_scan(struct _adapter *padapter,
&ht_ielen, pnetwork->network.IELength - 12);
if (p && ht_ielen > 0) {
ht_cap = true;
- pht_capie = (struct ieee80211_ht_cap *)(p + 2);
- memcpy(&mcs_rate, pht_capie->supp_mcs_set, 2);
}
/* Add the protocol name */
iwe.cmd = SIOCGIWNAME;
@@ -268,8 +265,8 @@ static char *translate_scan(struct _adapter *padapter,
memcpy((u8 *)&cap, r8712_get_capability_from_ie(pnetwork->network.IEs),
2);
le16_to_cpus(&cap);
- if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_BSS)) {
- if (cap & WLAN_CAPABILITY_BSS)
+ if (cap & (WLAN_CAPABILITY_IBSS | WLAN_CAPABILITY_ESS)) {
+ if (cap & WLAN_CAPABILITY_ESS)
iwe.u.mode = (u32)IW_MODE_MASTER;
else
iwe.u.mode = (u32)IW_MODE_ADHOC;
@@ -1395,7 +1392,7 @@ static int r8711_wx_get_rate(struct net_device *dev,
struct _adapter *padapter = netdev_priv(dev);
struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
struct wlan_bssid_ex *pcur_bss = &pmlmepriv->cur_network.network;
- struct ieee80211_ht_cap *pht_capie;
+ struct rtl_ieee80211_ht_cap *pht_capie;
unsigned char rf_type = padapter->registrypriv.rf_config;
int i;
u8 *p;
@@ -1411,7 +1408,7 @@ static int r8711_wx_get_rate(struct net_device *dev,
pcur_bss->IELength - 12);
if (p && ht_ielen > 0) {
ht_cap = true;
- pht_capie = (struct ieee80211_ht_cap *)(p + 2);
+ pht_capie = (struct rtl_ieee80211_ht_cap *)(p + 2);
memcpy(&mcs_rate, pht_capie->supp_mcs_set, 2);
bw_40MHz = (le16_to_cpu(pht_capie->cap_info) &
IEEE80211_HT_CAP_SUP_WIDTH) ? 1 : 0;