diff mbox

p54: unknown rssi calibration data packing

Message ID 200912151651.40220.chunkeey@googlemail.com (mailing list archive)
State Not Applicable, archived
Headers show

Commit Message

Christian Lamparter Dec. 15, 2009, 3:51 p.m. UTC
None
diff mbox

Patch

diff --git a/drivers/net/wireless/p54/eeprom.c b/drivers/net/wireless/p54/eeprom.c
index 8e3818f..8497c96 100644
--- a/drivers/net/wireless/p54/eeprom.c
+++ b/drivers/net/wireless/p54/eeprom.c
@@ -417,6 +417,17 @@  static void p54_parse_rssical(struct ieee80211_hw *dev, void *data, int len,
 	int num_entries = (type == PDR_RSSI_LINEAR_APPROXIMATION) ? 1 : 2;
 	int i;
 
+	/*
+	 * Workaround for _some_ Dell 1450 Wireless USB adapters revisions
+	 *
+	 * For no apparent reason Dell decided to add an extra 2-byte NULL
+	 * array at the beginning of the rssi calibration parameter table.
+	 */
+	if (len == 14) {
+		data += 2;
+		len -= 2;
+	}
+
 	if (len != (entry_size * num_entries)) {
 		printk(KERN_ERR "%s: unknown rssi calibration data packing "
 				 " type:(%x) len:%d.\n",