aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/iwlegacy/3945.c
diff options
context:
space:
mode:
authorStanislaw Gruszka <sgruszka@redhat.com>2012-02-03 11:31:37 -0500
committerJohn W. Linville <linville@tuxdriver.com>2012-02-06 14:55:55 -0500
commitc8b03958d4b23dc48932ec095a391f3d6447e0e9 (patch)
treefdc4b320476f9be764586387c52f13dfd740a8c1 /drivers/net/wireless/iwlegacy/3945.c
parentcaf60a6c957e7a35837a41f845e57b4433e20276 (diff)
iwlegacy: move rxon commands out of ctx structure
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/iwlegacy/3945.c')
-rw-r--r--drivers/net/wireless/iwlegacy/3945.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/drivers/net/wireless/iwlegacy/3945.c b/drivers/net/wireless/iwlegacy/3945.c
index 1489b1573a6a..dc0433f6801c 100644
--- a/drivers/net/wireless/iwlegacy/3945.c
+++ b/drivers/net/wireless/iwlegacy/3945.c
@@ -1388,7 +1388,7 @@ il3945_send_tx_power(struct il_priv *il)
1388 int rate_idx, i; 1388 int rate_idx, i;
1389 const struct il_channel_info *ch_info = NULL; 1389 const struct il_channel_info *ch_info = NULL;
1390 struct il3945_txpowertable_cmd txpower = { 1390 struct il3945_txpowertable_cmd txpower = {
1391 .channel = il->ctx.active.channel, 1391 .channel = il->active.channel,
1392 }; 1392 };
1393 u16 chan; 1393 u16 chan;
1394 1394
@@ -1397,7 +1397,7 @@ il3945_send_tx_power(struct il_priv *il)
1397 "TX Power requested while scanning!\n")) 1397 "TX Power requested while scanning!\n"))
1398 return -EAGAIN; 1398 return -EAGAIN;
1399 1399
1400 chan = le16_to_cpu(il->ctx.active.channel); 1400 chan = le16_to_cpu(il->active.channel);
1401 1401
1402 txpower.band = (il->band == IEEE80211_BAND_5GHZ) ? 0 : 1; 1402 txpower.band = (il->band == IEEE80211_BAND_5GHZ) ? 0 : 1;
1403 ch_info = il_get_channel_info(il, il->band, chan); 1403 ch_info = il_get_channel_info(il, il->band, chan);
@@ -1673,8 +1673,8 @@ il3945_send_rxon_assoc(struct il_priv *il, struct il_rxon_context *ctx)
1673 .flags = CMD_WANT_SKB, 1673 .flags = CMD_WANT_SKB,
1674 .data = &rxon_assoc, 1674 .data = &rxon_assoc,
1675 }; 1675 };
1676 const struct il_rxon_cmd *rxon1 = &ctx->staging; 1676 const struct il_rxon_cmd *rxon1 = &il->staging;
1677 const struct il_rxon_cmd *rxon2 = &ctx->active; 1677 const struct il_rxon_cmd *rxon2 = &il->active;
1678 1678
1679 if (rxon1->flags == rxon2->flags && 1679 if (rxon1->flags == rxon2->flags &&
1680 rxon1->filter_flags == rxon2->filter_flags && 1680 rxon1->filter_flags == rxon2->filter_flags &&
@@ -1684,10 +1684,10 @@ il3945_send_rxon_assoc(struct il_priv *il, struct il_rxon_context *ctx)
1684 return 0; 1684 return 0;
1685 } 1685 }
1686 1686
1687 rxon_assoc.flags = ctx->staging.flags; 1687 rxon_assoc.flags = il->staging.flags;
1688 rxon_assoc.filter_flags = ctx->staging.filter_flags; 1688 rxon_assoc.filter_flags = il->staging.filter_flags;
1689 rxon_assoc.ofdm_basic_rates = ctx->staging.ofdm_basic_rates; 1689 rxon_assoc.ofdm_basic_rates = il->staging.ofdm_basic_rates;
1690 rxon_assoc.cck_basic_rates = ctx->staging.cck_basic_rates; 1690 rxon_assoc.cck_basic_rates = il->staging.cck_basic_rates;
1691 rxon_assoc.reserved = 0; 1691 rxon_assoc.reserved = 0;
1692 1692
1693 rc = il_send_cmd_sync(il, &cmd); 1693 rc = il_send_cmd_sync(il, &cmd);
@@ -1717,8 +1717,8 @@ int
1717il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx) 1717il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
1718{ 1718{
1719 /* cast away the const for active_rxon in this function */ 1719 /* cast away the const for active_rxon in this function */
1720 struct il3945_rxon_cmd *active_rxon = (void *)&ctx->active; 1720 struct il3945_rxon_cmd *active_rxon = (void *)&il->active;
1721 struct il3945_rxon_cmd *staging_rxon = (void *)&ctx->staging; 1721 struct il3945_rxon_cmd *staging_rxon = (void *)&il->staging;
1722 int rc = 0; 1722 int rc = 0;
1723 bool new_assoc = !!(staging_rxon->filter_flags & RXON_FILTER_ASSOC_MSK); 1723 bool new_assoc = !!(staging_rxon->filter_flags & RXON_FILTER_ASSOC_MSK);
1724 1724
@@ -1776,7 +1776,7 @@ il3945_commit_rxon(struct il_priv *il, struct il_rxon_context *ctx)
1776 active_rxon->reserved4 = 0; 1776 active_rxon->reserved4 = 0;
1777 active_rxon->reserved5 = 0; 1777 active_rxon->reserved5 = 0;
1778 rc = il_send_cmd_pdu(il, C_RXON, sizeof(struct il3945_rxon_cmd), 1778 rc = il_send_cmd_pdu(il, C_RXON, sizeof(struct il3945_rxon_cmd),
1779 &il->ctx.active); 1779 &il->active);
1780 1780
1781 /* If the mask clearing failed then we set 1781 /* If the mask clearing failed then we set
1782 * active_rxon back to what it was previously */ 1782 * active_rxon back to what it was previously */