This patch adds new argument struct net_device and use netdev private data member wilc instead of g_linux_wlan, pass dev to the function. Signed-off-by: Glen Lee <glen.lee@xxxxxxxxx> --- drivers/staging/wilc1000/wilc_wlan.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/staging/wilc1000/wilc_wlan.c b/drivers/staging/wilc1000/wilc_wlan.c index 75b0616..ec4bff4 100644 --- a/drivers/staging/wilc1000/wilc_wlan.c +++ b/drivers/staging/wilc1000/wilc_wlan.c @@ -484,15 +484,20 @@ bool is_TCP_ACK_Filter_Enabled(void) return EnableTCPAckFilter; } -static int wilc_wlan_txq_add_cfg_pkt(u8 *buffer, u32 buffer_size) +static int wilc_wlan_txq_add_cfg_pkt(struct net_device *dev, + u8 *buffer, u32 buffer_size) { wilc_wlan_dev_t *p = &g_wlan; struct txq_entry_t *tqe; + perInterface_wlan_t *nic = netdev_priv(dev); + struct wilc *wilc; + + wilc = nic->wilc; PRINT_D(TX_DBG, "Adding config packet ...\n"); if (p->quit) { PRINT_D(TX_DBG, "Return due to clear function\n"); - up(&g_linux_wlan->cfg_event); + up(&wilc->cfg_event); return 0; } @@ -1763,7 +1768,7 @@ static int wilc_wlan_cfg_commit(struct net_device *dev, * Add to TX queue **/ - if (!wilc_wlan_txq_add_cfg_pkt(&cfg->wid_header[0], total_len)) + if (!wilc_wlan_txq_add_cfg_pkt(dev, &cfg->wid_header[0], total_len)) return -1; return 0; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html