staging: rtl8192e: Convert typedef r8192_priv to struct r8192_priv
authorLarry Finger <Larry.Finger@lwfinger.net>
Tue, 19 Jul 2011 05:26:41 +0000 (00:26 -0500)
committerLarry Finger <Larry.Finger@lwfinger.net>
Wed, 24 Aug 2011 06:52:26 +0000 (01:52 -0500)
Remove typedef from struct.
Rename struct.
Rename uses.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
drivers/staging/rtl8192e/r8192E_cmdpkt.c
drivers/staging/rtl8192e/r8192E_dev.c
drivers/staging/rtl8192e/r8192E_firmware.c
drivers/staging/rtl8192e/rtl_core.c
drivers/staging/rtl8192e/rtl_core.h
drivers/staging/rtl8192e/rtl_dm.c

index d306e1034cf2a49f3da732a59dcc509e195ab9df..90cbb5b45f6c1e34ef93c1a7e420a702e426d3f9 100644 (file)
@@ -42,7 +42,7 @@
 {
 
        bool                            rt_status = true;
-       struct r8192_priv       *priv = rtllib_priv(dev);
+       struct r8192_priv *priv = rtllib_priv(dev);
        u16                             frag_threshold;
        u16                             frag_length = 0, frag_offset = 0;
        struct rt_firmware *pfirmware = priv->pFirmware;
index 5da21855f7783974013ed22c1b550d991b448bea..830616ad6be69c68d5ca6412eaf81375aa9f475e 100644 (file)
@@ -97,7 +97,7 @@ void rtl8192e_update_msr(struct net_device *dev)
 void
 rtl8192e_SetHwReg(struct net_device *dev,u8 variable,u8* val)
 {
-       struct r8192_priv* priv = rtllib_priv(dev);
+       struct r8192_priv * priv = rtllib_priv(dev);
 
        switch (variable)
        {
@@ -1004,7 +1004,7 @@ void rtl8192_link_change(struct net_device *dev)
 void rtl8192_AllowAllDestAddr(struct net_device* dev,
                         bool bAllowAllDA, bool WriteIntoReg)
 {
-        struct r8192_priv* priv = rtllib_priv(dev);
+        struct r8192_priv * priv = rtllib_priv(dev);
 
         if (bAllowAllDA)
                 priv->ReceiveConfig |= RCR_AAP;
@@ -2001,7 +2001,7 @@ void rtl8192_halt_adapter(struct net_device *dev, bool reset)
 
 void rtl8192_update_ratr_table(struct net_device* dev)
 {
-       struct r8192_priv* priv = rtllib_priv(dev);
+       struct r8192_priv * priv = rtllib_priv(dev);
        struct rtllib_device* ieee = priv->rtllib;
        u8* pMcsRate = ieee->dot11HTOperationalRateSet;
        u32 ratr_value = 0;
@@ -2254,7 +2254,7 @@ bool rtl8192_GetNmodeSupportBySecCfg(struct net_device *dev)
 bool rtl8192_GetHalfNmodeSupportByAPs(struct net_device* dev)
 {
        bool                    Reval;
-       struct r8192_priv* priv = rtllib_priv(dev);
+       struct r8192_priv * priv = rtllib_priv(dev);
        struct rtllib_device* ieee = priv->rtllib;
 
        if (ieee->bHalfWirelessN24GMode == true)
@@ -2283,7 +2283,7 @@ ActUpdateChannelAccessSetting(
        struct channel_access_setting *ChnlAccessSetting
        )
 {
-               struct r8192_priv* priv = rtllib_priv(dev);
+               struct r8192_priv * priv = rtllib_priv(dev);
 
                return;
 
index 41a6144a3433d17a95757cc4682ffec0de12f8fb..bacee9e9e2a944888221fb6a34632aa1283d2433 100644 (file)
@@ -25,7 +25,7 @@
 
 extern void firmware_init_param(struct net_device *dev)
 {
-       struct r8192_priv       *priv = rtllib_priv(dev);
+       struct r8192_priv *priv = rtllib_priv(dev);
        struct rt_firmware *pfirmware = priv->pFirmware;
 
        pfirmware->cmdpacket_frag_thresold = GET_COMMAND_PACKET_FRAG_THRESHOLD(MAX_TRANSMIT_BUFFER_SIZE);
@@ -33,7 +33,7 @@ extern void firmware_init_param(struct net_device *dev)
 
 bool fw_download_code(struct net_device *dev, u8 *code_virtual_address, u32 buffer_len)
 {
-       struct r8192_priv   *priv = rtllib_priv(dev);
+       struct r8192_priv *priv = rtllib_priv(dev);
        bool                rt_status = true;
        u16                 frag_threshold;
        u16                 frag_length, frag_offset = 0;
@@ -101,7 +101,7 @@ fwSendNullPacket(
 )
 {
        bool    rtStatus = true;
-       struct r8192_priv   *priv = rtllib_priv(dev);
+       struct r8192_priv *priv = rtllib_priv(dev);
        struct sk_buff      *skb;
        struct cb_desc *tcb_desc;
        unsigned char       *ptr_buf;
@@ -209,7 +209,7 @@ CPUCheckFirmwareReady_Fail:
 
 inline static bool firmware_check_ready(struct net_device *dev, u8 load_fw_status)
 {
-       struct r8192_priv       *priv = rtllib_priv(dev);
+       struct r8192_priv *priv = rtllib_priv(dev);
        struct rt_firmware *pfirmware = priv->pFirmware;
        bool rt_status  = true;
 
@@ -253,7 +253,7 @@ inline static bool firmware_check_ready(struct net_device *dev, u8 load_fw_statu
 
 bool init_firmware(struct net_device *dev)
 {
-       struct r8192_priv       *priv = rtllib_priv(dev);
+       struct r8192_priv *priv = rtllib_priv(dev);
        bool                    rt_status = true;
 
        u8      *firmware_img_buf[3] = { &Rtl8192PciEFwBootArray[0],
index 578c3c807e6af0370772680c29538a21557bb722..ce649a560a37a2db19a9360321f32fd240507bd4 100644 (file)
@@ -923,7 +923,7 @@ void rtl8192_config_rate(struct net_device* dev, u16* rate_config)
         }
 }
 
-void rtl8192_refresh_supportrate(struct r8192_priv* priv)
+void rtl8192_refresh_supportrate(struct r8192_priv * priv)
 {
        struct rtllib_device* ieee = priv->rtllib;
        if (ieee->mode == WIRELESS_MODE_N_24G || ieee->mode == WIRELESS_MODE_N_5G) {
@@ -1283,7 +1283,7 @@ static void rtl8192_init_priv_variable(struct net_device* dev)
 
 }
 
-static void rtl8192_init_priv_lock(struct r8192_priv* priv)
+static void rtl8192_init_priv_lock(struct r8192_priv * priv)
 {
        spin_lock_init(&priv->fw_scan_lock);
        spin_lock_init(&priv->tx_lock);
@@ -1675,7 +1675,7 @@ void rtl819x_update_rxcounts(struct r8192_priv *priv,
 
 void   rtl819x_watchdog_wqcallback(void *data)
 {
-       struct r8192_priv *priv = container_of_dwork_rsl(data,struct r8192_priv,watch_dog_wq);
+       struct r8192_priv *priv = container_of_dwork_rsl(data, struct r8192_priv, watch_dog_wq);
        struct net_device *dev = priv->rtllib->dev;
        struct rtllib_device* ieee = priv->rtllib;
        RESET_TYPE      ResetType = RESET_TYPE_NORESET;
@@ -2479,7 +2479,7 @@ void rtl8192_irq_rx_tasklet(struct r8192_priv *priv)
 /****************************************************************************
  ---------------------------- NIC START/CLOSE STUFF---------------------------
 *****************************************************************************/
-void rtl8192_cancel_deferred_work(struct r8192_priv* priv)
+void rtl8192_cancel_deferred_work(struct r8192_priv * priv)
 {
        cancel_delayed_work(&priv->watch_dog_wq);
        cancel_delayed_work(&priv->update_beacon_wq);
@@ -3138,7 +3138,7 @@ static void __devexit rtl8192_pci_disconnect(struct pci_dev *pdev)
 bool NicIFEnableNIC(struct net_device* dev)
 {
        bool init_status = true;
-       struct r8192_priv* priv = rtllib_priv(dev);
+       struct r8192_priv * priv = rtllib_priv(dev);
        struct rt_pwr_save_ctrl *pPSC = (struct rt_pwr_save_ctrl *)(&(priv->rtllib->PowerSaveControl));
 
        if (IS_NIC_DOWN(priv)){
@@ -3167,7 +3167,7 @@ bool NicIFEnableNIC(struct net_device* dev)
 bool NicIFDisableNIC(struct net_device* dev)
 {
        bool    status = true;
-       struct r8192_priv* priv = rtllib_priv(dev);
+       struct r8192_priv * priv = rtllib_priv(dev);
        u8 tmp_state = 0;
        RT_TRACE(COMP_PS, "=========>%s()\n",__func__);
        priv->bdisable_nic = true;
@@ -3250,7 +3250,7 @@ static void __exit rtl8192_pci_module_exit(void)
 
 void check_rfctrl_gpio_timer(unsigned long data)
 {
-       struct r8192_priv* priv = rtllib_priv((struct net_device *)data);
+       struct r8192_priv * priv = rtllib_priv((struct net_device *)data);
 
        priv->polling_timer_on = 1;
 
index 1271e3dea938b140da2de13a700d9c6d1581ed3c..e0c56b9fa3c0943d8520556895a33c5ddb09be5d 100644 (file)
 
 #define DRV_NAME "rtl819xE"
 
-#define IS_HARDWARE_TYPE_819xP(_priv) ((((struct r8192_priv*)rtllib_priv(dev))->card_8192==NIC_8190P)||\
-                                       (((struct r8192_priv*)rtllib_priv(dev))->card_8192==NIC_8192E))
-#define IS_HARDWARE_TYPE_8192SE(_priv) (((struct r8192_priv*)rtllib_priv(dev))->card_8192==NIC_8192SE)
-#define IS_HARDWARE_TYPE_8192CE(_priv) (((struct r8192_priv*)rtllib_priv(dev))->card_8192==NIC_8192CE)
-#define IS_HARDWARE_TYPE_8192CU(_priv) (((struct r8192_priv*)rtllib_priv(dev))->card_8192==NIC_8192CU)
-#define IS_HARDWARE_TYPE_8192DE(_priv) (((struct r8192_priv*)rtllib_priv(dev))->card_8192==NIC_8192DE)
-#define IS_HARDWARE_TYPE_8192DU(_priv) (((struct r8192_priv*)rtllib_priv(dev))->card_8192==NIC_8192DU)
+#define IS_HARDWARE_TYPE_819xP(_priv) ((((struct r8192_priv *)rtllib_priv(dev))->card_8192==NIC_8190P)||\
+                                       (((struct r8192_priv *)rtllib_priv(dev))->card_8192==NIC_8192E))
+#define IS_HARDWARE_TYPE_8192SE(_priv) (((struct r8192_priv *)rtllib_priv(dev))->card_8192==NIC_8192SE)
+#define IS_HARDWARE_TYPE_8192CE(_priv) (((struct r8192_priv *)rtllib_priv(dev))->card_8192==NIC_8192CE)
+#define IS_HARDWARE_TYPE_8192CU(_priv) (((struct r8192_priv *)rtllib_priv(dev))->card_8192==NIC_8192CU)
+#define IS_HARDWARE_TYPE_8192DE(_priv) (((struct r8192_priv *)rtllib_priv(dev))->card_8192==NIC_8192DE)
+#define IS_HARDWARE_TYPE_8192DU(_priv) (((struct r8192_priv *)rtllib_priv(dev))->card_8192==NIC_8192DU)
 
 #define RTL_PCI_DEVICE(vend, dev, cfg) \
        .vendor = (vend), .device = (dev), \
@@ -547,8 +547,7 @@ struct rtl819x_ops{
        bool (* RxCheckStuckHandler)(struct net_device* dev);
 };
 
-typedef struct r8192_priv
-{
+struct r8192_priv {
        struct pci_dev *pdev;
        struct pci_dev *bridge_pdev;
 
@@ -1017,7 +1016,7 @@ typedef struct r8192_priv
        u8              H2CTxCmdSeq;
 
 
-}r8192_priv;
+};//;
 
 extern const struct ethtool_ops rtl819x_ethtool_ops;
 
@@ -1065,7 +1064,7 @@ irqreturn_type rtl8192_interrupt(int irq, void *netdev, struct pt_regs *regs);
 
 short rtl8192_pci_initdescring(struct net_device *dev);
 
-void rtl8192_cancel_deferred_work(struct r8192_priv* priv);
+void rtl8192_cancel_deferred_work(struct r8192_priv * priv);
 
 int _rtl8192_up(struct net_device *dev,bool is_silent_reset);
 
index ecd817740870e499156452c8c21a7eefbfaf4348..a8e2678c1a59e86bc16d515567b940817ecea750 100644 (file)
@@ -884,7 +884,7 @@ static void dm_TXPowerTrackingCallback_ThermalMeter(struct net_device * dev)
 
 void   dm_txpower_trackingcallback(void *data)
 {
-       struct r8192_priv *priv = container_of_dwork_rsl(data,struct r8192_priv,txpower_tracking_wq);
+       struct r8192_priv *priv = container_of_dwork_rsl(data, struct r8192_priv,txpower_tracking_wq);
        struct net_device *dev = priv->rtllib->dev;
 
        if (priv->IC_Cut >= IC_VersionCut_D)
@@ -2668,7 +2668,7 @@ static    void    dm_check_pbc_gpio(struct net_device *dev)
 
 extern void    dm_CheckRfCtrlGPIO(void *data)
 {
-       struct r8192_priv *priv = container_of_dwork_rsl(data,struct r8192_priv,gpio_change_rf_wq);
+       struct r8192_priv *priv = container_of_dwork_rsl(data, struct r8192_priv,gpio_change_rf_wq);
        struct net_device *dev = priv->rtllib->dev;
        u8 tmp1byte;
        RT_RF_POWER_STATE       eRfPowerStateToSet;
@@ -2735,7 +2735,7 @@ extern    void    dm_CheckRfCtrlGPIO(void *data)
 
 void   dm_rf_pathcheck_workitemcallback(void *data)
 {
-       struct r8192_priv *priv = container_of_dwork_rsl(data,struct r8192_priv,rfpath_check_wq);
+       struct r8192_priv *priv = container_of_dwork_rsl(data, struct r8192_priv,rfpath_check_wq);
        struct net_device *dev =priv->rtllib->dev;
        u8 rfpath = 0, i;