linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: <netdev@vger.kernel.org>
Cc: Florian Westphal <fw@strlen.de>, linux-wireless@vger.kernel.org
Subject: [PATCH RFC 07/14] net: wireless: iwlwifi: shrink status private area
Date: Mon,  2 Mar 2015 18:40:21 +0100	[thread overview]
Message-ID: <1425318028-26531-8-git-send-email-fw@strlen.de> (raw)
In-Reply-To: <1425318028-26531-1-git-send-email-fw@strlen.de>

iwlwifi is only driver to use status_driver_data, and it only wants to
store u8 counter.

This is one patch needed to reduce size of ieee80211_tx_info,
which in turn is needed to allow reducing size of skb->cb[].

Cc: linux-wireless@vger.kernel.org
Signed-off-by: Florian Westphal <fw@strlen.de>
---
 drivers/net/wireless/iwlwifi/mvm/rs.c | 2 +-
 drivers/net/wireless/iwlwifi/mvm/tx.c | 8 +++-----
 include/net/mac80211.h                | 2 +-
 3 files changed, 5 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/iwlwifi/mvm/rs.c b/drivers/net/wireless/iwlwifi/mvm/rs.c
index 194bd1f..e29092b 100644
--- a/drivers/net/wireless/iwlwifi/mvm/rs.c
+++ b/drivers/net/wireless/iwlwifi/mvm/rs.c
@@ -1054,7 +1054,7 @@ void iwl_mvm_rs_tx_status(struct iwl_mvm *mvm, struct ieee80211_sta *sta,
 	u32 ucode_rate;
 	struct rs_rate rate;
 	struct iwl_scale_tbl_info *curr_tbl, *other_tbl, *tmp_tbl;
-	u8 reduced_txp = (uintptr_t)info->status.status_driver_data[0];
+	u8 reduced_txp = (u8)info->status.status_driver_data[0];
 	struct iwl_mvm_sta *mvmsta = iwl_mvm_sta_from_mac80211(sta);
 	struct iwl_lq_sta *lq_sta = &mvmsta->lq_sta;
 
diff --git a/drivers/net/wireless/iwlwifi/mvm/tx.c b/drivers/net/wireless/iwlwifi/mvm/tx.c
index 07304e1..450635f 100644
--- a/drivers/net/wireless/iwlwifi/mvm/tx.c
+++ b/drivers/net/wireless/iwlwifi/mvm/tx.c
@@ -683,9 +683,8 @@ static void iwl_mvm_rx_tx_cmd_single(struct iwl_mvm *mvm,
 		 */
 		info->status.tx_time =
 			le16_to_cpu(tx_resp->wireless_media_time);
-		BUILD_BUG_ON(ARRAY_SIZE(info->status.status_driver_data) < 1);
-		info->status.status_driver_data[0] =
-				(void *)(uintptr_t)tx_resp->reduced_tpc;
+		BUILD_BUG_ON(sizeof(info->status.status_driver_data) < 1);
+		info->status.status_driver_data[0] = tx_resp->reduced_tpc;
 
 		ieee80211_tx_status(mvm->hw, skb);
 	}
@@ -907,8 +906,7 @@ static void iwl_mvm_tx_info_from_ba_notif(struct ieee80211_tx_info *info,
 				    info);
 	/* TODO: not accounted if the whole A-MPDU failed */
 	info->status.tx_time = tid_data->tx_time;
-	info->status.status_driver_data[0] =
-		(void *)(uintptr_t)tid_data->reduced_tpc;
+	info->status.status_driver_data[0] = tid_data->reduced_tpc;
 }
 
 int iwl_mvm_rx_ba_notif(struct iwl_mvm *mvm, struct iwl_rx_cmd_buffer *rxb,
diff --git a/include/net/mac80211.h b/include/net/mac80211.h
index d52914b..63c3708 100644
--- a/include/net/mac80211.h
+++ b/include/net/mac80211.h
@@ -755,7 +755,7 @@ struct ieee80211_tx_info {
 			u8 ampdu_len;
 			u8 antenna;
 			u16 tx_time;
-			void *status_driver_data[19 / sizeof(void *)];
+			u8 status_driver_data[1];
 		} status;
 		struct {
 			struct ieee80211_tx_rate driver_rates[
-- 
2.0.5


  parent reply	other threads:[~2015-03-02 17:40 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1425318028-26531-1-git-send-email-fw@strlen.de>
2015-03-02 17:40 ` [PATCH RFC 04/14] drivers: wireless: rt2x00: move skb_dma to queue entry Florian Westphal
2015-03-02 17:40 ` [PATCH RFC 05/14] drivers: wireless: ar5523: use container_of Florian Westphal
2015-03-03  9:16   ` Pontus Fuchs
2015-03-02 17:40 ` [PATCH RFC 06/14] drivers: wireless: carl9170: shrink carl9170_tx_info Florian Westphal
2015-03-02 17:40 ` Florian Westphal [this message]
2015-03-02 17:40 ` [PATCH RFC 08/14] net: wireless: mac80211: shrink ieee80211_tx_info Florian Westphal
2015-03-02 18:53   ` Johannes Berg
2015-03-02 19:03     ` Florian Westphal
2015-03-02 19:18       ` Johannes Berg
2015-03-02 19:30         ` Florian Westphal
2015-03-02 17:40 ` [PATCH RFC 09/14] net: wireless: mac80211: shrink private driver area Florian Westphal
2015-03-02 18:52   ` Johannes Berg
2015-03-02 19:49 ` [PATCH RFC 00/14] shrink skb cb to 44 bytes Eric Dumazet
2015-03-02 20:42   ` Florian Westphal
2015-03-02 21:56     ` Eric Dumazet
2015-03-02 22:17   ` David Miller
2015-03-03  4:02     ` Eric Dumazet
2015-03-03  4:05       ` David Miller
2015-03-03 11:43         ` Florian Westphal

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=1425318028-26531-8-git-send-email-fw@strlen.de \
    --to=fw@strlen.de \
    --cc=linux-wireless@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /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).