staging: rtl8192e: Avoid casting function pointers

Signed-off-by: Mike McCormack <mikem@ring3k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
Mike McCormack 2011-02-06 22:55:26 +09:00 committed by Greg Kroah-Hartman
parent 1348dc08a9
commit 80a4dead57
2 changed files with 21 additions and 22 deletions

View File

@ -1086,7 +1086,7 @@ short rtl8192_is_tx_queue_empty(struct net_device *dev);
void IPSEnter(struct net_device *dev); void IPSEnter(struct net_device *dev);
void IPSLeave(struct net_device *dev); void IPSLeave(struct net_device *dev);
void InactivePsWorkItemCallback(struct net_device *dev); void InactivePsWorkItemCallback(struct net_device *dev);
void IPSLeave_wq(void *data); void IPSLeave_wq(struct work_struct *work);
void ieee80211_ips_leave_wq(struct net_device *dev); void ieee80211_ips_leave_wq(struct net_device *dev);
void ieee80211_ips_leave(struct net_device *dev); void ieee80211_ips_leave(struct net_device *dev);
#endif #endif

View File

@ -99,9 +99,9 @@ static struct pci_driver rtl8192_pci_driver = {
static void rtl8192_start_beacon(struct net_device *dev); static void rtl8192_start_beacon(struct net_device *dev);
static void rtl8192_stop_beacon(struct net_device *dev); static void rtl8192_stop_beacon(struct net_device *dev);
static void rtl819x_watchdog_wqcallback(struct work_struct *work); static void rtl819x_watchdog_wqcallback(struct work_struct *work);
static void rtl8192_irq_rx_tasklet(struct r8192_priv *priv); static void rtl8192_irq_rx_tasklet(unsigned long arg);
static void rtl8192_irq_tx_tasklet(struct r8192_priv *priv); static void rtl8192_irq_tx_tasklet(unsigned long arg);
static void rtl8192_prepare_beacon(struct r8192_priv *priv); static void rtl8192_prepare_beacon(unsigned long arg);
static irqreturn_t rtl8192_interrupt(int irq, void *netdev); static irqreturn_t rtl8192_interrupt(int irq, void *netdev);
static void rtl819xE_tx_cmd(struct net_device *dev, struct sk_buff *skb); static void rtl819xE_tx_cmd(struct net_device *dev, struct sk_buff *skb);
static void rtl8192_update_ratr_table(struct net_device* dev); static void rtl8192_update_ratr_table(struct net_device* dev);
@ -2175,7 +2175,7 @@ static void rtl8192_init_priv_task(struct net_device* dev)
priv->priv_wq = create_workqueue(DRV_NAME); priv->priv_wq = create_workqueue(DRV_NAME);
#ifdef ENABLE_IPS #ifdef ENABLE_IPS
INIT_WORK(&priv->ieee80211->ips_leave_wq, (void*)IPSLeave_wq); INIT_WORK(&priv->ieee80211->ips_leave_wq, IPSLeave_wq);
#endif #endif
// INIT_WORK(&priv->reset_wq, (void(*)(void*)) rtl8192_restart); // INIT_WORK(&priv->reset_wq, (void(*)(void*)) rtl8192_restart);
@ -2188,17 +2188,14 @@ static void rtl8192_init_priv_task(struct net_device* dev)
//INIT_WORK(&priv->SwChnlWorkItem, rtl8192_SwChnl_WorkItem); //INIT_WORK(&priv->SwChnlWorkItem, rtl8192_SwChnl_WorkItem);
//INIT_WORK(&priv->SetBWModeWorkItem, rtl8192_SetBWModeWorkItem); //INIT_WORK(&priv->SetBWModeWorkItem, rtl8192_SetBWModeWorkItem);
INIT_WORK(&priv->qos_activate, rtl8192_qos_activate); INIT_WORK(&priv->qos_activate, rtl8192_qos_activate);
INIT_DELAYED_WORK(&priv->ieee80211->hw_wakeup_wq,(void*) rtl8192_hw_wakeup_wq); INIT_DELAYED_WORK(&priv->ieee80211->hw_wakeup_wq, rtl8192_hw_wakeup_wq);
INIT_DELAYED_WORK(&priv->ieee80211->hw_sleep_wq,(void*) rtl8192_hw_sleep_wq); INIT_DELAYED_WORK(&priv->ieee80211->hw_sleep_wq, rtl8192_hw_sleep_wq);
tasklet_init(&priv->irq_rx_tasklet, tasklet_init(&priv->irq_rx_tasklet, rtl8192_irq_rx_tasklet,
(void(*)(unsigned long))rtl8192_irq_rx_tasklet,
(unsigned long) priv); (unsigned long) priv);
tasklet_init(&priv->irq_tx_tasklet, tasklet_init(&priv->irq_tx_tasklet, rtl8192_irq_tx_tasklet,
(void(*)(unsigned long))rtl8192_irq_tx_tasklet,
(unsigned long) priv); (unsigned long) priv);
tasklet_init(&priv->irq_prepare_beacon_tasklet, tasklet_init(&priv->irq_prepare_beacon_tasklet, rtl8192_prepare_beacon,
(void(*)(unsigned long))rtl8192_prepare_beacon,
(unsigned long) priv); (unsigned long) priv);
} }
@ -3094,8 +3091,9 @@ static RT_STATUS rtl8192_adapter_start(struct net_device *dev)
} }
static void rtl8192_prepare_beacon(struct r8192_priv *priv) static void rtl8192_prepare_beacon(unsigned long arg)
{ {
struct r8192_priv *priv = (struct r8192_priv*) arg;
struct sk_buff *skb; struct sk_buff *skb;
//unsigned long flags; //unsigned long flags;
cb_desc *tcb_desc; cb_desc *tcb_desc;
@ -3133,7 +3131,6 @@ static void rtl8192_start_beacon(struct net_device *dev)
u16 BcnIFS = 0xf; u16 BcnIFS = 0xf;
DMESG("Enabling beacon TX"); DMESG("Enabling beacon TX");
//rtl8192_prepare_beacon(dev);
rtl8192_irq_disable(dev); rtl8192_irq_disable(dev);
//rtl8192_beacon_tx_enable(dev); //rtl8192_beacon_tx_enable(dev);
@ -3784,9 +3781,9 @@ IPSLeave(struct net_device *dev)
} }
} }
void IPSLeave_wq(void *data) void IPSLeave_wq(struct work_struct *work)
{ {
struct ieee80211_device *ieee = container_of(data,struct ieee80211_device,ips_leave_wq); struct ieee80211_device *ieee = container_of(work, struct ieee80211_device, ips_leave_wq);
struct net_device *dev = ieee->dev; struct net_device *dev = ieee->dev;
struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev); struct r8192_priv *priv = (struct r8192_priv *)ieee80211_priv(dev);
@ -4947,8 +4944,9 @@ static void rtl8192_tx_resume(struct net_device *dev)
} }
} }
static void rtl8192_irq_tx_tasklet(struct r8192_priv *priv) static void rtl8192_irq_tx_tasklet(unsigned long arg)
{ {
struct r8192_priv *priv = (struct r8192_priv*) arg;
struct rtl8192_tx_ring *mgnt_ring = &priv->tx_ring[MGNT_QUEUE]; struct rtl8192_tx_ring *mgnt_ring = &priv->tx_ring[MGNT_QUEUE];
struct net_device *dev = priv->ieee80211->dev; struct net_device *dev = priv->ieee80211->dev;
unsigned long flags; unsigned long flags;
@ -5164,8 +5162,9 @@ static void rtl8192_rx(struct net_device *dev)
} }
static void rtl8192_irq_rx_tasklet(struct r8192_priv *priv) static void rtl8192_irq_rx_tasklet(unsigned long arg)
{ {
struct r8192_priv *priv = (struct r8192_priv*) arg;
rtl8192_rx(priv->ieee80211->dev); rtl8192_rx(priv->ieee80211->dev);
/* unmask RDU */ /* unmask RDU */
write_nic_dword(priv, INTA_MASK, read_nic_dword(priv, INTA_MASK) | IMR_RDU); write_nic_dword(priv, INTA_MASK, read_nic_dword(priv, INTA_MASK) | IMR_RDU);