staging: wilc100: remove WILC_NULL usage
Use the "real" NULL value, don't try to be cute and define your own value for something that the compiler obviously supports. Cc: Johnny Kim <johnny.kim@atmel.com> Cc: Rachel Kim <rachel.kim@atmel.com> Cc: Dean Lee <dean.lee@atmel.com> Cc: Chris Park <chris.park@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8e1d4e5cf2
commit
b1413b6084
|
@ -771,7 +771,7 @@ WILC_Uint8 get_current_channel(WILC_Uint8 *pu8msa, WILC_Uint16 u16RxLen)
|
|||
WILC_Sint32 ParseNetworkInfo(WILC_Uint8 *pu8MsgBuffer, tstrNetworkInfo **ppstrNetworkInfo)
|
||||
{
|
||||
WILC_Sint32 s32Error = WILC_SUCCESS;
|
||||
tstrNetworkInfo *pstrNetworkInfo = WILC_NULL;
|
||||
tstrNetworkInfo *pstrNetworkInfo = NULL;
|
||||
WILC_Uint8 u8MsgType = 0;
|
||||
WILC_Uint8 u8MsgID = 0;
|
||||
WILC_Uint16 u16MsgLen = 0;
|
||||
|
@ -894,16 +894,16 @@ WILC_Sint32 DeallocateNetworkInfo(tstrNetworkInfo *pstrNetworkInfo)
|
|||
{
|
||||
WILC_Sint32 s32Error = WILC_SUCCESS;
|
||||
|
||||
if (pstrNetworkInfo != WILC_NULL) {
|
||||
if (pstrNetworkInfo->pu8IEs != WILC_NULL) {
|
||||
if (pstrNetworkInfo != NULL) {
|
||||
if (pstrNetworkInfo->pu8IEs != NULL) {
|
||||
WILC_FREE(pstrNetworkInfo->pu8IEs);
|
||||
pstrNetworkInfo->pu8IEs = WILC_NULL;
|
||||
pstrNetworkInfo->pu8IEs = NULL;
|
||||
} else {
|
||||
s32Error = WILC_FAIL;
|
||||
}
|
||||
|
||||
WILC_FREE(pstrNetworkInfo);
|
||||
pstrNetworkInfo = WILC_NULL;
|
||||
pstrNetworkInfo = NULL;
|
||||
|
||||
} else {
|
||||
s32Error = WILC_FAIL;
|
||||
|
@ -927,7 +927,7 @@ WILC_Sint32 ParseAssocRespInfo(WILC_Uint8 *pu8Buffer, WILC_Uint32 u32BufferLen,
|
|||
tstrConnectRespInfo **ppstrConnectRespInfo)
|
||||
{
|
||||
WILC_Sint32 s32Error = WILC_SUCCESS;
|
||||
tstrConnectRespInfo *pstrConnectRespInfo = WILC_NULL;
|
||||
tstrConnectRespInfo *pstrConnectRespInfo = NULL;
|
||||
WILC_Uint16 u16AssocRespLen = 0;
|
||||
WILC_Uint8 *pu8IEs = 0;
|
||||
WILC_Uint16 u16IEsLen = 0;
|
||||
|
@ -979,16 +979,16 @@ WILC_Sint32 DeallocateAssocRespInfo(tstrConnectRespInfo *pstrConnectRespInfo)
|
|||
{
|
||||
WILC_Sint32 s32Error = WILC_SUCCESS;
|
||||
|
||||
if (pstrConnectRespInfo != WILC_NULL) {
|
||||
if (pstrConnectRespInfo->pu8RespIEs != WILC_NULL) {
|
||||
if (pstrConnectRespInfo != NULL) {
|
||||
if (pstrConnectRespInfo->pu8RespIEs != NULL) {
|
||||
WILC_FREE(pstrConnectRespInfo->pu8RespIEs);
|
||||
pstrConnectRespInfo->pu8RespIEs = WILC_NULL;
|
||||
pstrConnectRespInfo->pu8RespIEs = NULL;
|
||||
} else {
|
||||
s32Error = WILC_FAIL;
|
||||
}
|
||||
|
||||
WILC_FREE(pstrConnectRespInfo);
|
||||
pstrConnectRespInfo = WILC_NULL;
|
||||
pstrConnectRespInfo = NULL;
|
||||
|
||||
} else {
|
||||
s32Error = WILC_FAIL;
|
||||
|
@ -1060,7 +1060,7 @@ WILC_Sint32 DeallocateSurveyResults(wid_site_survey_reslts_s *pstrSurveyResults)
|
|||
{
|
||||
WILC_Sint32 s32Error = WILC_SUCCESS;
|
||||
|
||||
if (pstrSurveyResults != WILC_NULL) {
|
||||
if (pstrSurveyResults != NULL) {
|
||||
WILC_FREE(pstrSurveyResults);
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -304,7 +304,7 @@ static int dev_state_ev_handler(struct notifier_block *this, unsigned long event
|
|||
if (nic->iftype == STATION_MODE || nic->iftype == CLIENT_MODE) {
|
||||
pstrWFIDrv->IFC_UP = 1;
|
||||
g_obtainingIP = WILC_FALSE;
|
||||
WILC_TimerStop(&hDuringIpTimer, WILC_NULL);
|
||||
WILC_TimerStop(&hDuringIpTimer, NULL);
|
||||
PRINT_D(GENERIC_DBG, "IP obtained , enable scan\n");
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ typedef WILC_Sint32 WILC_ErrNo;
|
|||
} while (0)
|
||||
|
||||
#define WILC_NULLCHECK(__status__, __ptr__) do { \
|
||||
if (__ptr__ == WILC_NULL) { \
|
||||
if (__ptr__ == NULL) { \
|
||||
WILC_ERRORREPORT(__status__, WILC_NULL_PTR); \
|
||||
} \
|
||||
} while (0)
|
||||
|
|
|
@ -12,7 +12,7 @@ void *WILC_MemoryAlloc(WILC_Uint32 u32Size, tstrWILC_MemoryAttrs *strAttrs,
|
|||
if (u32Size > 0) {
|
||||
return kmalloc(u32Size, GFP_ATOMIC);
|
||||
} else {
|
||||
return WILC_NULL;
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -37,8 +37,8 @@ void *WILC_MemoryRealloc(void *pvOldBlock, WILC_Uint32 u32NewSize,
|
|||
{
|
||||
if (u32NewSize == 0) {
|
||||
kfree(pvOldBlock);
|
||||
return WILC_NULL;
|
||||
} else if (pvOldBlock == WILC_NULL) {
|
||||
return NULL;
|
||||
} else if (pvOldBlock == NULL) {
|
||||
return kmalloc(u32NewSize, GFP_KERNEL);
|
||||
} else {
|
||||
return krealloc(pvOldBlock, u32NewSize, GFP_KERNEL);
|
||||
|
|
|
@ -121,27 +121,27 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs,
|
|||
*/
|
||||
#define WILC_MALLOC_EX(__size__, __attrs__) \
|
||||
(WILC_MemoryAlloc( \
|
||||
(__size__), __attrs__, WILC_NULL, 0))
|
||||
(__size__), __attrs__, NULL, 0))
|
||||
|
||||
/*!
|
||||
* @brief standrad calloc wrapper with custom attributes
|
||||
*/
|
||||
#define WILC_CALLOC_EX(__size__, __attrs__) \
|
||||
(WILC_MemoryCalloc( \
|
||||
(__size__), __attrs__, WILC_NULL, 0))
|
||||
(__size__), __attrs__, NULL, 0))
|
||||
|
||||
/*!
|
||||
* @brief standrad realloc wrapper with custom attributes
|
||||
*/
|
||||
#define WILC_REALLOC_EX(__ptr__, __new_size__, __attrs__) \
|
||||
(WILC_MemoryRealloc( \
|
||||
(__ptr__), (__new_size__), __attrs__, WILC_NULL, 0))
|
||||
(__ptr__), (__new_size__), __attrs__, NULL, 0))
|
||||
/*!
|
||||
* @brief standrad free wrapper with custom attributes
|
||||
*/
|
||||
#define WILC_FREE_EX(__ptr__, __attrs__) \
|
||||
(WILC_MemoryFree( \
|
||||
(__ptr__), __attrs__, WILC_NULL, 0))
|
||||
(__ptr__), __attrs__, NULL, 0))
|
||||
|
||||
/*!
|
||||
* @brief Allocates a block (with custom attributes) of given type and number of
|
||||
|
@ -164,9 +164,9 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs,
|
|||
* to NULL
|
||||
*/
|
||||
#define WILC_FREE_SET_NULL_EX(__ptr__, __attrs__) do { \
|
||||
if (__ptr__ != WILC_NULL) { \
|
||||
if (__ptr__ != NULL) { \
|
||||
WILC_FREE_EX(__ptr__, __attrs__); \
|
||||
__ptr__ = WILC_NULL; \
|
||||
__ptr__ = NULL; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
@ -175,7 +175,7 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs,
|
|||
* to true
|
||||
*/
|
||||
#define WILC_FREE_IF_TRUE_EX(__ptr__, __attrs__) do { \
|
||||
if (__ptr__ != WILC_NULL) { \
|
||||
if (__ptr__ != NULL) { \
|
||||
WILC_FREE_EX(__ptr__, __attrs__); \
|
||||
} \
|
||||
} while (0)
|
||||
|
@ -184,53 +184,53 @@ void WILC_MemoryFree(const void *pvBlock, tstrWILC_MemoryAttrs *strAttrs,
|
|||
* @brief standrad malloc wrapper with default attributes
|
||||
*/
|
||||
#define WILC_MALLOC(__size__) \
|
||||
WILC_MALLOC_EX(__size__, WILC_NULL)
|
||||
WILC_MALLOC_EX(__size__, NULL)
|
||||
|
||||
/*!
|
||||
* @brief standrad calloc wrapper with default attributes
|
||||
*/
|
||||
#define WILC_CALLOC(__size__) \
|
||||
WILC_CALLOC_EX(__size__, WILC_NULL)
|
||||
WILC_CALLOC_EX(__size__, NULL)
|
||||
|
||||
/*!
|
||||
* @brief standrad realloc wrapper with default attributes
|
||||
*/
|
||||
#define WILC_REALLOC(__ptr__, __new_size__) \
|
||||
WILC_REALLOC_EX(__ptr__, __new_size__, WILC_NULL)
|
||||
WILC_REALLOC_EX(__ptr__, __new_size__, NULL)
|
||||
|
||||
/*!
|
||||
* @brief standrad free wrapper with default attributes
|
||||
*/
|
||||
#define WILC_FREE(__ptr__) \
|
||||
WILC_FREE_EX(__ptr__, WILC_NULL)
|
||||
WILC_FREE_EX(__ptr__, NULL)
|
||||
|
||||
/*!
|
||||
* @brief Allocates a block (with default attributes) of given type and number of
|
||||
* elements
|
||||
*/
|
||||
#define WILC_NEW(__struct_type__, __n_structs__) \
|
||||
WILC_NEW_EX(__struct_type__, __n_structs__, WILC_NULL)
|
||||
WILC_NEW_EX(__struct_type__, __n_structs__, NULL)
|
||||
|
||||
/*!
|
||||
* @brief Allocates a block (with default attributes) of given type and number of
|
||||
* elements and Zero-fills it
|
||||
*/
|
||||
#define WILC_NEW_0(__struct_type__, __n_structs__) \
|
||||
WILC_NEW_O_EX(__struct_type__, __n_structs__, WILC_NULL)
|
||||
WILC_NEW_O_EX(__struct_type__, __n_structs__, NULL)
|
||||
|
||||
/*!
|
||||
* @brief Frees a block (with default attributes), also setting the original pointer
|
||||
* to NULL
|
||||
*/
|
||||
#define WILC_FREE_SET_NULL(__ptr__) \
|
||||
WILC_FREE_SET_NULL_EX(__ptr__, WILC_NULL)
|
||||
WILC_FREE_SET_NULL_EX(__ptr__, NULL)
|
||||
|
||||
/*!
|
||||
* @brief Frees a block (with default attributes) if the pointer expression evaluates
|
||||
* to true
|
||||
*/
|
||||
#define WILC_FREE_IF_TRUE(__ptr__) \
|
||||
WILC_FREE_IF_TRUE_EX(__ptr__, WILC_NULL)
|
||||
WILC_FREE_IF_TRUE_EX(__ptr__, NULL)
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -32,8 +32,6 @@ typedef enum {
|
|||
/* Character types */
|
||||
typedef char WILC_Char;
|
||||
|
||||
#define WILC_NULL ((void *)0)
|
||||
|
||||
/* Os Configuration File */
|
||||
#include "wilc_osconfig.h"
|
||||
#include "wilc_platform.h"
|
||||
|
|
|
@ -51,11 +51,11 @@ WILC_Sint32 WILC_strncmp(const WILC_Char *pcStr1, const WILC_Char *pcStr2,
|
|||
{
|
||||
WILC_Sint32 s32Result;
|
||||
|
||||
if (pcStr1 == WILC_NULL && pcStr2 == WILC_NULL) {
|
||||
if (pcStr1 == NULL && pcStr2 == NULL) {
|
||||
s32Result = 0;
|
||||
} else if (pcStr1 == WILC_NULL) {
|
||||
} else if (pcStr1 == NULL) {
|
||||
s32Result = -1;
|
||||
} else if (pcStr2 == WILC_NULL) {
|
||||
} else if (pcStr2 == NULL) {
|
||||
s32Result = 1;
|
||||
} else {
|
||||
s32Result = strncmp(pcStr1, pcStr2, u32Count);
|
||||
|
|
|
@ -97,13 +97,13 @@ WILC_Char *WILC_strncpy(WILC_Char *pcTarget, const WILC_Char *pcSource,
|
|||
|
||||
/*!
|
||||
* @brief Compares two strings up to u32Count characters
|
||||
* @details Compares 2 strings reporting which is bigger, WILC_NULL is considered
|
||||
* @details Compares 2 strings reporting which is bigger, NULL is considered
|
||||
* the smallest string, then a zero length string then all other
|
||||
* strings depending on thier ascii characters order with small case
|
||||
* converted to uppder case
|
||||
* @param[in] pcStr1 the first string, WILC_NULL is valid and considered smaller
|
||||
* @param[in] pcStr1 the first string, NULL is valid and considered smaller
|
||||
* than any other non-NULL string (incliding zero lenght strings)
|
||||
* @param[in] pcStr2 the second string, WILC_NULL is valid and considered smaller
|
||||
* @param[in] pcStr2 the second string, NULL is valid and considered smaller
|
||||
* than any other non-NULL string (incliding zero lenght strings)
|
||||
* @param[in] u32Count copying will proceed until a null character in pcStr1 or
|
||||
* pcStr2 is encountered or u32Count of bytes copied
|
||||
|
|
|
@ -148,7 +148,7 @@ void clear_shadow_scan(void *pUserVoid)
|
|||
int i;
|
||||
priv = (struct WILC_WFI_priv *)pUserVoid;
|
||||
if (op_ifcs == 0) {
|
||||
WILC_TimerDestroy(&hAgingTimer, WILC_NULL);
|
||||
WILC_TimerDestroy(&hAgingTimer, NULL);
|
||||
PRINT_INFO(CORECONFIG_DBG, "destroy aging timer\n");
|
||||
|
||||
for (i = 0; i < u32LastScannedNtwrksCountShadow; i++) {
|
||||
|
@ -198,7 +198,7 @@ void refresh_scan(void *pUserVoid, uint8_t all, WILC_Bool bDirectScan)
|
|||
WILC_Sint32 s32Freq;
|
||||
struct ieee80211_channel *channel;
|
||||
|
||||
if (pstrNetworkInfo != WILC_NULL) {
|
||||
if (pstrNetworkInfo != NULL) {
|
||||
|
||||
s32Freq = ieee80211_channel_to_frequency((WILC_Sint32)pstrNetworkInfo->u8channel, IEEE80211_BAND_2GHZ);
|
||||
channel = ieee80211_get_channel(wiphy, s32Freq);
|
||||
|
@ -266,7 +266,7 @@ void remove_network_from_shadow(void *pUserVoid)
|
|||
|
||||
PRINT_D(CFG80211_DBG, "Number of cached networks: %d\n", u32LastScannedNtwrksCountShadow);
|
||||
if (u32LastScannedNtwrksCountShadow != 0)
|
||||
WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid, WILC_NULL);
|
||||
WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid, NULL);
|
||||
else
|
||||
PRINT_D(CFG80211_DBG, "No need to restart Aging timer\n");
|
||||
}
|
||||
|
@ -288,7 +288,7 @@ int8_t is_network_in_shadow(tstrNetworkInfo *pstrNetworkInfo, void *pUserVoid)
|
|||
priv = (struct WILC_WFI_priv *)pUserVoid;
|
||||
if (u32LastScannedNtwrksCountShadow == 0) {
|
||||
PRINT_D(CFG80211_DBG, "Starting Aging timer\n");
|
||||
WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid, WILC_NULL);
|
||||
WILC_TimerStart(&(hAgingTimer), AGING_TIME, pUserVoid, NULL);
|
||||
state = -1;
|
||||
} else {
|
||||
/* Linear search for now */
|
||||
|
@ -399,7 +399,7 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo
|
|||
WILC_ERRORREPORT(s32Error, WILC_FAIL);
|
||||
}
|
||||
|
||||
if (pstrNetworkInfo != WILC_NULL) {
|
||||
if (pstrNetworkInfo != NULL) {
|
||||
s32Freq = ieee80211_channel_to_frequency((WILC_Sint32)pstrNetworkInfo->u8channel, IEEE80211_BAND_2GHZ);
|
||||
channel = ieee80211_get_channel(wiphy, s32Freq);
|
||||
|
||||
|
@ -464,11 +464,11 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo
|
|||
|
||||
down(&(priv->hSemScanReq));
|
||||
|
||||
if (priv->pstrScanReq != WILC_NULL) {
|
||||
if (priv->pstrScanReq != NULL) {
|
||||
cfg80211_scan_done(priv->pstrScanReq, WILC_FALSE);
|
||||
priv->u32RcvdChCount = 0;
|
||||
priv->bCfgScanning = WILC_FALSE;
|
||||
priv->pstrScanReq = WILC_NULL;
|
||||
priv->pstrScanReq = NULL;
|
||||
}
|
||||
up(&(priv->hSemScanReq));
|
||||
|
||||
|
@ -478,14 +478,14 @@ static void CfgScanResult(tenuScanEvent enuScanEvent, tstrNetworkInfo *pstrNetwo
|
|||
down(&(priv->hSemScanReq));
|
||||
|
||||
PRINT_D(CFG80211_DBG, "Scan Aborted \n");
|
||||
if (priv->pstrScanReq != WILC_NULL) {
|
||||
if (priv->pstrScanReq != NULL) {
|
||||
|
||||
update_scan_time(priv);
|
||||
refresh_scan(priv, 1, WILC_FALSE);
|
||||
|
||||
cfg80211_scan_done(priv->pstrScanReq, WILC_FALSE);
|
||||
priv->bCfgScanning = WILC_FALSE;
|
||||
priv->pstrScanReq = WILC_NULL;
|
||||
priv->pstrScanReq = NULL;
|
||||
}
|
||||
up(&(priv->hSemScanReq));
|
||||
}
|
||||
|
@ -1230,14 +1230,14 @@ static int WILC_WFI_add_key(struct wiphy *wiphy, struct net_device *netdev, u8 k
|
|||
|
||||
if (priv->wilc_gtk[key_index] == NULL) {
|
||||
priv->wilc_gtk[key_index] = (struct wilc_wfi_key *)WILC_MALLOC(sizeof(struct wilc_wfi_key));
|
||||
priv->wilc_gtk[key_index]->key = WILC_NULL;
|
||||
priv->wilc_gtk[key_index]->seq = WILC_NULL;
|
||||
priv->wilc_gtk[key_index]->key = NULL;
|
||||
priv->wilc_gtk[key_index]->seq = NULL;
|
||||
|
||||
}
|
||||
if (priv->wilc_ptk[key_index] == NULL) {
|
||||
priv->wilc_ptk[key_index] = (struct wilc_wfi_key *)WILC_MALLOC(sizeof(struct wilc_wfi_key));
|
||||
priv->wilc_ptk[key_index]->key = WILC_NULL;
|
||||
priv->wilc_ptk[key_index]->seq = WILC_NULL;
|
||||
priv->wilc_ptk[key_index]->key = NULL;
|
||||
priv->wilc_ptk[key_index]->seq = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2867,11 +2867,11 @@ int WILC_WFI_set_power_mgmt(struct wiphy *wiphy, struct net_device *dev,
|
|||
struct WILC_WFI_priv *priv;
|
||||
PRINT_D(CFG80211_DBG, " Power save Enabled= %d , TimeOut = %d\n", enabled, timeout);
|
||||
|
||||
if (wiphy == WILC_NULL)
|
||||
if (wiphy == NULL)
|
||||
return -ENOENT;
|
||||
|
||||
priv = wiphy_priv(wiphy);
|
||||
if (priv->hWILCWFIDrv == WILC_NULL) {
|
||||
if (priv->hWILCWFIDrv == NULL) {
|
||||
PRINT_ER("Driver is NULL\n");
|
||||
return -EIO;
|
||||
}
|
||||
|
@ -2922,7 +2922,7 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev
|
|||
|
||||
#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
|
||||
g_obtainingIP = WILC_FALSE;
|
||||
WILC_TimerStop(&hDuringIpTimer, WILC_NULL);
|
||||
WILC_TimerStop(&hDuringIpTimer, NULL);
|
||||
PRINT_D(GENERIC_DBG, "Changing virtual interface, enable scan\n");
|
||||
#endif
|
||||
/*BugID_5137*/
|
||||
|
@ -3165,7 +3165,7 @@ static int WILC_WFI_change_virt_intf(struct wiphy *wiphy, struct net_device *dev
|
|||
|
||||
#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
|
||||
g_obtainingIP = WILC_TRUE;
|
||||
WILC_TimerStart(&hDuringIpTimer, duringIP_TIME, WILC_NULL, WILC_NULL);
|
||||
WILC_TimerStart(&hDuringIpTimer, duringIP_TIME, NULL, NULL);
|
||||
#endif
|
||||
host_int_set_power_mgmt(priv->hWILCWFIDrv, 0, 0);
|
||||
/*BugID_5222*/
|
||||
|
@ -3460,7 +3460,7 @@ static int WILC_WFI_add_station(struct wiphy *wiphy, struct net_device *dev,
|
|||
PRINT_D(HOSTAPD_DBG, "ASSOC ID = %d\n", strStaParams.u16AssocID);
|
||||
PRINT_D(HOSTAPD_DBG, "Number of supported rates = %d\n", strStaParams.u8NumRates);
|
||||
|
||||
if (params->ht_capa == WILC_NULL) {
|
||||
if (params->ht_capa == NULL) {
|
||||
strStaParams.bIsHTSupported = WILC_FALSE;
|
||||
} else {
|
||||
strStaParams.bIsHTSupported = WILC_TRUE;
|
||||
|
@ -3533,7 +3533,7 @@ static int WILC_WFI_del_station(struct wiphy *wiphy, struct net_device *dev,
|
|||
PRINT_D(HOSTAPD_DBG, "Deleting station\n");
|
||||
|
||||
|
||||
if (mac == WILC_NULL) {
|
||||
if (mac == NULL) {
|
||||
PRINT_D(HOSTAPD_DBG, "All associated stations \n");
|
||||
s32Error = host_int_del_allstation(priv->hWILCWFIDrv, priv->assoc_stainfo.au8Sta_AssociatedBss);
|
||||
} else {
|
||||
|
@ -3592,7 +3592,7 @@ static int WILC_WFI_change_station(struct wiphy *wiphy, struct net_device *dev,
|
|||
PRINT_D(HOSTAPD_DBG, "ASSOC ID = %d\n", strStaParams.u16AssocID);
|
||||
PRINT_D(HOSTAPD_DBG, "Number of supported rates = %d\n", strStaParams.u8NumRates);
|
||||
|
||||
if (params->ht_capa == WILC_NULL) {
|
||||
if (params->ht_capa == NULL) {
|
||||
strStaParams.bIsHTSupported = WILC_FALSE;
|
||||
} else {
|
||||
strStaParams.bIsHTSupported = WILC_TRUE;
|
||||
|
@ -3994,9 +3994,9 @@ int WILC_WFI_InitHostInt(struct net_device *net)
|
|||
PRINT_D(INIT_DBG, "Host[%p][%p]\n", net, net->ieee80211_ptr);
|
||||
priv = wdev_priv(net->ieee80211_ptr);
|
||||
if (op_ifcs == 0) {
|
||||
s32Error = WILC_TimerCreate(&(hAgingTimer), remove_network_from_shadow, WILC_NULL);
|
||||
s32Error = WILC_TimerCreate(&(hAgingTimer), remove_network_from_shadow, NULL);
|
||||
#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
|
||||
s32Error = WILC_TimerCreate(&(hDuringIpTimer), clear_duringIP, WILC_NULL);
|
||||
s32Error = WILC_TimerCreate(&(hDuringIpTimer), clear_duringIP, NULL);
|
||||
#endif
|
||||
}
|
||||
op_ifcs++;
|
||||
|
@ -4048,7 +4048,7 @@ int WILC_WFI_DeInitHostInt(struct net_device *net)
|
|||
#ifdef DISABLE_PWRSAVE_AND_SCAN_DURING_IP
|
||||
if (op_ifcs == 0) {
|
||||
PRINT_D(CORECONFIG_DBG, "destroy during ip\n");
|
||||
WILC_TimerDestroy(&hDuringIpTimer, WILC_NULL);
|
||||
WILC_TimerDestroy(&hDuringIpTimer, NULL);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -1899,12 +1899,12 @@ static void wilc_wlan_cleanup(void)
|
|||
#ifdef MEMORY_STATIC
|
||||
if (p->rx_buffer) {
|
||||
p->os_func.os_free(p->rx_buffer);
|
||||
p->rx_buffer = WILC_NULL;
|
||||
p->rx_buffer = NULL;
|
||||
}
|
||||
#endif
|
||||
if (p->tx_buffer) {
|
||||
p->os_func.os_free(p->tx_buffer);
|
||||
p->tx_buffer = WILC_NULL;
|
||||
p->tx_buffer = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -2294,7 +2294,7 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup)
|
|||
|
||||
|
||||
|
||||
if (g_wlan.tx_buffer == WILC_NULL)
|
||||
if (g_wlan.tx_buffer == NULL)
|
||||
#if (defined WILC_PREALLOC_AT_BOOT)
|
||||
g_wlan.tx_buffer = (uint8_t *)get_tx_buffer();
|
||||
#else
|
||||
|
@ -2302,7 +2302,7 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup)
|
|||
#endif
|
||||
PRINT_D(TX_DBG, "g_wlan.tx_buffer = %p\n", g_wlan.tx_buffer);
|
||||
|
||||
if (g_wlan.tx_buffer == WILC_NULL) {
|
||||
if (g_wlan.tx_buffer == NULL) {
|
||||
/* ENOBUFS 105 */
|
||||
ret = -105;
|
||||
PRINT_ER("Can't allocate Tx Buffer");
|
||||
|
@ -2311,14 +2311,14 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup)
|
|||
|
||||
/* rx_buffer is not used unless we activate USE_MEM STATIC which is not applicable, allocating such memory is useless*/
|
||||
#if defined (MEMORY_STATIC)
|
||||
if (g_wlan.rx_buffer == WILC_NULL)
|
||||
if (g_wlan.rx_buffer == NULL)
|
||||
#if (defined WILC_PREALLOC_AT_BOOT)
|
||||
g_wlan.rx_buffer = (uint8_t *)get_rx_buffer();
|
||||
#else
|
||||
g_wlan.rx_buffer = (uint8_t *)g_wlan.os_func.os_malloc(g_wlan.rx_buffer_size);
|
||||
#endif
|
||||
PRINT_D(TX_DBG, "g_wlan.rx_buffer =%p\n", g_wlan.rx_buffer);
|
||||
if (g_wlan.rx_buffer == WILC_NULL) {
|
||||
if (g_wlan.rx_buffer == NULL) {
|
||||
/* ENOBUFS 105 */
|
||||
ret = -105;
|
||||
PRINT_ER("Can't allocate Rx Buffer");
|
||||
|
@ -2375,12 +2375,12 @@ _fail_:
|
|||
#ifdef MEMORY_STATIC
|
||||
if (g_wlan.rx_buffer) {
|
||||
g_wlan.os_func.os_free(g_wlan.rx_buffer);
|
||||
g_wlan.rx_buffer = WILC_NULL;
|
||||
g_wlan.rx_buffer = NULL;
|
||||
}
|
||||
#endif
|
||||
if (g_wlan.tx_buffer) {
|
||||
g_wlan.os_func.os_free(g_wlan.tx_buffer);
|
||||
g_wlan.tx_buffer = WILC_NULL;
|
||||
g_wlan.tx_buffer = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Loading…
Reference in New Issue