All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajkumar Manoharan <rmanoharan@atheros.com>
To: <linville@tuxdriver.com>
Cc: <linux-wireless@vger.kernel.org>,
	Rajkumar Manoharan <rmanoharan@atheros.com>
Subject: [PATCH 3/4] ath9k_hw: Fix eeprom offset for AR9287 devices (PCI/USB)
Date: Fri, 19 Nov 2010 16:53:21 +0530	[thread overview]
Message-ID: <1290165802-3566-3-git-send-email-rmanoharan@atheros.com> (raw)
In-Reply-To: <1290165802-3566-1-git-send-email-rmanoharan@atheros.com>

AR9287 devices (PCI/USB) use different eeprom start location
to read nvram. New devices might endup with same devid. So use
driver_info to set offset, instead of devid. driver_info is
valid for HTC devices alone which is filled in usb_device_id.

Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com>
---
 drivers/net/wireless/ath/ath9k/eeprom_9287.c |    6 +++---
 drivers/net/wireless/ath/ath9k/reg.h         |    4 ----
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/eeprom_9287.c b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
index 3ad1de2..353085b 100644
--- a/drivers/net/wireless/ath/ath9k/eeprom_9287.c
+++ b/drivers/net/wireless/ath/ath9k/eeprom_9287.c
@@ -37,10 +37,10 @@ static bool ath9k_hw_ar9287_fill_eeprom(struct ath_hw *ah)
 	int addr, eep_start_loc;
 	eep_data = (u16 *)eep;
 
-	if (AR9287_HTC_DEVID(ah))
-		eep_start_loc = AR9287_HTC_EEP_START_LOC;
-	else
+	if (!common->driver_info)
 		eep_start_loc = AR9287_EEP_START_LOC;
+	else
+		eep_start_loc = AR9287_HTC_EEP_START_LOC;
 
 	if (!ath9k_hw_use_flash(ah)) {
 		ath_print(common, ATH_DBG_EEPROM,
diff --git a/drivers/net/wireless/ath/ath9k/reg.h b/drivers/net/wireless/ath/ath9k/reg.h
index 443407d..f444a37 100644
--- a/drivers/net/wireless/ath/ath9k/reg.h
+++ b/drivers/net/wireless/ath/ath9k/reg.h
@@ -870,10 +870,6 @@
 	 ((_ah)->hw_version.devid == 0xA704) || \
 	 ((_ah)->hw_version.devid == 0x1200))
 
-#define AR9287_HTC_DEVID(_ah) \
-	(((_ah)->hw_version.devid == 0x7015) || \
-	 ((_ah)->hw_version.devid == 0x1200))
-
 #define AR_RADIO_SREV_MAJOR                   0xf0
 #define AR_RAD5133_SREV_MAJOR                 0xc0
 #define AR_RAD2133_SREV_MAJOR                 0xd0
-- 
1.7.3.2


  parent reply	other threads:[~2010-11-19 11:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-19 11:23 [PATCH 1/4] ath: Add a driver_info bitmask field Rajkumar Manoharan
2010-11-19 11:23 ` [PATCH 2/4] ath9k_htc: Add driver_info in usb device list Rajkumar Manoharan
2010-11-19 11:23 ` Rajkumar Manoharan [this message]
2010-11-19 11:23 ` [PATCH 4/4] ath9k_htc: Identify devices using driver_info Rajkumar Manoharan
2010-11-22 21:23 ` [PATCH 1/4] ath: Add a driver_info bitmask field Bob Copeland
2010-11-22 21:33   ` Christian Lamparter
2010-11-23  5:35   ` Rajkumar Manoharan

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=1290165802-3566-3-git-send-email-rmanoharan@atheros.com \
    --to=rmanoharan@atheros.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=linville@tuxdriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.