Hi Serge! Please do not send HTML emails. Your submissions are not useful for anyone if the mail body is HTML formatted and your mail application corrupted the white-space formatting. That's sad because your work will not be appreciated due to formalities which are easy to fulfil. Please read https://dev.openwrt.org/wiki/SubmittingPatches and have a look at the archive to get an impression why this is needed: https://lists.openwrt.org/pipermail/openwrt-devel/2014-August/027718.html also note that your patch was dropped by patchwork.openwrt.org for the same reasons and thus cannot be easily applied and merged. I suggest you should consider using git send-email to avoid these difficulties in future.
It required quite some manual work to even read your patch. First of all, your patch applies to rt2x00, so please send it to the rt2x00 users mailing list. http://rt2x00.serialmonkey.com/mailman/listinfo/users_rt2x00.serialmonkey.com To add it to patches applied to mac80211 in OpenWrt, you'd have to create a patch adding a patch-file to package/kernel/mac80211/patches/ Please read http://wiki.openwrt.org/doc/devel/patches Anyway, I'm still glad you figured out why rt2x00 performs bad in HT40 mode on these chips. Thank you for that! I manually applied your patch and am about to test it on DIR-615-H1 ;) Cheers Daniel On Sun, Aug 31, 2014 at 08:18:27PM +0700, Сергей Василюгин wrote: > <div><div lang="x-western" > style="font-family:-moz-fixed;font-size:12px;">Simple patch to correct > ht20/ht40 switching. Tested with rt3290/rt3352/rt5350 <br /> <br > />Signed-off-by: Serge Vasilugin <a > href="mailto:vasilu...@yanedx.ru"><vasilu...@yandex.ru></a> <br /> <br > />diff --git a/drivers/net/wireless/rt2x00/rt2800.h > b/drivers/net/wireless/rt2x00/rt2800.h <br />index a394a9a..e145e0f 100644 > <br />--- a/drivers/net/wireless/rt2x00/rt2800.h <br />+++ > b/drivers/net/wireless/rt2x00/rt2800.h <br />@@ -2284,6 +2284,8 @@ struct > mac_iveiv_entry { <br /> #define RFCSR30_RX_H20M FIELD8(0x04) <br > /> #define RFCSR30_RX_VCM FIELD8(0x18) <br /> #define > RFCSR30_RF_CALIBRATION FIELD8(0x80) <br />+#define > RF3322_RFCSR30_TX_H20M FIELD8(0x01) <br />+#define > RF3322_RFCSR30_RX_H20M FIELD8(0x02) <br /> <br /> /* <br /> * RFCSR > 31: <br />diff --git a/drivers/net/wireless/rt2x00/rt2800lib.c > b/drivers/net/wireless/rt2x00/rt2800lib.c <br />index 893c9d5..4e4daa0 100644 > <br />--- a/drivers/net/wireless/rt2x00/rt2800lib.c <br />+++ > b/drivers/net/wireless/rt2x00/rt2800lib.c <br />@@ -3208,8 +3208,13 @@ static > void rt2800_config_channel(struct rt2x00_dev *rt2x00dev, <br /> > rt2x00_rf(rt2x00dev, RF5390) || <br /> rt2x00_rf(rt2x00dev, RF5392)) > { <br /> rt2800_rfcsr_read(rt2x00dev, 30, &rfcsr); <br />- > rt2x00_set_field8(&rfcsr, RFCSR30_TX_H20M, 0); <br />- > rt2x00_set_field8(&rfcsr, RFCSR30_RX_H20M, 0); <br />+ > if(rt2x00_rf(rt2x00dev, RF3322)) { <br />+ > rt2x00_set_field8(&rfcsr, RF3320_RFCSR30_TX_H20M, conf_is_ht40(conf)); > <br />+ rt2x00_set_field8(&rfcsr, RF3322_RFCSR30_RX_H20M, > conf_is_ht40(conf)); <br />+ else { <br />+ > rt2x00_set_field8(&rfcsr, RFCSR30_TX_H20M, conf_is_ht40(conf)); <br />+ > rt2x00_set_field8(&rfcsr, RFCSR30_RX_H20M, conf_is_ht40(conf)); > <br />+ } <br /> rt2800_rfcsr_write(rt2x00dev, 30, rfcsr); <br > /> <br /> rt2800_rfcsr_read(rt2x00dev, 3, &rfcsr); > </div></div><div> </div><div>---</div><div>serge</div><div> </div> > _______________________________________________ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel