Linux wireless drivers development
 help / color / mirror / Atom feed
From: Ivo van Doorn <ivdoorn@gmail.com>
To: Johannes Berg <johannes@sipsolutions.net>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
	John Linville <linville@tuxdriver.com>,
	Dan E <trg_info@mailhaven.com>
Subject: Re: [PATCH] mac80211: remove fragmentation offload functionality
Date: Tue, 9 Dec 2008 21:36:56 +0100	[thread overview]
Message-ID: <200812092136.56768.IvDoorn@gmail.com> (raw)
In-Reply-To: <1228822203.22164.204.camel@johannes.berg>

On Tuesday 09 December 2008, Johannes Berg wrote:
> There's no driver that actually does fragmentation on the
> device, and the callback is buggy (when it returns an error,
> mac80211's fragmentation status is changed so reading the
> frag threshold from userspace reads the new value despite
> the error). Let's just remove it, if we really find some
> hardware supporting it we can add it back later.
> 
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
> ---
> Unless anybody knows a work-in-progress driver that needs this, in which
> case we should fix it? Speak up now if you do.

For rt2800{pci,usb} the set_frag_threshold is not implemented, so it won't
provide problems with those drivers.

Ivo

>  include/net/mac80211.h |    5 -----
>  net/mac80211/tx.c      |    1 -
>  net/mac80211/wext.c    |    8 --------
>  3 files changed, 14 deletions(-)
> 
> --- everything.orig/include/net/mac80211.h	2008-12-08 21:54:08.000000000 +0100
> +++ everything/include/net/mac80211.h	2008-12-08 21:54:21.000000000 +0100
> @@ -1253,10 +1253,6 @@ enum ieee80211_ampdu_mlme_action {
>   *
>   * @set_rts_threshold: Configuration of RTS threshold (if device needs it)
>   *
> - * @set_frag_threshold: Configuration of fragmentation threshold. Assign this if
> - *	the device does fragmentation by itself; if this method is assigned then
> - *	the stack will not do fragmentation.
> - *
>   * @sta_notify: Notifies low level driver about addition or removal of an
>   *	associated station, AP, IBSS/WDS/mesh peer etc. Must be atomic.
>   *
> @@ -1326,7 +1322,6 @@ struct ieee80211_ops {
>  	void (*get_tkip_seq)(struct ieee80211_hw *hw, u8 hw_key_idx,
>  			     u32 *iv32, u16 *iv16);
>  	int (*set_rts_threshold)(struct ieee80211_hw *hw, u32 value);
> -	int (*set_frag_threshold)(struct ieee80211_hw *hw, u32 value);
>  	void (*sta_notify)(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
>  			enum sta_notify_cmd, struct ieee80211_sta *sta);
>  	void (*sta_notify_ps)(struct ieee80211_hw *hw,
> --- everything.orig/net/mac80211/tx.c	2008-12-08 21:52:57.000000000 +0100
> +++ everything/net/mac80211/tx.c	2008-12-08 21:54:21.000000000 +0100
> @@ -1003,7 +1003,6 @@ __ieee80211_tx_prepare(struct ieee80211_
>  	if (tx->flags & IEEE80211_TX_FRAGMENTED) {
>  		if ((tx->flags & IEEE80211_TX_UNICAST) &&
>  		    skb->len + FCS_LEN > local->fragmentation_threshold &&
> -		    !local->ops->set_frag_threshold &&
>  		    !(info->flags & IEEE80211_TX_CTL_AMPDU))
>  			tx->flags |= IEEE80211_TX_FRAGMENTED;
>  		else
> --- everything.orig/net/mac80211/wext.c	2008-12-08 21:52:57.000000000 +0100
> +++ everything/net/mac80211/wext.c	2008-12-08 21:54:21.000000000 +0100
> @@ -639,14 +639,6 @@ static int ieee80211_ioctl_siwfrag(struc
>  		local->fragmentation_threshold = frag->value & ~0x1;
>  	}
>  
> -	/* If the wlan card performs fragmentation in hardware/firmware,
> -	 * configure it here */
> -
> -	if (local->ops->set_frag_threshold)
> -		return local->ops->set_frag_threshold(
> -			local_to_hw(local),
> -			local->fragmentation_threshold);
> -
>  	return 0;
>  }
>  
> 
> 
> 



  reply	other threads:[~2008-12-09 20:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-09 11:30 [PATCH] mac80211: remove fragmentation offload functionality Johannes Berg
2008-12-09 20:36 ` Ivo van Doorn [this message]
2008-12-09 21:10   ` Johannes Berg

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=200812092136.56768.IvDoorn@gmail.com \
    --to=ivdoorn@gmail.com \
    --cc=johannes@sipsolutions.net \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=trg_info@mailhaven.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