]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - drivers/staging/winbond/wbusb.c
Merge tag 'v2.6.38' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[mv-sheeva.git] / drivers / staging / winbond / wbusb.c
index 3f60cf7e6ec13554cb9d43d2475674126775b2e8..2163d60c2eafef9e7196026db08bf37f7a0a3de9 100644 (file)
 
 #include "core.h"
 #include "mds_f.h"
-#include "mlmetxrx_f.h"
 #include "mto.h"
-#include "wbhal_f.h"
-#include "wblinux_f.h"
+#include "wbhal.h"
+#include "wb35reg_f.h"
+#include "wb35tx_f.h"
+#include "wb35rx_f.h"
 
 MODULE_DESCRIPTION("IS89C35 802.11bg WLAN USB Driver");
 MODULE_LICENSE("GPL");
@@ -181,10 +182,7 @@ static void hal_set_current_channel_ex(struct hw_data *pHwData, struct chan_info
        RFSynthesizer_SwitchingChannel(pHwData, channel); /* Switch channel */
        pHwData->Channel = channel.ChanNo;
        pHwData->band = channel.band;
-#ifdef _PE_STATE_DUMP_
-       printk("Set channel is %d, band =%d\n", pHwData->Channel,
-              pHwData->band);
-#endif
+       pr_debug("Set channel is %d, band =%d\n", pHwData->Channel, pHwData->band);
        reg->M28_MacControl &= ~0xff;   /* Clean channel information field */
        reg->M28_MacControl |= channel.ChanNo;
        Wb35Reg_WriteWithCallbackValue(pHwData, 0x0828, reg->M28_MacControl,
@@ -339,10 +337,8 @@ static void hal_stop(struct hw_data *pHwData)
 static unsigned char hal_idle(struct hw_data *pHwData)
 {
        struct wb35_reg *reg = &pHwData->reg;
-       struct wb_usb *pWbUsb = &pHwData->WbUsb;
 
-       if (!pHwData->SurpriseRemove
-           && (pWbUsb->DetectCount || reg->EP0vm_state != VM_STOP))
+       if (!pHwData->SurpriseRemove && reg->EP0vm_state != VM_STOP)
                return false;
 
        return true;
@@ -608,15 +604,6 @@ static void hal_led_control(unsigned long data)
                        }
                        break;
                }
-
-               /* Active send null packet to avoid AP disconnect */
-               if (pHwData->LED_LinkOn) {
-                       pHwData->NullPacketCount += TimeInterval;
-                       if (pHwData->NullPacketCount >=
-                           DEFAULT_NULL_PACKET_COUNT) {
-                               pHwData->NullPacketCount = 0;
-                       }
-               }
        }
 
        pHwData->time_count += TimeInterval;
@@ -651,13 +638,6 @@ static int hal_init_hardware(struct ieee80211_hw *hw)
 
        SoftwareSet = hal_software_set(pHwData);
 
-#ifdef Vendor2
-       /* Try to make sure the EEPROM contain */
-       SoftwareSet >>= 8;
-       if (SoftwareSet != 0x82)
-               return false;
-#endif
-
        Wb35Rx_start(hw);
        Wb35Tx_EP2VM_start(priv);
 
@@ -734,9 +714,7 @@ static int wb35_hw_init(struct ieee80211_hw *hw)
        }
 
        priv->sLocalPara.bAntennaNo = hal_get_antenna_number(pHwData);
-#ifdef _PE_STATE_DUMP_
-       printk("Driver init, antenna no = %d\n", psLOCAL->bAntennaNo);
-#endif
+       pr_debug("Driver init, antenna no = %d\n", priv->sLocalPara.bAntennaNo);
        hal_get_hw_radio_off(pHwData);
 
        /* Waiting for HAL setting OK */
@@ -769,7 +747,6 @@ static int wb35_probe(struct usb_interface *intf,
        struct usb_host_interface *interface;
        struct ieee80211_hw *dev;
        struct wbsoft_priv *priv;
-       struct wb_usb *pWbUsb;
        int nr, err;
        u32 ltmp;
 
@@ -800,16 +777,13 @@ static int wb35_probe(struct usb_interface *intf,
 
        priv = dev->priv;
 
-       pWbUsb = &priv->sHwData.WbUsb;
-       pWbUsb->udev = udev;
+       priv->sHwData.udev = udev;
 
        interface = intf->cur_altsetting;
        endpoint = &interface->endpoint[0].desc;
 
-       if (endpoint[2].wMaxPacketSize == 512) {
+       if (endpoint[2].wMaxPacketSize == 512)
                printk("[w35und] Working on USB 2.0\n");
-               pWbUsb->IsUsb20 = 1;
-       }
 
        err = wb35_hw_init(dev);
        if (err)
@@ -860,13 +834,9 @@ static void hal_halt(struct hw_data *pHwData)
 
 static void wb35_hw_halt(struct wbsoft_priv *adapter)
 {
-       Mds_Destroy(adapter);
-
        /* Turn off Rx and Tx hardware ability */
        hal_stop(&adapter->sHwData);
-#ifdef _PE_USB_INI_DUMP_
-       printk("[w35und] Hal_stop O.K.\n");
-#endif
+       pr_debug("[w35und] Hal_stop O.K.\n");
        /* Waiting Irp completed */
        msleep(100);