Commit c468d584 authored by Quytelda Kahja's avatar Quytelda Kahja Committed by Greg Kroah-Hartman

staging: ks7010: Replace local capability constants with kernel constants.

This driver defined constants BSS_CAP_* to represent WLAN capability
codes; however, these constants are already defined in the header
'linux/ieee80211.h' as WLAN_CAPABILITY_*.  This change removes the locally
defined constants and substitutes the kernel's constants.
Signed-off-by: default avatarQuytelda Kahja <quytelda@tamalin.org>
Reviewed-by: default avatarTobin C. Harding <me@tobin.cc>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ecad5e1e
...@@ -1386,14 +1386,14 @@ static __le16 ks_wlan_cap(struct ks_wlan_private *priv) ...@@ -1386,14 +1386,14 @@ static __le16 ks_wlan_cap(struct ks_wlan_private *priv)
u16 capability = 0x0000; u16 capability = 0x0000;
if (priv->reg.preamble == SHORT_PREAMBLE) { if (priv->reg.preamble == SHORT_PREAMBLE) {
capability |= BSS_CAP_SHORT_PREAMBLE; capability |= WLAN_CAPABILITY_SHORT_PREAMBLE;
} }
capability &= ~(BSS_CAP_PBCC); /* pbcc not support */ capability &= ~(WLAN_CAPABILITY_PBCC); /* pbcc not support */
if (priv->reg.phy_type != D_11B_ONLY_MODE) { if (priv->reg.phy_type != D_11B_ONLY_MODE) {
capability |= BSS_CAP_SHORT_SLOT_TIME; capability |= WLAN_CAPABILITY_SHORT_SLOT_TIME;
capability &= ~(BSS_CAP_DSSS_OFDM); capability &= ~(WLAN_CAPABILITY_DSSS_OFDM);
} }
return cpu_to_le16((uint16_t)capability); return cpu_to_le16((uint16_t)capability);
......
...@@ -284,16 +284,6 @@ struct ap_info_t { ...@@ -284,16 +284,6 @@ struct ap_info_t {
u8 pad0; /* +09 */ u8 pad0; /* +09 */
__le16 beacon_period; /* +10 */ __le16 beacon_period; /* +10 */
__le16 capability; /* +12 */ __le16 capability; /* +12 */
#define BSS_CAP_ESS BIT(0)
#define BSS_CAP_IBSS BIT(1)
#define BSS_CAP_CF_POLABLE BIT(2)
#define BSS_CAP_CF_POLL_REQ BIT(3)
#define BSS_CAP_PRIVACY BIT(4)
#define BSS_CAP_SHORT_PREAMBLE BIT(5)
#define BSS_CAP_PBCC BIT(6)
#define BSS_CAP_CHANNEL_AGILITY BIT(7)
#define BSS_CAP_SHORT_SLOT_TIME BIT(10)
#define BSS_CAP_DSSS_OFDM BIT(13)
u8 frame_type; /* +14 */ u8 frame_type; /* +14 */
u8 ch_info; /* +15 */ u8 ch_info; /* +15 */
#define FRAME_TYPE_BEACON 0x80 #define FRAME_TYPE_BEACON 0x80
......
...@@ -1366,8 +1366,8 @@ static inline char *ks_wlan_translate_scan(struct net_device *dev, ...@@ -1366,8 +1366,8 @@ static inline char *ks_wlan_translate_scan(struct net_device *dev,
/* Add mode */ /* Add mode */
iwe.cmd = SIOCGIWMODE; iwe.cmd = SIOCGIWMODE;
capabilities = ap->capability; capabilities = ap->capability;
if (capabilities & (BSS_CAP_ESS | BSS_CAP_IBSS)) { if (capabilities & (WLAN_CAPABILITY_ESS | WLAN_CAPABILITY_IBSS)) {
if (capabilities & BSS_CAP_ESS) if (capabilities & WLAN_CAPABILITY_ESS)
iwe.u.mode = IW_MODE_INFRA; iwe.u.mode = IW_MODE_INFRA;
else else
iwe.u.mode = IW_MODE_ADHOC; iwe.u.mode = IW_MODE_ADHOC;
...@@ -1396,7 +1396,7 @@ static inline char *ks_wlan_translate_scan(struct net_device *dev, ...@@ -1396,7 +1396,7 @@ static inline char *ks_wlan_translate_scan(struct net_device *dev,
/* Add encryption capability */ /* Add encryption capability */
iwe.cmd = SIOCGIWENCODE; iwe.cmd = SIOCGIWENCODE;
if (capabilities & BSS_CAP_PRIVACY) if (capabilities & WLAN_CAPABILITY_PRIVACY)
iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY; iwe.u.data.flags = IW_ENCODE_ENABLED | IW_ENCODE_NOKEY;
else else
iwe.u.data.flags = IW_ENCODE_DISABLED; iwe.u.data.flags = IW_ENCODE_DISABLED;
......
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