b43-dev.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes@sipsolutions.net>
To: Thomas Huehn <thomas@net.t-labs.tu-berlin.de>
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org,
	ath9k-devel@lists.ath9k.org, ath5k-devel@lists.ath5k.org,
	ilw@linux.intel.com, users@rt2x00.serialmonkey.com,
	b43-dev@lists.infradead.org, brcm80211-dev-list@broadcom.com,
	chunkeey@googlemail.com, buytenh@wantstofly.org, dsd@gentoo.org,
	coelho@ti.com, nbd@openwrt.org
Subject: [PATCH v4] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path
Date: Tue, 24 Jul 2012 16:47:31 +0200	[thread overview]
Message-ID: <1343141251.4415.39.camel@jlt3.sipsolutions.net> (raw)
In-Reply-To: <1343072022-1383-1-git-send-email-thomas@net.t-labs.tu-berlin.de> (sfid-20120723_213356_862232_300A4FC5)

On Mon, 2012-07-23 at 21:33 +0200, Thomas Huehn wrote:

> --- a/net/mac80211/ieee80211_i.h
> +++ b/net/mac80211/ieee80211_i.h
> @@ -196,6 +196,8 @@ struct ieee80211_tx_data {
>  	struct ieee80211_channel *channel;
>  
>  	unsigned int flags;
> +
> +	struct ieee80211_tx_control control;

Why is this needed/useful?

>  		info->control.vif = vif;
> -		info->control.sta = sta;
> +		control->sta = sta;
>  
>  		__skb_unlink(skb, skbs);
> -		drv_tx(local, skb);
> +		drv_tx(local, control, skb);

You're assigning to it right before, and I don't see you using it any
time before, so why not just have the control struct on the stack of
this function?

That would save all this passing around:

> @@ -1253,6 +1254,7 @@ static bool ieee80211_tx_frags(struct ieee80211_local *local,
>   * Returns false if the frame couldn't be transmitted but was queued instead.
>   */
>  static bool __ieee80211_tx(struct ieee80211_local *local,
> +			   struct ieee80211_tx_control *control,
>  			   struct sk_buff_head *skbs, int led_len,
>  			   struct sta_info *sta, bool txpending)
>  {
> @@ -1301,7 +1303,7 @@ static bool __ieee80211_tx(struct ieee80211_local *local,
>  		break;
>  	}
>  
> -	result = ieee80211_tx_frags(local, vif, pubsta, skbs,
> +	result = ieee80211_tx_frags(local, vif, pubsta, control, skbs,
>  				    txpending);
>  
>  	ieee80211_tpt_led_trig_tx(local, fc, led_len);
> @@ -1409,7 +1411,7 @@ static bool ieee80211_tx(struct ieee80211_sub_if_data *sdata,
>  			sdata->vif.hw_queue[skb_get_queue_mapping(skb)];
>  
>  	if (!invoke_tx_handlers(&tx))
> -		result = __ieee80211_tx(local, &tx.skbs, led_len,
> +		result = __ieee80211_tx(local, &tx.control, &tx.skbs, led_len,
>  					tx.sta, txpending);
>   out:
>  	rcu_read_unlock();
> @@ -2154,6 +2156,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
>  	struct ieee80211_sub_if_data *sdata;
>  	struct sta_info *sta;
>  	struct ieee80211_hdr *hdr;
> +	struct ieee80211_tx_control control;
>  	bool result;
>  
>  	sdata = vif_to_sdata(info->control.vif);
> @@ -2169,7 +2172,7 @@ static bool ieee80211_tx_pending_skb(struct ieee80211_local *local,
>  		hdr = (struct ieee80211_hdr *)skb->data;
>  		sta = sta_info_get(sdata, hdr->addr1);
>  
> -		result = __ieee80211_tx(local, &skbs, skb->len, sta, true);
> +		result = __ieee80211_tx(local, &control, &skbs, skb->len, sta, true);
>  	}
>  
>  	return result;


johannes

  reply	other threads:[~2012-07-24 14:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-23 19:33 [PATCH v4] mac80211: Remove control.sta from struct ieee80211_tx_info and restructure tx-path Thomas Huehn
2012-07-24 14:47 ` Johannes Berg [this message]
2012-07-24 20:07   ` [ath5k-devel] " Thomas Huehn

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=1343141251.4415.39.camel@jlt3.sipsolutions.net \
    --to=johannes@sipsolutions.net \
    --cc=ath5k-devel@lists.ath5k.org \
    --cc=ath9k-devel@lists.ath9k.org \
    --cc=b43-dev@lists.infradead.org \
    --cc=brcm80211-dev-list@broadcom.com \
    --cc=buytenh@wantstofly.org \
    --cc=chunkeey@googlemail.com \
    --cc=coelho@ti.com \
    --cc=dsd@gentoo.org \
    --cc=ilw@linux.intel.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=nbd@openwrt.org \
    --cc=thomas@net.t-labs.tu-berlin.de \
    --cc=users@rt2x00.serialmonkey.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).