diff options
Diffstat (limited to 'drivers/net/wireless/iwlwifi/iwl3945-base.c')
-rw-r--r-- | drivers/net/wireless/iwlwifi/iwl3945-base.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index d42bb22e5ed5..73f2f3fcb49c 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -61,6 +61,7 @@ | |||
61 | #include "iwl-helpers.h" | 61 | #include "iwl-helpers.h" |
62 | #include "iwl-dev.h" | 62 | #include "iwl-dev.h" |
63 | #include "iwl-spectrum.h" | 63 | #include "iwl-spectrum.h" |
64 | #include "iwl-legacy.h" | ||
64 | 65 | ||
65 | /* | 66 | /* |
66 | * module name, copyright, version, etc. | 67 | * module name, copyright, version, etc. |
@@ -3057,22 +3058,22 @@ static void iwl3945_bg_rx_replenish(struct work_struct *data) | |||
3057 | mutex_unlock(&priv->mutex); | 3058 | mutex_unlock(&priv->mutex); |
3058 | } | 3059 | } |
3059 | 3060 | ||
3060 | void iwl3945_post_associate(struct iwl_priv *priv, struct ieee80211_vif *vif) | 3061 | void iwl3945_post_associate(struct iwl_priv *priv) |
3061 | { | 3062 | { |
3062 | int rc = 0; | 3063 | int rc = 0; |
3063 | struct ieee80211_conf *conf = NULL; | 3064 | struct ieee80211_conf *conf = NULL; |
3064 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; | 3065 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; |
3065 | 3066 | ||
3066 | if (!vif || !priv->is_open) | 3067 | if (!ctx->vif || !priv->is_open) |
3067 | return; | 3068 | return; |
3068 | 3069 | ||
3069 | if (vif->type == NL80211_IFTYPE_AP) { | 3070 | if (ctx->vif->type == NL80211_IFTYPE_AP) { |
3070 | IWL_ERR(priv, "%s Should not be called in AP mode\n", __func__); | 3071 | IWL_ERR(priv, "%s Should not be called in AP mode\n", __func__); |
3071 | return; | 3072 | return; |
3072 | } | 3073 | } |
3073 | 3074 | ||
3074 | IWL_DEBUG_ASSOC(priv, "Associated as %d to: %pM\n", | 3075 | IWL_DEBUG_ASSOC(priv, "Associated as %d to: %pM\n", |
3075 | vif->bss_conf.aid, ctx->active.bssid_addr); | 3076 | ctx->vif->bss_conf.aid, ctx->active.bssid_addr); |
3076 | 3077 | ||
3077 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 3078 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
3078 | return; | 3079 | return; |
@@ -3091,18 +3092,18 @@ void iwl3945_post_associate(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
3091 | 3092 | ||
3092 | ctx->staging.filter_flags |= RXON_FILTER_ASSOC_MSK; | 3093 | ctx->staging.filter_flags |= RXON_FILTER_ASSOC_MSK; |
3093 | 3094 | ||
3094 | ctx->staging.assoc_id = cpu_to_le16(vif->bss_conf.aid); | 3095 | ctx->staging.assoc_id = cpu_to_le16(ctx->vif->bss_conf.aid); |
3095 | 3096 | ||
3096 | IWL_DEBUG_ASSOC(priv, "assoc id %d beacon interval %d\n", | 3097 | IWL_DEBUG_ASSOC(priv, "assoc id %d beacon interval %d\n", |
3097 | vif->bss_conf.aid, vif->bss_conf.beacon_int); | 3098 | ctx->vif->bss_conf.aid, ctx->vif->bss_conf.beacon_int); |
3098 | 3099 | ||
3099 | if (vif->bss_conf.use_short_preamble) | 3100 | if (ctx->vif->bss_conf.use_short_preamble) |
3100 | ctx->staging.flags |= RXON_FLG_SHORT_PREAMBLE_MSK; | 3101 | ctx->staging.flags |= RXON_FLG_SHORT_PREAMBLE_MSK; |
3101 | else | 3102 | else |
3102 | ctx->staging.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK; | 3103 | ctx->staging.flags &= ~RXON_FLG_SHORT_PREAMBLE_MSK; |
3103 | 3104 | ||
3104 | if (ctx->staging.flags & RXON_FLG_BAND_24G_MSK) { | 3105 | if (ctx->staging.flags & RXON_FLG_BAND_24G_MSK) { |
3105 | if (vif->bss_conf.use_short_slot) | 3106 | if (ctx->vif->bss_conf.use_short_slot) |
3106 | ctx->staging.flags |= RXON_FLG_SHORT_SLOT_MSK; | 3107 | ctx->staging.flags |= RXON_FLG_SHORT_SLOT_MSK; |
3107 | else | 3108 | else |
3108 | ctx->staging.flags &= ~RXON_FLG_SHORT_SLOT_MSK; | 3109 | ctx->staging.flags &= ~RXON_FLG_SHORT_SLOT_MSK; |
@@ -3110,7 +3111,7 @@ void iwl3945_post_associate(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
3110 | 3111 | ||
3111 | iwl3945_commit_rxon(priv, ctx); | 3112 | iwl3945_commit_rxon(priv, ctx); |
3112 | 3113 | ||
3113 | switch (vif->type) { | 3114 | switch (ctx->vif->type) { |
3114 | case NL80211_IFTYPE_STATION: | 3115 | case NL80211_IFTYPE_STATION: |
3115 | iwl3945_rate_scale_init(priv->hw, IWL_AP_ID); | 3116 | iwl3945_rate_scale_init(priv->hw, IWL_AP_ID); |
3116 | break; | 3117 | break; |
@@ -3119,7 +3120,7 @@ void iwl3945_post_associate(struct iwl_priv *priv, struct ieee80211_vif *vif) | |||
3119 | break; | 3120 | break; |
3120 | default: | 3121 | default: |
3121 | IWL_ERR(priv, "%s Should not be called in %d mode\n", | 3122 | IWL_ERR(priv, "%s Should not be called in %d mode\n", |
3122 | __func__, vif->type); | 3123 | __func__, ctx->vif->type); |
3123 | break; | 3124 | break; |
3124 | } | 3125 | } |
3125 | } | 3126 | } |
@@ -3234,9 +3235,10 @@ static int iwl3945_mac_tx(struct ieee80211_hw *hw, struct sk_buff *skb) | |||
3234 | return NETDEV_TX_OK; | 3235 | return NETDEV_TX_OK; |
3235 | } | 3236 | } |
3236 | 3237 | ||
3237 | void iwl3945_config_ap(struct iwl_priv *priv, struct ieee80211_vif *vif) | 3238 | void iwl3945_config_ap(struct iwl_priv *priv) |
3238 | { | 3239 | { |
3239 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; | 3240 | struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS]; |
3241 | struct ieee80211_vif *vif = ctx->vif; | ||
3240 | int rc = 0; | 3242 | int rc = 0; |
3241 | 3243 | ||
3242 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) | 3244 | if (test_bit(STATUS_EXIT_PENDING, &priv->status)) |
@@ -3830,12 +3832,12 @@ struct ieee80211_ops iwl3945_hw_ops = { | |||
3830 | .stop = iwl3945_mac_stop, | 3832 | .stop = iwl3945_mac_stop, |
3831 | .add_interface = iwl_mac_add_interface, | 3833 | .add_interface = iwl_mac_add_interface, |
3832 | .remove_interface = iwl_mac_remove_interface, | 3834 | .remove_interface = iwl_mac_remove_interface, |
3833 | .config = iwl_mac_config, | 3835 | .config = iwl_legacy_mac_config, |
3834 | .configure_filter = iwl3945_configure_filter, | 3836 | .configure_filter = iwl3945_configure_filter, |
3835 | .set_key = iwl3945_mac_set_key, | 3837 | .set_key = iwl3945_mac_set_key, |
3836 | .conf_tx = iwl_mac_conf_tx, | 3838 | .conf_tx = iwl_mac_conf_tx, |
3837 | .reset_tsf = iwl_mac_reset_tsf, | 3839 | .reset_tsf = iwl_legacy_mac_reset_tsf, |
3838 | .bss_info_changed = iwl_bss_info_changed, | 3840 | .bss_info_changed = iwl_legacy_mac_bss_info_changed, |
3839 | .hw_scan = iwl_mac_hw_scan, | 3841 | .hw_scan = iwl_mac_hw_scan, |
3840 | .sta_add = iwl3945_mac_sta_add, | 3842 | .sta_add = iwl3945_mac_sta_add, |
3841 | .sta_remove = iwl_mac_sta_remove, | 3843 | .sta_remove = iwl_mac_sta_remove, |