diff options
author | Dmitry Shmidt <dimitrysh@google.com> | 2009-10-28 10:29:25 -0700 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2009-10-28 10:29:25 -0700 |
commit | 42bc7ae1bcff471dee92ab2419b232eade724691 (patch) | |
tree | ac17fe5039c203917c0ac258a6441b91d1732a2d /wilink_6_1/stad | |
parent | cd43498901155042b215caad44f2632e1181756d (diff) | |
parent | d60e69ac3931c3cf0f594670f8a0e0c7065b9b7f (diff) | |
download | ti-42bc7ae1bcff471dee92ab2419b232eade724691.tar.gz |
am d60e69ac: Check SSID length before association (http://b/issue?id=2198151)
Merge commit 'd60e69ac3931c3cf0f594670f8a0e0c7065b9b7f' into eclair-mr2
* commit 'd60e69ac3931c3cf0f594670f8a0e0c7065b9b7f':
Check SSID length before association (http://b/issue?id=2198151)
Diffstat (limited to 'wilink_6_1/stad')
-rw-r--r-- | wilink_6_1/stad/src/Connection_Managment/sme.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/wilink_6_1/stad/src/Connection_Managment/sme.c b/wilink_6_1/stad/src/Connection_Managment/sme.c index b48151d..454b724 100644 --- a/wilink_6_1/stad/src/Connection_Managment/sme.c +++ b/wilink_6_1/stad/src/Connection_Managment/sme.c @@ -39,6 +39,7 @@ #define __FILE_ID__ FILE_ID_41 +#include <linux/kernel.h> #include "smePrivate.h" #include "GenSM.h" #include "scanResultTable.h" @@ -353,6 +354,12 @@ TI_STATUS sme_SetParam (TI_HANDLE hSme, paramInfo_t *pParam) break; case SME_DESIRED_SSID_ACT_PARAM: + if (pParam->content.smeDesiredSSID.len > MAX_SSID_LEN) + { + printk("SSID length(%d) is out of range. Discard it.\n", pParam->content.smeDesiredSSID.len); + return PARAM_VALUE_NOT_VALID; /* ssid length is out of range */ + } + pSme->bRadioOn = TI_TRUE; /* if new value is different than current one */ @@ -388,6 +395,9 @@ TI_STATUS sme_SetParam (TI_HANDLE hSme, paramInfo_t *pParam) pSme->bConstantScan = TI_FALSE; } + /* printk("SME_DESIRED_SSID_ACT_PARAM: bRadioOn = %d, bRunning = %d\n", pSme->bRadioOn, pSme->bRunning); */ + pSme->bRunning = TI_TRUE; /* set it to TRUE in case it's accidentally altered. */ + /* now send a disconnect event */ genSM_Event (pSme->hSmeSm, SME_SM_EVENT_DISCONNECT, hSme); break; |