Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(341)

Side by Side Diff: chromeos/compat-wireless/drivers/net/wireless/adm8211.c

Issue 5326002: Update compat-wireless to 2.6.36-5-spn (Closed) Base URL: http://git.chromium.org/git/kernel.git@master
Patch Set: Fixes for !ACK handling, missing local changes, log message fixes Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 1
2 /* 2 /*
3 * Linux device driver for ADMtek ADM8211 (IEEE 802.11b MAC/BBP) 3 * Linux device driver for ADMtek ADM8211 (IEEE 802.11b MAC/BBP)
4 * 4 *
5 * Copyright (c) 2003, Jouni Malinen <j@w1.fi> 5 * Copyright (c) 2003, Jouni Malinen <j@w1.fi>
6 * Copyright (c) 2004-2007, Michael Wu <flamingice@sourmilk.net> 6 * Copyright (c) 2004-2007, Michael Wu <flamingice@sourmilk.net>
7 * Some parts copyright (c) 2003 by David Young <dyoung@pobox.com> 7 * Some parts copyright (c) 2003 by David Young <dyoung@pobox.com>
8 * and used with permission. 8 * and used with permission.
9 * 9 *
10 * Much thanks to Infineon-ADMtek for their support of this driver. 10 * Much thanks to Infineon-ADMtek for their support of this driver.
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
725 adm8211_write_bbp(dev, RF3000_LOW_GAIN_CALIB, lpf_cutoff); 725 adm8211_write_bbp(dev, RF3000_LOW_GAIN_CALIB, lpf_cutoff);
726 adm8211_write_bbp(dev, RF3000_HIGH_GAIN_CALIB, lnags_thresh); 726 adm8211_write_bbp(dev, RF3000_HIGH_GAIN_CALIB, lnags_thresh);
727 adm8211_write_bbp(dev, 0x1c, priv->pdev->revision == ADM8211_REV_BA ? 727 adm8211_write_bbp(dev, 0x1c, priv->pdev->revision == ADM8211_REV_BA ?
728 priv->eeprom->cr28 : 0); 728 priv->eeprom->cr28 : 0);
729 adm8211_write_bbp(dev, 0x1d, priv->eeprom->cr29); 729 adm8211_write_bbp(dev, 0x1d, priv->eeprom->cr29);
730 730
731 ADM8211_CSR_WRITE(SYNRF, 0); 731 ADM8211_CSR_WRITE(SYNRF, 0);
732 732
733 /* Nothing to do for ADMtek BBP */ 733 /* Nothing to do for ADMtek BBP */
734 } else if (priv->bbp_type != ADM8211_TYPE_ADMTEK) 734 } else if (priv->bbp_type != ADM8211_TYPE_ADMTEK)
735 » » wiphy_debug(dev->wiphy, "unsupported bbp type %d\n", 735 » » wiphy_debug(dev->wiphy, "unsupported BBP type %d\n",
736 priv->bbp_type); 736 priv->bbp_type);
737 737
738 ADM8211_RESTORE(); 738 ADM8211_RESTORE();
739 739
740 /* update current channel for adhoc (and maybe AP mode) */ 740 /* update current channel for adhoc (and maybe AP mode) */
741 reg = ADM8211_CSR_READ(CAP0); 741 reg = ADM8211_CSR_READ(CAP0);
742 reg &= ~0xF; 742 reg &= ~0xF;
743 reg |= chan; 743 reg |= chan;
744 ADM8211_CSR_WRITE(CAP0, reg); 744 ADM8211_CSR_WRITE(CAP0, reg);
745 745
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 1025
1026 case ADM8211_RFMD2948: 1026 case ADM8211_RFMD2948:
1027 break; 1027 break;
1028 1028
1029 default: 1029 default:
1030 wiphy_debug(dev->wiphy, "unsupported transceiver %d\n", 1030 wiphy_debug(dev->wiphy, "unsupported transceiver %d\n",
1031 priv->transceiver_type); 1031 priv->transceiver_type);
1032 break; 1032 break;
1033 } 1033 }
1034 } else 1034 } else
1035 » » wiphy_debug(dev->wiphy, "unsupported bbp %d\n", priv->bbp_type); 1035 » » wiphy_debug(dev->wiphy, "unsupported BBP %d\n", priv->bbp_type);
1036 1036
1037 ADM8211_CSR_WRITE(SYNRF, 0); 1037 ADM8211_CSR_WRITE(SYNRF, 0);
1038 1038
1039 /* Set RF CAL control source to MAC control */ 1039 /* Set RF CAL control source to MAC control */
1040 reg = ADM8211_CSR_READ(SYNCTL); 1040 reg = ADM8211_CSR_READ(SYNCTL);
1041 reg |= ADM8211_SYNCTL_SELCAL; 1041 reg |= ADM8211_SYNCTL_SELCAL;
1042 ADM8211_CSR_WRITE(SYNCTL, reg); 1042 ADM8211_CSR_WRITE(SYNCTL, reg);
1043 1043
1044 return 0; 1044 return 0;
1045 } 1045 }
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 goto fail; 1536 goto fail;
1537 } 1537 }
1538 1538
1539 /* Init hardware */ 1539 /* Init hardware */
1540 adm8211_hw_init(dev); 1540 adm8211_hw_init(dev);
1541 adm8211_rf_set_channel(dev, priv->channel); 1541 adm8211_rf_set_channel(dev, priv->channel);
1542 1542
1543 retval = request_irq(priv->pdev->irq, adm8211_interrupt, 1543 retval = request_irq(priv->pdev->irq, adm8211_interrupt,
1544 IRQF_SHARED, "adm8211", dev); 1544 IRQF_SHARED, "adm8211", dev);
1545 if (retval) { 1545 if (retval) {
1546 » » wiphy_err(dev->wiphy, "failed to register irq handler\n"); 1546 » » wiphy_err(dev->wiphy, "failed to register IRQ handler\n");
1547 goto fail; 1547 goto fail;
1548 } 1548 }
1549 1549
1550 ADM8211_CSR_WRITE(IER, ADM8211_IER_NIE | ADM8211_IER_AIE | 1550 ADM8211_CSR_WRITE(IER, ADM8211_IER_NIE | ADM8211_IER_AIE |
1551 ADM8211_IER_RCIE | ADM8211_IER_TCIE | 1551 ADM8211_IER_RCIE | ADM8211_IER_TCIE |
1552 ADM8211_IER_TDUIE | ADM8211_IER_GPTIE); 1552 ADM8211_IER_TDUIE | ADM8211_IER_GPTIE);
1553 priv->mode = NL80211_IFTYPE_MONITOR; 1553 priv->mode = NL80211_IFTYPE_MONITOR;
1554 adm8211_update_mode(dev); 1554 adm8211_update_mode(dev);
1555 ADM8211_CSR_WRITE(RDR, 0); 1555 ADM8211_CSR_WRITE(RDR, 0);
1556 1556
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1913 1913
1914 dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band; 1914 dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band;
1915 1915
1916 err = ieee80211_register_hw(dev); 1916 err = ieee80211_register_hw(dev);
1917 if (err) { 1917 if (err) {
1918 printk(KERN_ERR "%s (adm8211): Cannot register device\n", 1918 printk(KERN_ERR "%s (adm8211): Cannot register device\n",
1919 pci_name(pdev)); 1919 pci_name(pdev));
1920 goto err_free_eeprom; 1920 goto err_free_eeprom;
1921 } 1921 }
1922 1922
1923 » wiphy_info(dev->wiphy, "hwaddr %pm, rev 0x%02x\n", 1923 » wiphy_info(dev->wiphy, "hwaddr %pM, Rev 0x%02x\n",
1924 dev->wiphy->perm_addr, pdev->revision); 1924 dev->wiphy->perm_addr, pdev->revision);
1925 1925
1926 return 0; 1926 return 0;
1927 1927
1928 err_free_eeprom: 1928 err_free_eeprom:
1929 kfree(priv->eeprom); 1929 kfree(priv->eeprom);
1930 1930
1931 err_free_desc: 1931 err_free_desc:
1932 pci_free_consistent(pdev, 1932 pci_free_consistent(pdev,
1933 sizeof(struct adm8211_desc) * priv->rx_ring_size + 1933 sizeof(struct adm8211_desc) * priv->rx_ring_size +
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
2017 2017
2018 2018
2019 static void __exit adm8211_exit(void) 2019 static void __exit adm8211_exit(void)
2020 { 2020 {
2021 pci_unregister_driver(&adm8211_driver); 2021 pci_unregister_driver(&adm8211_driver);
2022 } 2022 }
2023 2023
2024 2024
2025 module_init(adm8211_init); 2025 module_init(adm8211_init);
2026 module_exit(adm8211_exit); 2026 module_exit(adm8211_exit);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698