* Re: [PATCH] ath9k/mac80211: disallow fragmentation in ath9k, report to userspace
2008-10-13 11:35 [PATCH] ath9k/mac80211: disallow fragmentation in ath9k, report to userspace Johannes Berg
@ 2008-10-13 10:56 ` Luis R. Rodriguez
0 siblings, 0 replies; 2+ messages in thread
From: Luis R. Rodriguez @ 2008-10-13 10:56 UTC (permalink / raw)
To: Johannes Berg
Cc: John Linville, linux-wireless, Vasanth Thiagarajan,
Luis R. Rodriguez
On Mon, Oct 13, 2008 at 04:35:05AM -0700, Johannes Berg wrote:
> As I've reported, ath9k currently fails utterly when fragmentation
> is enabled. This makes ath9k "support" hardware fragmentation by
> not supporting fragmentation at all to avoid the double-free issue.
> The patch also changes mac80211 to report errors from the driver
> operation to userspace.
>
> That hack in ath9k should be removed once the rate control algorithm
> it has is fixed, and we can at that time consider removing the hw
> fragmentation support entirely since it's not used by any driver.
Thanks.
> Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Acked-by: Luis R. Rodriguez <lrodriguez@atheros.com>
Luis
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] ath9k/mac80211: disallow fragmentation in ath9k, report to userspace
@ 2008-10-13 11:35 Johannes Berg
2008-10-13 10:56 ` Luis R. Rodriguez
0 siblings, 1 reply; 2+ messages in thread
From: Johannes Berg @ 2008-10-13 11:35 UTC (permalink / raw)
To: John Linville
Cc: linux-wireless, Vasanthakumar Thiagarajan, Luis R. Rodriguez
As I've reported, ath9k currently fails utterly when fragmentation
is enabled. This makes ath9k "support" hardware fragmentation by
not supporting fragmentation at all to avoid the double-free issue.
The patch also changes mac80211 to report errors from the driver
operation to userspace.
That hack in ath9k should be removed once the rate control algorithm
it has is fixed, and we can at that time consider removing the hw
fragmentation support entirely since it's not used by any driver.
Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Cc: stable@kernel.org
---
This is most likely the only appropriate bandaid for -stable since RC
rework will probably build on our RC rate API changes. For 2.6.28, the
RC rework will also not go in, but some RC rework has gone in, so it
seems that unfortunately you'll have to fix ath9k twice, once for .28
and once for .29, unless you want to stick to this patch in .28 as well.
drivers/net/wireless/ath9k/main.c | 8 +++++++-
net/mac80211/wext.c | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
--- everything.orig/drivers/net/wireless/ath9k/main.c 2008-10-13 13:25:59.000000000 +0200
+++ everything/drivers/net/wireless/ath9k/main.c 2008-10-13 13:28:08.000000000 +0200
@@ -1633,6 +1633,11 @@ static int ath9k_ampdu_action(struct iee
return ret;
}
+static int ath9k_no_fragmentation(struct ieee80211_hw *hw, u32 value)
+{
+ return -EOPNOTSUPP;
+}
+
static struct ieee80211_ops ath9k_ops = {
.tx = ath9k_tx,
.start = ath9k_start,
@@ -1656,7 +1661,8 @@ static struct ieee80211_ops ath9k_ops =
.get_tsf = ath9k_get_tsf,
.reset_tsf = ath9k_reset_tsf,
.tx_last_beacon = NULL,
- .ampdu_action = ath9k_ampdu_action
+ .ampdu_action = ath9k_ampdu_action,
+ .set_frag_threshold = ath9k_no_fragmentation,
};
static int ath_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
--- everything.orig/net/mac80211/wext.c 2008-10-13 13:28:17.000000000 +0200
+++ everything/net/mac80211/wext.c 2008-10-13 13:28:25.000000000 +0200
@@ -771,7 +771,7 @@ static int ieee80211_ioctl_siwfrag(struc
* configure it here */
if (local->ops->set_frag_threshold)
- local->ops->set_frag_threshold(
+ return local->ops->set_frag_threshold(
local_to_hw(local),
local->fragmentation_threshold);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-10-13 17:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-13 11:35 [PATCH] ath9k/mac80211: disallow fragmentation in ath9k, report to userspace Johannes Berg
2008-10-13 10:56 ` Luis R. Rodriguez
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).