From: Ivo van Doorn <ivdoorn@gmail.com>
To: netdev@vger.kernel.org
Cc: linville@tuxdriver.com
Subject: Re: [PATCH 13/24] RT2x00: Allow link tuning while scanning
Date: Wed, 26 Jul 2006 20:28:26 +0200 [thread overview]
Message-ID: <200607262028.27016.IvDoorn@gmail.com> (raw)
In-Reply-To: <200607261905.23860.IvDoorn@gmail.com>
>From Ivo van Doorn <IvDoorn@gmail.com>
rt2x00 does not know when we are scanning,
unless passive_scan() is being used.
For consistent behaviour we should not block
tuning while scanning.
We should however not tune the connection when
it has been disabled in the hardware.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
diff -rU3 wireless-dev-newdev/drivers/net/wireless/d80211/rt2x00/rt2500pci.c wireless-dev-tuning/drivers/net/wireless/d80211/rt2x00/rt2500pci.c
--- wireless-dev-newdev/drivers/net/wireless/d80211/rt2x00/rt2500pci.c 2006-07-23 22:41:58.000000000 +0200
+++ wireless-dev-tuning/drivers/net/wireless/d80211/rt2x00/rt2500pci.c 2006-07-23 22:59:00.000000000 +0200
@@ -811,9 +811,10 @@
u8 reg_r17;
/*
- * Don't perform any tuning during scan.
+ * Don't perform any tuning when it is disabled
+ * in the EEPROM.
*/
- if (rt2x00dev->scan)
+ if (GET_FLAG(rt2x00dev, CONFIG_DISABLE_BBP_TUNING))
return;
rt2x00_register_read(rt2x00dev, CSR0, ®);
@@ -2488,7 +2489,16 @@
SET_FLAG(rt2x00dev, DEVICE_SUPPORT_HW_BUTTON);
/*
- * 7 - Read BBP data from EEPROM and store in private structure.
+ * 7 - Check if the BBP tuning should be enabled.
+ */
+ rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &eeprom);
+ if (eeprom == 0xffff)
+ eeprom = 0;
+ if (rt2x00_get_field16(eeprom, EEPROM_NIC_DYN_BBP_TUNE))
+ SET_FLAG(rt2x00dev, CONFIG_DISABLE_BBP_TUNING);
+
+ /*
+ * 8 - Read BBP data from EEPROM and store in private structure.
*/
rt2x00dev->eeprom = kzalloc(EEPROM_BBP_SIZE * sizeof(u16), GFP_KERNEL);
if (!rt2x00dev->eeprom)
diff -rU3 wireless-dev-newdev/drivers/net/wireless/d80211/rt2x00/rt2500usb.c wireless-dev-tuning/drivers/net/wireless/d80211/rt2x00/rt2500usb.c
--- wireless-dev-newdev/drivers/net/wireless/d80211/rt2x00/rt2500usb.c 2006-07-23 22:42:03.000000000 +0200
+++ wireless-dev-tuning/drivers/net/wireless/d80211/rt2x00/rt2500usb.c 2006-07-23 23:00:43.000000000 +0200
@@ -617,15 +617,16 @@
*/
static void rt2500usb_link_tuner(struct rt2x00_dev *rt2x00dev, char rssi)
{
- u16 reg;
+ u16 reg;
u8 reg_r17;
u8 up_bound;
u8 low_bound;
/*
- * Don't perform any tuning during scan.
+ * Don't perform any tuning when it is disabled
+ * in the EEPROM.
*/
- if (rt2x00dev->scan)
+ if (GET_FLAG(rt2x00dev, CONFIG_DISABLE_BBP_TUNING))
return;
low_bound = 0x32;
@@ -2105,7 +2106,16 @@
EEPROM_ANTENNA_LED_MODE);
/*
- * 5 - Read BBP data from EEPROM and store in private structure.
+ * 5 - Check if the BBP tuning should be disabled.
+ */
+ rt2x00_eeprom_read(rt2x00dev, EEPROM_NIC, &eeprom);
+ if (eeprom == 0xffff)
+ eeprom = 0;
+ if (rt2x00_get_field16(eeprom, EEPROM_NIC_DYN_BBP_TUNE))
+ SET_FLAG(rt2x00dev, CONFIG_DISABLE_BBP_TUNING);
+
+ /*
+ * 6 - Read BBP data from EEPROM and store in private structure.
*/
rt2x00dev->eeprom = kzalloc(EEPROM_BBP_SIZE * sizeof(u16), GFP_KERNEL);
if (!rt2x00dev->eeprom)
diff -rU3 wireless-dev-newdev/drivers/net/wireless/d80211/rt2x00/rt61pci.c wireless-dev-tuning/drivers/net/wireless/d80211/rt2x00/rt61pci.c
--- wireless-dev-newdev/drivers/net/wireless/d80211/rt2x00/rt61pci.c 2006-07-23 22:42:09.000000000 +0200
+++ wireless-dev-tuning/drivers/net/wireless/d80211/rt2x00/rt61pci.c 2006-07-23 23:04:25.000000000 +0200
@@ -1043,12 +1043,6 @@
u8 up_bound;
u8 low_bound;
- /*
- * Don't perform any tuning during scan.
- */
- if (rt2x00dev->scan)
- return;
-
if (rt2x00dev->rx_params.phymode == MODE_IEEE80211A) {
up_bound = 0x48;
low_bound = 0x28;
diff -rU3 wireless-dev-newdev/drivers/net/wireless/d80211/rt2x00/rt73usb.c wireless-dev-tuning/drivers/net/wireless/d80211/rt2x00/rt73usb.c
--- wireless-dev-newdev/drivers/net/wireless/d80211/rt2x00/rt73usb.c 2006-07-23 22:47:41.000000000 +0200
+++ wireless-dev-tuning/drivers/net/wireless/d80211/rt2x00/rt73usb.c 2006-07-23 23:04:31.000000000 +0200
@@ -757,12 +757,6 @@
u8 up_bound;
u8 low_bound;
- /*
- * Don't perform any tuning during scan.
- */
- if (rt2x00dev->scan)
- return;
-
if (rt2x00dev->rx_params.phymode == MODE_IEEE80211A) {
up_bound = 0x48;
low_bound = 0x28;
prev parent reply other threads:[~2006-07-26 18:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-26 17:05 [PATCH 13/24] RT2x00: Allow link tuning while scanning Ivo van Doorn
2006-07-26 18:28 ` Ivo van Doorn [this message]
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=200607262028.27016.IvDoorn@gmail.com \
--to=ivdoorn@gmail.com \
--cc=linville@tuxdriver.com \
--cc=netdev@vger.kernel.org \
/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).