staging: wilc1000: remove function pointer wlan_add_to_tx_que
authorGlen Lee <glen.lee@atmel.com>
Thu, 1 Oct 2015 07:03:35 +0000 (16:03 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 2 Oct 2015 09:59:52 +0000 (11:59 +0200)
This patch removes function pointer wlan_add_to_tx_que and just call
the function wilc_wlan_txq_add_net_pkt. Remove static from the function also.

Signed-off-by: Glen Lee <glen.lee@atmel.com>
Signed-off-by: Tony Cho <tony.cho@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/wilc1000/linux_wlan.c
drivers/staging/wilc1000/wilc_wlan.c
drivers/staging/wilc1000/wilc_wlan.h
drivers/staging/wilc1000/wilc_wlan_if.h

index 245357e0bd4daf8a482da6a8c2f3444400de9f44..e40ee8c98597e464b2217cbbb698be9155011e04 100644 (file)
@@ -1563,10 +1563,9 @@ int mac_xmit(struct sk_buff *skb, struct net_device *ndev)
        nic->netstats.tx_packets++;
        nic->netstats.tx_bytes += tx_data->size;
        tx_data->pBssid = g_linux_wlan->strInterfaceInfo[nic->u8IfIdx].aBSSID;
-       QueueCount = g_linux_wlan->oup.wlan_add_to_tx_que((void *)tx_data,
-                                                         tx_data->buff,
-                                                         tx_data->size,
-                                                         linux_wlan_tx_complete);
+       QueueCount = wilc_wlan_txq_add_net_pkt((void *)tx_data, tx_data->buff,
+                                              tx_data->size,
+                                              linux_wlan_tx_complete);
 
        if (QueueCount > FLOW_CONTROL_UPPER_THRESHOLD) {
                netif_stop_queue(g_linux_wlan->strInterfaceInfo[0].wilc_netdev);
index 745953c6b65101e65b74bdff42478f47034cea4f..fcc4155941bc6b59bc7ba760996357f76603e562 100644 (file)
@@ -503,7 +503,8 @@ static int wilc_wlan_txq_add_cfg_pkt(u8 *buffer, u32 buffer_size)
        return 1;
 }
 
-static int wilc_wlan_txq_add_net_pkt(void *priv, u8 *buffer, u32 buffer_size, wilc_tx_complete_func_t func)
+int wilc_wlan_txq_add_net_pkt(void *priv, u8 *buffer, u32 buffer_size,
+                             wilc_tx_complete_func_t func)
 {
        wilc_wlan_dev_t *p = (wilc_wlan_dev_t *)&g_wlan;
        struct txq_entry_t *tqe;
@@ -2027,7 +2028,6 @@ int wilc_wlan_init(wilc_wlan_inp_t *inp, wilc_wlan_oup_t *oup)
        /**
         *      export functions
         **/
-       oup->wlan_add_to_tx_que = wilc_wlan_txq_add_net_pkt;
        oup->wlan_handle_tx_que = wilc_wlan_handle_txq;
        oup->wlan_handle_rx_isr = wilc_handle_isr;
        oup->wlan_cleanup = wilc_wlan_cleanup;
index b32ba4f210b2f2be4de0c2faccd4b925113447aa..2af027ccc101be8d1373d9e9c322957f7f492359 100644 (file)
@@ -308,4 +308,6 @@ typedef struct {
 int wilc_wlan_firmware_download(const u8 *buffer, u32 buffer_size);
 int wilc_wlan_start(void);
 int wilc_wlan_stop(void);
+int wilc_wlan_txq_add_net_pkt(void *priv, u8 *buffer, u32 buffer_size,
+                             wilc_tx_complete_func_t func);
 #endif
index 9e749c7397e2e33bf51488ad25c3511291831980..25d9d908f2844cc6951a558233fbdf62e68f7b64 100644 (file)
@@ -122,7 +122,6 @@ typedef void (*wilc_tx_complete_func_t)(void *, int);
 #define WILC_TX_ERR_NO_BUF     (-2)
 
 typedef struct {
-       int (*wlan_add_to_tx_que)(void *, u8 *, u32, wilc_tx_complete_func_t);
        int (*wlan_handle_tx_que)(u32 *);
        void (*wlan_handle_rx_isr)(void);
        void (*wlan_cleanup)(void);