diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 84 |
1 files changed, 42 insertions, 42 deletions
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 | ||
2157 | static int iwl3945_scan_initiate(struct iwl3945_priv *priv) | 2157 | static 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 | ||
2303 | static int iwl3945_set_mode(struct iwl3945_priv *priv, int mode) | 2303 | static 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); |