qsap: Allow empty wpa_passphrase
With this commit, wpa_passphrase should follow below condition: 1. empty string (len = 0) 2. string with length >= 8 && length <= 64 Change-Id: I029ac7cc2b32b564b4e3d6b747cc584ba59e5fde
This commit is contained in:
committed by
Gerrit - the friendly Code Review server
parent
8c3357cbe4
commit
80064989b2
2
softap/sdk/qsap_api.c
Executable file → Normal file
2
softap/sdk/qsap_api.c
Executable file → Normal file
@@ -2544,7 +2544,7 @@ static void qsap_handle_set_request(s8 *pcmd, s8 *presp, u32 *plen)
|
||||
pVal = pcmd + strlen(cmd_list[cNum].name);
|
||||
if( (cNum != eCMD_COMMIT) &&
|
||||
(cNum != eCMD_RESET_TO_DEFAULT) &&
|
||||
((*pVal != '=') || (strlen(pVal) < 2)) ) {
|
||||
((*pVal != '=') || (((eCMD_PASSPHRASE != cNum)) && (strlen(pVal) < 2)))) {
|
||||
*plen = qsap_scnprintf(presp, *plen, "%s", ERR_INVALID_ARG);
|
||||
return;
|
||||
}
|
||||
|
||||
2
softap/sdk/qsap_api.h
Executable file → Normal file
2
softap/sdk/qsap_api.h
Executable file → Normal file
@@ -509,7 +509,7 @@ typedef struct sap_auto_channel_info {
|
||||
#define IS_VALID_BSSID(x) (((value == ENABLE) || (value == DISABLE)) ? TRUE: FALSE)
|
||||
|
||||
/** Validate the length of the passphrase */
|
||||
#define IS_VALID_PASSPHRASE_LEN(x) (((x >= PASSPHRASE_MIN) && (x <= PASSPHRASE_MAX)) ? TRUE: FALSE)
|
||||
#define IS_VALID_PASSPHRASE_LEN(x) ((((x >= PASSPHRASE_MIN) && (x <= PASSPHRASE_MAX)) || (x == 0)) ? TRUE: FALSE)
|
||||
|
||||
/** Validate the beacon interval */
|
||||
#define IS_VALID_BEACON(x) (((x >= BCN_INTERVAL_MIN) && (x <= BCN_INTERVAL_MAX)) ? TRUE: FALSE)
|
||||
|
||||
Reference in New Issue
Block a user