diff options
author | Sergio Paracuellos <sergio.paracuellos@gmail.com> | 2018-07-13 03:36:59 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-07-16 04:04:11 -0400 |
commit | eb37430d402de7d1cb2f37a5fdc80620dd98dc1d (patch) | |
tree | 1337ed37cd9a11458110c4e4659f85c7b9413bef | |
parent | 69a1d98c831ec64cbfd381f5dcb6697e1445d239 (diff) |
staging: ks7010: call 'hostif_mib_set_request_int' instead of 'hostif_mib_set_request_bool'
'hostif_mib_set_request_bool' function receives a bool as value and
send the received value with MIB_VALUE_TYPE_BOOL type. There is
one case where the value passed is not a boolean one but
'MCAST_FILTER_PROMISC' which is '2'. Call hostif_mib_set_request_int
instead for related multicast enumeration. This changes original
code behaviour but seems to be the right way to do this.
Fixes: 8ce76bff0e6a ("staging: ks7010: add new helpers to achieve mib set request and simplify code")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/ks7010/ks_hostif.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c index 0ecffab52ec2..abdaf7cf8162 100644 --- a/drivers/staging/ks7010/ks_hostif.c +++ b/drivers/staging/ks7010/ks_hostif.c | |||
@@ -1842,15 +1842,15 @@ void hostif_sme_multicast_set(struct ks_wlan_private *priv) | |||
1842 | memset(set_address, 0, NIC_MAX_MCAST_LIST * ETH_ALEN); | 1842 | memset(set_address, 0, NIC_MAX_MCAST_LIST * ETH_ALEN); |
1843 | 1843 | ||
1844 | if (dev->flags & IFF_PROMISC) { | 1844 | if (dev->flags & IFF_PROMISC) { |
1845 | hostif_mib_set_request_bool(priv, LOCAL_MULTICAST_FILTER, | 1845 | hostif_mib_set_request_int(priv, LOCAL_MULTICAST_FILTER, |
1846 | MCAST_FILTER_PROMISC); | 1846 | MCAST_FILTER_PROMISC); |
1847 | goto spin_unlock; | 1847 | goto spin_unlock; |
1848 | } | 1848 | } |
1849 | 1849 | ||
1850 | if ((netdev_mc_count(dev) > NIC_MAX_MCAST_LIST) || | 1850 | if ((netdev_mc_count(dev) > NIC_MAX_MCAST_LIST) || |
1851 | (dev->flags & IFF_ALLMULTI)) { | 1851 | (dev->flags & IFF_ALLMULTI)) { |
1852 | hostif_mib_set_request_bool(priv, LOCAL_MULTICAST_FILTER, | 1852 | hostif_mib_set_request_int(priv, LOCAL_MULTICAST_FILTER, |
1853 | MCAST_FILTER_MCASTALL); | 1853 | MCAST_FILTER_MCASTALL); |
1854 | goto spin_unlock; | 1854 | goto spin_unlock; |
1855 | } | 1855 | } |
1856 | 1856 | ||
@@ -1866,8 +1866,8 @@ void hostif_sme_multicast_set(struct ks_wlan_private *priv) | |||
1866 | ETH_ALEN * mc_count); | 1866 | ETH_ALEN * mc_count); |
1867 | } else { | 1867 | } else { |
1868 | priv->sme_i.sme_flag |= SME_MULTICAST; | 1868 | priv->sme_i.sme_flag |= SME_MULTICAST; |
1869 | hostif_mib_set_request_bool(priv, LOCAL_MULTICAST_FILTER, | 1869 | hostif_mib_set_request_int(priv, LOCAL_MULTICAST_FILTER, |
1870 | MCAST_FILTER_MCAST); | 1870 | MCAST_FILTER_MCAST); |
1871 | } | 1871 | } |
1872 | 1872 | ||
1873 | spin_unlock: | 1873 | spin_unlock: |