aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/adm8211.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes@sipsolutions.net>2008-09-10 18:01:58 -0400
committerJohn W. Linville <linville@tuxdriver.com>2008-09-15 16:48:23 -0400
commit05c914fe330fa8e1cc67870dc0d3809dfd96c107 (patch)
treedf53bcab47335f3361c09478d6b1447b7d298536 /drivers/net/wireless/adm8211.c
parent96dd22ac06b0dbfb069fdf530c72046a941e9694 (diff)
mac80211: use nl80211 interface types
There's really no reason for mac80211 to be using its own interface type defines. Use the nl80211 types and simplify the configuration code a bit: there's no need to translate them any more now. Signed-off-by: Johannes Berg <johannes@sipsolutions.net> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/adm8211.c')
-rw-r--r--drivers/net/wireless/adm8211.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/adm8211.c b/drivers/net/wireless/adm8211.c
index c6a55cd12db9..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
1443static int adm8211_init_rings(struct ieee80211_hw *dev) 1443static 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);
@@ -1896,7 +1896,7 @@ static int __devinit adm8211_probe(struct pci_dev *pdev,
1896 priv->tx_power = 0x40; 1896 priv->tx_power = 0x40;
1897 priv->lpf_cutoff = 0xFF; 1897 priv->lpf_cutoff = 0xFF;
1898 priv->lnags_threshold = 0xFF; 1898 priv->lnags_threshold = 0xFF;
1899 priv->mode = IEEE80211_IF_TYPE_INVALID; 1899 priv->mode = NL80211_IFTYPE_UNSPECIFIED;
1900 1900
1901 /* Power-on issue. EEPROM won't read correctly without */ 1901 /* Power-on issue. EEPROM won't read correctly without */
1902 if (pdev->revision >= ADM8211_REV_BA) { 1902 if (pdev->revision >= ADM8211_REV_BA) {
@@ -1986,7 +1986,7 @@ static int adm8211_suspend(struct pci_dev *pdev, pm_message_t state)
1986 struct ieee80211_hw *dev = pci_get_drvdata(pdev); 1986 struct ieee80211_hw *dev = pci_get_drvdata(pdev);
1987 struct adm8211_priv *priv = dev->priv; 1987 struct adm8211_priv *priv = dev->priv;
1988 1988
1989 if (priv->mode != IEEE80211_IF_TYPE_INVALID) { 1989 if (priv->mode != NL80211_IFTYPE_UNSPECIFIED) {
1990 ieee80211_stop_queues(dev); 1990 ieee80211_stop_queues(dev);
1991 adm8211_stop(dev); 1991 adm8211_stop(dev);
1992 } 1992 }
@@ -2004,7 +2004,7 @@ static int adm8211_resume(struct pci_dev *pdev)
2004 pci_set_power_state(pdev, PCI_D0); 2004 pci_set_power_state(pdev, PCI_D0);
2005 pci_restore_state(pdev); 2005 pci_restore_state(pdev);
2006 2006
2007 if (priv->mode != IEEE80211_IF_TYPE_INVALID) { 2007 if (priv->mode != NL80211_IFTYPE_UNSPECIFIED) {
2008 adm8211_start(dev); 2008 adm8211_start(dev);
2009 ieee80211_wake_queues(dev); 2009 ieee80211_wake_queues(dev);
2010 } 2010 }