summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CORE/HDD/src/wlan_hdd_main.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/CORE/HDD/src/wlan_hdd_main.c b/CORE/HDD/src/wlan_hdd_main.c
index 6039625b1ea9..2a89049c5cec 100644
--- a/CORE/HDD/src/wlan_hdd_main.c
+++ b/CORE/HDD/src/wlan_hdd_main.c
@@ -726,6 +726,11 @@ hdd_extract_assigned_int_from_str
{
return NULL;
}
+
+ if (tempInt < 0)
+ {
+ tempInt = 0;
+ }
*pOutPtr = tempInt;
pInPtr = strnchr(pInPtr, strlen(pInPtr), SPACE_ASCII_VALUE);
@@ -3443,8 +3448,9 @@ int hdd_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
goto exit;
}
- if ((WLAN_HDD_INFRA_STATION != pAdapter->device_mode) &&
- (WLAN_HDD_P2P_CLIENT != pAdapter->device_mode))
+ if ((WLAN_HDD_INFRA_STATION != pAdapter->device_mode) &&
+ (WLAN_HDD_P2P_CLIENT != pAdapter->device_mode) &&
+ (WLAN_HDD_P2P_DEVICE != pAdapter->device_mode))
{
VOS_TRACE( VOS_MODULE_ID_HDD, VOS_TRACE_LEVEL_ERROR,
"Received WLS_BATCHING_VERSION command in invalid mode %d "