aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlwifi
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlwifi')
-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
13 files changed, 107 insertions, 107 deletions
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);