Browse Source

qcacld-3.0: Fix NAPI creation with 0 instances

If NAPI does not find any instances to create, then it would
return a bitmap of 0. Make this a condition that is reportable
as a warning, but do not break initialization sequence with an
error.

Acked-by: Orhan K AKYILDIZ <[email protected]>

Change-Id: I38a7a845c5b9ed3ab5ce691917e981ee2c8f7b1c
CRs-Fixed: 999422
Manjunathappa Prakash 9 years ago
parent
commit
9dd19130fe
1 changed files with 3 additions and 1 deletions
  1. 3 1
      core/hdd/src/wlan_hdd_driver_ops.c

+ 3 - 1
core/hdd/src/wlan_hdd_driver_ops.c

@@ -256,7 +256,9 @@ static int hdd_hif_open(struct device *dev, void *bdev, const hif_bus_id *bid,
 	} else {
 		ret = hdd_napi_create();
 		hdd_info("hdd_napi_create returned: %d", ret);
-		if (ret <= 0) {
+		if (ret == 0)
+			hdd_warn("NAPI: no instances are created");
+		else if (ret < 0) {
 			hdd_err("NAPI creation error, rc: 0x%x, reinit = %d",
 				ret, reinit);
 			ret = -EFAULT;