14 #include <linux/module.h>
29 { USB_DEVICE(0x0416, 0x0035) },
30 { USB_DEVICE(0x18E8, 0x6201) },
31 { USB_DEVICE(0x18E8, 0x6206) },
32 { USB_DEVICE(0x18E8, 0x6217) },
33 { USB_DEVICE(0x18E8, 0x6230) },
34 { USB_DEVICE(0x18E8, 0x6233) },
35 { USB_DEVICE(0x1131, 0x2035) },
46 { .center_freq = 2412 },
50 .channels = wbsoft_channels,
52 .bitrates = wbsoft_rates,
56 static void hal_set_beacon_period(
struct hw_data *pHwData,
u16 beacon_period)
82 printk(
"wbsoft_remove interface called\n");
104 unsigned int changed_flags,
105 unsigned int *total_flags,
108 unsigned int new_flags;
114 else if ((*total_flags &
FIF_ALLMULTI) || (multicast > 32))
119 *total_flags = new_flags;
158 static void hal_set_radio_mode(
struct hw_data *pHwData,
unsigned char radio_off)
195 static void hal_set_current_channel(
struct hw_data *pHwData,
struct chan_info channel)
197 hal_set_current_channel_ex(pHwData, channel);
200 static void hal_set_accept_broadcast(
struct hw_data *pHwData,
u8 enable)
216 static void hal_set_accept_promiscuous(
struct hw_data *pHwData,
u8 enable)
232 static void hal_set_accept_multicast(
struct hw_data *pHwData,
u8 enable)
245 static void hal_set_accept_beacon(
struct hw_data *pHwData,
u8 enable)
267 printk(
"wbsoft_config called\n");
273 hal_set_current_channel(&priv->
sHwData, ch);
274 hal_set_accept_broadcast(&priv->
sHwData, 1);
275 hal_set_accept_promiscuous(&priv->
sHwData, 1);
276 hal_set_accept_multicast(&priv->
sHwData, 1);
277 hal_set_accept_beacon(&priv->
sHwData, 1);
278 hal_set_radio_mode(&priv->
sHwData, 0);
285 printk(
"wbsoft_get_tsf called\n");
291 .start = wbsoft_start,
293 .add_interface = wbsoft_add_interface,
294 .remove_interface = wbsoft_remove_interface,
295 .config = wbsoft_config,
296 .prepare_multicast = wbsoft_prepare_multicast,
297 .configure_filter = wbsoft_configure_filter,
298 .get_stats = wbsoft_get_stats,
299 .get_tsf = wbsoft_get_tsf,
302 static void hal_set_ethernet_address(
struct hw_data *pHwData,
u8 *current_address)
317 static void hal_get_permanent_address(
struct hw_data *pHwData,
u8 *pethernet_address)
325 static void hal_stop(
struct hw_data *pHwData)
329 pHwData->
Wb35Rx.rx_halt = 1;
332 pHwData->
Wb35Tx.tx_halt = 1;
339 static unsigned char hal_idle(
struct hw_data *pHwData)
353 if ((reg->
BB2C &
BIT(11)) == 0)
360 static u8 hal_get_hw_radio_off(
struct hw_data *pHwData)
369 if ((reg->
U1B0 & 0x00010000)) {
378 static u8 LED_GRAY[20] = {
379 0, 3, 4, 6, 8, 10, 11, 12, 13, 14, 15, 14, 13, 12, 11, 10, 8, 6, 4, 2
382 static u8 LED_GRAY2[30] = {
383 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
384 0, 15, 14, 13, 12, 11, 10, 9, 8
387 static void hal_led_control(
unsigned long data)
393 u32 TimeInterval = 500, ltmp, ltmp2;
627 goto error_reg_destroy;
630 goto error_tx_destroy;
633 goto error_rx_destroy;
636 pHwData->
LEDTimer.function = hal_led_control;
680 priv->
sLocalPara.bToSelfPacketReceived =
false;
681 priv->
sLocalPara.WepKeyDetectTimerCount = 2 * 100;
683 priv->
sLocalPara.RadioOffStatus.boSwRadioOff =
false;
685 err = hal_init_hardware(hw);
706 pMacAddr2 = priv->
sLocalPara.PermanentAddress;
709 hal_get_permanent_address(pHwData, priv->
sLocalPara.PermanentAddress);
714 hal_set_ethernet_address(pHwData,
720 hal_get_hw_radio_off(pHwData);
723 while (!hal_idle(pHwData))
728 HwRadioOff = hal_get_hw_radio_off(pHwData);
729 priv->
sLocalPara.RadioOffStatus.boHwRadioOff = !!HwRadioOff;
731 hal_set_radio_mode(pHwData,
732 (
unsigned char)(priv->
sLocalPara.RadioOffStatus.
747 struct usb_device *
udev = interface_to_usbdev(intf);
761 0x0, 0x400, <mp, 4,
HZ * 100);
782 interface = intf->cur_altsetting;
783 endpoint = &interface->endpoint[0].desc;
786 printk(
"[w35und] Working on USB 2.0\n");
788 err = wb35_hw_init(dev);
792 SET_IEEE80211_DEV(dev, &udev->dev);
796 hal_get_permanent_address(pHwData, dev_addr);
797 SET_IEEE80211_PERM_ADDR(dev, dev_addr);
814 usb_set_intfdata(intf, dev);
825 static void hal_halt(
struct hw_data *pHwData)
835 static void wb35_hw_halt(
struct wbsoft_priv *adapter)
839 pr_debug(
"[w35und] Hal_stop O.K.\n");
857 usb_set_intfdata(intf,
NULL);
861 static struct usb_driver wb35_driver = {
863 .id_table = wb35_table,
865 .disconnect = wb35_disconnect,