[PATCH v2] staging: ks7010: call 'hostif_mib_set_request_int' instead of 'hostif_mib_set_request_bool'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



'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. 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@xxxxxxxxxx>
Signed-off-by: Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx>
---
Changes in v2:
    - Rename commit message. Previous patch was: 
       staging: ks7010: pass 'int' instead of 'bool' to 'hostif_mib_set_request_bool'
    - Call 'hostif_mib_set_request_int' for this case instead of
       change hostif_mib_set_request_bool parameter type. 

This has been reported as a bug here:
http://driverdev.linuxdriverproject.org/pipermail/driverdev-devel/2018-July/123058.html
 drivers/staging/ks7010/ks_hostif.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ks7010/ks_hostif.c b/drivers/staging/ks7010/ks_hostif.c
index a85975f..94bee25 100644
--- a/drivers/staging/ks7010/ks_hostif.c
+++ b/drivers/staging/ks7010/ks_hostif.c
@@ -1840,8 +1840,8 @@ 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;
 	}
 
-- 
2.7.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux