From e416f4d256cbf2685a577a13cdf06fbdc01f648b Mon Sep 17 00:00:00 2001 From: Lin Bai Date: Tue, 4 Aug 2020 12:38:06 +0800 Subject: [PATCH] qcacld-3.0: Ignore ndo_set_features failure from upper stack Change I0e44cb1789516e1bcee619be3581d826f45f265b register ndo_set_features API, and upper stack will invoke it during driver loading phase, which is not expected. Return success with debug level log printed if DSC check failure. Change-Id: Iba35a6c3ed6394794c9be7332e0243d975ba37bd CRs-Fixed: 2747343 --- core/hdd/src/wlan_hdd_main.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/core/hdd/src/wlan_hdd_main.c b/core/hdd/src/wlan_hdd_main.c index bcf852c1a41b..6096f099b87b 100644 --- a/core/hdd/src/wlan_hdd_main.c +++ b/core/hdd/src/wlan_hdd_main.c @@ -5030,8 +5030,16 @@ static int hdd_set_features(struct net_device *net_dev, struct osif_vdev_sync *vdev_sync; errno = osif_vdev_sync_op_start(net_dev, &vdev_sync); - if (errno) - return errno; + if (errno) { + /* + * Only invoke from netdev_feature_update_work expected, + * which is from CLD inside. + * Ignore others from upper stack during loading phase, + * and return success to avoid failure print from kernel. + */ + hdd_debug("VDEV in transition, ignore set_features"); + return 0; + } errno = __hdd_set_features(net_dev, features);