aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy/iwl4965-base.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/iwlegacy/iwl4965-base.c')
-rw-r--r--drivers/net/wireless/iwlegacy/iwl4965-base.c52
1 files changed, 17 insertions, 35 deletions
diff --git a/drivers/net/wireless/iwlegacy/iwl4965-base.c b/drivers/net/wireless/iwlegacy/iwl4965-base.c
index 043d51e9d59..df86431d3ba 100644
--- a/drivers/net/wireless/iwlegacy/iwl4965-base.c
+++ b/drivers/net/wireless/iwlegacy/iwl4965-base.c
@@ -89,14 +89,10 @@ MODULE_ALIAS("iwl4965");
89 89
90void il4965_update_chain_flags(struct il_priv *il) 90void il4965_update_chain_flags(struct il_priv *il)
91{ 91{
92 struct il_rxon_context *ctx;
93
94 if (il->cfg->ops->hcmd->set_rxon_chain) { 92 if (il->cfg->ops->hcmd->set_rxon_chain) {
95 for_each_context(il, ctx) { 93 il->cfg->ops->hcmd->set_rxon_chain(il, &il->ctx);
96 il->cfg->ops->hcmd->set_rxon_chain(il, ctx); 94 if (il->ctx.active.rx_chain != il->ctx.staging.rx_chain)
97 if (ctx->active.rx_chain != ctx->staging.rx_chain) 95 il_commit_rxon(il, &il->ctx);
98 il_commit_rxon(il, ctx);
99 }
100 } 96 }
101} 97}
102 98
@@ -1766,10 +1762,8 @@ static void il4965_alive_start(struct il_priv *il)
1766 ctx->staging.filter_flags |= RXON_FILTER_ASSOC_MSK; 1762 ctx->staging.filter_flags |= RXON_FILTER_ASSOC_MSK;
1767 active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK; 1763 active_rxon->filter_flags &= ~RXON_FILTER_ASSOC_MSK;
1768 } else { 1764 } else {
1769 struct il_rxon_context *tmp;
1770 /* Initialize our rx_config data */ 1765 /* Initialize our rx_config data */
1771 for_each_context(il, tmp) 1766 il_connection_init_rx_config(il, &il->ctx);
1772 il_connection_init_rx_config(il, tmp);
1773 1767
1774 if (il->cfg->ops->hcmd->set_rxon_chain) 1768 if (il->cfg->ops->hcmd->set_rxon_chain)
1775 il->cfg->ops->hcmd->set_rxon_chain(il, ctx); 1769 il->cfg->ops->hcmd->set_rxon_chain(il, ctx);
@@ -1950,7 +1944,6 @@ static int il4965_prepare_card_hw(struct il_priv *il)
1950 1944
1951static int __il4965_up(struct il_priv *il) 1945static int __il4965_up(struct il_priv *il)
1952{ 1946{
1953 struct il_rxon_context *ctx;
1954 int i; 1947 int i;
1955 int ret; 1948 int ret;
1956 1949
@@ -1964,12 +1957,10 @@ static int __il4965_up(struct il_priv *il)
1964 return -EIO; 1957 return -EIO;
1965 } 1958 }
1966 1959
1967 for_each_context(il, ctx) { 1960 ret = il4965_alloc_bcast_station(il, &il->ctx);
1968 ret = il4965_alloc_bcast_station(il, ctx); 1961 if (ret) {
1969 if (ret) { 1962 il_dealloc_bcast_stations(il);
1970 il_dealloc_bcast_stations(il); 1963 return ret;
1971 return ret;
1972 }
1973 } 1964 }
1974 1965
1975 il4965_prepare_card_hw(il); 1966 il4965_prepare_card_hw(il);
@@ -2121,11 +2112,8 @@ static void il4965_bg_restart(struct work_struct *data)
2121 return; 2112 return;
2122 2113
2123 if (test_and_clear_bit(STATUS_FW_ERROR, &il->status)) { 2114 if (test_and_clear_bit(STATUS_FW_ERROR, &il->status)) {
2124 struct il_rxon_context *ctx;
2125
2126 mutex_lock(&il->mutex); 2115 mutex_lock(&il->mutex);
2127 for_each_context(il, ctx) 2116 il->ctx.vif = NULL;
2128 ctx->vif = NULL;
2129 il->is_open = 0; 2117 il->is_open = 0;
2130 2118
2131 __il4965_down(il); 2119 __il4965_down(il);
@@ -2177,7 +2165,6 @@ static int il4965_mac_setup_register(struct il_priv *il,
2177{ 2165{
2178 int ret; 2166 int ret;
2179 struct ieee80211_hw *hw = il->hw; 2167 struct ieee80211_hw *hw = il->hw;
2180 struct il_rxon_context *ctx;
2181 2168
2182 hw->rate_control_algorithm = "iwl-4965-rs"; 2169 hw->rate_control_algorithm = "iwl-4965-rs";
2183 2170
@@ -2195,10 +2182,8 @@ static int il4965_mac_setup_register(struct il_priv *il,
2195 hw->sta_data_size = sizeof(struct il_station_priv); 2182 hw->sta_data_size = sizeof(struct il_station_priv);
2196 hw->vif_data_size = sizeof(struct il_vif_priv); 2183 hw->vif_data_size = sizeof(struct il_vif_priv);
2197 2184
2198 for_each_context(il, ctx) { 2185 hw->wiphy->interface_modes |= il->ctx.interface_modes;
2199 hw->wiphy->interface_modes |= ctx->interface_modes; 2186 hw->wiphy->interface_modes |= il->ctx.exclusive_interface_modes;
2200 hw->wiphy->interface_modes |= ctx->exclusive_interface_modes;
2201 }
2202 2187
2203 hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY | 2188 hw->wiphy->flags |= WIPHY_FLAG_CUSTOM_REGULATORY |
2204 WIPHY_FLAG_DISABLE_BEACON_HINTS; 2189 WIPHY_FLAG_DISABLE_BEACON_HINTS;
@@ -2590,7 +2575,6 @@ void il4965_configure_filter(struct ieee80211_hw *hw,
2590{ 2575{
2591 struct il_priv *il = hw->priv; 2576 struct il_priv *il = hw->priv;
2592 __le32 filter_or = 0, filter_nand = 0; 2577 __le32 filter_or = 0, filter_nand = 0;
2593 struct il_rxon_context *ctx;
2594 2578
2595#define CHK(test, flag) do { \ 2579#define CHK(test, flag) do { \
2596 if (*total_flags & (test)) \ 2580 if (*total_flags & (test)) \
@@ -2611,15 +2595,13 @@ void il4965_configure_filter(struct ieee80211_hw *hw,
2611 2595
2612 mutex_lock(&il->mutex); 2596 mutex_lock(&il->mutex);
2613 2597
2614 for_each_context(il, ctx) { 2598 il->ctx.staging.filter_flags &= ~filter_nand;
2615 ctx->staging.filter_flags &= ~filter_nand; 2599 il->ctx.staging.filter_flags |= filter_or;
2616 ctx->staging.filter_flags |= filter_or;
2617 2600
2618 /* 2601 /*
2619 * Not committing directly because hardware can perform a scan, 2602 * Not committing directly because hardware can perform a scan,
2620 * but we'll eventually commit the filter flags change anyway. 2603 * but we'll eventually commit the filter flags change anyway.
2621 */ 2604 */
2622 }
2623 2605
2624 mutex_unlock(&il->mutex); 2606 mutex_unlock(&il->mutex);
2625 2607