aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
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
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')
-rw-r--r--drivers/net/wireless/adm8211.c22
-rw-r--r--drivers/net/wireless/ath5k/ath5k.h4
-rw-r--r--drivers/net/wireless/ath5k/attach.c2
-rw-r--r--drivers/net/wireless/ath5k/base.c50
-rw-r--r--drivers/net/wireless/ath5k/base.h2
-rw-r--r--drivers/net/wireless/ath5k/pcu.c12
-rw-r--r--drivers/net/wireless/ath5k/reset.c2
-rw-r--r--drivers/net/wireless/ath9k/main.c28
-rw-r--r--drivers/net/wireless/b43/main.c38
-rw-r--r--drivers/net/wireless/b43/phy_common.c4
-rw-r--r--drivers/net/wireless/b43legacy/main.c30
-rw-r--r--drivers/net/wireless/b43legacy/phy.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945-rs.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.c6
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-3945.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn-rs.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-agn.c64
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-core.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-dev.h2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-power.c2
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-rx.c8
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-scan.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-sta.c20
-rw-r--r--drivers/net/wireless/iwlwifi/iwl-tx.c4
-rw-r--r--drivers/net/wireless/iwlwifi/iwl3945-base.c84
-rw-r--r--drivers/net/wireless/libertas_tf/main.c18
-rw-r--r--drivers/net/wireless/mac80211_hwsim.c2
-rw-r--r--drivers/net/wireless/p54/p54common.c14
-rw-r--r--drivers/net/wireless/p54/p54pci.c4
-rw-r--r--drivers/net/wireless/rt2x00/rt2500usb.c2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00.h2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00config.c8
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00dev.c8
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00lib.h2
-rw-r--r--drivers/net/wireless/rt2x00/rt2x00mac.c18
-rw-r--r--drivers/net/wireless/rtl8180_dev.c10
-rw-r--r--drivers/net/wireless/rtl8187_dev.c8
-rw-r--r--drivers/net/wireless/zd1211rw/zd_mac.c20
38 files changed, 264 insertions, 264 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 }
diff --git a/drivers/net/wireless/ath5k/ath5k.h b/drivers/net/wireless/ath5k/ath5k.h
index 4c0211798a7a..20018869051d 100644
--- a/drivers/net/wireless/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath5k/ath5k.h
@@ -1008,7 +1008,7 @@ struct ath5k_hw {
1008 1008
1009 enum ath5k_int ah_imr; 1009 enum ath5k_int ah_imr;
1010 1010
1011 enum ieee80211_if_types ah_op_mode; 1011 enum nl80211_iftype ah_op_mode;
1012 enum ath5k_power_mode ah_power_mode; 1012 enum ath5k_power_mode ah_power_mode;
1013 struct ieee80211_channel ah_current_channel; 1013 struct ieee80211_channel ah_current_channel;
1014 bool ah_turbo; 1014 bool ah_turbo;
@@ -1117,7 +1117,7 @@ extern void ath5k_hw_detach(struct ath5k_hw *ah);
1117 1117
1118/* Reset Functions */ 1118/* Reset Functions */
1119extern int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial); 1119extern int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial);
1120extern int ath5k_hw_reset(struct ath5k_hw *ah, enum ieee80211_if_types op_mode, struct ieee80211_channel *channel, bool change_channel); 1120extern int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode, struct ieee80211_channel *channel, bool change_channel);
1121/* Power management functions */ 1121/* Power management functions */
1122extern int ath5k_hw_set_power(struct ath5k_hw *ah, enum ath5k_power_mode mode, bool set_chip, u16 sleep_duration); 1122extern int ath5k_hw_set_power(struct ath5k_hw *ah, enum ath5k_power_mode mode, bool set_chip, u16 sleep_duration);
1123 1123
diff --git a/drivers/net/wireless/ath5k/attach.c b/drivers/net/wireless/ath5k/attach.c
index 0eb2511fe147..153c4111fabe 100644
--- a/drivers/net/wireless/ath5k/attach.c
+++ b/drivers/net/wireless/ath5k/attach.c
@@ -124,7 +124,7 @@ struct ath5k_hw *ath5k_hw_attach(struct ath5k_softc *sc, u8 mac_version)
124 /* 124 /*
125 * HW information 125 * HW information
126 */ 126 */
127 ah->ah_op_mode = IEEE80211_IF_TYPE_STA; 127 ah->ah_op_mode = NL80211_IFTYPE_STATION;
128 ah->ah_radar.r_enabled = AR5K_TUNE_RADAR_ALERT; 128 ah->ah_radar.r_enabled = AR5K_TUNE_RADAR_ALERT;
129 ah->ah_turbo = false; 129 ah->ah_turbo = false;
130 ah->ah_txpower.txp_tpc = AR5K_TUNE_TPC_TXPOWER; 130 ah->ah_txpower.txp_tpc = AR5K_TUNE_TPC_TXPOWER;
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c
index 85260c39aa2b..e09ed2ce6753 100644
--- a/drivers/net/wireless/ath5k/base.c
+++ b/drivers/net/wireless/ath5k/base.c
@@ -507,7 +507,7 @@ ath5k_pci_probe(struct pci_dev *pdev,
507 507
508 sc->iobase = mem; /* So we can unmap it on detach */ 508 sc->iobase = mem; /* So we can unmap it on detach */
509 sc->cachelsz = csz * sizeof(u32); /* convert to bytes */ 509 sc->cachelsz = csz * sizeof(u32); /* convert to bytes */
510 sc->opmode = IEEE80211_IF_TYPE_STA; 510 sc->opmode = NL80211_IFTYPE_STATION;
511 mutex_init(&sc->lock); 511 mutex_init(&sc->lock);
512 spin_lock_init(&sc->rxbuflock); 512 spin_lock_init(&sc->rxbuflock);
513 spin_lock_init(&sc->txbuflock); 513 spin_lock_init(&sc->txbuflock);
@@ -1377,8 +1377,8 @@ ath5k_beaconq_config(struct ath5k_softc *sc)
1377 ret = ath5k_hw_get_tx_queueprops(ah, sc->bhalq, &qi); 1377 ret = ath5k_hw_get_tx_queueprops(ah, sc->bhalq, &qi);
1378 if (ret) 1378 if (ret)
1379 return ret; 1379 return ret;
1380 if (sc->opmode == IEEE80211_IF_TYPE_AP || 1380 if (sc->opmode == NL80211_IFTYPE_AP ||
1381 sc->opmode == IEEE80211_IF_TYPE_MESH_POINT) { 1381 sc->opmode == NL80211_IFTYPE_MESH_POINT) {
1382 /* 1382 /*
1383 * Always burst out beacon and CAB traffic 1383 * Always burst out beacon and CAB traffic
1384 * (aifs = cwmin = cwmax = 0) 1384 * (aifs = cwmin = cwmax = 0)
@@ -1386,7 +1386,7 @@ ath5k_beaconq_config(struct ath5k_softc *sc)
1386 qi.tqi_aifs = 0; 1386 qi.tqi_aifs = 0;
1387 qi.tqi_cw_min = 0; 1387 qi.tqi_cw_min = 0;
1388 qi.tqi_cw_max = 0; 1388 qi.tqi_cw_max = 0;
1389 } else if (sc->opmode == IEEE80211_IF_TYPE_IBSS) { 1389 } else if (sc->opmode == NL80211_IFTYPE_ADHOC) {
1390 /* 1390 /*
1391 * Adhoc mode; backoff between 0 and (2 * cw_min). 1391 * Adhoc mode; backoff between 0 and (2 * cw_min).
1392 */ 1392 */
@@ -1714,7 +1714,7 @@ ath5k_tasklet_rx(unsigned long data)
1714 /* let crypto-error packets fall through in MNTR */ 1714 /* let crypto-error packets fall through in MNTR */
1715 if ((rs.rs_status & 1715 if ((rs.rs_status &
1716 ~(AR5K_RXERR_DECRYPT|AR5K_RXERR_MIC)) || 1716 ~(AR5K_RXERR_DECRYPT|AR5K_RXERR_MIC)) ||
1717 sc->opmode != IEEE80211_IF_TYPE_MNTR) 1717 sc->opmode != NL80211_IFTYPE_MONITOR)
1718 goto next; 1718 goto next;
1719 } 1719 }
1720accept: 1720accept:
@@ -1777,7 +1777,7 @@ accept:
1777 ath5k_debug_dump_skb(sc, skb, "RX ", 0); 1777 ath5k_debug_dump_skb(sc, skb, "RX ", 0);
1778 1778
1779 /* check beacons in IBSS mode */ 1779 /* check beacons in IBSS mode */
1780 if (sc->opmode == IEEE80211_IF_TYPE_IBSS) 1780 if (sc->opmode == NL80211_IFTYPE_ADHOC)
1781 ath5k_check_ibss_tsf(sc, skb, &rxs); 1781 ath5k_check_ibss_tsf(sc, skb, &rxs);
1782 1782
1783 __ieee80211_rx(sc->hw, skb, &rxs); 1783 __ieee80211_rx(sc->hw, skb, &rxs);
@@ -1892,7 +1892,7 @@ ath5k_beacon_setup(struct ath5k_softc *sc, struct ath5k_buf *bf)
1892 ds = bf->desc; 1892 ds = bf->desc;
1893 1893
1894 flags = AR5K_TXDESC_NOACK; 1894 flags = AR5K_TXDESC_NOACK;
1895 if (sc->opmode == IEEE80211_IF_TYPE_IBSS && ath5k_hw_hasveol(ah)) { 1895 if (sc->opmode == NL80211_IFTYPE_ADHOC && ath5k_hw_hasveol(ah)) {
1896 ds->ds_link = bf->daddr; /* self-linked */ 1896 ds->ds_link = bf->daddr; /* self-linked */
1897 flags |= AR5K_TXDESC_VEOL; 1897 flags |= AR5K_TXDESC_VEOL;
1898 /* 1898 /*
@@ -1941,8 +1941,8 @@ ath5k_beacon_send(struct ath5k_softc *sc)
1941 1941
1942 ATH5K_DBG_UNLIMIT(sc, ATH5K_DEBUG_BEACON, "in beacon_send\n"); 1942 ATH5K_DBG_UNLIMIT(sc, ATH5K_DEBUG_BEACON, "in beacon_send\n");
1943 1943
1944 if (unlikely(bf->skb == NULL || sc->opmode == IEEE80211_IF_TYPE_STA || 1944 if (unlikely(bf->skb == NULL || sc->opmode == NL80211_IFTYPE_STATION ||
1945 sc->opmode == IEEE80211_IF_TYPE_MNTR)) { 1945 sc->opmode == NL80211_IFTYPE_MONITOR)) {
1946 ATH5K_WARN(sc, "bf=%p bf_skb=%p\n", bf, bf ? bf->skb : NULL); 1946 ATH5K_WARN(sc, "bf=%p bf_skb=%p\n", bf, bf ? bf->skb : NULL);
1947 return; 1947 return;
1948 } 1948 }
@@ -2116,9 +2116,9 @@ ath5k_beacon_config(struct ath5k_softc *sc)
2116 sc->bmisscount = 0; 2116 sc->bmisscount = 0;
2117 sc->imask &= ~(AR5K_INT_BMISS | AR5K_INT_SWBA); 2117 sc->imask &= ~(AR5K_INT_BMISS | AR5K_INT_SWBA);
2118 2118
2119 if (sc->opmode == IEEE80211_IF_TYPE_STA) { 2119 if (sc->opmode == NL80211_IFTYPE_STATION) {
2120 sc->imask |= AR5K_INT_BMISS; 2120 sc->imask |= AR5K_INT_BMISS;
2121 } else if (sc->opmode == IEEE80211_IF_TYPE_IBSS) { 2121 } else if (sc->opmode == NL80211_IFTYPE_ADHOC) {
2122 /* 2122 /*
2123 * In IBSS mode we use a self-linked tx descriptor and let the 2123 * In IBSS mode we use a self-linked tx descriptor and let the
2124 * hardware send the beacons automatically. We have to load it 2124 * hardware send the beacons automatically. We have to load it
@@ -2323,7 +2323,7 @@ ath5k_intr(int irq, void *dev_id)
2323 * transmission time) in order to detect wether 2323 * transmission time) in order to detect wether
2324 * automatic TSF updates happened. 2324 * automatic TSF updates happened.
2325 */ 2325 */
2326 if (sc->opmode == IEEE80211_IF_TYPE_IBSS) { 2326 if (sc->opmode == NL80211_IFTYPE_ADHOC) {
2327 /* XXX: only if VEOL suppported */ 2327 /* XXX: only if VEOL suppported */
2328 u64 tsf = ath5k_hw_get_tsf64(ah); 2328 u64 tsf = ath5k_hw_get_tsf64(ah);
2329 sc->nexttbtt += sc->bintval; 2329 sc->nexttbtt += sc->bintval;
@@ -2553,7 +2553,7 @@ ath5k_tx(struct ieee80211_hw *hw, struct sk_buff *skb)
2553 2553
2554 ath5k_debug_dump_skb(sc, skb, "TX ", 1); 2554 ath5k_debug_dump_skb(sc, skb, "TX ", 1);
2555 2555
2556 if (sc->opmode == IEEE80211_IF_TYPE_MNTR) 2556 if (sc->opmode == NL80211_IFTYPE_MONITOR)
2557 ATH5K_DBG(sc, ATH5K_DEBUG_XMIT, "tx in monitor (scan?)\n"); 2557 ATH5K_DBG(sc, ATH5K_DEBUG_XMIT, "tx in monitor (scan?)\n");
2558 2558
2559 /* 2559 /*
@@ -2688,9 +2688,9 @@ static int ath5k_add_interface(struct ieee80211_hw *hw,
2688 sc->vif = conf->vif; 2688 sc->vif = conf->vif;
2689 2689
2690 switch (conf->type) { 2690 switch (conf->type) {
2691 case IEEE80211_IF_TYPE_STA: 2691 case NL80211_IFTYPE_STATION:
2692 case IEEE80211_IF_TYPE_IBSS: 2692 case NL80211_IFTYPE_ADHOC:
2693 case IEEE80211_IF_TYPE_MNTR: 2693 case NL80211_IFTYPE_MONITOR:
2694 sc->opmode = conf->type; 2694 sc->opmode = conf->type;
2695 break; 2695 break;
2696 default: 2696 default:
@@ -2761,7 +2761,7 @@ ath5k_config_interface(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
2761 } 2761 }
2762 2762
2763 if (conf->changed & IEEE80211_IFCC_BEACON && 2763 if (conf->changed & IEEE80211_IFCC_BEACON &&
2764 vif->type == IEEE80211_IF_TYPE_IBSS) { 2764 vif->type == NL80211_IFTYPE_ADHOC) {
2765 struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); 2765 struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
2766 if (!beacon) { 2766 if (!beacon) {
2767 ret = -ENOMEM; 2767 ret = -ENOMEM;
@@ -2880,17 +2880,17 @@ static void ath5k_configure_filter(struct ieee80211_hw *hw,
2880 2880
2881 /* XXX move these to mac80211, and add a beacon IFF flag to mac80211 */ 2881 /* XXX move these to mac80211, and add a beacon IFF flag to mac80211 */
2882 2882
2883 if (sc->opmode == IEEE80211_IF_TYPE_MNTR) 2883 if (sc->opmode == NL80211_IFTYPE_MONITOR)
2884 rfilt |= AR5K_RX_FILTER_CONTROL | AR5K_RX_FILTER_BEACON | 2884 rfilt |= AR5K_RX_FILTER_CONTROL | AR5K_RX_FILTER_BEACON |
2885 AR5K_RX_FILTER_PROBEREQ | AR5K_RX_FILTER_PROM; 2885 AR5K_RX_FILTER_PROBEREQ | AR5K_RX_FILTER_PROM;
2886 if (sc->opmode != IEEE80211_IF_TYPE_STA) 2886 if (sc->opmode != NL80211_IFTYPE_STATION)
2887 rfilt |= AR5K_RX_FILTER_PROBEREQ; 2887 rfilt |= AR5K_RX_FILTER_PROBEREQ;
2888 if (sc->opmode != IEEE80211_IF_TYPE_AP && 2888 if (sc->opmode != NL80211_IFTYPE_AP &&
2889 sc->opmode != IEEE80211_IF_TYPE_MESH_POINT && 2889 sc->opmode != NL80211_IFTYPE_MESH_POINT &&
2890 test_bit(ATH_STAT_PROMISC, sc->status)) 2890 test_bit(ATH_STAT_PROMISC, sc->status))
2891 rfilt |= AR5K_RX_FILTER_PROM; 2891 rfilt |= AR5K_RX_FILTER_PROM;
2892 if (sc->opmode == IEEE80211_IF_TYPE_STA || 2892 if (sc->opmode == NL80211_IFTYPE_STATION ||
2893 sc->opmode == IEEE80211_IF_TYPE_IBSS) { 2893 sc->opmode == NL80211_IFTYPE_ADHOC) {
2894 rfilt |= AR5K_RX_FILTER_BEACON; 2894 rfilt |= AR5K_RX_FILTER_BEACON;
2895 } 2895 }
2896 2896
@@ -2995,7 +2995,7 @@ ath5k_reset_tsf(struct ieee80211_hw *hw)
2995 * in IBSS mode we need to update the beacon timers too. 2995 * in IBSS mode we need to update the beacon timers too.
2996 * this will also reset the TSF if we call it with 0 2996 * this will also reset the TSF if we call it with 0
2997 */ 2997 */
2998 if (sc->opmode == IEEE80211_IF_TYPE_IBSS) 2998 if (sc->opmode == NL80211_IFTYPE_ADHOC)
2999 ath5k_beacon_update_timers(sc, 0); 2999 ath5k_beacon_update_timers(sc, 0);
3000 else 3000 else
3001 ath5k_hw_reset_tsf(sc->ah); 3001 ath5k_hw_reset_tsf(sc->ah);
@@ -3010,7 +3010,7 @@ ath5k_beacon_update(struct ieee80211_hw *hw, struct sk_buff *skb)
3010 3010
3011 ath5k_debug_dump_skb(sc, skb, "BC ", 1); 3011 ath5k_debug_dump_skb(sc, skb, "BC ", 1);
3012 3012
3013 if (sc->opmode != IEEE80211_IF_TYPE_IBSS) { 3013 if (sc->opmode != NL80211_IFTYPE_ADHOC) {
3014 ret = -EIO; 3014 ret = -EIO;
3015 goto end; 3015 goto end;
3016 } 3016 }
diff --git a/drivers/net/wireless/ath5k/base.h b/drivers/net/wireless/ath5k/base.h
index 1549b63d6138..9d0b728928e3 100644
--- a/drivers/net/wireless/ath5k/base.h
+++ b/drivers/net/wireless/ath5k/base.h
@@ -113,7 +113,7 @@ struct ath5k_softc {
113 struct ieee80211_channel channels[ATH_CHAN_MAX]; 113 struct ieee80211_channel channels[ATH_CHAN_MAX];
114 struct ieee80211_rate rates[IEEE80211_NUM_BANDS][AR5K_MAX_RATES]; 114 struct ieee80211_rate rates[IEEE80211_NUM_BANDS][AR5K_MAX_RATES];
115 u8 rate_idx[IEEE80211_NUM_BANDS][AR5K_MAX_RATES]; 115 u8 rate_idx[IEEE80211_NUM_BANDS][AR5K_MAX_RATES];
116 enum ieee80211_if_types opmode; 116 enum nl80211_iftype opmode;
117 struct ath5k_hw *ah; /* Atheros HW */ 117 struct ath5k_hw *ah; /* Atheros HW */
118 118
119 struct ieee80211_supported_band *curband; 119 struct ieee80211_supported_band *curband;
diff --git a/drivers/net/wireless/ath5k/pcu.c b/drivers/net/wireless/ath5k/pcu.c
index 5a896d1e2a2b..c77cee2a5582 100644
--- a/drivers/net/wireless/ath5k/pcu.c
+++ b/drivers/net/wireless/ath5k/pcu.c
@@ -52,26 +52,26 @@ int ath5k_hw_set_opmode(struct ath5k_hw *ah)
52 ATH5K_TRACE(ah->ah_sc); 52 ATH5K_TRACE(ah->ah_sc);
53 53
54 switch (ah->ah_op_mode) { 54 switch (ah->ah_op_mode) {
55 case IEEE80211_IF_TYPE_IBSS: 55 case NL80211_IFTYPE_ADHOC:
56 pcu_reg |= AR5K_STA_ID1_ADHOC | AR5K_STA_ID1_DESC_ANTENNA | 56 pcu_reg |= AR5K_STA_ID1_ADHOC | AR5K_STA_ID1_DESC_ANTENNA |
57 (ah->ah_version == AR5K_AR5210 ? 57 (ah->ah_version == AR5K_AR5210 ?
58 AR5K_STA_ID1_NO_PSPOLL : 0); 58 AR5K_STA_ID1_NO_PSPOLL : 0);
59 beacon_reg |= AR5K_BCR_ADHOC; 59 beacon_reg |= AR5K_BCR_ADHOC;
60 break; 60 break;
61 61
62 case IEEE80211_IF_TYPE_AP: 62 case NL80211_IFTYPE_AP:
63 case IEEE80211_IF_TYPE_MESH_POINT: 63 case NL80211_IFTYPE_MESH_POINT:
64 pcu_reg |= AR5K_STA_ID1_AP | AR5K_STA_ID1_RTS_DEF_ANTENNA | 64 pcu_reg |= AR5K_STA_ID1_AP | AR5K_STA_ID1_RTS_DEF_ANTENNA |
65 (ah->ah_version == AR5K_AR5210 ? 65 (ah->ah_version == AR5K_AR5210 ?
66 AR5K_STA_ID1_NO_PSPOLL : 0); 66 AR5K_STA_ID1_NO_PSPOLL : 0);
67 beacon_reg |= AR5K_BCR_AP; 67 beacon_reg |= AR5K_BCR_AP;
68 break; 68 break;
69 69
70 case IEEE80211_IF_TYPE_STA: 70 case NL80211_IFTYPE_STATION:
71 pcu_reg |= AR5K_STA_ID1_DEFAULT_ANTENNA | 71 pcu_reg |= AR5K_STA_ID1_DEFAULT_ANTENNA |
72 (ah->ah_version == AR5K_AR5210 ? 72 (ah->ah_version == AR5K_AR5210 ?
73 AR5K_STA_ID1_PWR_SV : 0); 73 AR5K_STA_ID1_PWR_SV : 0);
74 case IEEE80211_IF_TYPE_MNTR: 74 case NL80211_IFTYPE_MONITOR:
75 pcu_reg |= AR5K_STA_ID1_DEFAULT_ANTENNA | 75 pcu_reg |= AR5K_STA_ID1_DEFAULT_ANTENNA |
76 (ah->ah_version == AR5K_AR5210 ? 76 (ah->ah_version == AR5K_AR5210 ?
77 AR5K_STA_ID1_NO_PSPOLL : 0); 77 AR5K_STA_ID1_NO_PSPOLL : 0);
@@ -649,7 +649,7 @@ void ath5k_hw_init_beacon(struct ath5k_hw *ah, u32 next_beacon, u32 interval)
649 * Set the additional timers by mode 649 * Set the additional timers by mode
650 */ 650 */
651 switch (ah->ah_op_mode) { 651 switch (ah->ah_op_mode) {
652 case IEEE80211_IF_TYPE_STA: 652 case NL80211_IFTYPE_STATION:
653 if (ah->ah_version == AR5K_AR5210) { 653 if (ah->ah_version == AR5K_AR5210) {
654 timer1 = 0xffffffff; 654 timer1 = 0xffffffff;
655 timer2 = 0xffffffff; 655 timer2 = 0xffffffff;
diff --git a/drivers/net/wireless/ath5k/reset.c b/drivers/net/wireless/ath5k/reset.c
index d260fba0180f..f5c3de890cdb 100644
--- a/drivers/net/wireless/ath5k/reset.c
+++ b/drivers/net/wireless/ath5k/reset.c
@@ -399,7 +399,7 @@ int ath5k_hw_nic_wakeup(struct ath5k_hw *ah, int flags, bool initial)
399/* 399/*
400 * Main reset function 400 * Main reset function
401 */ 401 */
402int ath5k_hw_reset(struct ath5k_hw *ah, enum ieee80211_if_types op_mode, 402int ath5k_hw_reset(struct ath5k_hw *ah, enum nl80211_iftype op_mode,
403 struct ieee80211_channel *channel, bool change_channel) 403 struct ieee80211_channel *channel, bool change_channel)
404{ 404{
405 struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom; 405 struct ath5k_eeprom_info *ee = &ah->ah_capabilities.cap_eeprom;
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c
index b493dff5643e..2a6e089062f3 100644
--- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c
@@ -140,7 +140,7 @@ static int ath_key_config(struct ath_softc *sc,
140 struct ath9k_keyval hk; 140 struct ath9k_keyval hk;
141 const u8 *mac = NULL; 141 const u8 *mac = NULL;
142 int ret = 0; 142 int ret = 0;
143 enum ieee80211_if_types opmode; 143 enum nl80211_iftype opmode;
144 144
145 memset(&hk, 0, sizeof(hk)); 145 memset(&hk, 0, sizeof(hk));
146 146
@@ -179,14 +179,14 @@ static int ath_key_config(struct ath_softc *sc,
179 */ 179 */
180 if (is_broadcast_ether_addr(addr)) { 180 if (is_broadcast_ether_addr(addr)) {
181 switch (opmode) { 181 switch (opmode) {
182 case IEEE80211_IF_TYPE_STA: 182 case NL80211_IFTYPE_STATION:
183 /* default key: could be group WPA key 183 /* default key: could be group WPA key
184 * or could be static WEP key */ 184 * or could be static WEP key */
185 mac = NULL; 185 mac = NULL;
186 break; 186 break;
187 case IEEE80211_IF_TYPE_IBSS: 187 case NL80211_IFTYPE_ADHOC:
188 break; 188 break;
189 case IEEE80211_IF_TYPE_AP: 189 case NL80211_IFTYPE_AP:
190 break; 190 break;
191 default: 191 default:
192 ASSERT(0); 192 ASSERT(0);
@@ -1147,13 +1147,13 @@ static int ath9k_add_interface(struct ieee80211_hw *hw,
1147 return -ENOBUFS; 1147 return -ENOBUFS;
1148 1148
1149 switch (conf->type) { 1149 switch (conf->type) {
1150 case IEEE80211_IF_TYPE_STA: 1150 case NL80211_IFTYPE_STATION:
1151 ic_opmode = ATH9K_M_STA; 1151 ic_opmode = ATH9K_M_STA;
1152 break; 1152 break;
1153 case IEEE80211_IF_TYPE_IBSS: 1153 case NL80211_IFTYPE_ADHOC:
1154 ic_opmode = ATH9K_M_IBSS; 1154 ic_opmode = ATH9K_M_IBSS;
1155 break; 1155 break;
1156 case IEEE80211_IF_TYPE_AP: 1156 case NL80211_IFTYPE_AP:
1157 ic_opmode = ATH9K_M_HOSTAP; 1157 ic_opmode = ATH9K_M_HOSTAP;
1158 break; 1158 break;
1159 default: 1159 default:
@@ -1275,7 +1275,7 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
1275 1275
1276 /* TODO: Need to decide which hw opmode to use for multi-interface 1276 /* TODO: Need to decide which hw opmode to use for multi-interface
1277 * cases */ 1277 * cases */
1278 if (vif->type == IEEE80211_IF_TYPE_AP && 1278 if (vif->type == NL80211_IFTYPE_AP &&
1279 ah->ah_opmode != ATH9K_M_HOSTAP) { 1279 ah->ah_opmode != ATH9K_M_HOSTAP) {
1280 ah->ah_opmode = ATH9K_M_HOSTAP; 1280 ah->ah_opmode = ATH9K_M_HOSTAP;
1281 ath9k_hw_setopmode(ah); 1281 ath9k_hw_setopmode(ah);
@@ -1287,8 +1287,8 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
1287 if ((conf->changed & IEEE80211_IFCC_BSSID) && 1287 if ((conf->changed & IEEE80211_IFCC_BSSID) &&
1288 !is_zero_ether_addr(conf->bssid)) { 1288 !is_zero_ether_addr(conf->bssid)) {
1289 switch (vif->type) { 1289 switch (vif->type) {
1290 case IEEE80211_IF_TYPE_STA: 1290 case NL80211_IFTYPE_STATION:
1291 case IEEE80211_IF_TYPE_IBSS: 1291 case NL80211_IFTYPE_ADHOC:
1292 /* Update ratectrl about the new state */ 1292 /* Update ratectrl about the new state */
1293 ath_rate_newstate(sc, avp); 1293 ath_rate_newstate(sc, avp);
1294 1294
@@ -1333,8 +1333,8 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
1333 } 1333 }
1334 1334
1335 if ((conf->changed & IEEE80211_IFCC_BEACON) && 1335 if ((conf->changed & IEEE80211_IFCC_BEACON) &&
1336 ((vif->type == IEEE80211_IF_TYPE_IBSS) || 1336 ((vif->type == NL80211_IFTYPE_ADHOC) ||
1337 (vif->type == IEEE80211_IF_TYPE_AP))) { 1337 (vif->type == NL80211_IFTYPE_AP))) {
1338 /* 1338 /*
1339 * Allocate and setup the beacon frame. 1339 * Allocate and setup the beacon frame.
1340 * 1340 *
@@ -1353,7 +1353,7 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
1353 } 1353 }
1354 1354
1355 /* Check for WLAN_CAPABILITY_PRIVACY ? */ 1355 /* Check for WLAN_CAPABILITY_PRIVACY ? */
1356 if ((avp->av_opmode != IEEE80211_IF_TYPE_STA)) { 1356 if ((avp->av_opmode != NL80211_IFTYPE_STATION)) {
1357 for (i = 0; i < IEEE80211_WEP_NKID; i++) 1357 for (i = 0; i < IEEE80211_WEP_NKID; i++)
1358 if (ath9k_hw_keyisvalid(sc->sc_ah, (u16)i)) 1358 if (ath9k_hw_keyisvalid(sc->sc_ah, (u16)i))
1359 ath9k_hw_keysetmac(sc->sc_ah, 1359 ath9k_hw_keysetmac(sc->sc_ah,
@@ -1362,7 +1362,7 @@ static int ath9k_config_interface(struct ieee80211_hw *hw,
1362 } 1362 }
1363 1363
1364 /* Only legacy IBSS for now */ 1364 /* Only legacy IBSS for now */
1365 if (vif->type == IEEE80211_IF_TYPE_IBSS) 1365 if (vif->type == NL80211_IFTYPE_ADHOC)
1366 ath_update_chainmask(sc, 0); 1366 ath_update_chainmask(sc, 0);
1367 1367
1368 return 0; 1368 return 0;
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c
index d4a356b11636..df7a1e7f4a52 100644
--- a/drivers/net/wireless/b43/main.c
+++ b/drivers/net/wireless/b43/main.c
@@ -1244,13 +1244,13 @@ generate_new:
1244 1244
1245static void handle_irq_tbtt_indication(struct b43_wldev *dev) 1245static void handle_irq_tbtt_indication(struct b43_wldev *dev)
1246{ 1246{
1247 if (b43_is_mode(dev->wl, IEEE80211_IF_TYPE_AP)) { 1247 if (b43_is_mode(dev->wl, NL80211_IFTYPE_AP)) {
1248 ///TODO: PS TBTT 1248 ///TODO: PS TBTT
1249 } else { 1249 } else {
1250 if (1 /*FIXME: the last PSpoll frame was sent successfully */ ) 1250 if (1 /*FIXME: the last PSpoll frame was sent successfully */ )
1251 b43_power_saving_ctl_bits(dev, 0); 1251 b43_power_saving_ctl_bits(dev, 0);
1252 } 1252 }
1253 if (b43_is_mode(dev->wl, IEEE80211_IF_TYPE_IBSS)) 1253 if (b43_is_mode(dev->wl, NL80211_IFTYPE_ADHOC))
1254 dev->dfq_valid = 1; 1254 dev->dfq_valid = 1;
1255} 1255}
1256 1256
@@ -1599,8 +1599,8 @@ static void handle_irq_beacon(struct b43_wldev *dev)
1599 struct b43_wl *wl = dev->wl; 1599 struct b43_wl *wl = dev->wl;
1600 u32 cmd, beacon0_valid, beacon1_valid; 1600 u32 cmd, beacon0_valid, beacon1_valid;
1601 1601
1602 if (!b43_is_mode(wl, IEEE80211_IF_TYPE_AP) && 1602 if (!b43_is_mode(wl, NL80211_IFTYPE_AP) &&
1603 !b43_is_mode(wl, IEEE80211_IF_TYPE_MESH_POINT)) 1603 !b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT))
1604 return; 1604 return;
1605 1605
1606 /* This is the bottom half of the asynchronous beacon update. */ 1606 /* This is the bottom half of the asynchronous beacon update. */
@@ -2568,10 +2568,10 @@ static void b43_adjust_opmode(struct b43_wldev *dev)
2568 ctl &= ~B43_MACCTL_BEACPROMISC; 2568 ctl &= ~B43_MACCTL_BEACPROMISC;
2569 ctl |= B43_MACCTL_INFRA; 2569 ctl |= B43_MACCTL_INFRA;
2570 2570
2571 if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP) || 2571 if (b43_is_mode(wl, NL80211_IFTYPE_AP) ||
2572 b43_is_mode(wl, IEEE80211_IF_TYPE_MESH_POINT)) 2572 b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT))
2573 ctl |= B43_MACCTL_AP; 2573 ctl |= B43_MACCTL_AP;
2574 else if (b43_is_mode(wl, IEEE80211_IF_TYPE_IBSS)) 2574 else if (b43_is_mode(wl, NL80211_IFTYPE_ADHOC))
2575 ctl &= ~B43_MACCTL_INFRA; 2575 ctl &= ~B43_MACCTL_INFRA;
2576 2576
2577 if (wl->filter_flags & FIF_CONTROL) 2577 if (wl->filter_flags & FIF_CONTROL)
@@ -3406,8 +3406,8 @@ static int b43_op_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
3406 phy->ops->set_rx_antenna(dev, antenna); 3406 phy->ops->set_rx_antenna(dev, antenna);
3407 3407
3408 /* Update templates for AP/mesh mode. */ 3408 /* Update templates for AP/mesh mode. */
3409 if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP) || 3409 if (b43_is_mode(wl, NL80211_IFTYPE_AP) ||
3410 b43_is_mode(wl, IEEE80211_IF_TYPE_MESH_POINT)) 3410 b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT))
3411 b43_set_beacon_int(dev, conf->beacon_int); 3411 b43_set_beacon_int(dev, conf->beacon_int);
3412 3412
3413 if (!!conf->radio_enabled != phy->radio_on) { 3413 if (!!conf->radio_enabled != phy->radio_on) {
@@ -3595,14 +3595,14 @@ static int b43_op_config_interface(struct ieee80211_hw *hw,
3595 else 3595 else
3596 memset(wl->bssid, 0, ETH_ALEN); 3596 memset(wl->bssid, 0, ETH_ALEN);
3597 if (b43_status(dev) >= B43_STAT_INITIALIZED) { 3597 if (b43_status(dev) >= B43_STAT_INITIALIZED) {
3598 if (b43_is_mode(wl, IEEE80211_IF_TYPE_AP) || 3598 if (b43_is_mode(wl, NL80211_IFTYPE_AP) ||
3599 b43_is_mode(wl, IEEE80211_IF_TYPE_MESH_POINT)) { 3599 b43_is_mode(wl, NL80211_IFTYPE_MESH_POINT)) {
3600 B43_WARN_ON(vif->type != wl->if_type); 3600 B43_WARN_ON(vif->type != wl->if_type);
3601 if (conf->changed & IEEE80211_IFCC_SSID) 3601 if (conf->changed & IEEE80211_IFCC_SSID)
3602 b43_set_ssid(dev, conf->ssid, conf->ssid_len); 3602 b43_set_ssid(dev, conf->ssid, conf->ssid_len);
3603 if (conf->changed & IEEE80211_IFCC_BEACON) 3603 if (conf->changed & IEEE80211_IFCC_BEACON)
3604 b43_update_templates(wl); 3604 b43_update_templates(wl);
3605 } else if (b43_is_mode(wl, IEEE80211_IF_TYPE_IBSS)) { 3605 } else if (b43_is_mode(wl, NL80211_IFTYPE_ADHOC)) {
3606 if (conf->changed & IEEE80211_IFCC_BEACON) 3606 if (conf->changed & IEEE80211_IFCC_BEACON)
3607 b43_update_templates(wl); 3607 b43_update_templates(wl);
3608 } 3608 }
@@ -3903,7 +3903,7 @@ static void b43_set_synth_pu_delay(struct b43_wldev *dev, bool idle)
3903 pu_delay = 3700; 3903 pu_delay = 3700;
3904 else 3904 else
3905 pu_delay = 1050; 3905 pu_delay = 1050;
3906 if (b43_is_mode(dev->wl, IEEE80211_IF_TYPE_IBSS) || idle) 3906 if (b43_is_mode(dev->wl, NL80211_IFTYPE_ADHOC) || idle)
3907 pu_delay = 500; 3907 pu_delay = 500;
3908 if ((dev->phy.radio_ver == 0x2050) && (dev->phy.radio_rev == 8)) 3908 if ((dev->phy.radio_ver == 0x2050) && (dev->phy.radio_rev == 8))
3909 pu_delay = max(pu_delay, (u16)2400); 3909 pu_delay = max(pu_delay, (u16)2400);
@@ -3917,7 +3917,7 @@ static void b43_set_pretbtt(struct b43_wldev *dev)
3917 u16 pretbtt; 3917 u16 pretbtt;
3918 3918
3919 /* The time value is in microseconds. */ 3919 /* The time value is in microseconds. */
3920 if (b43_is_mode(dev->wl, IEEE80211_IF_TYPE_IBSS)) { 3920 if (b43_is_mode(dev->wl, NL80211_IFTYPE_ADHOC)) {
3921 pretbtt = 2; 3921 pretbtt = 2;
3922 } else { 3922 } else {
3923 if (dev->phy.type == B43_PHYTYPE_A) 3923 if (dev->phy.type == B43_PHYTYPE_A)
@@ -4084,11 +4084,11 @@ static int b43_op_add_interface(struct ieee80211_hw *hw,
4084 4084
4085 /* TODO: allow WDS/AP devices to coexist */ 4085 /* TODO: allow WDS/AP devices to coexist */
4086 4086
4087 if (conf->type != IEEE80211_IF_TYPE_AP && 4087 if (conf->type != NL80211_IFTYPE_AP &&
4088 conf->type != IEEE80211_IF_TYPE_MESH_POINT && 4088 conf->type != NL80211_IFTYPE_MESH_POINT &&
4089 conf->type != IEEE80211_IF_TYPE_STA && 4089 conf->type != NL80211_IFTYPE_STATION &&
4090 conf->type != IEEE80211_IF_TYPE_WDS && 4090 conf->type != NL80211_IFTYPE_WDS &&
4091 conf->type != IEEE80211_IF_TYPE_IBSS) 4091 conf->type != NL80211_IFTYPE_ADHOC)
4092 return -EOPNOTSUPP; 4092 return -EOPNOTSUPP;
4093 4093
4094 mutex_lock(&wl->mutex); 4094 mutex_lock(&wl->mutex);
diff --git a/drivers/net/wireless/b43/phy_common.c b/drivers/net/wireless/b43/phy_common.c
index 4d4345d76abf..af37abccccb3 100644
--- a/drivers/net/wireless/b43/phy_common.c
+++ b/drivers/net/wireless/b43/phy_common.c
@@ -162,7 +162,7 @@ void b43_phy_lock(struct b43_wldev *dev)
162#endif 162#endif
163 B43_WARN_ON(dev->dev->id.revision < 3); 163 B43_WARN_ON(dev->dev->id.revision < 3);
164 164
165 if (!b43_is_mode(dev->wl, IEEE80211_IF_TYPE_AP)) 165 if (!b43_is_mode(dev->wl, NL80211_IFTYPE_AP))
166 b43_power_saving_ctl_bits(dev, B43_PS_AWAKE); 166 b43_power_saving_ctl_bits(dev, B43_PS_AWAKE);
167} 167}
168 168
@@ -174,7 +174,7 @@ void b43_phy_unlock(struct b43_wldev *dev)
174#endif 174#endif
175 B43_WARN_ON(dev->dev->id.revision < 3); 175 B43_WARN_ON(dev->dev->id.revision < 3);
176 176
177 if (!b43_is_mode(dev->wl, IEEE80211_IF_TYPE_AP)) 177 if (!b43_is_mode(dev->wl, NL80211_IFTYPE_AP))
178 b43_power_saving_ctl_bits(dev, 0); 178 b43_power_saving_ctl_bits(dev, 0);
179} 179}
180 180
diff --git a/drivers/net/wireless/b43legacy/main.c b/drivers/net/wireless/b43legacy/main.c
index 68f63f5093af..6e425410c99d 100644
--- a/drivers/net/wireless/b43legacy/main.c
+++ b/drivers/net/wireless/b43legacy/main.c
@@ -888,13 +888,13 @@ generate_new:
888 888
889static void handle_irq_tbtt_indication(struct b43legacy_wldev *dev) 889static void handle_irq_tbtt_indication(struct b43legacy_wldev *dev)
890{ 890{
891 if (b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_AP)) { 891 if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_AP)) {
892 /* TODO: PS TBTT */ 892 /* TODO: PS TBTT */
893 } else { 893 } else {
894 if (1/*FIXME: the last PSpoll frame was sent successfully */) 894 if (1/*FIXME: the last PSpoll frame was sent successfully */)
895 b43legacy_power_saving_ctl_bits(dev, -1, -1); 895 b43legacy_power_saving_ctl_bits(dev, -1, -1);
896 } 896 }
897 if (b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_IBSS)) 897 if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_ADHOC))
898 dev->dfq_valid = 1; 898 dev->dfq_valid = 1;
899} 899}
900 900
@@ -1201,7 +1201,7 @@ static void handle_irq_beacon(struct b43legacy_wldev *dev)
1201 struct b43legacy_wl *wl = dev->wl; 1201 struct b43legacy_wl *wl = dev->wl;
1202 u32 cmd; 1202 u32 cmd;
1203 1203
1204 if (!b43legacy_is_mode(wl, IEEE80211_IF_TYPE_AP)) 1204 if (!b43legacy_is_mode(wl, NL80211_IFTYPE_AP))
1205 return; 1205 return;
1206 1206
1207 /* This is the bottom half of the asynchronous beacon update. */ 1207 /* This is the bottom half of the asynchronous beacon update. */
@@ -1936,9 +1936,9 @@ static void b43legacy_adjust_opmode(struct b43legacy_wldev *dev)
1936 ctl &= ~B43legacy_MACCTL_BEACPROMISC; 1936 ctl &= ~B43legacy_MACCTL_BEACPROMISC;
1937 ctl |= B43legacy_MACCTL_INFRA; 1937 ctl |= B43legacy_MACCTL_INFRA;
1938 1938
1939 if (b43legacy_is_mode(wl, IEEE80211_IF_TYPE_AP)) 1939 if (b43legacy_is_mode(wl, NL80211_IFTYPE_AP))
1940 ctl |= B43legacy_MACCTL_AP; 1940 ctl |= B43legacy_MACCTL_AP;
1941 else if (b43legacy_is_mode(wl, IEEE80211_IF_TYPE_IBSS)) 1941 else if (b43legacy_is_mode(wl, NL80211_IFTYPE_ADHOC))
1942 ctl &= ~B43legacy_MACCTL_INFRA; 1942 ctl &= ~B43legacy_MACCTL_INFRA;
1943 1943
1944 if (wl->filter_flags & FIF_CONTROL) 1944 if (wl->filter_flags & FIF_CONTROL)
@@ -2646,7 +2646,7 @@ static int b43legacy_op_dev_config(struct ieee80211_hw *hw,
2646 b43legacy_mgmtframe_txantenna(dev, antenna_tx); 2646 b43legacy_mgmtframe_txantenna(dev, antenna_tx);
2647 2647
2648 /* Update templates for AP mode. */ 2648 /* Update templates for AP mode. */
2649 if (b43legacy_is_mode(wl, IEEE80211_IF_TYPE_AP)) 2649 if (b43legacy_is_mode(wl, NL80211_IFTYPE_AP))
2650 b43legacy_set_beacon_int(dev, conf->beacon_int); 2650 b43legacy_set_beacon_int(dev, conf->beacon_int);
2651 2651
2652 2652
@@ -2733,12 +2733,12 @@ static int b43legacy_op_config_interface(struct ieee80211_hw *hw,
2733 else 2733 else
2734 memset(wl->bssid, 0, ETH_ALEN); 2734 memset(wl->bssid, 0, ETH_ALEN);
2735 if (b43legacy_status(dev) >= B43legacy_STAT_INITIALIZED) { 2735 if (b43legacy_status(dev) >= B43legacy_STAT_INITIALIZED) {
2736 if (b43legacy_is_mode(wl, IEEE80211_IF_TYPE_AP)) { 2736 if (b43legacy_is_mode(wl, NL80211_IFTYPE_AP)) {
2737 B43legacy_WARN_ON(vif->type != IEEE80211_IF_TYPE_AP); 2737 B43legacy_WARN_ON(vif->type != NL80211_IFTYPE_AP);
2738 b43legacy_set_ssid(dev, conf->ssid, conf->ssid_len); 2738 b43legacy_set_ssid(dev, conf->ssid, conf->ssid_len);
2739 if (conf->changed & IEEE80211_IFCC_BEACON) 2739 if (conf->changed & IEEE80211_IFCC_BEACON)
2740 b43legacy_update_templates(wl); 2740 b43legacy_update_templates(wl);
2741 } else if (b43legacy_is_mode(wl, IEEE80211_IF_TYPE_IBSS)) { 2741 } else if (b43legacy_is_mode(wl, NL80211_IFTYPE_ADHOC)) {
2742 if (conf->changed & IEEE80211_IFCC_BEACON) 2742 if (conf->changed & IEEE80211_IFCC_BEACON)
2743 b43legacy_update_templates(wl); 2743 b43legacy_update_templates(wl);
2744 } 2744 }
@@ -3020,7 +3020,7 @@ static void b43legacy_set_synth_pu_delay(struct b43legacy_wldev *dev,
3020 bool idle) { 3020 bool idle) {
3021 u16 pu_delay = 1050; 3021 u16 pu_delay = 1050;
3022 3022
3023 if (b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_IBSS) || idle) 3023 if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_ADHOC) || idle)
3024 pu_delay = 500; 3024 pu_delay = 500;
3025 if ((dev->phy.radio_ver == 0x2050) && (dev->phy.radio_rev == 8)) 3025 if ((dev->phy.radio_ver == 0x2050) && (dev->phy.radio_rev == 8))
3026 pu_delay = max(pu_delay, (u16)2400); 3026 pu_delay = max(pu_delay, (u16)2400);
@@ -3035,7 +3035,7 @@ static void b43legacy_set_pretbtt(struct b43legacy_wldev *dev)
3035 u16 pretbtt; 3035 u16 pretbtt;
3036 3036
3037 /* The time value is in microseconds. */ 3037 /* The time value is in microseconds. */
3038 if (b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_IBSS)) 3038 if (b43legacy_is_mode(dev->wl, NL80211_IFTYPE_ADHOC))
3039 pretbtt = 2; 3039 pretbtt = 2;
3040 else 3040 else
3041 pretbtt = 250; 3041 pretbtt = 250;
@@ -3259,10 +3259,10 @@ static int b43legacy_op_add_interface(struct ieee80211_hw *hw,
3259 3259
3260 /* TODO: allow WDS/AP devices to coexist */ 3260 /* TODO: allow WDS/AP devices to coexist */
3261 3261
3262 if (conf->type != IEEE80211_IF_TYPE_AP && 3262 if (conf->type != NL80211_IFTYPE_AP &&
3263 conf->type != IEEE80211_IF_TYPE_STA && 3263 conf->type != NL80211_IFTYPE_STATION &&
3264 conf->type != IEEE80211_IF_TYPE_WDS && 3264 conf->type != NL80211_IFTYPE_WDS &&
3265 conf->type != IEEE80211_IF_TYPE_IBSS) 3265 conf->type != NL80211_IFTYPE_ADHOC)
3266 return -EOPNOTSUPP; 3266 return -EOPNOTSUPP;
3267 3267
3268 mutex_lock(&wl->mutex); 3268 mutex_lock(&wl->mutex);
diff --git a/drivers/net/wireless/b43legacy/phy.c b/drivers/net/wireless/b43legacy/phy.c
index bed67a54250c..4c9442b16f3f 100644
--- a/drivers/net/wireless/b43legacy/phy.c
+++ b/drivers/net/wireless/b43legacy/phy.c
@@ -103,7 +103,7 @@ void b43legacy_phy_lock(struct b43legacy_wldev *dev)
103 if (dev->dev->id.revision < 3) { 103 if (dev->dev->id.revision < 3) {
104 b43legacy_mac_suspend(dev); 104 b43legacy_mac_suspend(dev);
105 } else { 105 } else {
106 if (!b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_AP)) 106 if (!b43legacy_is_mode(dev->wl, NL80211_IFTYPE_AP))
107 b43legacy_power_saving_ctl_bits(dev, -1, 1); 107 b43legacy_power_saving_ctl_bits(dev, -1, 1);
108 } 108 }
109} 109}
@@ -118,7 +118,7 @@ void b43legacy_phy_unlock(struct b43legacy_wldev *dev)
118 if (dev->dev->id.revision < 3) { 118 if (dev->dev->id.revision < 3) {
119 b43legacy_mac_enable(dev); 119 b43legacy_mac_enable(dev);
120 } else { 120 } else {
121 if (!b43legacy_is_mode(dev->wl, IEEE80211_IF_TYPE_AP)) 121 if (!b43legacy_is_mode(dev->wl, NL80211_IFTYPE_AP))
122 b43legacy_power_saving_ctl_bits(dev, -1, -1); 122 b43legacy_power_saving_ctl_bits(dev, -1, -1);
123 } 123 }
124} 124}
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
index 10c64bdb314c..da23c927380f 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945-rs.c
@@ -682,7 +682,7 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
682 682
683 rs_sta = (void *)sta->rate_ctrl_priv; 683 rs_sta = (void *)sta->rate_ctrl_priv;
684 684
685 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && 685 if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) &&
686 !rs_sta->ibss_sta_added) { 686 !rs_sta->ibss_sta_added) {
687 u8 sta_id = iwl3945_hw_find_station(priv, hdr->addr1); 687 u8 sta_id = iwl3945_hw_find_station(priv, hdr->addr1);
688 688
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
index 3d100e898249..7ca5627cc078 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.c
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
@@ -520,10 +520,10 @@ static int iwl3945_is_network_packet(struct iwl3945_priv *priv,
520 /* Filter incoming packets to determine if they are targeted toward 520 /* Filter incoming packets to determine if they are targeted toward
521 * this network, discarding packets coming from ourselves */ 521 * this network, discarding packets coming from ourselves */
522 switch (priv->iw_mode) { 522 switch (priv->iw_mode) {
523 case IEEE80211_IF_TYPE_IBSS: /* Header: Dest. | Source | BSSID */ 523 case NL80211_IFTYPE_ADHOC: /* Header: Dest. | Source | BSSID */
524 /* packets to our IBSS update information */ 524 /* packets to our IBSS update information */
525 return !compare_ether_addr(header->addr3, priv->bssid); 525 return !compare_ether_addr(header->addr3, priv->bssid);
526 case IEEE80211_IF_TYPE_STA: /* Header: Dest. | AP{BSSID} | Source */ 526 case NL80211_IFTYPE_STATION: /* Header: Dest. | AP{BSSID} | Source */
527 /* packets to our IBSS update information */ 527 /* packets to our IBSS update information */
528 return !compare_ether_addr(header->addr2, priv->bssid); 528 return !compare_ether_addr(header->addr2, priv->bssid);
529 default: 529 default:
@@ -807,7 +807,7 @@ void iwl3945_hw_build_tx_cmd_rate(struct iwl3945_priv *priv,
807 807
808 priv->stations[sta_id].current_rate.rate_n_flags = rate; 808 priv->stations[sta_id].current_rate.rate_n_flags = rate;
809 809
810 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && 810 if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) &&
811 (sta_id != priv->hw_setting.bcast_sta_id) && 811 (sta_id != priv->hw_setting.bcast_sta_id) &&
812 (sta_id != IWL_MULTICAST_ID)) 812 (sta_id != IWL_MULTICAST_ID))
813 priv->stations[IWL_STA_ID].current_rate.rate_n_flags = rate; 813 priv->stations[IWL_STA_ID].current_rate.rate_n_flags = rate;
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.h b/drivers/net/wireless/iwlwifi/iwl-3945.h
index 9bbbc9d7c0e8..2a4933b5fb64 100644
--- a/drivers/net/wireless/iwlwifi/iwl-3945.h
+++ b/drivers/net/wireless/iwlwifi/iwl-3945.h
@@ -851,7 +851,7 @@ struct iwl3945_priv {
851 /* eeprom */ 851 /* eeprom */
852 struct iwl3945_eeprom eeprom; 852 struct iwl3945_eeprom eeprom;
853 853
854 enum ieee80211_if_types iw_mode; 854 enum nl80211_iftype iw_mode;
855 855
856 struct sk_buff *ibss_beacon; 856 struct sk_buff *ibss_beacon;
857 857
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
index c293e5b6cbb5..700da67ac288 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c
@@ -821,7 +821,7 @@ static void rs_tx_status(void *priv_rate, struct net_device *dev,
821 821
822 lq_sta = (struct iwl_lq_sta *)sta->rate_ctrl_priv; 822 lq_sta = (struct iwl_lq_sta *)sta->rate_ctrl_priv;
823 823
824 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && 824 if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) &&
825 !lq_sta->ibss_sta_added) 825 !lq_sta->ibss_sta_added)
826 goto out; 826 goto out;
827 827
@@ -2093,7 +2093,7 @@ static void rs_initialize_lq(struct iwl_priv *priv,
2093 i = sta->last_txrate_idx; 2093 i = sta->last_txrate_idx;
2094 2094
2095 if ((lq_sta->lq.sta_id == 0xff) && 2095 if ((lq_sta->lq.sta_id == 0xff) &&
2096 (priv->iw_mode == IEEE80211_IF_TYPE_IBSS)) 2096 (priv->iw_mode == NL80211_IFTYPE_ADHOC))
2097 goto out; 2097 goto out;
2098 2098
2099 valid_tx_ant = priv->hw_params.valid_tx_ant; 2099 valid_tx_ant = priv->hw_params.valid_tx_ant;
@@ -2163,7 +2163,7 @@ static void rs_get_rate(void *priv_rate, struct net_device *dev,
2163 lq_sta = (struct iwl_lq_sta *)sta->rate_ctrl_priv; 2163 lq_sta = (struct iwl_lq_sta *)sta->rate_ctrl_priv;
2164 i = sta->last_txrate_idx; 2164 i = sta->last_txrate_idx;
2165 2165
2166 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && 2166 if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) &&
2167 !lq_sta->ibss_sta_added) { 2167 !lq_sta->ibss_sta_added) {
2168 u8 sta_id = iwl_find_station(priv, hdr->addr1); 2168 u8 sta_id = iwl_find_station(priv, hdr->addr1);
2169 DECLARE_MAC_BUF(mac); 2169 DECLARE_MAC_BUF(mac);
@@ -2243,7 +2243,7 @@ static void rs_rate_init(void *priv_rate, void *priv_sta,
2243 * after assoc.. */ 2243 * after assoc.. */
2244 2244
2245 lq_sta->ibss_sta_added = 0; 2245 lq_sta->ibss_sta_added = 0;
2246 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 2246 if (priv->iw_mode == NL80211_IFTYPE_AP) {
2247 u8 sta_id = iwl_find_station(priv, sta->addr); 2247 u8 sta_id = iwl_find_station(priv, sta->addr);
2248 DECLARE_MAC_BUF(mac); 2248 DECLARE_MAC_BUF(mac);
2249 2249
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c
index 31ea28858896..e8db33bf5e5d 100644
--- a/drivers/net/wireless/iwlwifi/iwl-agn.c
+++ b/drivers/net/wireless/iwlwifi/iwl-agn.c
@@ -337,7 +337,7 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv)
337 /* If we have set the ASSOC_MSK and we are in BSS mode then 337 /* If we have set the ASSOC_MSK and we are in BSS mode then
338 * add the IWL_AP_ID to the station rate table */ 338 * add the IWL_AP_ID to the station rate table */
339 if (new_assoc) { 339 if (new_assoc) {
340 if (priv->iw_mode == IEEE80211_IF_TYPE_STA) { 340 if (priv->iw_mode == NL80211_IFTYPE_STATION) {
341 ret = iwl_rxon_add_station(priv, 341 ret = iwl_rxon_add_station(priv,
342 priv->active_rxon.bssid_addr, 1); 342 priv->active_rxon.bssid_addr, 1);
343 if (ret == IWL_INVALID_STATION) { 343 if (ret == IWL_INVALID_STATION) {
@@ -448,8 +448,8 @@ static unsigned int iwl_fill_beacon_frame(struct iwl_priv *priv,
448 const u8 *dest, int left) 448 const u8 *dest, int left)
449{ 449{
450 if (!iwl_is_associated(priv) || !priv->ibss_beacon || 450 if (!iwl_is_associated(priv) || !priv->ibss_beacon ||
451 ((priv->iw_mode != IEEE80211_IF_TYPE_IBSS) && 451 ((priv->iw_mode != NL80211_IFTYPE_ADHOC) &&
452 (priv->iw_mode != IEEE80211_IF_TYPE_AP))) 452 (priv->iw_mode != NL80211_IFTYPE_AP)))
453 return 0; 453 return 0;
454 454
455 if (priv->ibss_beacon->len > left) 455 if (priv->ibss_beacon->len > left)
@@ -672,7 +672,7 @@ static void iwl4965_setup_rxon_timing(struct iwl_priv *priv)
672 beacon_int = priv->beacon_int; 672 beacon_int = priv->beacon_int;
673 spin_unlock_irqrestore(&priv->lock, flags); 673 spin_unlock_irqrestore(&priv->lock, flags);
674 674
675 if (priv->iw_mode == IEEE80211_IF_TYPE_STA) { 675 if (priv->iw_mode == NL80211_IFTYPE_STATION) {
676 if (beacon_int == 0) { 676 if (beacon_int == 0) {
677 priv->rxon_timing.beacon_interval = cpu_to_le16(100); 677 priv->rxon_timing.beacon_interval = cpu_to_le16(100);
678 priv->rxon_timing.beacon_init_val = cpu_to_le32(102400); 678 priv->rxon_timing.beacon_init_val = cpu_to_le32(102400);
@@ -721,7 +721,7 @@ static void iwl_set_flags_for_band(struct iwl_priv *priv,
721 else 721 else
722 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; 722 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
723 723
724 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) 724 if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
725 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; 725 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
726 726
727 priv->staging_rxon.flags |= RXON_FLG_BAND_24G_MSK; 727 priv->staging_rxon.flags |= RXON_FLG_BAND_24G_MSK;
@@ -740,23 +740,23 @@ static void iwl4965_connection_init_rx_config(struct iwl_priv *priv)
740 memset(&priv->staging_rxon, 0, sizeof(priv->staging_rxon)); 740 memset(&priv->staging_rxon, 0, sizeof(priv->staging_rxon));
741 741
742 switch (priv->iw_mode) { 742 switch (priv->iw_mode) {
743 case IEEE80211_IF_TYPE_AP: 743 case NL80211_IFTYPE_AP:
744 priv->staging_rxon.dev_type = RXON_DEV_TYPE_AP; 744 priv->staging_rxon.dev_type = RXON_DEV_TYPE_AP;
745 break; 745 break;
746 746
747 case IEEE80211_IF_TYPE_STA: 747 case NL80211_IFTYPE_STATION:
748 priv->staging_rxon.dev_type = RXON_DEV_TYPE_ESS; 748 priv->staging_rxon.dev_type = RXON_DEV_TYPE_ESS;
749 priv->staging_rxon.filter_flags = RXON_FILTER_ACCEPT_GRP_MSK; 749 priv->staging_rxon.filter_flags = RXON_FILTER_ACCEPT_GRP_MSK;
750 break; 750 break;
751 751
752 case IEEE80211_IF_TYPE_IBSS: 752 case NL80211_IFTYPE_ADHOC:
753 priv->staging_rxon.dev_type = RXON_DEV_TYPE_IBSS; 753 priv->staging_rxon.dev_type = RXON_DEV_TYPE_IBSS;
754 priv->staging_rxon.flags = RXON_FLG_SHORT_PREAMBLE_MSK; 754 priv->staging_rxon.flags = RXON_FLG_SHORT_PREAMBLE_MSK;
755 priv->staging_rxon.filter_flags = RXON_FILTER_BCON_AWARE_MSK | 755 priv->staging_rxon.filter_flags = RXON_FILTER_BCON_AWARE_MSK |
756 RXON_FILTER_ACCEPT_GRP_MSK; 756 RXON_FILTER_ACCEPT_GRP_MSK;
757 break; 757 break;
758 758
759 case IEEE80211_IF_TYPE_MNTR: 759 case NL80211_IFTYPE_MONITOR:
760 priv->staging_rxon.dev_type = RXON_DEV_TYPE_SNIFFER; 760 priv->staging_rxon.dev_type = RXON_DEV_TYPE_SNIFFER;
761 priv->staging_rxon.filter_flags = RXON_FILTER_PROMISC_MSK | 761 priv->staging_rxon.filter_flags = RXON_FILTER_PROMISC_MSK |
762 RXON_FILTER_CTL2HOST_MSK | RXON_FILTER_ACCEPT_GRP_MSK; 762 RXON_FILTER_CTL2HOST_MSK | RXON_FILTER_ACCEPT_GRP_MSK;
@@ -785,7 +785,7 @@ static void iwl4965_connection_init_rx_config(struct iwl_priv *priv)
785 * in some case A channels are all non IBSS 785 * in some case A channels are all non IBSS
786 * in this case force B/G channel 786 * in this case force B/G channel
787 */ 787 */
788 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && 788 if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) &&
789 !(is_channel_ibss(ch_info))) 789 !(is_channel_ibss(ch_info)))
790 ch_info = &priv->channel_info[0]; 790 ch_info = &priv->channel_info[0];
791 791
@@ -1182,7 +1182,7 @@ static void iwl4965_rx_beacon_notif(struct iwl_priv *priv,
1182 le32_to_cpu(beacon->low_tsf), rate); 1182 le32_to_cpu(beacon->low_tsf), rate);
1183#endif 1183#endif
1184 1184
1185 if ((priv->iw_mode == IEEE80211_IF_TYPE_AP) && 1185 if ((priv->iw_mode == NL80211_IFTYPE_AP) &&
1186 (!test_bit(STATUS_EXIT_PENDING, &priv->status))) 1186 (!test_bit(STATUS_EXIT_PENDING, &priv->status)))
1187 queue_work(priv->workqueue, &priv->beacon_update); 1187 queue_work(priv->workqueue, &priv->beacon_update);
1188} 1188}
@@ -2388,7 +2388,7 @@ static void iwl4965_bg_set_monitor(struct work_struct *work)
2388 2388
2389 mutex_lock(&priv->mutex); 2389 mutex_lock(&priv->mutex);
2390 2390
2391 ret = iwl4965_set_mode(priv, IEEE80211_IF_TYPE_MNTR); 2391 ret = iwl4965_set_mode(priv, NL80211_IFTYPE_MONITOR);
2392 2392
2393 if (ret) { 2393 if (ret) {
2394 if (ret == -EAGAIN) 2394 if (ret == -EAGAIN)
@@ -2469,7 +2469,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv)
2469 DECLARE_MAC_BUF(mac); 2469 DECLARE_MAC_BUF(mac);
2470 unsigned long flags; 2470 unsigned long flags;
2471 2471
2472 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 2472 if (priv->iw_mode == NL80211_IFTYPE_AP) {
2473 IWL_ERROR("%s Should not be called in AP mode\n", __func__); 2473 IWL_ERROR("%s Should not be called in AP mode\n", __func__);
2474 return; 2474 return;
2475 } 2475 }
@@ -2524,7 +2524,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv)
2524 else 2524 else
2525 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; 2525 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
2526 2526
2527 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) 2527 if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
2528 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; 2528 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
2529 2529
2530 } 2530 }
@@ -2532,10 +2532,10 @@ static void iwl4965_post_associate(struct iwl_priv *priv)
2532 iwl4965_commit_rxon(priv); 2532 iwl4965_commit_rxon(priv);
2533 2533
2534 switch (priv->iw_mode) { 2534 switch (priv->iw_mode) {
2535 case IEEE80211_IF_TYPE_STA: 2535 case NL80211_IFTYPE_STATION:
2536 break; 2536 break;
2537 2537
2538 case IEEE80211_IF_TYPE_IBSS: 2538 case NL80211_IFTYPE_ADHOC:
2539 2539
2540 /* assume default assoc id */ 2540 /* assume default assoc id */
2541 priv->assoc_id = 1; 2541 priv->assoc_id = 1;
@@ -2551,7 +2551,7 @@ static void iwl4965_post_associate(struct iwl_priv *priv)
2551 break; 2551 break;
2552 } 2552 }
2553 2553
2554 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) 2554 if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
2555 priv->assoc_station_added = 1; 2555 priv->assoc_station_added = 1;
2556 2556
2557 spin_lock_irqsave(&priv->lock, flags); 2557 spin_lock_irqsave(&priv->lock, flags);
@@ -2828,7 +2828,7 @@ static int iwl4965_mac_config(struct ieee80211_hw *hw, struct ieee80211_conf *co
2828 goto out; 2828 goto out;
2829 } 2829 }
2830 2830
2831 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS && 2831 if (priv->iw_mode == NL80211_IFTYPE_ADHOC &&
2832 !is_channel_ibss(ch_info)) { 2832 !is_channel_ibss(ch_info)) {
2833 IWL_ERROR("channel %d in band %d not IBSS channel\n", 2833 IWL_ERROR("channel %d in band %d not IBSS channel\n",
2834 conf->channel->hw_value, conf->channel->band); 2834 conf->channel->hw_value, conf->channel->band);
@@ -2943,7 +2943,7 @@ static void iwl4965_config_ap(struct iwl_priv *priv)
2943 priv->staging_rxon.flags &= 2943 priv->staging_rxon.flags &=
2944 ~RXON_FLG_SHORT_SLOT_MSK; 2944 ~RXON_FLG_SHORT_SLOT_MSK;
2945 2945
2946 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) 2946 if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
2947 priv->staging_rxon.flags &= 2947 priv->staging_rxon.flags &=
2948 ~RXON_FLG_SHORT_SLOT_MSK; 2948 ~RXON_FLG_SHORT_SLOT_MSK;
2949 } 2949 }
@@ -2982,7 +2982,7 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
2982 return 0; 2982 return 0;
2983 } 2983 }
2984 2984
2985 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS && 2985 if (priv->iw_mode == NL80211_IFTYPE_ADHOC &&
2986 conf->changed & IEEE80211_IFCC_BEACON) { 2986 conf->changed & IEEE80211_IFCC_BEACON) {
2987 struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); 2987 struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
2988 if (!beacon) 2988 if (!beacon)
@@ -2992,7 +2992,7 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
2992 return rc; 2992 return rc;
2993 } 2993 }
2994 2994
2995 if ((priv->iw_mode == IEEE80211_IF_TYPE_AP) && 2995 if ((priv->iw_mode == NL80211_IFTYPE_AP) &&
2996 (!conf->ssid_len)) { 2996 (!conf->ssid_len)) {
2997 IWL_DEBUG_MAC80211 2997 IWL_DEBUG_MAC80211
2998 ("Leaving in AP mode because HostAPD is not ready.\n"); 2998 ("Leaving in AP mode because HostAPD is not ready.\n");
@@ -3015,7 +3015,7 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
3015 !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) { 3015 !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) {
3016 */ 3016 */
3017 3017
3018 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 3018 if (priv->iw_mode == NL80211_IFTYPE_AP) {
3019 if (!conf->bssid) { 3019 if (!conf->bssid) {
3020 conf->bssid = priv->mac_addr; 3020 conf->bssid = priv->mac_addr;
3021 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN); 3021 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN);
@@ -3050,11 +3050,11 @@ static int iwl4965_mac_config_interface(struct ieee80211_hw *hw,
3050 * to verify) - jpk */ 3050 * to verify) - jpk */
3051 memcpy(priv->bssid, conf->bssid, ETH_ALEN); 3051 memcpy(priv->bssid, conf->bssid, ETH_ALEN);
3052 3052
3053 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) 3053 if (priv->iw_mode == NL80211_IFTYPE_AP)
3054 iwl4965_config_ap(priv); 3054 iwl4965_config_ap(priv);
3055 else { 3055 else {
3056 rc = iwl4965_commit_rxon(priv); 3056 rc = iwl4965_commit_rxon(priv);
3057 if ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && rc) 3057 if ((priv->iw_mode == NL80211_IFTYPE_STATION) && rc)
3058 iwl_rxon_add_station( 3058 iwl_rxon_add_station(
3059 priv, priv->active_rxon.bssid_addr, 1); 3059 priv, priv->active_rxon.bssid_addr, 1);
3060 } 3060 }
@@ -3090,7 +3090,7 @@ static void iwl4965_configure_filter(struct ieee80211_hw *hw,
3090 3090
3091 if (changed_flags & (*total_flags) & FIF_OTHER_BSS) { 3091 if (changed_flags & (*total_flags) & FIF_OTHER_BSS) {
3092 IWL_DEBUG_MAC80211("Enter: type %d (0x%x, 0x%x)\n", 3092 IWL_DEBUG_MAC80211("Enter: type %d (0x%x, 0x%x)\n",
3093 IEEE80211_IF_TYPE_MNTR, 3093 NL80211_IFTYPE_MONITOR,
3094 changed_flags, *total_flags); 3094 changed_flags, *total_flags);
3095 /* queue work 'cuz mac80211 is holding a lock which 3095 /* queue work 'cuz mac80211 is holding a lock which
3096 * prevents us from issuing (synchronous) f/w cmds */ 3096 * prevents us from issuing (synchronous) f/w cmds */
@@ -3204,7 +3204,7 @@ static int iwl_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t ssid_len)
3204 goto out_unlock; 3204 goto out_unlock;
3205 } 3205 }
3206 3206
3207 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { /* APs don't scan */ 3207 if (priv->iw_mode == NL80211_IFTYPE_AP) { /* APs don't scan */
3208 ret = -EIO; 3208 ret = -EIO;
3209 IWL_ERROR("ERROR: APs don't scan\n"); 3209 IWL_ERROR("ERROR: APs don't scan\n");
3210 goto out_unlock; 3210 goto out_unlock;
@@ -3329,7 +3329,7 @@ static int iwl4965_mac_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
3329 * in 1X mode. 3329 * in 1X mode.
3330 * In legacy wep mode, we use another host command to the uCode */ 3330 * In legacy wep mode, we use another host command to the uCode */
3331 if (key->alg == ALG_WEP && sta_id == priv->hw_params.bcast_sta_id && 3331 if (key->alg == ALG_WEP && sta_id == priv->hw_params.bcast_sta_id &&
3332 priv->iw_mode != IEEE80211_IF_TYPE_AP) { 3332 priv->iw_mode != NL80211_IFTYPE_AP) {
3333 if (cmd == SET_KEY) 3333 if (cmd == SET_KEY)
3334 is_default_wep_key = !priv->key_mapping_key; 3334 is_default_wep_key = !priv->key_mapping_key;
3335 else 3335 else
@@ -3400,7 +3400,7 @@ static int iwl4965_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
3400 priv->qos_data.def_qos_parm.ac[q].reserved1 = 0; 3400 priv->qos_data.def_qos_parm.ac[q].reserved1 = 0;
3401 priv->qos_data.qos_active = 1; 3401 priv->qos_data.qos_active = 1;
3402 3402
3403 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) 3403 if (priv->iw_mode == NL80211_IFTYPE_AP)
3404 iwl_activate_qos(priv, 1); 3404 iwl_activate_qos(priv, 1);
3405 else if (priv->assoc_id && iwl_is_associated(priv)) 3405 else if (priv->assoc_id && iwl_is_associated(priv))
3406 iwl_activate_qos(priv, 0); 3406 iwl_activate_qos(priv, 0);
@@ -3518,7 +3518,7 @@ static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw)
3518 3518
3519 priv->beacon_int = priv->hw->conf.beacon_int; 3519 priv->beacon_int = priv->hw->conf.beacon_int;
3520 priv->timestamp = 0; 3520 priv->timestamp = 0;
3521 if ((priv->iw_mode == IEEE80211_IF_TYPE_STA)) 3521 if ((priv->iw_mode == NL80211_IFTYPE_STATION))
3522 priv->beacon_int = 0; 3522 priv->beacon_int = 0;
3523 3523
3524 spin_unlock_irqrestore(&priv->lock, flags); 3524 spin_unlock_irqrestore(&priv->lock, flags);
@@ -3532,7 +3532,7 @@ static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw)
3532 /* we are restarting association process 3532 /* we are restarting association process
3533 * clear RXON_FILTER_ASSOC_MSK bit 3533 * clear RXON_FILTER_ASSOC_MSK bit
3534 */ 3534 */
3535 if (priv->iw_mode != IEEE80211_IF_TYPE_AP) { 3535 if (priv->iw_mode != NL80211_IFTYPE_AP) {
3536 iwl_scan_cancel_timeout(priv, 100); 3536 iwl_scan_cancel_timeout(priv, 100);
3537 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; 3537 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
3538 iwl4965_commit_rxon(priv); 3538 iwl4965_commit_rxon(priv);
@@ -3541,7 +3541,7 @@ static void iwl4965_mac_reset_tsf(struct ieee80211_hw *hw)
3541 iwl_power_update_mode(priv, 0); 3541 iwl_power_update_mode(priv, 0);
3542 3542
3543 /* Per mac80211.h: This is only used in IBSS mode... */ 3543 /* Per mac80211.h: This is only used in IBSS mode... */
3544 if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) { 3544 if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
3545 3545
3546 /* switch to CAM during association period. 3546 /* switch to CAM during association period.
3547 * the ucode will block any association/authentication 3547 * the ucode will block any association/authentication
@@ -3580,7 +3580,7 @@ static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk
3580 return -EIO; 3580 return -EIO;
3581 } 3581 }
3582 3582
3583 if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) { 3583 if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
3584 IWL_DEBUG_MAC80211("leave - not IBSS\n"); 3584 IWL_DEBUG_MAC80211("leave - not IBSS\n");
3585 mutex_unlock(&priv->mutex); 3585 mutex_unlock(&priv->mutex);
3586 return -EIO; 3586 return -EIO;
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c
index 36d08b0eec43..d80184ee911c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-core.c
+++ b/drivers/net/wireless/iwlwifi/iwl-core.c
@@ -306,14 +306,14 @@ void iwl_reset_qos(struct iwl_priv *priv)
306 spin_lock_irqsave(&priv->lock, flags); 306 spin_lock_irqsave(&priv->lock, flags);
307 priv->qos_data.qos_active = 0; 307 priv->qos_data.qos_active = 0;
308 308
309 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) { 309 if (priv->iw_mode == NL80211_IFTYPE_ADHOC) {
310 if (priv->qos_data.qos_enable) 310 if (priv->qos_data.qos_enable)
311 priv->qos_data.qos_active = 1; 311 priv->qos_data.qos_active = 1;
312 if (!(priv->active_rate & 0xfff0)) { 312 if (!(priv->active_rate & 0xfff0)) {
313 cw_min = 31; 313 cw_min = 31;
314 is_legacy = 1; 314 is_legacy = 1;
315 } 315 }
316 } else if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 316 } else if (priv->iw_mode == NL80211_IFTYPE_AP) {
317 if (priv->qos_data.qos_enable) 317 if (priv->qos_data.qos_enable)
318 priv->qos_data.qos_active = 1; 318 priv->qos_data.qos_active = 1;
319 } else if (!(priv->staging_rxon.flags & RXON_FLG_SHORT_SLOT_MSK)) { 319 } else if (!(priv->staging_rxon.flags & RXON_FLG_SHORT_SLOT_MSK)) {
@@ -932,7 +932,7 @@ int iwl_init_drv(struct iwl_priv *priv)
932 priv->ieee_rates = NULL; 932 priv->ieee_rates = NULL;
933 priv->band = IEEE80211_BAND_2GHZ; 933 priv->band = IEEE80211_BAND_2GHZ;
934 934
935 priv->iw_mode = IEEE80211_IF_TYPE_STA; 935 priv->iw_mode = NL80211_IFTYPE_STATION;
936 936
937 priv->use_ant_b_for_management_frame = 1; /* start with ant B */ 937 priv->use_ant_b_for_management_frame = 1; /* start with ant B */
938 priv->current_ht_config.sm_ps = WLAN_HT_CAP_SM_PS_DISABLED; 938 priv->current_ht_config.sm_ps = WLAN_HT_CAP_SM_PS_DISABLED;
@@ -1396,7 +1396,7 @@ void iwl_radio_kill_sw_disable_radio(struct iwl_priv *priv)
1396 1396
1397 iwl_scan_cancel(priv); 1397 iwl_scan_cancel(priv);
1398 /* FIXME: This is a workaround for AP */ 1398 /* FIXME: This is a workaround for AP */
1399 if (priv->iw_mode != IEEE80211_IF_TYPE_AP) { 1399 if (priv->iw_mode != NL80211_IFTYPE_AP) {
1400 spin_lock_irqsave(&priv->lock, flags); 1400 spin_lock_irqsave(&priv->lock, flags);
1401 iwl_write32(priv, CSR_UCODE_DRV_GP1_SET, 1401 iwl_write32(priv, CSR_UCODE_DRV_GP1_SET,
1402 CSR_UCODE_SW_BIT_RFKILL); 1402 CSR_UCODE_SW_BIT_RFKILL);
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h
index 1823687e5820..c018121085e9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-dev.h
+++ b/drivers/net/wireless/iwlwifi/iwl-dev.h
@@ -954,7 +954,7 @@ struct iwl_priv {
954 u8 *eeprom; 954 u8 *eeprom;
955 struct iwl_eeprom_calib_info *calib_info; 955 struct iwl_eeprom_calib_info *calib_info;
956 956
957 enum ieee80211_if_types iw_mode; 957 enum nl80211_iftype iw_mode;
958 958
959 struct sk_buff *ibss_beacon; 959 struct sk_buff *ibss_beacon;
960 960
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c
index 55ec31ec9e15..60a03d2d2d0e 100644
--- a/drivers/net/wireless/iwlwifi/iwl-power.c
+++ b/drivers/net/wireless/iwlwifi/iwl-power.c
@@ -290,7 +290,7 @@ int iwl_power_update_mode(struct iwl_priv *priv, bool force)
290 final_mode = setting->critical_power_setting; 290 final_mode = setting->critical_power_setting;
291 291
292 /* driver only support CAM for non STA network */ 292 /* driver only support CAM for non STA network */
293 if (priv->iw_mode != IEEE80211_IF_TYPE_STA) 293 if (priv->iw_mode != NL80211_IFTYPE_STATION)
294 final_mode = IWL_POWER_MODE_CAM; 294 final_mode = IWL_POWER_MODE_CAM;
295 295
296 if (!iwl_is_rfkill(priv) && !setting->power_disabled && 296 if (!iwl_is_rfkill(priv) && !setting->power_disabled &&
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c
index faad4d3f56e1..38b2946b1d81 100644
--- a/drivers/net/wireless/iwlwifi/iwl-rx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-rx.c
@@ -1026,10 +1026,10 @@ static int iwl_is_network_packet(struct iwl_priv *priv,
1026 /* Filter incoming packets to determine if they are targeted toward 1026 /* Filter incoming packets to determine if they are targeted toward
1027 * this network, discarding packets coming from ourselves */ 1027 * this network, discarding packets coming from ourselves */
1028 switch (priv->iw_mode) { 1028 switch (priv->iw_mode) {
1029 case IEEE80211_IF_TYPE_IBSS: /* Header: Dest. | Source | BSSID */ 1029 case NL80211_IFTYPE_ADHOC: /* Header: Dest. | Source | BSSID */
1030 /* packets to our IBSS update information */ 1030 /* packets to our IBSS update information */
1031 return !compare_ether_addr(header->addr3, priv->bssid); 1031 return !compare_ether_addr(header->addr3, priv->bssid);
1032 case IEEE80211_IF_TYPE_STA: /* Header: Dest. | AP{BSSID} | Source */ 1032 case NL80211_IFTYPE_STATION: /* Header: Dest. | AP{BSSID} | Source */
1033 /* packets to our IBSS update information */ 1033 /* packets to our IBSS update information */
1034 return !compare_ether_addr(header->addr2, priv->bssid); 1034 return !compare_ether_addr(header->addr2, priv->bssid);
1035 default: 1035 default:
@@ -1169,7 +1169,7 @@ void iwl_rx_reply_rx(struct iwl_priv *priv,
1169 rx_status.flag |= RX_FLAG_SHORTPRE; 1169 rx_status.flag |= RX_FLAG_SHORTPRE;
1170 1170
1171 /* Take shortcut when only in monitor mode */ 1171 /* Take shortcut when only in monitor mode */
1172 if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) { 1172 if (priv->iw_mode == NL80211_IFTYPE_MONITOR) {
1173 iwl_pass_packet_to_mac80211(priv, include_phy, 1173 iwl_pass_packet_to_mac80211(priv, include_phy,
1174 rxb, &rx_status); 1174 rxb, &rx_status);
1175 return; 1175 return;
@@ -1186,7 +1186,7 @@ void iwl_rx_reply_rx(struct iwl_priv *priv,
1186 switch (fc & IEEE80211_FCTL_FTYPE) { 1186 switch (fc & IEEE80211_FCTL_FTYPE) {
1187 case IEEE80211_FTYPE_MGMT: 1187 case IEEE80211_FTYPE_MGMT:
1188 case IEEE80211_FTYPE_DATA: 1188 case IEEE80211_FTYPE_DATA:
1189 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) 1189 if (priv->iw_mode == NL80211_IFTYPE_AP)
1190 iwl_update_ps_mode(priv, fc & IEEE80211_FCTL_PM, 1190 iwl_update_ps_mode(priv, fc & IEEE80211_FCTL_PM,
1191 header->addr2); 1191 header->addr2);
1192 /* fall through */ 1192 /* fall through */
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c
index d026aaf62335..09c264be0496 100644
--- a/drivers/net/wireless/iwlwifi/iwl-scan.c
+++ b/drivers/net/wireless/iwlwifi/iwl-scan.c
@@ -463,7 +463,7 @@ void iwl_init_scan_params(struct iwl_priv *priv)
463 463
464int iwl_scan_initiate(struct iwl_priv *priv) 464int iwl_scan_initiate(struct iwl_priv *priv)
465{ 465{
466 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 466 if (priv->iw_mode == NL80211_IFTYPE_AP) {
467 IWL_ERROR("APs don't scan.\n"); 467 IWL_ERROR("APs don't scan.\n");
468 return 0; 468 return 0;
469 } 469 }
@@ -868,7 +868,7 @@ static void iwl_bg_request_scan(struct work_struct *data)
868 868
869 scan->tx_cmd.len = cpu_to_le16(cmd_len); 869 scan->tx_cmd.len = cpu_to_le16(cmd_len);
870 870
871 if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) 871 if (priv->iw_mode == NL80211_IFTYPE_MONITOR)
872 scan->filter_flags = RXON_FILTER_PROMISC_MSK; 872 scan->filter_flags = RXON_FILTER_PROMISC_MSK;
873 873
874 scan->filter_flags |= (RXON_FILTER_ACCEPT_GRP_MSK | 874 scan->filter_flags |= (RXON_FILTER_ACCEPT_GRP_MSK |
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c
index a72569f1acb5..61797f3f8d5c 100644
--- a/drivers/net/wireless/iwlwifi/iwl-sta.c
+++ b/drivers/net/wireless/iwlwifi/iwl-sta.c
@@ -47,8 +47,8 @@ u8 iwl_find_station(struct iwl_priv *priv, const u8 *addr)
47 unsigned long flags; 47 unsigned long flags;
48 DECLARE_MAC_BUF(mac); 48 DECLARE_MAC_BUF(mac);
49 49
50 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) || 50 if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) ||
51 (priv->iw_mode == IEEE80211_IF_TYPE_AP)) 51 (priv->iw_mode == NL80211_IFTYPE_AP))
52 start = IWL_STA_ID; 52 start = IWL_STA_ID;
53 53
54 if (is_broadcast_ether_addr(addr)) 54 if (is_broadcast_ether_addr(addr))
@@ -74,7 +74,7 @@ EXPORT_SYMBOL(iwl_find_station);
74 74
75int iwl_get_ra_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) 75int iwl_get_ra_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
76{ 76{
77 if (priv->iw_mode == IEEE80211_IF_TYPE_STA) { 77 if (priv->iw_mode == NL80211_IFTYPE_STATION) {
78 return IWL_AP_ID; 78 return IWL_AP_ID;
79 } else { 79 } else {
80 u8 *da = ieee80211_get_DA(hdr); 80 u8 *da = ieee80211_get_DA(hdr);
@@ -286,7 +286,7 @@ u8 iwl_add_station_flags(struct iwl_priv *priv, const u8 *addr, int is_ap,
286 286
287 /* BCAST station and IBSS stations do not work in HT mode */ 287 /* BCAST station and IBSS stations do not work in HT mode */
288 if (sta_id != priv->hw_params.bcast_sta_id && 288 if (sta_id != priv->hw_params.bcast_sta_id &&
289 priv->iw_mode != IEEE80211_IF_TYPE_IBSS) 289 priv->iw_mode != NL80211_IFTYPE_ADHOC)
290 iwl_set_ht_add_station(priv, sta_id, ht_info); 290 iwl_set_ht_add_station(priv, sta_id, ht_info);
291 291
292 spin_unlock_irqrestore(&priv->sta_lock, flags_spin); 292 spin_unlock_irqrestore(&priv->sta_lock, flags_spin);
@@ -817,7 +817,7 @@ int iwl_send_lq_cmd(struct iwl_priv *priv,
817 }; 817 };
818 818
819 if ((lq->sta_id == 0xFF) && 819 if ((lq->sta_id == 0xFF) &&
820 (priv->iw_mode == IEEE80211_IF_TYPE_IBSS)) 820 (priv->iw_mode == NL80211_IFTYPE_ADHOC))
821 return -EINVAL; 821 return -EINVAL;
822 822
823 if (lq->sta_id == 0xFF) 823 if (lq->sta_id == 0xFF)
@@ -904,7 +904,7 @@ int iwl_rxon_add_station(struct iwl_priv *priv, const u8 *addr, int is_ap)
904 904
905 if ((is_ap) && 905 if ((is_ap) &&
906 (conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) && 906 (conf->flags & IEEE80211_CONF_SUPPORT_HT_MODE) &&
907 (priv->iw_mode == IEEE80211_IF_TYPE_STA)) 907 (priv->iw_mode == NL80211_IFTYPE_STATION))
908 sta_id = iwl_add_station_flags(priv, addr, is_ap, 908 sta_id = iwl_add_station_flags(priv, addr, is_ap,
909 0, cur_ht_config); 909 0, cur_ht_config);
910 else 910 else
@@ -938,11 +938,11 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
938 938
939 /* If we are a client station in a BSS network, use the special 939 /* If we are a client station in a BSS network, use the special
940 * AP station entry (that's the only station we communicate with) */ 940 * AP station entry (that's the only station we communicate with) */
941 case IEEE80211_IF_TYPE_STA: 941 case NL80211_IFTYPE_STATION:
942 return IWL_AP_ID; 942 return IWL_AP_ID;
943 943
944 /* If we are an AP, then find the station, or use BCAST */ 944 /* If we are an AP, then find the station, or use BCAST */
945 case IEEE80211_IF_TYPE_AP: 945 case NL80211_IFTYPE_AP:
946 sta_id = iwl_find_station(priv, hdr->addr1); 946 sta_id = iwl_find_station(priv, hdr->addr1);
947 if (sta_id != IWL_INVALID_STATION) 947 if (sta_id != IWL_INVALID_STATION)
948 return sta_id; 948 return sta_id;
@@ -950,7 +950,7 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
950 950
951 /* If this frame is going out to an IBSS network, find the station, 951 /* If this frame is going out to an IBSS network, find the station,
952 * or create a new station table entry */ 952 * or create a new station table entry */
953 case IEEE80211_IF_TYPE_IBSS: 953 case NL80211_IFTYPE_ADHOC:
954 sta_id = iwl_find_station(priv, hdr->addr1); 954 sta_id = iwl_find_station(priv, hdr->addr1);
955 if (sta_id != IWL_INVALID_STATION) 955 if (sta_id != IWL_INVALID_STATION)
956 return sta_id; 956 return sta_id;
@@ -970,7 +970,7 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr)
970 970
971 /* If we are in monitor mode, use BCAST. This is required for 971 /* If we are in monitor mode, use BCAST. This is required for
972 * packet injection. */ 972 * packet injection. */
973 case IEEE80211_IF_TYPE_MNTR: 973 case NL80211_IFTYPE_MONITOR:
974 return priv->hw_params.bcast_sta_id; 974 return priv->hw_params.bcast_sta_id;
975 975
976 default: 976 default:
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 9d5bcf46cbe9..e9feca4033f9 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -814,10 +814,10 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
814 814
815 /* drop all data frame if we are not associated */ 815 /* drop all data frame if we are not associated */
816 if (ieee80211_is_data(fc) && 816 if (ieee80211_is_data(fc) &&
817 (priv->iw_mode != IEEE80211_IF_TYPE_MNTR || 817 (priv->iw_mode != NL80211_IFTYPE_MONITOR ||
818 !(info->flags & IEEE80211_TX_CTL_INJECTED)) && /* packet injection */ 818 !(info->flags & IEEE80211_TX_CTL_INJECTED)) && /* packet injection */
819 (!iwl_is_associated(priv) || 819 (!iwl_is_associated(priv) ||
820 ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && !priv->assoc_id) || 820 ((priv->iw_mode == NL80211_IFTYPE_STATION) && !priv->assoc_id) ||
821 !priv->assoc_station_added)) { 821 !priv->assoc_station_added)) {
822 IWL_DEBUG_DROP("Dropping - !iwl_is_associated\n"); 822 IWL_DEBUG_DROP("Dropping - !iwl_is_associated\n");
823 goto drop_unlock; 823 goto drop_unlock;
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c
index cbbe73a12887..e6c6ef6ad62e 100644
--- a/drivers/net/wireless/iwlwifi/iwl3945-base.c
+++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c
@@ -1160,7 +1160,7 @@ static int iwl3945_commit_rxon(struct iwl3945_priv *priv)
1160 /* If we have set the ASSOC_MSK and we are in BSS mode then 1160 /* If we have set the ASSOC_MSK and we are in BSS mode then
1161 * add the IWL_AP_ID to the station rate table */ 1161 * add the IWL_AP_ID to the station rate table */
1162 if (iwl3945_is_associated(priv) && 1162 if (iwl3945_is_associated(priv) &&
1163 (priv->iw_mode == IEEE80211_IF_TYPE_STA)) 1163 (priv->iw_mode == NL80211_IFTYPE_STATION))
1164 if (iwl3945_add_station(priv, priv->active_rxon.bssid_addr, 1, 0) 1164 if (iwl3945_add_station(priv, priv->active_rxon.bssid_addr, 1, 0)
1165 == IWL_INVALID_STATION) { 1165 == IWL_INVALID_STATION) {
1166 IWL_ERROR("Error adding AP address for transmit.\n"); 1166 IWL_ERROR("Error adding AP address for transmit.\n");
@@ -1447,8 +1447,8 @@ unsigned int iwl3945_fill_beacon_frame(struct iwl3945_priv *priv,
1447{ 1447{
1448 1448
1449 if (!iwl3945_is_associated(priv) || !priv->ibss_beacon || 1449 if (!iwl3945_is_associated(priv) || !priv->ibss_beacon ||
1450 ((priv->iw_mode != IEEE80211_IF_TYPE_IBSS) && 1450 ((priv->iw_mode != NL80211_IFTYPE_ADHOC) &&
1451 (priv->iw_mode != IEEE80211_IF_TYPE_AP))) 1451 (priv->iw_mode != NL80211_IFTYPE_AP)))
1452 return 0; 1452 return 0;
1453 1453
1454 if (priv->ibss_beacon->len > left) 1454 if (priv->ibss_beacon->len > left)
@@ -1746,14 +1746,14 @@ static void iwl3945_reset_qos(struct iwl3945_priv *priv)
1746 spin_lock_irqsave(&priv->lock, flags); 1746 spin_lock_irqsave(&priv->lock, flags);
1747 priv->qos_data.qos_active = 0; 1747 priv->qos_data.qos_active = 0;
1748 1748
1749 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) { 1749 if (priv->iw_mode == NL80211_IFTYPE_ADHOC) {
1750 if (priv->qos_data.qos_enable) 1750 if (priv->qos_data.qos_enable)
1751 priv->qos_data.qos_active = 1; 1751 priv->qos_data.qos_active = 1;
1752 if (!(priv->active_rate & 0xfff0)) { 1752 if (!(priv->active_rate & 0xfff0)) {
1753 cw_min = 31; 1753 cw_min = 31;
1754 is_legacy = 1; 1754 is_legacy = 1;
1755 } 1755 }
1756 } else if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 1756 } else if (priv->iw_mode == NL80211_IFTYPE_AP) {
1757 if (priv->qos_data.qos_enable) 1757 if (priv->qos_data.qos_enable)
1758 priv->qos_data.qos_active = 1; 1758 priv->qos_data.qos_active = 1;
1759 } else if (!(priv->staging_rxon.flags & RXON_FLG_SHORT_SLOT_MSK)) { 1759 } else if (!(priv->staging_rxon.flags & RXON_FLG_SHORT_SLOT_MSK)) {
@@ -2120,7 +2120,7 @@ static void iwl3945_setup_rxon_timing(struct iwl3945_priv *priv)
2120 beacon_int = priv->beacon_int; 2120 beacon_int = priv->beacon_int;
2121 spin_unlock_irqrestore(&priv->lock, flags); 2121 spin_unlock_irqrestore(&priv->lock, flags);
2122 2122
2123 if (priv->iw_mode == IEEE80211_IF_TYPE_STA) { 2123 if (priv->iw_mode == NL80211_IFTYPE_STATION) {
2124 if (beacon_int == 0) { 2124 if (beacon_int == 0) {
2125 priv->rxon_timing.beacon_interval = cpu_to_le16(100); 2125 priv->rxon_timing.beacon_interval = cpu_to_le16(100);
2126 priv->rxon_timing.beacon_init_val = cpu_to_le32(102400); 2126 priv->rxon_timing.beacon_init_val = cpu_to_le32(102400);
@@ -2156,7 +2156,7 @@ static void iwl3945_setup_rxon_timing(struct iwl3945_priv *priv)
2156 2156
2157static int iwl3945_scan_initiate(struct iwl3945_priv *priv) 2157static int iwl3945_scan_initiate(struct iwl3945_priv *priv)
2158{ 2158{
2159 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 2159 if (priv->iw_mode == NL80211_IFTYPE_AP) {
2160 IWL_ERROR("APs don't scan.\n"); 2160 IWL_ERROR("APs don't scan.\n");
2161 return 0; 2161 return 0;
2162 } 2162 }
@@ -2218,7 +2218,7 @@ static void iwl3945_set_flags_for_phymode(struct iwl3945_priv *priv,
2218 else 2218 else
2219 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; 2219 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
2220 2220
2221 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) 2221 if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
2222 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; 2222 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
2223 2223
2224 priv->staging_rxon.flags |= RXON_FLG_BAND_24G_MSK; 2224 priv->staging_rxon.flags |= RXON_FLG_BAND_24G_MSK;
@@ -2237,23 +2237,23 @@ static void iwl3945_connection_init_rx_config(struct iwl3945_priv *priv)
2237 memset(&priv->staging_rxon, 0, sizeof(priv->staging_rxon)); 2237 memset(&priv->staging_rxon, 0, sizeof(priv->staging_rxon));
2238 2238
2239 switch (priv->iw_mode) { 2239 switch (priv->iw_mode) {
2240 case IEEE80211_IF_TYPE_AP: 2240 case NL80211_IFTYPE_AP:
2241 priv->staging_rxon.dev_type = RXON_DEV_TYPE_AP; 2241 priv->staging_rxon.dev_type = RXON_DEV_TYPE_AP;
2242 break; 2242 break;
2243 2243
2244 case IEEE80211_IF_TYPE_STA: 2244 case NL80211_IFTYPE_STATION:
2245 priv->staging_rxon.dev_type = RXON_DEV_TYPE_ESS; 2245 priv->staging_rxon.dev_type = RXON_DEV_TYPE_ESS;
2246 priv->staging_rxon.filter_flags = RXON_FILTER_ACCEPT_GRP_MSK; 2246 priv->staging_rxon.filter_flags = RXON_FILTER_ACCEPT_GRP_MSK;
2247 break; 2247 break;
2248 2248
2249 case IEEE80211_IF_TYPE_IBSS: 2249 case NL80211_IFTYPE_ADHOC:
2250 priv->staging_rxon.dev_type = RXON_DEV_TYPE_IBSS; 2250 priv->staging_rxon.dev_type = RXON_DEV_TYPE_IBSS;
2251 priv->staging_rxon.flags = RXON_FLG_SHORT_PREAMBLE_MSK; 2251 priv->staging_rxon.flags = RXON_FLG_SHORT_PREAMBLE_MSK;
2252 priv->staging_rxon.filter_flags = RXON_FILTER_BCON_AWARE_MSK | 2252 priv->staging_rxon.filter_flags = RXON_FILTER_BCON_AWARE_MSK |
2253 RXON_FILTER_ACCEPT_GRP_MSK; 2253 RXON_FILTER_ACCEPT_GRP_MSK;
2254 break; 2254 break;
2255 2255
2256 case IEEE80211_IF_TYPE_MNTR: 2256 case NL80211_IFTYPE_MONITOR:
2257 priv->staging_rxon.dev_type = RXON_DEV_TYPE_SNIFFER; 2257 priv->staging_rxon.dev_type = RXON_DEV_TYPE_SNIFFER;
2258 priv->staging_rxon.filter_flags = RXON_FILTER_PROMISC_MSK | 2258 priv->staging_rxon.filter_flags = RXON_FILTER_PROMISC_MSK |
2259 RXON_FILTER_CTL2HOST_MSK | RXON_FILTER_ACCEPT_GRP_MSK; 2259 RXON_FILTER_CTL2HOST_MSK | RXON_FILTER_ACCEPT_GRP_MSK;
@@ -2282,7 +2282,7 @@ static void iwl3945_connection_init_rx_config(struct iwl3945_priv *priv)
2282 * in some case A channels are all non IBSS 2282 * in some case A channels are all non IBSS
2283 * in this case force B/G channel 2283 * in this case force B/G channel
2284 */ 2284 */
2285 if ((priv->iw_mode == IEEE80211_IF_TYPE_IBSS) && 2285 if ((priv->iw_mode == NL80211_IFTYPE_ADHOC) &&
2286 !(is_channel_ibss(ch_info))) 2286 !(is_channel_ibss(ch_info)))
2287 ch_info = &priv->channel_info[0]; 2287 ch_info = &priv->channel_info[0];
2288 2288
@@ -2302,7 +2302,7 @@ static void iwl3945_connection_init_rx_config(struct iwl3945_priv *priv)
2302 2302
2303static int iwl3945_set_mode(struct iwl3945_priv *priv, int mode) 2303static int iwl3945_set_mode(struct iwl3945_priv *priv, int mode)
2304{ 2304{
2305 if (mode == IEEE80211_IF_TYPE_IBSS) { 2305 if (mode == NL80211_IFTYPE_ADHOC) {
2306 const struct iwl3945_channel_info *ch_info; 2306 const struct iwl3945_channel_info *ch_info;
2307 2307
2308 ch_info = iwl3945_get_channel_info(priv, 2308 ch_info = iwl3945_get_channel_info(priv,
@@ -2469,11 +2469,11 @@ static int iwl3945_get_sta_id(struct iwl3945_priv *priv, struct ieee80211_hdr *h
2469 2469
2470 /* If we are a client station in a BSS network, use the special 2470 /* If we are a client station in a BSS network, use the special
2471 * AP station entry (that's the only station we communicate with) */ 2471 * AP station entry (that's the only station we communicate with) */
2472 case IEEE80211_IF_TYPE_STA: 2472 case NL80211_IFTYPE_STATION:
2473 return IWL_AP_ID; 2473 return IWL_AP_ID;
2474 2474
2475 /* If we are an AP, then find the station, or use BCAST */ 2475 /* If we are an AP, then find the station, or use BCAST */
2476 case IEEE80211_IF_TYPE_AP: 2476 case NL80211_IFTYPE_AP:
2477 sta_id = iwl3945_hw_find_station(priv, hdr->addr1); 2477 sta_id = iwl3945_hw_find_station(priv, hdr->addr1);
2478 if (sta_id != IWL_INVALID_STATION) 2478 if (sta_id != IWL_INVALID_STATION)
2479 return sta_id; 2479 return sta_id;
@@ -2481,7 +2481,7 @@ static int iwl3945_get_sta_id(struct iwl3945_priv *priv, struct ieee80211_hdr *h
2481 2481
2482 /* If this frame is going out to an IBSS network, find the station, 2482 /* If this frame is going out to an IBSS network, find the station,
2483 * or create a new station table entry */ 2483 * or create a new station table entry */
2484 case IEEE80211_IF_TYPE_IBSS: { 2484 case NL80211_IFTYPE_ADHOC: {
2485 DECLARE_MAC_BUF(mac); 2485 DECLARE_MAC_BUF(mac);
2486 2486
2487 /* Create new station table entry */ 2487 /* Create new station table entry */
@@ -2502,7 +2502,7 @@ static int iwl3945_get_sta_id(struct iwl3945_priv *priv, struct ieee80211_hdr *h
2502 } 2502 }
2503 /* If we are in monitor mode, use BCAST. This is required for 2503 /* If we are in monitor mode, use BCAST. This is required for
2504 * packet injection. */ 2504 * packet injection. */
2505 case IEEE80211_IF_TYPE_MNTR: 2505 case NL80211_IFTYPE_MONITOR:
2506 return priv->hw_setting.bcast_sta_id; 2506 return priv->hw_setting.bcast_sta_id;
2507 2507
2508 default: 2508 default:
@@ -2565,9 +2565,9 @@ static int iwl3945_tx_skb(struct iwl3945_priv *priv, struct sk_buff *skb)
2565 2565
2566 /* drop all data frame if we are not associated */ 2566 /* drop all data frame if we are not associated */
2567 if (ieee80211_is_data(fc) && 2567 if (ieee80211_is_data(fc) &&
2568 (priv->iw_mode != IEEE80211_IF_TYPE_MNTR) && /* packet injection */ 2568 (priv->iw_mode != NL80211_IFTYPE_MONITOR) && /* packet injection */
2569 (!iwl3945_is_associated(priv) || 2569 (!iwl3945_is_associated(priv) ||
2570 ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && !priv->assoc_id))) { 2570 ((priv->iw_mode == NL80211_IFTYPE_STATION) && !priv->assoc_id))) {
2571 IWL_DEBUG_DROP("Dropping - !iwl3945_is_associated\n"); 2571 IWL_DEBUG_DROP("Dropping - !iwl3945_is_associated\n");
2572 goto drop_unlock; 2572 goto drop_unlock;
2573 } 2573 }
@@ -2806,7 +2806,7 @@ static void iwl3945_radio_kill_sw(struct iwl3945_priv *priv, int disable_radio)
2806 if (disable_radio) { 2806 if (disable_radio) {
2807 iwl3945_scan_cancel(priv); 2807 iwl3945_scan_cancel(priv);
2808 /* FIXME: This is a workaround for AP */ 2808 /* FIXME: This is a workaround for AP */
2809 if (priv->iw_mode != IEEE80211_IF_TYPE_AP) { 2809 if (priv->iw_mode != NL80211_IFTYPE_AP) {
2810 spin_lock_irqsave(&priv->lock, flags); 2810 spin_lock_irqsave(&priv->lock, flags);
2811 iwl3945_write32(priv, CSR_UCODE_DRV_GP1_SET, 2811 iwl3945_write32(priv, CSR_UCODE_DRV_GP1_SET,
2812 CSR_UCODE_SW_BIT_RFKILL); 2812 CSR_UCODE_SW_BIT_RFKILL);
@@ -3161,7 +3161,7 @@ static void iwl3945_rx_beacon_notif(struct iwl3945_priv *priv,
3161 le32_to_cpu(beacon->low_tsf), rate); 3161 le32_to_cpu(beacon->low_tsf), rate);
3162#endif 3162#endif
3163 3163
3164 if ((priv->iw_mode == IEEE80211_IF_TYPE_AP) && 3164 if ((priv->iw_mode == NL80211_IFTYPE_AP) &&
3165 (!test_bit(STATUS_EXIT_PENDING, &priv->status))) 3165 (!test_bit(STATUS_EXIT_PENDING, &priv->status)))
3166 queue_work(priv->workqueue, &priv->beacon_update); 3166 queue_work(priv->workqueue, &priv->beacon_update);
3167} 3167}
@@ -6059,7 +6059,7 @@ static void iwl3945_bg_set_monitor(struct work_struct *work)
6059 if (!iwl3945_is_ready(priv)) 6059 if (!iwl3945_is_ready(priv))
6060 IWL_DEBUG(IWL_DL_STATE, "leave - not ready\n"); 6060 IWL_DEBUG(IWL_DL_STATE, "leave - not ready\n");
6061 else 6061 else
6062 if (iwl3945_set_mode(priv, IEEE80211_IF_TYPE_MNTR) != 0) 6062 if (iwl3945_set_mode(priv, NL80211_IFTYPE_MONITOR) != 0)
6063 IWL_ERROR("iwl3945_set_mode() failed\n"); 6063 IWL_ERROR("iwl3945_set_mode() failed\n");
6064 6064
6065 mutex_unlock(&priv->mutex); 6065 mutex_unlock(&priv->mutex);
@@ -6248,7 +6248,7 @@ static void iwl3945_bg_request_scan(struct work_struct *data)
6248 /* select Rx antennas */ 6248 /* select Rx antennas */
6249 scan->flags |= iwl3945_get_antenna_flags(priv); 6249 scan->flags |= iwl3945_get_antenna_flags(priv);
6250 6250
6251 if (priv->iw_mode == IEEE80211_IF_TYPE_MNTR) 6251 if (priv->iw_mode == NL80211_IFTYPE_MONITOR)
6252 scan->filter_flags = RXON_FILTER_PROMISC_MSK; 6252 scan->filter_flags = RXON_FILTER_PROMISC_MSK;
6253 6253
6254 scan->channel_count = 6254 scan->channel_count =
@@ -6323,7 +6323,7 @@ static void iwl3945_post_associate(struct iwl3945_priv *priv)
6323 struct ieee80211_conf *conf = NULL; 6323 struct ieee80211_conf *conf = NULL;
6324 DECLARE_MAC_BUF(mac); 6324 DECLARE_MAC_BUF(mac);
6325 6325
6326 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 6326 if (priv->iw_mode == NL80211_IFTYPE_AP) {
6327 IWL_ERROR("%s Should not be called in AP mode\n", __func__); 6327 IWL_ERROR("%s Should not be called in AP mode\n", __func__);
6328 return; 6328 return;
6329 } 6329 }
@@ -6372,7 +6372,7 @@ static void iwl3945_post_associate(struct iwl3945_priv *priv)
6372 else 6372 else
6373 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; 6373 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
6374 6374
6375 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) 6375 if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
6376 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK; 6376 priv->staging_rxon.flags &= ~RXON_FLG_SHORT_SLOT_MSK;
6377 6377
6378 } 6378 }
@@ -6380,11 +6380,11 @@ static void iwl3945_post_associate(struct iwl3945_priv *priv)
6380 iwl3945_commit_rxon(priv); 6380 iwl3945_commit_rxon(priv);
6381 6381
6382 switch (priv->iw_mode) { 6382 switch (priv->iw_mode) {
6383 case IEEE80211_IF_TYPE_STA: 6383 case NL80211_IFTYPE_STATION:
6384 iwl3945_rate_scale_init(priv->hw, IWL_AP_ID); 6384 iwl3945_rate_scale_init(priv->hw, IWL_AP_ID);
6385 break; 6385 break;
6386 6386
6387 case IEEE80211_IF_TYPE_IBSS: 6387 case NL80211_IFTYPE_ADHOC:
6388 6388
6389 /* clear out the station table */ 6389 /* clear out the station table */
6390 iwl3945_clear_stations_table(priv); 6390 iwl3945_clear_stations_table(priv);
@@ -6754,7 +6754,7 @@ static void iwl3945_config_ap(struct iwl3945_priv *priv)
6754 priv->staging_rxon.flags &= 6754 priv->staging_rxon.flags &=
6755 ~RXON_FLG_SHORT_SLOT_MSK; 6755 ~RXON_FLG_SHORT_SLOT_MSK;
6756 6756
6757 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS) 6757 if (priv->iw_mode == NL80211_IFTYPE_ADHOC)
6758 priv->staging_rxon.flags &= 6758 priv->staging_rxon.flags &=
6759 ~RXON_FLG_SHORT_SLOT_MSK; 6759 ~RXON_FLG_SHORT_SLOT_MSK;
6760 } 6760 }
@@ -6791,7 +6791,7 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw,
6791 } 6791 }
6792 6792
6793 /* handle this temporarily here */ 6793 /* handle this temporarily here */
6794 if (priv->iw_mode == IEEE80211_IF_TYPE_IBSS && 6794 if (priv->iw_mode == NL80211_IFTYPE_ADHOC &&
6795 conf->changed & IEEE80211_IFCC_BEACON) { 6795 conf->changed & IEEE80211_IFCC_BEACON) {
6796 struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); 6796 struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
6797 if (!beacon) 6797 if (!beacon)
@@ -6803,7 +6803,7 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw,
6803 6803
6804 /* XXX: this MUST use conf->mac_addr */ 6804 /* XXX: this MUST use conf->mac_addr */
6805 6805
6806 if ((priv->iw_mode == IEEE80211_IF_TYPE_AP) && 6806 if ((priv->iw_mode == NL80211_IFTYPE_AP) &&
6807 (!conf->ssid_len)) { 6807 (!conf->ssid_len)) {
6808 IWL_DEBUG_MAC80211 6808 IWL_DEBUG_MAC80211
6809 ("Leaving in AP mode because HostAPD is not ready.\n"); 6809 ("Leaving in AP mode because HostAPD is not ready.\n");
@@ -6826,7 +6826,7 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw,
6826 !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) { 6826 !(priv->hw->flags & IEEE80211_HW_NO_PROBE_FILTERING)) {
6827 */ 6827 */
6828 6828
6829 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { 6829 if (priv->iw_mode == NL80211_IFTYPE_AP) {
6830 if (!conf->bssid) { 6830 if (!conf->bssid) {
6831 conf->bssid = priv->mac_addr; 6831 conf->bssid = priv->mac_addr;
6832 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN); 6832 memcpy(priv->bssid, priv->mac_addr, ETH_ALEN);
@@ -6861,11 +6861,11 @@ static int iwl3945_mac_config_interface(struct ieee80211_hw *hw,
6861 * to verify) - jpk */ 6861 * to verify) - jpk */
6862 memcpy(priv->bssid, conf->bssid, ETH_ALEN); 6862 memcpy(priv->bssid, conf->bssid, ETH_ALEN);
6863 6863
6864 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) 6864 if (priv->iw_mode == NL80211_IFTYPE_AP)
6865 iwl3945_config_ap(priv); 6865 iwl3945_config_ap(priv);
6866 else { 6866 else {
6867 rc = iwl3945_commit_rxon(priv); 6867 rc = iwl3945_commit_rxon(priv);
6868 if ((priv->iw_mode == IEEE80211_IF_TYPE_STA) && rc) 6868 if ((priv->iw_mode == NL80211_IFTYPE_STATION) && rc)
6869 iwl3945_add_station(priv, 6869 iwl3945_add_station(priv,
6870 priv->active_rxon.bssid_addr, 1, 0); 6870 priv->active_rxon.bssid_addr, 1, 0);
6871 } 6871 }
@@ -6901,7 +6901,7 @@ static void iwl3945_configure_filter(struct ieee80211_hw *hw,
6901 6901
6902 if (changed_flags & (*total_flags) & FIF_OTHER_BSS) { 6902 if (changed_flags & (*total_flags) & FIF_OTHER_BSS) {
6903 IWL_DEBUG_MAC80211("Enter: type %d (0x%x, 0x%x)\n", 6903 IWL_DEBUG_MAC80211("Enter: type %d (0x%x, 0x%x)\n",
6904 IEEE80211_IF_TYPE_MNTR, 6904 NL80211_IFTYPE_MONITOR,
6905 changed_flags, *total_flags); 6905 changed_flags, *total_flags);
6906 /* queue work 'cuz mac80211 is holding a lock which 6906 /* queue work 'cuz mac80211 is holding a lock which
6907 * prevents us from issuing (synchronous) f/w cmds */ 6907 * prevents us from issuing (synchronous) f/w cmds */
@@ -7010,7 +7010,7 @@ static int iwl3945_mac_hw_scan(struct ieee80211_hw *hw, u8 *ssid, size_t len)
7010 goto out_unlock; 7010 goto out_unlock;
7011 } 7011 }
7012 7012
7013 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) { /* APs don't scan */ 7013 if (priv->iw_mode == NL80211_IFTYPE_AP) { /* APs don't scan */
7014 rc = -EIO; 7014 rc = -EIO;
7015 IWL_ERROR("ERROR: APs don't scan\n"); 7015 IWL_ERROR("ERROR: APs don't scan\n");
7016 goto out_unlock; 7016 goto out_unlock;
@@ -7152,7 +7152,7 @@ static int iwl3945_mac_conf_tx(struct ieee80211_hw *hw, u16 queue,
7152 spin_unlock_irqrestore(&priv->lock, flags); 7152 spin_unlock_irqrestore(&priv->lock, flags);
7153 7153
7154 mutex_lock(&priv->mutex); 7154 mutex_lock(&priv->mutex);
7155 if (priv->iw_mode == IEEE80211_IF_TYPE_AP) 7155 if (priv->iw_mode == NL80211_IFTYPE_AP)
7156 iwl3945_activate_qos(priv, 1); 7156 iwl3945_activate_qos(priv, 1);
7157 else if (priv->assoc_id && iwl3945_is_associated(priv)) 7157 else if (priv->assoc_id && iwl3945_is_associated(priv))
7158 iwl3945_activate_qos(priv, 0); 7158 iwl3945_activate_qos(priv, 0);
@@ -7239,7 +7239,7 @@ static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw)
7239 priv->beacon_int = priv->hw->conf.beacon_int; 7239 priv->beacon_int = priv->hw->conf.beacon_int;
7240 priv->timestamp1 = 0; 7240 priv->timestamp1 = 0;
7241 priv->timestamp0 = 0; 7241 priv->timestamp0 = 0;
7242 if ((priv->iw_mode == IEEE80211_IF_TYPE_STA)) 7242 if ((priv->iw_mode == NL80211_IFTYPE_STATION))
7243 priv->beacon_int = 0; 7243 priv->beacon_int = 0;
7244 7244
7245 spin_unlock_irqrestore(&priv->lock, flags); 7245 spin_unlock_irqrestore(&priv->lock, flags);
@@ -7253,14 +7253,14 @@ static void iwl3945_mac_reset_tsf(struct ieee80211_hw *hw)
7253 /* we are restarting association process 7253 /* we are restarting association process
7254 * clear RXON_FILTER_ASSOC_MSK bit 7254 * clear RXON_FILTER_ASSOC_MSK bit
7255 */ 7255 */
7256 if (priv->iw_mode != IEEE80211_IF_TYPE_AP) { 7256 if (priv->iw_mode != NL80211_IFTYPE_AP) {
7257 iwl3945_scan_cancel_timeout(priv, 100); 7257 iwl3945_scan_cancel_timeout(priv, 100);
7258 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK; 7258 priv->staging_rxon.filter_flags &= ~RXON_FILTER_ASSOC_MSK;
7259 iwl3945_commit_rxon(priv); 7259 iwl3945_commit_rxon(priv);
7260 } 7260 }
7261 7261
7262 /* Per mac80211.h: This is only used in IBSS mode... */ 7262 /* Per mac80211.h: This is only used in IBSS mode... */
7263 if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) { 7263 if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
7264 7264
7265 IWL_DEBUG_MAC80211("leave - not in IBSS\n"); 7265 IWL_DEBUG_MAC80211("leave - not in IBSS\n");
7266 mutex_unlock(&priv->mutex); 7266 mutex_unlock(&priv->mutex);
@@ -7289,7 +7289,7 @@ static int iwl3945_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk
7289 return -EIO; 7289 return -EIO;
7290 } 7290 }
7291 7291
7292 if (priv->iw_mode != IEEE80211_IF_TYPE_IBSS) { 7292 if (priv->iw_mode != NL80211_IFTYPE_ADHOC) {
7293 IWL_DEBUG_MAC80211("leave - not IBSS\n"); 7293 IWL_DEBUG_MAC80211("leave - not IBSS\n");
7294 mutex_unlock(&priv->mutex); 7294 mutex_unlock(&priv->mutex);
7295 return -EIO; 7295 return -EIO;
@@ -7996,7 +7996,7 @@ static int iwl3945_pci_probe(struct pci_dev *pdev, const struct pci_device_id *e
7996 IWL_DEBUG_INFO("Radio disabled.\n"); 7996 IWL_DEBUG_INFO("Radio disabled.\n");
7997 } 7997 }
7998 7998
7999 priv->iw_mode = IEEE80211_IF_TYPE_STA; 7999 priv->iw_mode = NL80211_IFTYPE_STATION;
8000 8000
8001 printk(KERN_INFO DRV_NAME 8001 printk(KERN_INFO DRV_NAME
8002 ": Detected Intel Wireless WiFi Link %s\n", priv->cfg->name); 8002 ": Detected Intel Wireless WiFi Link %s\n", priv->cfg->name);
diff --git a/drivers/net/wireless/libertas_tf/main.c b/drivers/net/wireless/libertas_tf/main.c
index c948021bff6a..feff945ad856 100644
--- a/drivers/net/wireless/libertas_tf/main.c
+++ b/drivers/net/wireless/libertas_tf/main.c
@@ -219,7 +219,7 @@ static void lbtf_tx_work(struct work_struct *work)
219 struct sk_buff *skb = NULL; 219 struct sk_buff *skb = NULL;
220 int err; 220 int err;
221 221
222 if ((priv->vif->type == IEEE80211_IF_TYPE_AP) && 222 if ((priv->vif->type == NL80211_IFTYPE_AP) &&
223 (!skb_queue_empty(&priv->bc_ps_buf))) 223 (!skb_queue_empty(&priv->bc_ps_buf)))
224 skb = skb_dequeue(&priv->bc_ps_buf); 224 skb = skb_dequeue(&priv->bc_ps_buf);
225 else if (priv->skb_to_tx) { 225 else if (priv->skb_to_tx) {
@@ -326,11 +326,11 @@ static int lbtf_op_add_interface(struct ieee80211_hw *hw,
326 326
327 priv->vif = conf->vif; 327 priv->vif = conf->vif;
328 switch (conf->type) { 328 switch (conf->type) {
329 case IEEE80211_IF_TYPE_MESH_POINT: 329 case NL80211_IFTYPE_MESH_POINT:
330 case IEEE80211_IF_TYPE_AP: 330 case NL80211_IFTYPE_AP:
331 lbtf_set_mode(priv, LBTF_AP_MODE); 331 lbtf_set_mode(priv, LBTF_AP_MODE);
332 break; 332 break;
333 case IEEE80211_IF_TYPE_STA: 333 case NL80211_IFTYPE_STATION:
334 lbtf_set_mode(priv, LBTF_STA_MODE); 334 lbtf_set_mode(priv, LBTF_STA_MODE);
335 break; 335 break;
336 default: 336 default:
@@ -346,8 +346,8 @@ static void lbtf_op_remove_interface(struct ieee80211_hw *hw,
346{ 346{
347 struct lbtf_private *priv = hw->priv; 347 struct lbtf_private *priv = hw->priv;
348 348
349 if (priv->vif->type == IEEE80211_IF_TYPE_AP || 349 if (priv->vif->type == NL80211_IFTYPE_AP ||
350 priv->vif->type == IEEE80211_IF_TYPE_MESH_POINT) 350 priv->vif->type == NL80211_IFTYPE_MESH_POINT)
351 lbtf_beacon_ctrl(priv, 0, 0); 351 lbtf_beacon_ctrl(priv, 0, 0);
352 lbtf_set_mode(priv, LBTF_PASSIVE_MODE); 352 lbtf_set_mode(priv, LBTF_PASSIVE_MODE);
353 lbtf_set_bssid(priv, 0, NULL); 353 lbtf_set_bssid(priv, 0, NULL);
@@ -372,8 +372,8 @@ static int lbtf_op_config_interface(struct ieee80211_hw *hw,
372 struct sk_buff *beacon; 372 struct sk_buff *beacon;
373 373
374 switch (priv->vif->type) { 374 switch (priv->vif->type) {
375 case IEEE80211_IF_TYPE_AP: 375 case NL80211_IFTYPE_AP:
376 case IEEE80211_IF_TYPE_MESH_POINT: 376 case NL80211_IFTYPE_MESH_POINT:
377 beacon = ieee80211_beacon_get(hw, vif); 377 beacon = ieee80211_beacon_get(hw, vif);
378 if (beacon) { 378 if (beacon) {
379 lbtf_beacon_set(priv, beacon); 379 lbtf_beacon_set(priv, beacon);
@@ -614,7 +614,7 @@ void lbtf_bcn_sent(struct lbtf_private *priv)
614{ 614{
615 struct sk_buff *skb = NULL; 615 struct sk_buff *skb = NULL;
616 616
617 if (priv->vif->type != IEEE80211_IF_TYPE_AP) 617 if (priv->vif->type != NL80211_IFTYPE_AP)
618 return; 618 return;
619 619
620 if (skb_queue_empty(&priv->bc_ps_buf)) { 620 if (skb_queue_empty(&priv->bc_ps_buf)) {
diff --git a/drivers/net/wireless/mac80211_hwsim.c b/drivers/net/wireless/mac80211_hwsim.c
index 6ba50f087f7b..e855211a90f8 100644
--- a/drivers/net/wireless/mac80211_hwsim.c
+++ b/drivers/net/wireless/mac80211_hwsim.c
@@ -267,7 +267,7 @@ static void mac80211_hwsim_beacon_tx(void *arg, u8 *mac,
267 struct sk_buff *skb; 267 struct sk_buff *skb;
268 struct ieee80211_tx_info *info; 268 struct ieee80211_tx_info *info;
269 269
270 if (vif->type != IEEE80211_IF_TYPE_AP) 270 if (vif->type != NL80211_IFTYPE_AP)
271 return; 271 return;
272 272
273 skb = ieee80211_beacon_get(hw, vif); 273 skb = ieee80211_beacon_get(hw, vif);
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c
index da51786254dc..bac58ed03e5c 100644
--- a/drivers/net/wireless/p54/p54common.c
+++ b/drivers/net/wireless/p54/p54common.c
@@ -1139,7 +1139,7 @@ static int p54_start(struct ieee80211_hw *dev)
1139 1139
1140 err = priv->open(dev); 1140 err = priv->open(dev);
1141 if (!err) 1141 if (!err)
1142 priv->mode = IEEE80211_IF_TYPE_MNTR; 1142 priv->mode = NL80211_IFTYPE_MONITOR;
1143 1143
1144 p54_init_vdcf(dev); 1144 p54_init_vdcf(dev);
1145 1145
@@ -1157,7 +1157,7 @@ static void p54_stop(struct ieee80211_hw *dev)
1157 kfree_skb(skb); 1157 kfree_skb(skb);
1158 priv->stop(dev); 1158 priv->stop(dev);
1159 priv->tsf_high32 = priv->tsf_low32 = 0; 1159 priv->tsf_high32 = priv->tsf_low32 = 0;
1160 priv->mode = IEEE80211_IF_TYPE_INVALID; 1160 priv->mode = NL80211_IFTYPE_UNSPECIFIED;
1161} 1161}
1162 1162
1163static int p54_add_interface(struct ieee80211_hw *dev, 1163static int p54_add_interface(struct ieee80211_hw *dev,
@@ -1165,11 +1165,11 @@ static int p54_add_interface(struct ieee80211_hw *dev,
1165{ 1165{
1166 struct p54_common *priv = dev->priv; 1166 struct p54_common *priv = dev->priv;
1167 1167
1168 if (priv->mode != IEEE80211_IF_TYPE_MNTR) 1168 if (priv->mode != NL80211_IFTYPE_MONITOR)
1169 return -EOPNOTSUPP; 1169 return -EOPNOTSUPP;
1170 1170
1171 switch (conf->type) { 1171 switch (conf->type) {
1172 case IEEE80211_IF_TYPE_STA: 1172 case NL80211_IFTYPE_STATION:
1173 priv->mode = conf->type; 1173 priv->mode = conf->type;
1174 break; 1174 break;
1175 default: 1175 default:
@@ -1181,7 +1181,7 @@ static int p54_add_interface(struct ieee80211_hw *dev,
1181 p54_set_filter(dev, 0, NULL); 1181 p54_set_filter(dev, 0, NULL);
1182 1182
1183 switch (conf->type) { 1183 switch (conf->type) {
1184 case IEEE80211_IF_TYPE_STA: 1184 case NL80211_IFTYPE_STATION:
1185 p54_set_filter(dev, 1, NULL); 1185 p54_set_filter(dev, 1, NULL);
1186 break; 1186 break;
1187 default: 1187 default:
@@ -1198,7 +1198,7 @@ static void p54_remove_interface(struct ieee80211_hw *dev,
1198 struct ieee80211_if_init_conf *conf) 1198 struct ieee80211_if_init_conf *conf)
1199{ 1199{
1200 struct p54_common *priv = dev->priv; 1200 struct p54_common *priv = dev->priv;
1201 priv->mode = IEEE80211_IF_TYPE_MNTR; 1201 priv->mode = NL80211_IFTYPE_MONITOR;
1202 memset(priv->mac_addr, 0, ETH_ALEN); 1202 memset(priv->mac_addr, 0, ETH_ALEN);
1203 p54_set_filter(dev, 0, NULL); 1203 p54_set_filter(dev, 0, NULL);
1204} 1204}
@@ -1380,7 +1380,7 @@ struct ieee80211_hw *p54_init_common(size_t priv_data_len)
1380 return NULL; 1380 return NULL;
1381 1381
1382 priv = dev->priv; 1382 priv = dev->priv;
1383 priv->mode = IEEE80211_IF_TYPE_INVALID; 1383 priv->mode = NL80211_IFTYPE_UNSPECIFIED;
1384 skb_queue_head_init(&priv->tx_queue); 1384 skb_queue_head_init(&priv->tx_queue);
1385 dev->flags = IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING | /* not sure */ 1385 dev->flags = IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING | /* not sure */
1386 IEEE80211_HW_RX_INCLUDES_FCS | 1386 IEEE80211_HW_RX_INCLUDES_FCS |
diff --git a/drivers/net/wireless/p54/p54pci.c b/drivers/net/wireless/p54/p54pci.c
index 1594786205f8..1c2a02a741af 100644
--- a/drivers/net/wireless/p54/p54pci.c
+++ b/drivers/net/wireless/p54/p54pci.c
@@ -616,7 +616,7 @@ static int p54p_suspend(struct pci_dev *pdev, pm_message_t state)
616 struct ieee80211_hw *dev = pci_get_drvdata(pdev); 616 struct ieee80211_hw *dev = pci_get_drvdata(pdev);
617 struct p54p_priv *priv = dev->priv; 617 struct p54p_priv *priv = dev->priv;
618 618
619 if (priv->common.mode != IEEE80211_IF_TYPE_INVALID) { 619 if (priv->common.mode != NL80211_IFTYPE_UNSPECIFIED) {
620 ieee80211_stop_queues(dev); 620 ieee80211_stop_queues(dev);
621 p54p_stop(dev); 621 p54p_stop(dev);
622 } 622 }
@@ -634,7 +634,7 @@ static int p54p_resume(struct pci_dev *pdev)
634 pci_set_power_state(pdev, PCI_D0); 634 pci_set_power_state(pdev, PCI_D0);
635 pci_restore_state(pdev); 635 pci_restore_state(pdev);
636 636
637 if (priv->common.mode != IEEE80211_IF_TYPE_INVALID) { 637 if (priv->common.mode != NL80211_IFTYPE_UNSPECIFIED) {
638 p54p_open(dev); 638 p54p_open(dev);
639 ieee80211_wake_queues(dev); 639 ieee80211_wake_queues(dev);
640 } 640 }
diff --git a/drivers/net/wireless/rt2x00/rt2500usb.c b/drivers/net/wireless/rt2x00/rt2500usb.c
index cb5f2d01a9c3..d3bf7bba611a 100644
--- a/drivers/net/wireless/rt2x00/rt2500usb.c
+++ b/drivers/net/wireless/rt2x00/rt2500usb.c
@@ -384,7 +384,7 @@ static void rt2500usb_config_intf(struct rt2x00_dev *rt2x00dev,
384 rt2500usb_register_read(rt2x00dev, TXRX_CSR20, &reg); 384 rt2500usb_register_read(rt2x00dev, TXRX_CSR20, &reg);
385 rt2x00_set_field16(&reg, TXRX_CSR20_OFFSET, bcn_preload >> 6); 385 rt2x00_set_field16(&reg, TXRX_CSR20_OFFSET, bcn_preload >> 6);
386 rt2x00_set_field16(&reg, TXRX_CSR20_BCN_EXPECT_WINDOW, 386 rt2x00_set_field16(&reg, TXRX_CSR20_BCN_EXPECT_WINDOW,
387 2 * (conf->type != IEEE80211_IF_TYPE_STA)); 387 2 * (conf->type != NL80211_IFTYPE_STATION));
388 rt2500usb_register_write(rt2x00dev, TXRX_CSR20, reg); 388 rt2500usb_register_write(rt2x00dev, TXRX_CSR20, reg);
389 389
390 /* 390 /*
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h
index 6f296cef76ad..1359a3768404 100644
--- a/drivers/net/wireless/rt2x00/rt2x00.h
+++ b/drivers/net/wireless/rt2x00/rt2x00.h
@@ -483,7 +483,7 @@ struct rt2x00intf_conf {
483 /* 483 /*
484 * Interface type 484 * Interface type
485 */ 485 */
486 enum ieee80211_if_types type; 486 enum nl80211_iftype type;
487 487
488 /* 488 /*
489 * TSF sync value, this is dependant on the operation type. 489 * TSF sync value, this is dependant on the operation type.
diff --git a/drivers/net/wireless/rt2x00/rt2x00config.c b/drivers/net/wireless/rt2x00/rt2x00config.c
index ca051f50ef10..4d5e87b015a0 100644
--- a/drivers/net/wireless/rt2x00/rt2x00config.c
+++ b/drivers/net/wireless/rt2x00/rt2x00config.c
@@ -31,7 +31,7 @@
31 31
32void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, 32void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev,
33 struct rt2x00_intf *intf, 33 struct rt2x00_intf *intf,
34 enum ieee80211_if_types type, 34 enum nl80211_iftype type,
35 u8 *mac, u8 *bssid) 35 u8 *mac, u8 *bssid)
36{ 36{
37 struct rt2x00intf_conf conf; 37 struct rt2x00intf_conf conf;
@@ -40,11 +40,11 @@ void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev,
40 conf.type = type; 40 conf.type = type;
41 41
42 switch (type) { 42 switch (type) {
43 case IEEE80211_IF_TYPE_IBSS: 43 case NL80211_IFTYPE_ADHOC:
44 case IEEE80211_IF_TYPE_AP: 44 case NL80211_IFTYPE_AP:
45 conf.sync = TSF_SYNC_BEACON; 45 conf.sync = TSF_SYNC_BEACON;
46 break; 46 break;
47 case IEEE80211_IF_TYPE_STA: 47 case NL80211_IFTYPE_STATION:
48 conf.sync = TSF_SYNC_INFRA; 48 conf.sync = TSF_SYNC_INFRA;
49 break; 49 break;
50 default: 50 default:
diff --git a/drivers/net/wireless/rt2x00/rt2x00dev.c b/drivers/net/wireless/rt2x00/rt2x00dev.c
index 2f3bfc606880..86840e3585e8 100644
--- a/drivers/net/wireless/rt2x00/rt2x00dev.c
+++ b/drivers/net/wireless/rt2x00/rt2x00dev.c
@@ -467,8 +467,8 @@ static void rt2x00lib_beacondone_iter(void *data, u8 *mac,
467 struct rt2x00_dev *rt2x00dev = data; 467 struct rt2x00_dev *rt2x00dev = data;
468 struct rt2x00_intf *intf = vif_to_intf(vif); 468 struct rt2x00_intf *intf = vif_to_intf(vif);
469 469
470 if (vif->type != IEEE80211_IF_TYPE_AP && 470 if (vif->type != NL80211_IFTYPE_AP &&
471 vif->type != IEEE80211_IF_TYPE_IBSS) 471 vif->type != NL80211_IFTYPE_ADHOC)
472 return; 472 return;
473 473
474 /* 474 /*
@@ -1212,8 +1212,8 @@ static void rt2x00lib_resume_intf(void *data, u8 *mac,
1212 /* 1212 /*
1213 * Master or Ad-hoc mode require a new beacon update. 1213 * Master or Ad-hoc mode require a new beacon update.
1214 */ 1214 */
1215 if (vif->type == IEEE80211_IF_TYPE_AP || 1215 if (vif->type == NL80211_IFTYPE_AP ||
1216 vif->type == IEEE80211_IF_TYPE_IBSS) 1216 vif->type == NL80211_IFTYPE_ADHOC)
1217 intf->delayed_flags |= DELAYED_UPDATE_BEACON; 1217 intf->delayed_flags |= DELAYED_UPDATE_BEACON;
1218 1218
1219 spin_unlock(&intf->lock); 1219 spin_unlock(&intf->lock);
diff --git a/drivers/net/wireless/rt2x00/rt2x00lib.h b/drivers/net/wireless/rt2x00/rt2x00lib.h
index 7bbc16b1b6c6..797eb619aa0a 100644
--- a/drivers/net/wireless/rt2x00/rt2x00lib.h
+++ b/drivers/net/wireless/rt2x00/rt2x00lib.h
@@ -88,7 +88,7 @@ void rt2x00lib_stop(struct rt2x00_dev *rt2x00dev);
88 */ 88 */
89void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev, 89void rt2x00lib_config_intf(struct rt2x00_dev *rt2x00dev,
90 struct rt2x00_intf *intf, 90 struct rt2x00_intf *intf,
91 enum ieee80211_if_types type, 91 enum nl80211_iftype type,
92 u8 *mac, u8 *bssid); 92 u8 *mac, u8 *bssid);
93void rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev, 93void rt2x00lib_config_erp(struct rt2x00_dev *rt2x00dev,
94 struct rt2x00_intf *intf, 94 struct rt2x00_intf *intf,
diff --git a/drivers/net/wireless/rt2x00/rt2x00mac.c b/drivers/net/wireless/rt2x00/rt2x00mac.c
index 56829fad3471..485c40de5cc0 100644
--- a/drivers/net/wireless/rt2x00/rt2x00mac.c
+++ b/drivers/net/wireless/rt2x00/rt2x00mac.c
@@ -211,7 +211,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
211 return -ENODEV; 211 return -ENODEV;
212 212
213 switch (conf->type) { 213 switch (conf->type) {
214 case IEEE80211_IF_TYPE_AP: 214 case NL80211_IFTYPE_AP:
215 /* 215 /*
216 * We don't support mixed combinations of 216 * We don't support mixed combinations of
217 * sta and ap interfaces. 217 * sta and ap interfaces.
@@ -227,8 +227,8 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
227 return -ENOBUFS; 227 return -ENOBUFS;
228 228
229 break; 229 break;
230 case IEEE80211_IF_TYPE_STA: 230 case NL80211_IFTYPE_STATION:
231 case IEEE80211_IF_TYPE_IBSS: 231 case NL80211_IFTYPE_ADHOC:
232 /* 232 /*
233 * We don't support mixed combinations of 233 * We don't support mixed combinations of
234 * sta and ap interfaces. 234 * sta and ap interfaces.
@@ -268,7 +268,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
268 * increase interface count and start initialization. 268 * increase interface count and start initialization.
269 */ 269 */
270 270
271 if (conf->type == IEEE80211_IF_TYPE_AP) 271 if (conf->type == NL80211_IFTYPE_AP)
272 rt2x00dev->intf_ap_count++; 272 rt2x00dev->intf_ap_count++;
273 else 273 else
274 rt2x00dev->intf_sta_count++; 274 rt2x00dev->intf_sta_count++;
@@ -277,7 +277,7 @@ int rt2x00mac_add_interface(struct ieee80211_hw *hw,
277 spin_lock_init(&intf->seqlock); 277 spin_lock_init(&intf->seqlock);
278 intf->beacon = entry; 278 intf->beacon = entry;
279 279
280 if (conf->type == IEEE80211_IF_TYPE_AP) 280 if (conf->type == NL80211_IFTYPE_AP)
281 memcpy(&intf->bssid, conf->mac_addr, ETH_ALEN); 281 memcpy(&intf->bssid, conf->mac_addr, ETH_ALEN);
282 memcpy(&intf->mac, conf->mac_addr, ETH_ALEN); 282 memcpy(&intf->mac, conf->mac_addr, ETH_ALEN);
283 283
@@ -311,11 +311,11 @@ void rt2x00mac_remove_interface(struct ieee80211_hw *hw,
311 * no interface is present. 311 * no interface is present.
312 */ 312 */
313 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) || 313 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags) ||
314 (conf->type == IEEE80211_IF_TYPE_AP && !rt2x00dev->intf_ap_count) || 314 (conf->type == NL80211_IFTYPE_AP && !rt2x00dev->intf_ap_count) ||
315 (conf->type != IEEE80211_IF_TYPE_AP && !rt2x00dev->intf_sta_count)) 315 (conf->type != NL80211_IFTYPE_AP && !rt2x00dev->intf_sta_count))
316 return; 316 return;
317 317
318 if (conf->type == IEEE80211_IF_TYPE_AP) 318 if (conf->type == NL80211_IFTYPE_AP)
319 rt2x00dev->intf_ap_count--; 319 rt2x00dev->intf_ap_count--;
320 else 320 else
321 rt2x00dev->intf_sta_count--; 321 rt2x00dev->intf_sta_count--;
@@ -331,7 +331,7 @@ void rt2x00mac_remove_interface(struct ieee80211_hw *hw,
331 * are cleared to prevent false ACKing of frames. 331 * are cleared to prevent false ACKing of frames.
332 */ 332 */
333 rt2x00lib_config_intf(rt2x00dev, intf, 333 rt2x00lib_config_intf(rt2x00dev, intf,
334 IEEE80211_IF_TYPE_INVALID, NULL, NULL); 334 NL80211_IFTYPE_UNSPECIFIED, NULL, NULL);
335} 335}
336EXPORT_SYMBOL_GPL(rt2x00mac_remove_interface); 336EXPORT_SYMBOL_GPL(rt2x00mac_remove_interface);
337 337
diff --git a/drivers/net/wireless/rtl8180_dev.c b/drivers/net/wireless/rtl8180_dev.c
index 861c76a65d6a..abcd641c54be 100644
--- a/drivers/net/wireless/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl8180_dev.c
@@ -615,7 +615,7 @@ static int rtl8180_start(struct ieee80211_hw *dev)
615 reg |= RTL818X_CMD_TX_ENABLE; 615 reg |= RTL818X_CMD_TX_ENABLE;
616 rtl818x_iowrite8(priv, &priv->map->CMD, reg); 616 rtl818x_iowrite8(priv, &priv->map->CMD, reg);
617 617
618 priv->mode = IEEE80211_IF_TYPE_MNTR; 618 priv->mode = NL80211_IFTYPE_MONITOR;
619 return 0; 619 return 0;
620 620
621 err_free_rings: 621 err_free_rings:
@@ -633,7 +633,7 @@ static void rtl8180_stop(struct ieee80211_hw *dev)
633 u8 reg; 633 u8 reg;
634 int i; 634 int i;
635 635
636 priv->mode = IEEE80211_IF_TYPE_INVALID; 636 priv->mode = NL80211_IFTYPE_UNSPECIFIED;
637 637
638 rtl818x_iowrite16(priv, &priv->map->INT_MASK, 0); 638 rtl818x_iowrite16(priv, &priv->map->INT_MASK, 0);
639 639
@@ -661,11 +661,11 @@ static int rtl8180_add_interface(struct ieee80211_hw *dev,
661{ 661{
662 struct rtl8180_priv *priv = dev->priv; 662 struct rtl8180_priv *priv = dev->priv;
663 663
664 if (priv->mode != IEEE80211_IF_TYPE_MNTR) 664 if (priv->mode != NL80211_IFTYPE_MONITOR)
665 return -EOPNOTSUPP; 665 return -EOPNOTSUPP;
666 666
667 switch (conf->type) { 667 switch (conf->type) {
668 case IEEE80211_IF_TYPE_STA: 668 case NL80211_IFTYPE_STATION:
669 priv->mode = conf->type; 669 priv->mode = conf->type;
670 break; 670 break;
671 default: 671 default:
@@ -688,7 +688,7 @@ static void rtl8180_remove_interface(struct ieee80211_hw *dev,
688 struct ieee80211_if_init_conf *conf) 688 struct ieee80211_if_init_conf *conf)
689{ 689{
690 struct rtl8180_priv *priv = dev->priv; 690 struct rtl8180_priv *priv = dev->priv;
691 priv->mode = IEEE80211_IF_TYPE_MNTR; 691 priv->mode = NL80211_IFTYPE_MONITOR;
692 priv->vif = NULL; 692 priv->vif = NULL;
693} 693}
694 694
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c
index 8a42bfa6d4f0..e9902613e2ee 100644
--- a/drivers/net/wireless/rtl8187_dev.c
+++ b/drivers/net/wireless/rtl8187_dev.c
@@ -836,11 +836,11 @@ static int rtl8187_add_interface(struct ieee80211_hw *dev,
836 struct rtl8187_priv *priv = dev->priv; 836 struct rtl8187_priv *priv = dev->priv;
837 int i; 837 int i;
838 838
839 if (priv->mode != IEEE80211_IF_TYPE_MNTR) 839 if (priv->mode != NL80211_IFTYPE_MONITOR)
840 return -EOPNOTSUPP; 840 return -EOPNOTSUPP;
841 841
842 switch (conf->type) { 842 switch (conf->type) {
843 case IEEE80211_IF_TYPE_STA: 843 case NL80211_IFTYPE_STATION:
844 priv->mode = conf->type; 844 priv->mode = conf->type;
845 break; 845 break;
846 default: 846 default:
@@ -865,7 +865,7 @@ static void rtl8187_remove_interface(struct ieee80211_hw *dev,
865{ 865{
866 struct rtl8187_priv *priv = dev->priv; 866 struct rtl8187_priv *priv = dev->priv;
867 mutex_lock(&priv->conf_mutex); 867 mutex_lock(&priv->conf_mutex);
868 priv->mode = IEEE80211_IF_TYPE_MNTR; 868 priv->mode = NL80211_IFTYPE_MONITOR;
869 priv->vif = NULL; 869 priv->vif = NULL;
870 mutex_unlock(&priv->conf_mutex); 870 mutex_unlock(&priv->conf_mutex);
871} 871}
@@ -1057,7 +1057,7 @@ static int __devinit rtl8187_probe(struct usb_interface *intf,
1057 dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band; 1057 dev->wiphy->bands[IEEE80211_BAND_2GHZ] = &priv->band;
1058 1058
1059 1059
1060 priv->mode = IEEE80211_IF_TYPE_MNTR; 1060 priv->mode = NL80211_IFTYPE_MONITOR;
1061 dev->flags = IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING | 1061 dev->flags = IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING |
1062 IEEE80211_HW_RX_INCLUDES_FCS; 1062 IEEE80211_HW_RX_INCLUDES_FCS;
1063 1063
diff --git a/drivers/net/wireless/zd1211rw/zd_mac.c b/drivers/net/wireless/zd1211rw/zd_mac.c
index 3005dd1fde42..a3da014f928d 100644
--- a/drivers/net/wireless/zd1211rw/zd_mac.c
+++ b/drivers/net/wireless/zd1211rw/zd_mac.c
@@ -716,15 +716,15 @@ static int zd_op_add_interface(struct ieee80211_hw *hw,
716{ 716{
717 struct zd_mac *mac = zd_hw_mac(hw); 717 struct zd_mac *mac = zd_hw_mac(hw);
718 718
719 /* using IEEE80211_IF_TYPE_INVALID to indicate no mode selected */ 719 /* using NL80211_IFTYPE_UNSPECIFIED to indicate no mode selected */
720 if (mac->type != IEEE80211_IF_TYPE_INVALID) 720 if (mac->type != NL80211_IFTYPE_UNSPECIFIED)
721 return -EOPNOTSUPP; 721 return -EOPNOTSUPP;
722 722
723 switch (conf->type) { 723 switch (conf->type) {
724 case IEEE80211_IF_TYPE_MNTR: 724 case NL80211_IFTYPE_MONITOR:
725 case IEEE80211_IF_TYPE_MESH_POINT: 725 case NL80211_IFTYPE_MESH_POINT:
726 case IEEE80211_IF_TYPE_STA: 726 case NL80211_IFTYPE_STATION:
727 case IEEE80211_IF_TYPE_IBSS: 727 case NL80211_IFTYPE_ADHOC:
728 mac->type = conf->type; 728 mac->type = conf->type;
729 break; 729 break;
730 default: 730 default:
@@ -738,7 +738,7 @@ static void zd_op_remove_interface(struct ieee80211_hw *hw,
738 struct ieee80211_if_init_conf *conf) 738 struct ieee80211_if_init_conf *conf)
739{ 739{
740 struct zd_mac *mac = zd_hw_mac(hw); 740 struct zd_mac *mac = zd_hw_mac(hw);
741 mac->type = IEEE80211_IF_TYPE_INVALID; 741 mac->type = NL80211_IFTYPE_UNSPECIFIED;
742 zd_set_beacon_interval(&mac->chip, 0); 742 zd_set_beacon_interval(&mac->chip, 0);
743 zd_write_mac_addr(&mac->chip, NULL); 743 zd_write_mac_addr(&mac->chip, NULL);
744} 744}
@@ -757,8 +757,8 @@ static int zd_op_config_interface(struct ieee80211_hw *hw,
757 int associated; 757 int associated;
758 int r; 758 int r;
759 759
760 if (mac->type == IEEE80211_IF_TYPE_MESH_POINT || 760 if (mac->type == NL80211_IFTYPE_MESH_POINT ||
761 mac->type == IEEE80211_IF_TYPE_IBSS) { 761 mac->type == NL80211_IFTYPE_ADHOC) {
762 associated = true; 762 associated = true;
763 if (conf->changed & IEEE80211_IFCC_BEACON) { 763 if (conf->changed & IEEE80211_IFCC_BEACON) {
764 struct sk_buff *beacon = ieee80211_beacon_get(hw, vif); 764 struct sk_buff *beacon = ieee80211_beacon_get(hw, vif);
@@ -955,7 +955,7 @@ struct ieee80211_hw *zd_mac_alloc_hw(struct usb_interface *intf)
955 spin_lock_init(&mac->lock); 955 spin_lock_init(&mac->lock);
956 mac->hw = hw; 956 mac->hw = hw;
957 957
958 mac->type = IEEE80211_IF_TYPE_INVALID; 958 mac->type = NL80211_IFTYPE_UNSPECIFIED;
959 959
960 memcpy(mac->channels, zd_channels, sizeof(zd_channels)); 960 memcpy(mac->channels, zd_channels, sizeof(zd_channels));
961 memcpy(mac->rates, zd_rates, sizeof(zd_rates)); 961 memcpy(mac->rates, zd_rates, sizeof(zd_rates));