linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [v2] iwlwifi: iwl-tx.c cleanup (remove unused parameters).
@ 2008-12-16  7:35 Rami Rosen
  2008-12-17 16:39 ` John W. Linville
  0 siblings, 1 reply; 5+ messages in thread
From: Rami Rosen @ 2008-12-16  7:35 UTC (permalink / raw)
  To: linville; +Cc: linux-wireless, reinette.chatre

This patch removes unused parameters in methods in iwl-tx.c:

- remove a parameter (is_unicast) from iwl_tx_cmd_build_basic()
- remove a parameter (sta_id) from iwl_tx_cmd_build_rate()
- remove two parameters (sta_id and priv) from iwl_tx_cmd_build_hwcrypto()

(wireless-testing).

Signed-off-by: Rami Rosen <ramirose@gmail.com>

diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c
b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 3cb4363..1d72a19 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -645,7 +645,7 @@ static void iwl_tx_cmd_build_basic(struct iwl_priv *priv,
 				  struct iwl_tx_cmd *tx_cmd,
 				  struct ieee80211_tx_info *info,
 				  struct ieee80211_hdr *hdr,
-				  int is_unicast, u8 std_id)
+				  u8 std_id)
 {
 	__le16 fc = hdr->frame_control;
 	__le32 tx_flags = tx_cmd->tx_flags;
@@ -705,7 +705,7 @@ static void iwl_tx_cmd_build_basic(struct iwl_priv *priv,
 static void iwl_tx_cmd_build_rate(struct iwl_priv *priv,
 			      struct iwl_tx_cmd *tx_cmd,
 			      struct ieee80211_tx_info *info,
-			      __le16 fc, int sta_id,
+			      __le16 fc,
 			      int is_hcca)
 {
 	u32 rate_flags = 0;
@@ -764,11 +764,10 @@ static void iwl_tx_cmd_build_rate(struct iwl_priv *priv,
 	tx_cmd->rate_n_flags = iwl_hw_set_rate_n_flags(rate_plcp, rate_flags);
 }

-static void iwl_tx_cmd_build_hwcrypto(struct iwl_priv *priv,
-				      struct ieee80211_tx_info *info,
+static void iwl_tx_cmd_build_hwcrypto(struct ieee80211_tx_info *info,
 				      struct iwl_tx_cmd *tx_cmd,
-				      struct sk_buff *skb_frag,
-				      int sta_id)
+				      struct sk_buff *skb_frag)
+
 {
 	struct ieee80211_key_conf *keyconf = info->control.hw_key;

@@ -834,7 +833,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 	u16 len, len_org;
 	u16 seq_number = 0;
 	__le16 fc;
-	u8 hdr_len, unicast;
+	u8 hdr_len;
 	u8 sta_id;
 	u8 wait_write_ptr = 0;
 	u8 tid = 0;
@@ -854,7 +853,6 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 		goto drop_unlock;
 	}

-	unicast = !is_multicast_ether_addr(hdr->addr1);

 	fc = hdr->frame_control;

@@ -977,7 +975,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 	iwl_hw_txq_attach_buf_to_tfd(priv, tfd, txcmd_phys, len);

 	if (info->control.hw_key)
-		iwl_tx_cmd_build_hwcrypto(priv, info, tx_cmd, skb, sta_id);
+		iwl_tx_cmd_build_hwcrypto(info, tx_cmd, skb);

 	/* Set up TFD's 2nd entry to point directly to remainder of skb,
 	 * if any (802.11 null frames have no payload). */
@@ -996,10 +994,10 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 	len = (u16)skb->len;
 	tx_cmd->len = cpu_to_le16(len);
 	/* TODO need this for burst mode later on */
-	iwl_tx_cmd_build_basic(priv, tx_cmd, info, hdr, unicast, sta_id);
+	iwl_tx_cmd_build_basic(priv, tx_cmd, info, hdr, sta_id);

 	/* set is_hcca to 0; it probably will never be implemented */
-	iwl_tx_cmd_build_rate(priv, tx_cmd, info, fc, sta_id, 0);
+	iwl_tx_cmd_build_rate(priv, tx_cmd, info, fc, 0);

 	iwl_update_tx_stats(priv, le16_to_cpu(fc), len);

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] [v2] iwlwifi: iwl-tx.c cleanup (remove unused parameters).
  2008-12-16  7:35 [PATCH] [v2] iwlwifi: iwl-tx.c cleanup (remove unused parameters) Rami Rosen
@ 2008-12-17 16:39 ` John W. Linville
  2008-12-17 21:51   ` [PATCH] [v3] " Rami Rosen
  0 siblings, 1 reply; 5+ messages in thread
From: John W. Linville @ 2008-12-17 16:39 UTC (permalink / raw)
  To: Rami Rosen; +Cc: linux-wireless, reinette.chatre

On Tue, Dec 16, 2008 at 09:35:23AM +0200, Rami Rosen wrote:
> This patch removes unused parameters in methods in iwl-tx.c:
>=20
> - remove a parameter (is_unicast) from iwl_tx_cmd_build_basic()
> - remove a parameter (sta_id) from iwl_tx_cmd_build_rate()
> - remove two parameters (sta_id and priv) from iwl_tx_cmd_build_hwcry=
pto()

  CC [M]  drivers/net/wireless/iwlwifi/iwl-tx.o
drivers/net/wireless/iwlwifi/iwl-tx.c: In function =E2=80=98iwl_tx_cmd_=
build_hwcrypto=E2=80=99:
drivers/net/wireless/iwlwifi/iwl-tx.c:780: error: =E2=80=98priv=E2=80=99=
 undeclared (first use in this function)
drivers/net/wireless/iwlwifi/iwl-tx.c:780: error: (Each undeclared iden=
tifier is reported only once
drivers/net/wireless/iwlwifi/iwl-tx.c:780: error: for each function it =
appears in.)
make[2]: *** [drivers/net/wireless/iwlwifi/iwl-tx.o] Error 1

Did you compile w/ debugging enabled?

John
--=20
John W. Linville		Linux should be at the core
linville@tuxdriver.com			of your literate lifestyle.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireles=
s" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] [v3] iwlwifi: iwl-tx.c cleanup (remove unused parameters).
  2008-12-17 16:39 ` John W. Linville
@ 2008-12-17 21:51   ` Rami Rosen
  2008-12-17 22:42     ` Tomas Winkler
  0 siblings, 1 reply; 5+ messages in thread
From: Rami Rosen @ 2008-12-17 21:51 UTC (permalink / raw)
  To: John W. Linville; +Cc: linux-wireless, reinette.chatre

This patch removes unused parameters in methods in iwl-tx.c:
remove a parameter (is_unicast) from iwl_tx_cmd_build_basic()
remove a parameter (sta_id) from iwl_tx_cmd_build_rate()
remove a parameter (sta_id ) from iwl_tx_cmd_build_hwcrypto()

(This version fixes the build error when compiling with debugging enabled.)

(wireless-testing).

Signed-off-by: Rami Rosen <ramirose@gmail.com>


diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c
b/drivers/net/wireless/iwlwifi/iwl-tx.c
index 3cb4363..a1607cd 100644
--- a/drivers/net/wireless/iwlwifi/iwl-tx.c
+++ b/drivers/net/wireless/iwlwifi/iwl-tx.c
@@ -645,7 +645,7 @@ static void iwl_tx_cmd_build_basic(struct iwl_priv *priv,
 				  struct iwl_tx_cmd *tx_cmd,
 				  struct ieee80211_tx_info *info,
 				  struct ieee80211_hdr *hdr,
-				  int is_unicast, u8 std_id)
+				  u8 std_id)
 {
 	__le16 fc = hdr->frame_control;
 	__le32 tx_flags = tx_cmd->tx_flags;
@@ -705,7 +705,7 @@ static void iwl_tx_cmd_build_basic(struct iwl_priv *priv,
 static void iwl_tx_cmd_build_rate(struct iwl_priv *priv,
 			      struct iwl_tx_cmd *tx_cmd,
 			      struct ieee80211_tx_info *info,
-			      __le16 fc, int sta_id,
+			      __le16 fc,
 			      int is_hcca)
 {
 	u32 rate_flags = 0;
@@ -767,8 +767,8 @@ static void iwl_tx_cmd_build_rate(struct iwl_priv *priv,
 static void iwl_tx_cmd_build_hwcrypto(struct iwl_priv *priv,
 				      struct ieee80211_tx_info *info,
 				      struct iwl_tx_cmd *tx_cmd,
-				      struct sk_buff *skb_frag,
-				      int sta_id)
+				      struct sk_buff *skb_frag)
+
 {
 	struct ieee80211_key_conf *keyconf = info->control.hw_key;

@@ -834,7 +834,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 	u16 len, len_org;
 	u16 seq_number = 0;
 	__le16 fc;
-	u8 hdr_len, unicast;
+	u8 hdr_len;
 	u8 sta_id;
 	u8 wait_write_ptr = 0;
 	u8 tid = 0;
@@ -854,7 +854,6 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 		goto drop_unlock;
 	}

-	unicast = !is_multicast_ether_addr(hdr->addr1);

 	fc = hdr->frame_control;

@@ -977,7 +976,7 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 	iwl_hw_txq_attach_buf_to_tfd(priv, tfd, txcmd_phys, len);

 	if (info->control.hw_key)
-		iwl_tx_cmd_build_hwcrypto(priv, info, tx_cmd, skb, sta_id);
+		iwl_tx_cmd_build_hwcrypto(priv, info, tx_cmd, skb);

 	/* Set up TFD's 2nd entry to point directly to remainder of skb,
 	 * if any (802.11 null frames have no payload). */
@@ -996,10 +995,10 @@ int iwl_tx_skb(struct iwl_priv *priv, struct sk_buff *skb)
 	len = (u16)skb->len;
 	tx_cmd->len = cpu_to_le16(len);
 	/* TODO need this for burst mode later on */
-	iwl_tx_cmd_build_basic(priv, tx_cmd, info, hdr, unicast, sta_id);
+	iwl_tx_cmd_build_basic(priv, tx_cmd, info, hdr, sta_id);

 	/* set is_hcca to 0; it probably will never be implemented */
-	iwl_tx_cmd_build_rate(priv, tx_cmd, info, fc, sta_id, 0);
+	iwl_tx_cmd_build_rate(priv, tx_cmd, info, fc, 0);

 	iwl_update_tx_stats(priv, le16_to_cpu(fc), len);



On Wed, Dec 17, 2008 at 6:39 PM, John W. Linville
<linville@tuxdriver.com> wrote:
> On Tue, Dec 16, 2008 at 09:35:23AM +0200, Rami Rosen wrote:
>> This patch removes unused parameters in methods in iwl-tx.c:
>>
>> - remove a parameter (is_unicast) from iwl_tx_cmd_build_basic()
>> - remove a parameter (sta_id) from iwl_tx_cmd_build_rate()
>> - remove two parameters (sta_id and priv) from iwl_tx_cmd_build_hwcrypto()
>
>  CC [M]  drivers/net/wireless/iwlwifi/iwl-tx.o
> drivers/net/wireless/iwlwifi/iwl-tx.c: In function 'iwl_tx_cmd_build_hwcrypto':
> drivers/net/wireless/iwlwifi/iwl-tx.c:780: error: 'priv' undeclared (first use in this function)
> drivers/net/wireless/iwlwifi/iwl-tx.c:780: error: (Each undeclared identifier is reported only once
> drivers/net/wireless/iwlwifi/iwl-tx.c:780: error: for each function it appears in.)
> make[2]: *** [drivers/net/wireless/iwlwifi/iwl-tx.o] Error 1
>
> Did you compile w/ debugging enabled?
>
> John
> --
> John W. Linville                Linux should be at the core
> linville@tuxdriver.com                  of your literate lifestyle.
>

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] [v3] iwlwifi: iwl-tx.c cleanup (remove unused parameters).
  2008-12-17 21:51   ` [PATCH] [v3] " Rami Rosen
@ 2008-12-17 22:42     ` Tomas Winkler
  2008-12-18 15:31       ` John W. Linville
  0 siblings, 1 reply; 5+ messages in thread
From: Tomas Winkler @ 2008-12-17 22:42 UTC (permalink / raw)
  To: Rami Rosen; +Cc: John W. Linville, linux-wireless, reinette.chatre

On Wed, Dec 17, 2008 at 11:51 PM, Rami Rosen <ramirose@gmail.com> wrote:
> This patch removes unused parameters in methods in iwl-tx.c:
> remove a parameter (is_unicast) from iwl_tx_cmd_build_basic()
> remove a parameter (sta_id) from iwl_tx_cmd_build_rate()
> remove a parameter (sta_id ) from iwl_tx_cmd_build_hwcrypto()

Unicast can go sta_id has to stay, we need it for merging 3945 back
Thanks
Tomas

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] [v3] iwlwifi: iwl-tx.c cleanup (remove unused parameters).
  2008-12-17 22:42     ` Tomas Winkler
@ 2008-12-18 15:31       ` John W. Linville
  0 siblings, 0 replies; 5+ messages in thread
From: John W. Linville @ 2008-12-18 15:31 UTC (permalink / raw)
  To: Tomas Winkler; +Cc: Rami Rosen, linux-wireless, reinette.chatre

On Thu, Dec 18, 2008 at 12:42:37AM +0200, Tomas Winkler wrote:
> On Wed, Dec 17, 2008 at 11:51 PM, Rami Rosen <ramirose@gmail.com> wrote:
> > This patch removes unused parameters in methods in iwl-tx.c:
> > remove a parameter (is_unicast) from iwl_tx_cmd_build_basic()
> > remove a parameter (sta_id) from iwl_tx_cmd_build_rate()
> > remove a parameter (sta_id ) from iwl_tx_cmd_build_hwcrypto()
> 
> Unicast can go sta_id has to stay, we need it for merging 3945 back

OK, I'll drop this patch and wait for a new submission.

John
-- 
John W. Linville		Linux should be at the core
linville@tuxdriver.com			of your literate lifestyle.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-12-18 15:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-12-16  7:35 [PATCH] [v2] iwlwifi: iwl-tx.c cleanup (remove unused parameters) Rami Rosen
2008-12-17 16:39 ` John W. Linville
2008-12-17 21:51   ` [PATCH] [v3] " Rami Rosen
2008-12-17 22:42     ` Tomas Winkler
2008-12-18 15:31       ` John W. Linville

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).