s32 result = 0;
struct wid strWID;
u8 *mac_buf = kmalloc(ETH_ALEN, GFP_KERNEL);
+
if (!mac_buf) {
PRINT_ER("No buffer to send mac address\n");
return -EFAULT;
}
if (strHostIFCfgParamAttr->cfg_attr_info.flag & CURRENT_TX_RATE) {
enum CURRENT_TXRATE curr_tx_rate = strHostIFCfgParamAttr->cfg_attr_info.curr_tx_rate;
+
if (curr_tx_rate == AUTORATE || curr_tx_rate == MBPS_1
|| curr_tx_rate == MBPS_2 || curr_tx_rate == MBPS_5_5
|| curr_tx_rate == MBPS_11 || curr_tx_rate == MBPS_6
int host_int_wait_msg_queue_idle(void)
{
int result = 0;
-
struct host_if_msg msg;
+
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_Q_IDLE;
result = wilc_mq_send(&hif_msg_q, &msg, sizeof(struct host_if_msg));
int host_int_set_wfi_drv_handler(struct host_if_drv *hif_drv)
{
int result = 0;
-
struct host_if_msg msg;
+
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_SET_WFIDRV_HANDLER;
msg.body.drv.u32Address = get_id_from_handler(hif_drv);
int host_int_set_operation_mode(struct host_if_drv *hif_drv, u32 mode)
{
int result = 0;
-
struct host_if_msg msg;
+
memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_SET_OPERATION_MODE;
msg.body.mode.u32Mode = mode;
{
s32 result = 0;
struct host_if_msg msg;
- memset(&msg, 0, sizeof(struct host_if_msg));
+ memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_GET_RSSI;
msg.drv = hif_drv;
{
struct host_if_msg msg;
s32 result = 0;
- memset(&msg, 0, sizeof(struct host_if_msg));
+ memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_GET_LINKSPEED;
msg.drv = hif_drv;
{
s32 result = 0;
struct host_if_msg msg;
- memset(&msg, 0, sizeof(struct host_if_msg));
+ memset(&msg, 0, sizeof(struct host_if_msg));
msg.id = HOST_IF_MSG_GET_STATISTICS;
msg.body.data = (char *)pstrStatistics;
msg.drv = hif_drv;
memcpy(pstrAddStationMsg, pstrStaParams, sizeof(struct add_sta_param));
if (pstrAddStationMsg->u8NumRates > 0) {
u8 *rates = kmalloc(pstrAddStationMsg->u8NumRates, GFP_KERNEL);
+
if (!rates)
return -ENOMEM;
memcpy(pstrAddStationMsg, pstrStaParams, sizeof(struct add_sta_param));
if (pstrAddStationMsg->u8NumRates > 0) {
u8 *rates = kmalloc(pstrAddStationMsg->u8NumRates, GFP_KERNEL);
+
if (!rates)
return -ENOMEM;