Commit 1028e5a4 authored by Glen Lee's avatar Glen Lee Committed by Greg Kroah-Hartman

staging: wilc1000: remove function pointer wlan_cfg_set

This patch removes function pointer wlan_cfg_set and just call
the function wilc_wlan_cfg_set. Remove static from the function also.
Signed-off-by: default avatarGlen Lee <glen.lee@atmel.com>
Signed-off-by: default avatarTony Cho <tony.cho@atmel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1d4469c9
......@@ -11,6 +11,7 @@
#include "coreconfigurator.h"
#include "wilc_wlan_if.h"
#include "wilc_wlan.h"
#include <linux/errno.h>
#include <linux/slab.h>
#define TAG_PARAM_OFFSET (MAC_HDR_LEN + TIME_STAMP_LEN + \
......@@ -613,8 +614,7 @@ s32 send_config_pkt(u8 u8Mode, tstrWID *pstrWIDs,
} else {
PRINT_D(CORECONFIG_DBG, "Net Dev is initialized\n");
}
if (gpstrWlanOps->wlan_cfg_set == NULL ||
gpstrWlanOps->wlan_cfg_get == NULL) {
if (gpstrWlanOps->wlan_cfg_get == NULL) {
PRINT_D(CORECONFIG_DBG, "Set and Get is still not initialized\n");
return 1;
} else {
......@@ -642,10 +642,12 @@ s32 send_config_pkt(u8 u8Mode, tstrWID *pstrWIDs,
} else if (u8Mode == SET_CFG) {
for (counter = 0; counter < u32WIDsCount; counter++) {
PRINT_D(CORECONFIG_DBG, "Sending config SET PACKET WID:%x\n", pstrWIDs[counter].u16WIDid);
if (!gpstrWlanOps->wlan_cfg_set(!counter,
pstrWIDs[counter].u16WIDid, pstrWIDs[counter].ps8WidVal,
pstrWIDs[counter].s32ValueSize,
(counter == u32WIDsCount - 1), drvHandler)) {
if (!wilc_wlan_cfg_set(!counter,
pstrWIDs[counter].u16WIDid,
pstrWIDs[counter].ps8WidVal,
pstrWIDs[counter].s32ValueSize,
(counter == u32WIDsCount - 1),
drvHandler)) {
ret = -1;
printk("[Sendconfigpkt]Set Timed out\n");
break;
......
This diff is collapsed.
......@@ -1748,7 +1748,8 @@ static int wilc_wlan_cfg_commit(int type, u32 drvHandler)
return 0;
}
static int wilc_wlan_cfg_set(int start, u32 wid, u8 *buffer, u32 buffer_size, int commit, u32 drvHandler)
int wilc_wlan_cfg_set(int start, u32 wid, u8 *buffer, u32 buffer_size,
int commit, u32 drvHandler)
{
wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;
u32 offset;
......@@ -2028,7 +2029,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup)
/**
* export functions
**/
oup->wlan_cfg_set = wilc_wlan_cfg_set;
oup->wlan_cfg_get = wilc_wlan_cfg_get;
oup->wlan_cfg_get_value = wilc_wlan_cfg_get_val;
......
......@@ -311,4 +311,6 @@ int wilc_wlan_txq_add_net_pkt(void *priv, u8 *buffer, u32 buffer_size,
int wilc_wlan_handle_txq(u32 *pu32TxqCount);
void wilc_handle_isr(void);
void wilc_wlan_cleanup(void);
int wilc_wlan_cfg_set(int start, u32 wid, u8 *buffer, u32 buffer_size,
int commit, u32 drvHandler);
#endif
......@@ -122,7 +122,6 @@ typedef void (*wilc_tx_complete_func_t)(void *, int);
#define WILC_TX_ERR_NO_BUF (-2)
typedef struct {
int (*wlan_cfg_set)(int, u32, u8 *, u32, int, u32);
int (*wlan_cfg_get)(int, u32, int, u32);
int (*wlan_cfg_get_value)(u32, u8 *, u32);
int (*wlan_add_mgmt_to_tx_que)(void *, u8 *, u32,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment