diff options
author | David S. Miller <davem@davemloft.net> | 2008-10-11 15:39:35 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-10-11 15:39:35 -0400 |
commit | 56c5d900dbb8e042bfad035d18433476931d8f93 (patch) | |
tree | 00b793965beeef10db03e0ff021d2d965c410759 /drivers/net/wireless/adm8211.c | |
parent | 4dd95b63ae25c5cad6986829b5e8788e9faa0330 (diff) | |
parent | ead9d23d803ea3a73766c3cb27bf7563ac8d7266 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
sound/core/memalloc.c
Diffstat (limited to 'drivers/net/wireless/adm8211.c')
-rw-r--r-- | drivers/net/wireless/adm8211.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c index 3333d4596b8d..b2c050b68890 100644 --- a/drivers/net/wireless/adm8211.c +++ b/drivers/net/wireless/adm8211.c | |||
@@ -765,11 +765,11 @@ static void adm8211_update_mode(struct ieee80211_hw *dev) | |||
765 | 765 | ||
766 | priv->soft_rx_crc = 0; | 766 | priv->soft_rx_crc = 0; |
767 | switch (priv->mode) { | 767 | switch (priv->mode) { |
768 | case IEEE80211_IF_TYPE_STA: | 768 | case NL80211_IFTYPE_STATION: |
769 | priv->nar &= ~(ADM8211_NAR_PR | ADM8211_NAR_EA); | 769 | priv->nar &= ~(ADM8211_NAR_PR | ADM8211_NAR_EA); |
770 | priv->nar |= ADM8211_NAR_ST | ADM8211_NAR_SR; | 770 | priv->nar |= ADM8211_NAR_ST | ADM8211_NAR_SR; |
771 | break; | 771 | break; |
772 | case IEEE80211_IF_TYPE_IBSS: | 772 | case NL80211_IFTYPE_ADHOC: |
773 | priv->nar &= ~ADM8211_NAR_PR; | 773 | priv->nar &= ~ADM8211_NAR_PR; |
774 | priv->nar |= ADM8211_NAR_EA | ADM8211_NAR_ST | ADM8211_NAR_SR; | 774 | priv->nar |= ADM8211_NAR_EA | ADM8211_NAR_ST | ADM8211_NAR_SR; |
775 | 775 | ||
@@ -777,7 +777,7 @@ static void adm8211_update_mode(struct ieee80211_hw *dev) | |||
777 | if (priv->pdev->revision >= ADM8211_REV_BA) | 777 | if (priv->pdev->revision >= ADM8211_REV_BA) |
778 | priv->soft_rx_crc = 1; | 778 | priv->soft_rx_crc = 1; |
779 | break; | 779 | break; |
780 | case IEEE80211_IF_TYPE_MNTR: | 780 | case NL80211_IFTYPE_MONITOR: |
781 | priv->nar &= ~(ADM8211_NAR_EA | ADM8211_NAR_ST); | 781 | priv->nar &= ~(ADM8211_NAR_EA | ADM8211_NAR_ST); |
782 | priv->nar |= ADM8211_NAR_PR | ADM8211_NAR_SR; | 782 | priv->nar |= ADM8211_NAR_PR | ADM8211_NAR_SR; |
783 | break; | 783 | break; |
@@ -1410,11 +1410,11 @@ static int adm8211_add_interface(struct ieee80211_hw *dev, | |||
1410 | struct ieee80211_if_init_conf *conf) | 1410 | struct ieee80211_if_init_conf *conf) |
1411 | { | 1411 | { |
1412 | struct adm8211_priv *priv = dev->priv; | 1412 | struct adm8211_priv *priv = dev->priv; |
1413 | if (priv->mode != IEEE80211_IF_TYPE_MNTR) | 1413 | if (priv->mode != NL80211_IFTYPE_MONITOR) |
1414 | return -EOPNOTSUPP; | 1414 | return -EOPNOTSUPP; |
1415 | 1415 | ||
1416 | switch (conf->type) { | 1416 | switch (conf->type) { |
1417 | case IEEE80211_IF_TYPE_STA: | 1417 | case NL80211_IFTYPE_STATION: |
1418 | priv->mode = conf->type; | 1418 | priv->mode = conf->type; |
1419 | break; | 1419 | break; |
1420 | default: | 1420 | default: |
@@ -1437,7 +1437,7 @@ static void adm8211_remove_interface(struct ieee80211_hw *dev, | |||
1437 | struct ieee80211_if_init_conf *conf) | 1437 | struct ieee80211_if_init_conf *conf) |
1438 | { | 1438 | { |
1439 | struct adm8211_priv *priv = dev->priv; | 1439 | struct adm8211_priv *priv = dev->priv; |
1440 | priv->mode = IEEE80211_IF_TYPE_MNTR; | 1440 | priv->mode = NL80211_IFTYPE_MONITOR; |
1441 | } | 1441 | } |
1442 | 1442 | ||
1443 | static int adm8211_init_rings(struct ieee80211_hw *dev) | 1443 | static int adm8211_init_rings(struct ieee80211_hw *dev) |
@@ -1556,7 +1556,7 @@ static int adm8211_start(struct ieee80211_hw *dev) | |||
1556 | ADM8211_CSR_WRITE(IER, ADM8211_IER_NIE | ADM8211_IER_AIE | | 1556 | ADM8211_CSR_WRITE(IER, ADM8211_IER_NIE | ADM8211_IER_AIE | |
1557 | ADM8211_IER_RCIE | ADM8211_IER_TCIE | | 1557 | ADM8211_IER_RCIE | ADM8211_IER_TCIE | |
1558 | ADM8211_IER_TDUIE | ADM8211_IER_GPTIE); | 1558 | ADM8211_IER_TDUIE | ADM8211_IER_GPTIE); |
1559 | priv->mode = IEEE80211_IF_TYPE_MNTR; | 1559 | priv->mode = NL80211_IFTYPE_MONITOR; |
1560 | adm8211_update_mode(dev); | 1560 | adm8211_update_mode(dev); |
1561 | ADM8211_CSR_WRITE(RDR, 0); | 1561 | ADM8211_CSR_WRITE(RDR, 0); |
1562 | 1562 | ||
@@ -1571,7 +1571,7 @@ static void adm8211_stop(struct ieee80211_hw *dev) | |||
1571 | { | 1571 | { |
1572 | struct adm8211_priv *priv = dev->priv; | 1572 | struct adm8211_priv *priv = dev->priv; |
1573 | 1573 | ||
1574 | priv->mode = IEEE80211_IF_TYPE_INVALID; | 1574 | priv->mode = NL80211_IFTYPE_UNSPECIFIED; |
1575 | priv->nar = 0; | 1575 | priv->nar = 0; |
1576 | ADM8211_CSR_WRITE(NAR, 0); | 1576 | ADM8211_CSR_WRITE(NAR, 0); |
1577 | ADM8211_CSR_WRITE(IER, 0); | 1577 | ADM8211_CSR_WRITE(IER, 0); |
@@ -1884,6 +1884,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev, | |||
1884 | dev->extra_tx_headroom = sizeof(struct adm8211_tx_hdr); | 1884 | dev->extra_tx_headroom = sizeof(struct adm8211_tx_hdr); |
1885 | /* dev->flags = IEEE80211_HW_RX_INCLUDES_FCS in promisc mode */ | 1885 | /* dev->flags = IEEE80211_HW_RX_INCLUDES_FCS in promisc mode */ |
1886 | dev->flags = IEEE80211_HW_SIGNAL_UNSPEC; | 1886 | dev->flags = IEEE80211_HW_SIGNAL_UNSPEC; |
1887 | dev->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION); | ||
1887 | 1888 | ||
1888 | dev->channel_change_time = 1000; | 1889 | dev->channel_change_time = 1000; |
1889 | dev->max_signal = 100; /* FIXME: find better value */ | 1890 | dev->max_signal = 100; /* FIXME: find better value */ |
@@ -1895,7 +1896,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev, | |||
1895 | priv->tx_power = 0x40; | 1896 | priv->tx_power = 0x40; |
1896 | priv->lpf_cutoff = 0xFF; | 1897 | priv->lpf_cutoff = 0xFF; |
1897 | priv->lnags_threshold = 0xFF; | 1898 | priv->lnags_threshold = 0xFF; |
1898 | priv->mode = IEEE80211_IF_TYPE_INVALID; | 1899 | priv->mode = NL80211_IFTYPE_UNSPECIFIED; |
1899 | 1900 | ||
1900 | /* Power-on issue. EEPROM won't read correctly without */ | 1901 | /* Power-on issue. EEPROM won't read correctly without */ |
1901 | if (pdev->revision >= ADM8211_REV_BA) { | 1902 | if (pdev->revision >= ADM8211_REV_BA) { |
@@ -1985,7 +1986,7 @@ static int adm8211_suspend(struct pci_dev *pdev, pm_message_t state) | |||
1985 | struct ieee80211_hw *dev = pci_get_drvdata(pdev); | 1986 | struct ieee80211_hw *dev = pci_get_drvdata(pdev); |
1986 | struct adm8211_priv *priv = dev->priv; | 1987 | struct adm8211_priv *priv = dev->priv; |
1987 | 1988 | ||
1988 | if (priv->mode != IEEE80211_IF_TYPE_INVALID) { | 1989 | if (priv->mode != NL80211_IFTYPE_UNSPECIFIED) { |
1989 | ieee80211_stop_queues(dev); | 1990 | ieee80211_stop_queues(dev); |
1990 | adm8211_stop(dev); | 1991 | adm8211_stop(dev); |
1991 | } | 1992 | } |
@@ -2003,7 +2004,7 @@ static int adm8211_resume(struct pci_dev *pdev) | |||
2003 | pci_set_power_state(pdev, PCI_D0); | 2004 | pci_set_power_state(pdev, PCI_D0); |
2004 | pci_restore_state(pdev); | 2005 | pci_restore_state(pdev); |
2005 | 2006 | ||
2006 | if (priv->mode != IEEE80211_IF_TYPE_INVALID) { | 2007 | if (priv->mode != NL80211_IFTYPE_UNSPECIFIED) { |
2007 | adm8211_start(dev); | 2008 | adm8211_start(dev); |
2008 | ieee80211_wake_queues(dev); | 2009 | ieee80211_wake_queues(dev); |
2009 | } | 2010 | } |