mirror of
https://github.com/torvalds/linux.git
synced 2024-11-20 02:51:44 +00:00
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: 8ce76bff0e
("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>
This commit is contained in:
parent
69a1d98c83
commit
eb37430d40
@ -1842,15 +1842,15 @@ void hostif_sme_multicast_set(struct ks_wlan_private *priv)
|
||||
memset(set_address, 0, NIC_MAX_MCAST_LIST * ETH_ALEN);
|
||||
|
||||
if (dev->flags & IFF_PROMISC) {
|
||||
hostif_mib_set_request_bool(priv, LOCAL_MULTICAST_FILTER,
|
||||
MCAST_FILTER_PROMISC);
|
||||
hostif_mib_set_request_int(priv, LOCAL_MULTICAST_FILTER,
|
||||
MCAST_FILTER_PROMISC);
|
||||
goto spin_unlock;
|
||||
}
|
||||
|
||||
if ((netdev_mc_count(dev) > NIC_MAX_MCAST_LIST) ||
|
||||
(dev->flags & IFF_ALLMULTI)) {
|
||||
hostif_mib_set_request_bool(priv, LOCAL_MULTICAST_FILTER,
|
||||
MCAST_FILTER_MCASTALL);
|
||||
hostif_mib_set_request_int(priv, LOCAL_MULTICAST_FILTER,
|
||||
MCAST_FILTER_MCASTALL);
|
||||
goto spin_unlock;
|
||||
}
|
||||
|
||||
@ -1866,8 +1866,8 @@ void hostif_sme_multicast_set(struct ks_wlan_private *priv)
|
||||
ETH_ALEN * mc_count);
|
||||
} else {
|
||||
priv->sme_i.sme_flag |= SME_MULTICAST;
|
||||
hostif_mib_set_request_bool(priv, LOCAL_MULTICAST_FILTER,
|
||||
MCAST_FILTER_MCAST);
|
||||
hostif_mib_set_request_int(priv, LOCAL_MULTICAST_FILTER,
|
||||
MCAST_FILTER_MCAST);
|
||||
}
|
||||
|
||||
spin_unlock:
|
||||
|
Loading…
Reference in New Issue
Block a user