linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stanislaw Gruszka <sgruszka@redhat.com>
To: "John W. Linville" <linville@tuxdriver.com>
Cc: linux-wireless@vger.kernel.org, Stanislaw Gruszka <sgruszka@redhat.com>
Subject: [PATCH 15/25] iwlegacy: move qos_data out of ctx structure
Date: Fri,  3 Feb 2012 13:07:15 +0100	[thread overview]
Message-ID: <1328270845-16891-16-git-send-email-sgruszka@redhat.com> (raw)
In-Reply-To: <1328270845-16891-1-git-send-email-sgruszka@redhat.com>

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
---
 drivers/net/wireless/iwlegacy/common.c |   24 ++++++++++++------------
 drivers/net/wireless/iwlegacy/common.h |    4 ++--
 drivers/net/wireless/iwlegacy/debug.c  |    8 ++++----
 3 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/drivers/net/wireless/iwlegacy/common.c b/drivers/net/wireless/iwlegacy/common.c
index 7f4c6bf..c93fa1b 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,
 
 	spin_lock_irqsave(&il->lock, flags);
 
-	il->ctx.qos_data.def_qos_parm.ac[q].cw_min =
+	il->qos_data.def_qos_parm.ac[q].cw_min =
 	    cpu_to_le16(params->cw_min);
-	il->ctx.qos_data.def_qos_parm.ac[q].cw_max =
+	il->qos_data.def_qos_parm.ac[q].cw_max =
 	    cpu_to_le16(params->cw_max);
-	il->ctx.qos_data.def_qos_parm.ac[q].aifsn = params->aifs;
-	il->ctx.qos_data.def_qos_parm.ac[q].edca_txop =
+	il->qos_data.def_qos_parm.ac[q].aifsn = params->aifs;
+	il->qos_data.def_qos_parm.ac[q].edca_txop =
 	    cpu_to_le16((params->txop * 32));
 
-	il->ctx.qos_data.def_qos_parm.ac[q].reserved1 = 0;
+	il->qos_data.def_qos_parm.ac[q].reserved1 = 0;
 
 	spin_unlock_irqrestore(&il->lock, flags);
 
@@ -5230,20 +5230,20 @@ il_update_qos(struct il_priv *il, struct il_rxon_context *ctx)
 	if (!ctx->is_active)
 		return;
 
-	ctx->qos_data.def_qos_parm.qos_flags = 0;
+	il->qos_data.def_qos_parm.qos_flags = 0;
 
-	if (ctx->qos_data.qos_active)
-		ctx->qos_data.def_qos_parm.qos_flags |=
+	if (il->qos_data.qos_active)
+		il->qos_data.def_qos_parm.qos_flags |=
 		    QOS_PARAM_FLG_UPDATE_EDCA_MSK;
 
 	if (ctx->ht.enabled)
-		ctx->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK;
+		il->qos_data.def_qos_parm.qos_flags |= QOS_PARAM_FLG_TGN_MSK;
 
 	D_QOS("send QoS cmd with Qos active=%d FLAGS=0x%X\n",
-	      ctx->qos_data.qos_active, ctx->qos_data.def_qos_parm.qos_flags);
+	      il->qos_data.qos_active, il->qos_data.def_qos_parm.qos_flags);
 
 	il_send_cmd_pdu_async(il, C_QOS_PARAM, sizeof(struct il_qosparam_cmd),
-			      &ctx->qos_data.def_qos_parm, NULL);
+			      &il->qos_data.def_qos_parm, NULL);
 }
 
 /**
@@ -5596,7 +5596,7 @@ il_mac_bss_info_changed(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
 		unsigned long flags;
 
 		spin_lock_irqsave(&il->lock, flags);
-		ctx->qos_data.qos_active = bss_conf->qos;
+		il->qos_data.qos_active = bss_conf->qos;
 		il_update_qos(il, ctx);
 		spin_unlock_irqrestore(&il->lock, flags);
 	}
diff --git a/drivers/net/wireless/iwlegacy/common.h b/drivers/net/wireless/iwlegacy/common.h
index eddf22d..18375cb 100644
--- a/drivers/net/wireless/iwlegacy/common.h
+++ b/drivers/net/wireless/iwlegacy/common.h
@@ -1165,8 +1165,6 @@ struct il_rxon_context {
 	 */
 	bool always_active, is_active;
 
-	struct il_qos_info qos_data;
-
 	struct {
 		bool non_gf_sta_present;
 		u8 protection;
@@ -1278,6 +1276,8 @@ struct il_priv {
 
 	struct il_rxon_context ctx;
 
+	struct il_qos_info qos_data;
+
 	/*
 	 * We declare this const so it can only be
 	 * changed via explicit cast within the
diff --git a/drivers/net/wireless/iwlegacy/debug.c b/drivers/net/wireless/iwlegacy/debug.c
index b1b8926..61e3f43 100644
--- a/drivers/net/wireless/iwlegacy/debug.c
+++ b/drivers/net/wireless/iwlegacy/debug.c
@@ -657,10 +657,10 @@ il_dbgfs_qos_read(struct file *file, char __user *user_buf, size_t count,
 		pos +=
 		    scnprintf(buf + pos, bufsz - pos,
 			      "AC[%d]\t%u\t%u\t%u\t%u\n", i,
-			      ctx->qos_data.def_qos_parm.ac[i].cw_min,
-			      ctx->qos_data.def_qos_parm.ac[i].cw_max,
-			      ctx->qos_data.def_qos_parm.ac[i].aifsn,
-			      ctx->qos_data.def_qos_parm.ac[i].edca_txop);
+			      il->qos_data.def_qos_parm.ac[i].cw_min,
+			      il->qos_data.def_qos_parm.ac[i].cw_max,
+			      il->qos_data.def_qos_parm.ac[i].aifsn,
+			      il->qos_data.def_qos_parm.ac[i].edca_txop);
 	}
 
 	return simple_read_from_buffer(user_buf, count, ppos, buf, pos);
-- 
1.7.1


  parent reply	other threads:[~2012-02-03 12:08 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-03 12:07 [PATCH 0/25] iwlegacy update 2012-02-03 Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 01/25] iwlegacy: move rxon commands out of ctx structure Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 02/25] iwlegacy: get rid of ctx->rxon_cmd Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 03/25] iwlegacy: get rid of ctx->rxon_timing_cmd Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 04/25] iwlegacy: get rid of C_RXON_ASSOC Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 05/25] iwlegacy: get rid of qos_cmd Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 06/25] iwlegacy: get rid of wep_key_cmd Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 07/25] iwlegacy: get rid of ap_sta_id Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 08/25] iwlegacy: move bcast_sta_id to hw_params Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 09/25] iwlegacy: get rid of *_devtype Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 10/25] iwlegacy: get rid of ctxid Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 11/25] iwlegacy: get rid of mcast_queue Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 12/25] iwlegacy: move wep_keys out of context Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 13/25] iwlegacy: get rid of ctx->station_flags Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 14/25] iwlegacy: remove ctx interface_modes Stanislaw Gruszka
2012-02-03 12:47   ` Gertjan van Wingerde
2012-02-03 13:27     ` Stanislaw Gruszka
2012-02-03 13:30   ` [PATCH 14/25 v2] " Stanislaw Gruszka
2012-02-03 12:07 ` Stanislaw Gruszka [this message]
2012-02-03 12:07 ` [PATCH 16/25] iwlegacy: move ht out of ctx structure Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 17/25] iwlegacy: get rid of ctx->ac_to_fifo Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 18/25] iwlegacy: get rid of ctx->ac_to_queue Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 19/25] iwlegacy: get rid of ctx->is_active Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 20/25] iwlegacy: remove il_setup_interface() Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 21/25] iwlegacy: get rid of ctx structure Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 22/25] iwlegacy: move ops out of config Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 23/25] iwlegacy: merge il_base_params into il_cfg Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 24/25] iwlegacy: remove struct il_tx_info Stanislaw Gruszka
2012-02-03 12:07 ` [PATCH 25/25] iwlegacy: remove set_hw_params callback Stanislaw Gruszka
2012-02-03 15:35 ` [PATCH 0/25] iwlegacy update 2012-02-03 Stanislaw Gruszka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1328270845-16891-16-git-send-email-sgruszka@redhat.com \
    --to=sgruszka@redhat.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).