~ubuntu-branches/ubuntu/precise/linux-ti-omap4/precise

« back to all changes in this revision

Viewing changes to drivers/net/wireless/rt2x00/rt2500usb.c

  • Committer: Bazaar Package Importer
  • Author(s): Paolo Pisati
  • Date: 2011-06-29 15:23:51 UTC
  • mfrom: (26.1.1 natty-proposed)
  • Revision ID: james.westby@ubuntu.com-20110629152351-xs96tm303d95rpbk
Tags: 3.0.0-1200.2
* Rebased against 3.0.0-6.7
* BSP from TI based on 3.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
478
478
                rt2500usb_register_write(rt2x00dev, TXRX_CSR18, reg);
479
479
 
480
480
                rt2500usb_register_read(rt2x00dev, TXRX_CSR19, &reg);
481
 
                rt2x00_set_field16(&reg, TXRX_CSR19_TSF_COUNT, 1);
482
481
                rt2x00_set_field16(&reg, TXRX_CSR19_TSF_SYNC, conf->sync);
483
 
                rt2x00_set_field16(&reg, TXRX_CSR19_TBCN, 1);
484
482
                rt2500usb_register_write(rt2x00dev, TXRX_CSR19, reg);
485
483
        }
486
484
 
1056
1054
                rt2500usb_disable_radio(rt2x00dev);
1057
1055
                break;
1058
1056
        case STATE_RADIO_IRQ_ON:
1059
 
        case STATE_RADIO_IRQ_ON_ISR:
1060
1057
        case STATE_RADIO_IRQ_OFF:
1061
 
        case STATE_RADIO_IRQ_OFF_ISR:
1062
1058
                /* No support, but no error either */
1063
1059
                break;
1064
1060
        case STATE_DEEP_SLEEP:
1104
1100
                           (txdesc->rate_mode == RATE_MODE_OFDM));
1105
1101
        rt2x00_set_field32(&word, TXD_W0_NEW_SEQ,
1106
1102
                           test_bit(ENTRY_TXD_FIRST_FRAGMENT, &txdesc->flags));
1107
 
        rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->ifs);
 
1103
        rt2x00_set_field32(&word, TXD_W0_IFS, txdesc->u.plcp.ifs);
1108
1104
        rt2x00_set_field32(&word, TXD_W0_DATABYTE_COUNT, txdesc->length);
1109
1105
        rt2x00_set_field32(&word, TXD_W0_CIPHER, !!txdesc->cipher);
1110
1106
        rt2x00_set_field32(&word, TXD_W0_KEY_ID, txdesc->key_idx);
1118
1114
        rt2x00_desc_write(txd, 1, word);
1119
1115
 
1120
1116
        rt2x00_desc_read(txd, 2, &word);
1121
 
        rt2x00_set_field32(&word, TXD_W2_PLCP_SIGNAL, txdesc->signal);
1122
 
        rt2x00_set_field32(&word, TXD_W2_PLCP_SERVICE, txdesc->service);
1123
 
        rt2x00_set_field32(&word, TXD_W2_PLCP_LENGTH_LOW, txdesc->length_low);
1124
 
        rt2x00_set_field32(&word, TXD_W2_PLCP_LENGTH_HIGH, txdesc->length_high);
 
1117
        rt2x00_set_field32(&word, TXD_W2_PLCP_SIGNAL, txdesc->u.plcp.signal);
 
1118
        rt2x00_set_field32(&word, TXD_W2_PLCP_SERVICE, txdesc->u.plcp.service);
 
1119
        rt2x00_set_field32(&word, TXD_W2_PLCP_LENGTH_LOW,
 
1120
                           txdesc->u.plcp.length_low);
 
1121
        rt2x00_set_field32(&word, TXD_W2_PLCP_LENGTH_HIGH,
 
1122
                           txdesc->u.plcp.length_high);
1125
1123
        rt2x00_desc_write(txd, 2, word);
1126
1124
 
1127
1125
        if (test_bit(ENTRY_TXD_ENCRYPT, &txdesc->flags)) {
1521
1519
         * Detect if this device has an hardware controlled radio.
1522
1520
         */
1523
1521
        if (rt2x00_get_field16(eeprom, EEPROM_ANTENNA_HARDWARE_RADIO))
1524
 
                __set_bit(CONFIG_SUPPORT_HW_BUTTON, &rt2x00dev->flags);
 
1522
                __set_bit(CAPABILITY_HW_BUTTON, &rt2x00dev->cap_flags);
1525
1523
 
1526
1524
        /*
1527
1525
         * Read the RSSI <-> dBm offset information.
1792
1790
        /*
1793
1791
         * This device requires the atim queue
1794
1792
         */
1795
 
        __set_bit(DRIVER_REQUIRE_ATIM_QUEUE, &rt2x00dev->flags);
1796
 
        __set_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags);
 
1793
        __set_bit(REQUIRE_ATIM_QUEUE, &rt2x00dev->cap_flags);
 
1794
        __set_bit(REQUIRE_BEACON_GUARD, &rt2x00dev->cap_flags);
1797
1795
        if (!modparam_nohwcrypt) {
1798
 
                __set_bit(CONFIG_SUPPORT_HW_CRYPTO, &rt2x00dev->flags);
1799
 
                __set_bit(DRIVER_REQUIRE_COPY_IV, &rt2x00dev->flags);
 
1796
                __set_bit(CAPABILITY_HW_CRYPTO, &rt2x00dev->cap_flags);
 
1797
                __set_bit(REQUIRE_COPY_IV, &rt2x00dev->cap_flags);
1800
1798
        }
1801
 
        __set_bit(DRIVER_SUPPORT_WATCHDOG, &rt2x00dev->flags);
 
1799
        __set_bit(REQUIRE_SW_SEQNO, &rt2x00dev->cap_flags);
 
1800
        __set_bit(REQUIRE_PS_AUTOWAKE, &rt2x00dev->cap_flags);
1802
1801
 
1803
1802
        /*
1804
1803
         * Set the rssi offset.
1825
1824
        .conf_tx                = rt2x00mac_conf_tx,
1826
1825
        .rfkill_poll            = rt2x00mac_rfkill_poll,
1827
1826
        .flush                  = rt2x00mac_flush,
 
1827
        .set_antenna            = rt2x00mac_set_antenna,
 
1828
        .get_antenna            = rt2x00mac_get_antenna,
 
1829
        .get_ringparam          = rt2x00mac_get_ringparam,
1828
1830
};
1829
1831
 
1830
1832
static const struct rt2x00lib_ops rt2500usb_rt2x00_ops = {
1906
1908
 */
1907
1909
static struct usb_device_id rt2500usb_device_table[] = {
1908
1910
        /* ASUS */
1909
 
        { USB_DEVICE(0x0b05, 0x1706), USB_DEVICE_DATA(&rt2500usb_ops) },
1910
 
        { USB_DEVICE(0x0b05, 0x1707), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1911
        { USB_DEVICE(0x0b05, 0x1706) },
 
1912
        { USB_DEVICE(0x0b05, 0x1707) },
1911
1913
        /* Belkin */
1912
 
        { USB_DEVICE(0x050d, 0x7050), USB_DEVICE_DATA(&rt2500usb_ops) },
1913
 
        { USB_DEVICE(0x050d, 0x7051), USB_DEVICE_DATA(&rt2500usb_ops) },
1914
 
        { USB_DEVICE(0x050d, 0x705a), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1914
        { USB_DEVICE(0x050d, 0x7050) },
 
1915
        { USB_DEVICE(0x050d, 0x7051) },
1915
1916
        /* Cisco Systems */
1916
 
        { USB_DEVICE(0x13b1, 0x000d), USB_DEVICE_DATA(&rt2500usb_ops) },
1917
 
        { USB_DEVICE(0x13b1, 0x0011), USB_DEVICE_DATA(&rt2500usb_ops) },
1918
 
        { USB_DEVICE(0x13b1, 0x001a), USB_DEVICE_DATA(&rt2500usb_ops) },
1919
 
        /* CNet */
1920
 
        { USB_DEVICE(0x1371, 0x9022), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1917
        { USB_DEVICE(0x13b1, 0x000d) },
 
1918
        { USB_DEVICE(0x13b1, 0x0011) },
 
1919
        { USB_DEVICE(0x13b1, 0x001a) },
1921
1920
        /* Conceptronic */
1922
 
        { USB_DEVICE(0x14b2, 0x3c02), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1921
        { USB_DEVICE(0x14b2, 0x3c02) },
1923
1922
        /* D-LINK */
1924
 
        { USB_DEVICE(0x2001, 0x3c00), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1923
        { USB_DEVICE(0x2001, 0x3c00) },
1925
1924
        /* Gigabyte */
1926
 
        { USB_DEVICE(0x1044, 0x8001), USB_DEVICE_DATA(&rt2500usb_ops) },
1927
 
        { USB_DEVICE(0x1044, 0x8007), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1925
        { USB_DEVICE(0x1044, 0x8001) },
 
1926
        { USB_DEVICE(0x1044, 0x8007) },
1928
1927
        /* Hercules */
1929
 
        { USB_DEVICE(0x06f8, 0xe000), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1928
        { USB_DEVICE(0x06f8, 0xe000) },
1930
1929
        /* Melco */
1931
 
        { USB_DEVICE(0x0411, 0x005e), USB_DEVICE_DATA(&rt2500usb_ops) },
1932
 
        { USB_DEVICE(0x0411, 0x0066), USB_DEVICE_DATA(&rt2500usb_ops) },
1933
 
        { USB_DEVICE(0x0411, 0x0067), USB_DEVICE_DATA(&rt2500usb_ops) },
1934
 
        { USB_DEVICE(0x0411, 0x008b), USB_DEVICE_DATA(&rt2500usb_ops) },
1935
 
        { USB_DEVICE(0x0411, 0x0097), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1930
        { USB_DEVICE(0x0411, 0x005e) },
 
1931
        { USB_DEVICE(0x0411, 0x0066) },
 
1932
        { USB_DEVICE(0x0411, 0x0067) },
 
1933
        { USB_DEVICE(0x0411, 0x008b) },
 
1934
        { USB_DEVICE(0x0411, 0x0097) },
1936
1935
        /* MSI */
1937
 
        { USB_DEVICE(0x0db0, 0x6861), USB_DEVICE_DATA(&rt2500usb_ops) },
1938
 
        { USB_DEVICE(0x0db0, 0x6865), USB_DEVICE_DATA(&rt2500usb_ops) },
1939
 
        { USB_DEVICE(0x0db0, 0x6869), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1936
        { USB_DEVICE(0x0db0, 0x6861) },
 
1937
        { USB_DEVICE(0x0db0, 0x6865) },
 
1938
        { USB_DEVICE(0x0db0, 0x6869) },
1940
1939
        /* Ralink */
1941
 
        { USB_DEVICE(0x148f, 0x1706), USB_DEVICE_DATA(&rt2500usb_ops) },
1942
 
        { USB_DEVICE(0x148f, 0x2570), USB_DEVICE_DATA(&rt2500usb_ops) },
1943
 
        { USB_DEVICE(0x148f, 0x2573), USB_DEVICE_DATA(&rt2500usb_ops) },
1944
 
        { USB_DEVICE(0x148f, 0x9020), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1940
        { USB_DEVICE(0x148f, 0x1706) },
 
1941
        { USB_DEVICE(0x148f, 0x2570) },
 
1942
        { USB_DEVICE(0x148f, 0x9020) },
1945
1943
        /* Sagem */
1946
 
        { USB_DEVICE(0x079b, 0x004b), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1944
        { USB_DEVICE(0x079b, 0x004b) },
1947
1945
        /* Siemens */
1948
 
        { USB_DEVICE(0x0681, 0x3c06), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1946
        { USB_DEVICE(0x0681, 0x3c06) },
1949
1947
        /* SMC */
1950
 
        { USB_DEVICE(0x0707, 0xee13), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1948
        { USB_DEVICE(0x0707, 0xee13) },
1951
1949
        /* Spairon */
1952
 
        { USB_DEVICE(0x114b, 0x0110), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1950
        { USB_DEVICE(0x114b, 0x0110) },
1953
1951
        /* SURECOM */
1954
 
        { USB_DEVICE(0x0769, 0x11f3), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1952
        { USB_DEVICE(0x0769, 0x11f3) },
1955
1953
        /* Trust */
1956
 
        { USB_DEVICE(0x0eb0, 0x9020), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1954
        { USB_DEVICE(0x0eb0, 0x9020) },
1957
1955
        /* VTech */
1958
 
        { USB_DEVICE(0x0f88, 0x3012), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1956
        { USB_DEVICE(0x0f88, 0x3012) },
1959
1957
        /* Zinwell */
1960
 
        { USB_DEVICE(0x5a57, 0x0260), USB_DEVICE_DATA(&rt2500usb_ops) },
 
1958
        { USB_DEVICE(0x5a57, 0x0260) },
1961
1959
        { 0, }
1962
1960
};
1963
1961
 
1968
1966
MODULE_DEVICE_TABLE(usb, rt2500usb_device_table);
1969
1967
MODULE_LICENSE("GPL");
1970
1968
 
 
1969
static int rt2500usb_probe(struct usb_interface *usb_intf,
 
1970
                           const struct usb_device_id *id)
 
1971
{
 
1972
        return rt2x00usb_probe(usb_intf, &rt2500usb_ops);
 
1973
}
 
1974
 
1971
1975
static struct usb_driver rt2500usb_driver = {
1972
1976
        .name           = KBUILD_MODNAME,
1973
1977
        .id_table       = rt2500usb_device_table,
1974
 
        .probe          = rt2x00usb_probe,
 
1978
        .probe          = rt2500usb_probe,
1975
1979
        .disconnect     = rt2x00usb_disconnect,
1976
1980
        .suspend        = rt2x00usb_suspend,
1977
1981
        .resume         = rt2x00usb_resume,