diff --git a/softap/sdk/qsap_api.c b/softap/sdk/qsap_api.c index 2bbad60..4c48cb2 100644 --- a/softap/sdk/qsap_api.c +++ b/softap/sdk/qsap_api.c @@ -181,6 +181,7 @@ static struct Command cmd_list[eCMD_LAST] = { { "ctrl_interface", NULL }, { "vendor_elements", NULL }, { "assocresp_elements", NULL }, + { "acs_exclude_dfs", NULL }, }; struct Command qsap_str[eSTR_LAST] = { @@ -1348,6 +1349,12 @@ int qsap_get_mode(s32 *pmode) //allocate socket sk = nl_socket_alloc(); + //return if socket allocation fails + if(sk == NULL){ + ALOGE( "socket allocation failure"); + return ret; + } + //connect to generic netlink if (genl_connect(sk)) { ALOGE( "Netlink socket Connection failure"); @@ -1365,6 +1372,12 @@ int qsap_get_mode(s32 *pmode) //allocate a message msg = nlmsg_alloc(); + //return if message allocation fails + if(msg == NULL){ + ALOGE( "message allocation failure"); + goto nla_put_failure; + } + // setup the message genlmsg_put(msg, 0, 0, nl80211_id, 0, 0, NL80211_CMD_GET_INTERFACE, 0); diff --git a/softap/sdk/qsap_api.h b/softap/sdk/qsap_api.h index 900ff6a..89e7a88 100644 --- a/softap/sdk/qsap_api.h +++ b/softap/sdk/qsap_api.h @@ -350,6 +350,7 @@ typedef enum esap_cmd { eCMD_CTRL_INTERFACE = 76, eCMD_VENDOR_ELEMENT = 77, eCMD_ASSOCRESP_ELEMENT = 78, + eCMD_ACS_EXCLUDE_DFS = 79, eCMD_LAST /** New command numbers should be added above this */ } esap_cmd_t;