summaryrefslogtreecommitdiff
path: root/drivers/staging/ks7010
diff options
context:
space:
mode:
authorJanusz Lisiecki <janusz.lisiecki@gmail.com>2017-07-03 06:41:39 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-16 08:41:02 +0200
commit7b379dba14f8039fac06db0fced2e68b86570ddf (patch)
tree75a10311fb8a5d7b0be17c0ec2558d4c3494e88a /drivers/staging/ks7010
parent0c2310217b40af190b4a8ff79320088856c2f25c (diff)
staging: ks7010: Fix cast to restricted __le16 in ks_wlan_net.c
This patch fixes the following Sparse warnings in ks_wlan_net.c: drivers/staging/ks7010/ks_wlan_net.c:1359:24: warning: cast to restricted __le16 link_ap_info_t structure field 'capability' has native order and is used everywhere in the code in such way (i.e get_ap_information, get_current_ap). Both sides of assignment are u16 (native order) so 'le16_to_cpu' is not needed and wrong. Signed-off-by: Janusz Lisiecki <janusz.lisiecki@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/ks7010')
-rw-r--r--drivers/staging/ks7010/ks_wlan_net.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/ks7010/ks_wlan_net.c b/drivers/staging/ks7010/ks_wlan_net.c
index 8aa12e813bd7..0f9348ba5d84 100644
--- a/drivers/staging/ks7010/ks_wlan_net.c
+++ b/drivers/staging/ks7010/ks_wlan_net.c
@@ -1356,7 +1356,7 @@ static inline char *ks_wlan_translate_scan(struct net_device *dev,
/* Add mode */
iwe.cmd = SIOCGIWMODE;
- capabilities = le16_to_cpu(ap->capability);
+ capabilities = ap->capability;
if (capabilities & (BSS_CAP_ESS | BSS_CAP_IBSS)) {
if (capabilities & BSS_CAP_ESS)
iwe.u.mode = IW_MODE_INFRA;