diff options
author | Stanislaw Gruszka <sgruszka@redhat.com> | 2012-02-03 11:31:51 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2012-02-06 14:56:06 -0500 |
commit | 8d44f2bd7554734913f1256e4f45c35454167161 (patch) | |
tree | 4c15efc78e339696c257e8b16107021307687287 | |
parent | 8c9c48d5a9ca5e1426372f8a747846bd0609dc08 (diff) |
iwlegacy: move qos_data out of ctx structure
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.c | 24 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/common.h | 4 | ||||
-rw-r--r-- | drivers/net/wireless/iwlegacy/debug.c | 9 |
3 files changed, 18 insertions, 19 deletions
diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c index 7f4c6bf41995..c93fa1b85da5 100644 --- a/drivers/net/wireless/iwlegacy/common.c +++ b/drivers/net/wireless/iwlegacy/common.c | |||
@@ -4496,15 +4496,15 @@ il_mac_conf_tx(struct ieee80211_hw *hw, struct ieee80211_vif *vif, u16 queue, | |||
4496 | 4496 | ||
4497 | spin_lock_irqsave(&il->lock, flags); | 4497 | spin_lock_irqsave(&il->lock, flags); |
4498 | 4498 | ||
4499 | il->ctx.qos_data.def_qos_parm.ac[q].cw_min = | 4499 | il->qos_data.def_qos_parm.ac[q].cw_min = |
4500 | cpu_to_le16(params->cw_min); | 4500 | cpu_to_le16(params->cw_min); |
4501 | il->ctx.qos_data.def_qos_parm.ac[q].cw_max = | 4501 | il->qos_data.def_qos_parm.ac[q].cw_max = |
4502 | cpu_to_le16(params->cw_max); | 4502 | cpu_to_le16(params->cw_max); |
4503 | il->ctx.qos_data.def_qos_parm.ac[q].aifsn = params->aifs; | 4503 | il->qos_data.def_qos_parm.ac[q].aifsn = params->aifs; |
4504 | il->ctx.qos_data.def_qos_parm.ac[q].edca_txop = | 4504 | il->qos_data.def_qos_parm.ac[q].edca_txop = |
4505 | cpu_to_le16((params->txop * 32)); | 4505 | cpu_to_le16((params->txop * 32)); |
4506 | 4506 | ||
4507 | il->ctx.qos_data.def_qos_parm.ac[q].reserved1 = 0; | 4507 | il->qos_data.def_qos_parm.ac[q].reserved1 = 0; |
4508 | 4508 | ||
4509 | spin_unlock_irqrestore(&il->lock, flags); | 4509 | spin_unlock_irqrestore(&il->lock, flags); |
4510 | 4510 | ||
@@ -5230,20 +5230,20 @@ il_update_qos(struct il_priv *il, struct il_rxon_context *ctx) | |||
5230 | if (!ctx->is_active) | 5230 | if (!ctx->is_active) |
5231 | return; | 5231 | return; |
5232 | 5232 | ||
5233 | ctx->qos_data.def_qos_parm.qos_flags = 0; | 5233 | il->qos_data.def_qos_parm.qos_flags = 0; |
5234 | 5234 | ||
5235 | if (ctx->qos_data.qos_active) | 5235 | if (il->qos_data.qos_active) |
5236 | ctx->qos_data.def_qos_parm.qos_flags |= | 5236 | il->qos_data.def_qos_parm.qos_flags |= |
5237 | QOS_PARAM_FLG_UPDATE_EDCA_MSK; | 5237 | QOS_PARAM_FLG_UPDATE_EDCA_MSK; |
5238 | 5238 | ||
5239 | if (ctx->ht.enabled) | 5239 | if (ctx->ht.enabled) |
5240 | ctx->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK; | 5240 | il->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK; |
5241 | 5241 | ||
5242 | D_QOS("send QoS cmd with Qos active=%d FLAGS=0x%X\n", | 5242 | D_QOS("send QoS cmd with Qos active=%d FLAGS=0x%X\n", |
5243 | ctx->qos_data.qos_active, ctx->qos_data.def_qos_parm.qos_flags); | 5243 | il->qos_data.qos_active, il->qos_data.def_qos_parm.qos_flags); |
5244 | 5244 | ||
5245 | il_send_cmd_pdu_async(il, C_QOS_PARAM, sizeof(struct il_qosparam_cmd), | 5245 | il_send_cmd_pdu_async(il, C_QOS_PARAM, sizeof(struct il_qosparam_cmd), |
5246 | &ctx->qos_data.def_qos_parm, NULL); | 5246 | &il->qos_data.def_qos_parm, NULL); |
5247 | } | 5247 | } |
5248 | 5248 | ||
5249 | /** | 5249 | /** |
@@ -5596,7 +5596,7 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif, | |||
5596 | unsigned long flags; | 5596 | unsigned long flags; |
5597 | 5597 | ||
5598 | spin_lock_irqsave(&il->lock, flags); | 5598 | spin_lock_irqsave(&il->lock, flags); |
5599 | ctx->qos_data.qos_active = bss_conf->qos; | 5599 | il->qos_data.qos_active = bss_conf->qos; |
5600 | il_update_qos(il, ctx); | 5600 | il_update_qos(il, ctx); |
5601 | spin_unlock_irqrestore(&il->lock, flags); | 5601 | spin_unlock_irqrestore(&il->lock, flags); |
5602 | } | 5602 | } |
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h index eddf22d4f1b2..18375cb7904c 100644 --- a/drivers/net/wireless/iwlegacy/common.h +++ b/drivers/net/wireless/iwlegacy/common.h | |||
@@ -1165,8 +1165,6 @@ struct il_rxon_context { | |||
1165 | */ | 1165 | */ |
1166 | bool always_active, is_active; | 1166 | bool always_active, is_active; |
1167 | 1167 | ||
1168 | struct il_qos_info qos_data; | ||
1169 | |||
1170 | struct { | 1168 | struct { |
1171 | bool non_gf_sta_present; | 1169 | bool non_gf_sta_present; |
1172 | u8 protection; | 1170 | u8 protection; |
@@ -1278,6 +1276,8 @@ struct il_priv { | |||
1278 | 1276 | ||
1279 | struct il_rxon_context ctx; | 1277 | struct il_rxon_context ctx; |
1280 | 1278 | ||
1279 | struct il_qos_info qos_data; | ||
1280 | |||
1281 | /* | 1281 | /* |
1282 | * We declare this const so it can only be | 1282 | * We declare this const so it can only be |
1283 | * changed via explicit cast within the | 1283 | * changed via explicit cast within the |
diff --git a/drivers/net/wireless/iwlegacy/debug.c b/drivers/net/wireless/iwlegacy/debug.c index f3cb45e53c05..3a9609a88748 100644 --- a/drivers/net/wireless/iwlegacy/debug.c +++ b/drivers/net/wireless/iwlegacy/debug.c | |||
@@ -644,7 +644,6 @@ il_dbgfs_qos_read(struct file *file, char __user *user_buf, size_t count, | |||
644 | loff_t *ppos) | 644 | loff_t *ppos) |
645 | { | 645 | { |
646 | struct il_priv *il = file->private_data; | 646 | struct il_priv *il = file->private_data; |
647 | struct il_rxon_context *ctx = &il->ctx; | ||
648 | int pos = 0, i; | 647 | int pos = 0, i; |
649 | char buf[256]; | 648 | char buf[256]; |
650 | const size_t bufsz = sizeof(buf); | 649 | const size_t bufsz = sizeof(buf); |
@@ -656,10 +655,10 @@ il_dbgfs_qos_read(struct file *file, char __user *user_buf, size_t count, | |||
656 | pos += | 655 | pos += |
657 | scnprintf(buf + pos, bufsz - pos, | 656 | scnprintf(buf + pos, bufsz - pos, |
658 | "AC[%d]\t%u\t%u\t%u\t%u\n", i, | 657 | "AC[%d]\t%u\t%u\t%u\t%u\n", i, |
659 | ctx->qos_data.def_qos_parm.ac[i].cw_min, | 658 | il->qos_data.def_qos_parm.ac[i].cw_min, |
660 | ctx->qos_data.def_qos_parm.ac[i].cw_max, | 659 | il->qos_data.def_qos_parm.ac[i].cw_max, |
661 | ctx->qos_data.def_qos_parm.ac[i].aifsn, | 660 | il->qos_data.def_qos_parm.ac[i].aifsn, |
662 | ctx->qos_data.def_qos_parm.ac[i].edca_txop); | 661 | il->qos_data.def_qos_parm.ac[i].edca_txop); |
663 | } | 662 | } |
664 | 663 | ||
665 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); | 664 | return simple_read_from_buffer(user_buf, count, ppos, buf, pos); |