Search Linux Wireless

[PATCH] ath9k/mac80211: disallow fragmentation in ath9k, report to userspace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxx>
Cc: stable@xxxxxxxxxx
---
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);
 


--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux