1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2024-12-25 04:33:21 +02:00

[package] mac80211: update compat-wireless to 2009-02-15

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@14532 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
juhosg 2009-02-16 19:02:26 +00:00
parent c3a8afd3ef
commit b5b5c52a3b
7 changed files with 42 additions and 42 deletions

View File

@ -9,14 +9,14 @@ include $(TOPDIR)/rules.mk
include $(INCLUDE_DIR)/kernel.mk include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=mac80211 PKG_NAME:=mac80211
PKG_RELEASE:=3 PKG_RELEASE:=1
ifneq ($(CONFIG_LINUX_2_6_27)$(CONFIG_LINUX_2_6_28),) ifneq ($(CONFIG_LINUX_2_6_27)$(CONFIG_LINUX_2_6_28),)
PKG_VERSION:=2009-02-07 PKG_VERSION:=2009-02-15
PKG_SOURCE_URL:= \ PKG_SOURCE_URL:= \
http://www.orbit-lab.org/kernel/compat-wireless-2.6/2009/02 \ http://www.orbit-lab.org/kernel/compat-wireless-2.6/2009/02 \
http://wireless.kernel.org/download/compat-wireless-2.6 http://wireless.kernel.org/download/compat-wireless-2.6
PKG_MD5SUM:=fed21ffa78c91e0f8067b8ca63a442b7 PKG_MD5SUM:=65b4c3ccd23aa9fa4604fe63b03cce28
else else
PKG_VERSION:=2008-08-06 PKG_VERSION:=2008-08-06
PKG_SOURCE_URL:=http://www.orbit-lab.org/kernel/compat-wireless-2.6/2008/08 PKG_SOURCE_URL:=http://www.orbit-lab.org/kernel/compat-wireless-2.6/2008/08

View File

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -78,10 +78,10 @@ CONFIG_MAC80211_MESH=y @@ -90,10 +90,10 @@ CONFIG_MAC80211_MESH=y
CONFIG_CFG80211=m CONFIG_CFG80211=m
# CONFIG_CFG80211_REG_DEBUG is not set # CONFIG_CFG80211_REG_DEBUG is not set
@ -15,7 +15,7 @@
CONFIG_NL80211=y CONFIG_NL80211=y
@@ -121,16 +121,16 @@ CONFIG_IWL3945_LEDS=y @@ -133,16 +133,16 @@ CONFIG_IWL3945_LEDS=y
CONFIG_B43=m CONFIG_B43=m
CONFIG_B43_PCI_AUTOSELECT=y CONFIG_B43_PCI_AUTOSELECT=y
CONFIG_B43_PCICORE_AUTOSELECT=y CONFIG_B43_PCICORE_AUTOSELECT=y
@ -35,7 +35,7 @@
# CONFIG_B43LEGACY_RFKILL=y # CONFIG_B43LEGACY_RFKILL=y
# CONFIG_B43LEGACY_DEBUG=y # CONFIG_B43LEGACY_DEBUG=y
CONFIG_B43LEGACY_DMA=y CONFIG_B43LEGACY_DMA=y
@@ -140,17 +140,17 @@ CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y @@ -152,17 +152,17 @@ CONFIG_B43LEGACY_DMA_AND_PIO_MODE=y
# CONFIG_B43LEGACY_PIO_MODE is not set # CONFIG_B43LEGACY_PIO_MODE is not set
# The Intel ipws # The Intel ipws
@ -61,7 +61,7 @@
# CONFIG_IPW2200_DEBUG is not set # CONFIG_IPW2200_DEBUG is not set
# The above enables use a second interface prefixed 'rtap'. # The above enables use a second interface prefixed 'rtap'.
# Example usage: # Example usage:
@@ -272,15 +272,15 @@ CONFIG_SSB_SPROM=y @@ -284,15 +284,15 @@ CONFIG_SSB_SPROM=y
ifneq ($(CONFIG_USB),) ifneq ($(CONFIG_USB),)
ifneq ($(CONFIG_LIBERTAS_THINFIRM_USB),m) ifneq ($(CONFIG_LIBERTAS_THINFIRM_USB),m)
CONFIG_LIBERTAS_USB=m CONFIG_LIBERTAS_USB=m

View File

@ -458,7 +458,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
if (err) if (err)
--- a/drivers/net/wireless/ath5k/eeprom.h --- a/drivers/net/wireless/ath5k/eeprom.h
+++ b/drivers/net/wireless/ath5k/eeprom.h +++ b/drivers/net/wireless/ath5k/eeprom.h
@@ -265,15 +265,27 @@ struct ath5k_chan_pcal_info_rf5112 { @@ -266,15 +266,27 @@ struct ath5k_chan_pcal_info_rf5112 {
u8 pcdac_x3[AR5K_EEPROM_N_XPD3_POINTS]; u8 pcdac_x3[AR5K_EEPROM_N_XPD3_POINTS];
}; };

View File

@ -7,13 +7,13 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+++ b/drivers/net/wireless/ath5k/phy.c +++ b/drivers/net/wireless/ath5k/phy.c
@@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
* Copyright (c) 2004-2007 Reyk Floeter <reyk@openbsd.org> * Copyright (c) 2004-2007 Reyk Floeter <reyk@openbsd.org>
* Copyright (c) 2006-2007 Nick Kossifidis <mickflemm@gmail.com> * Copyright (c) 2006-2009 Nick Kossifidis <mickflemm@gmail.com>
* Copyright (c) 2007-2008 Jiri Slaby <jirislaby@gmail.com> * Copyright (c) 2007-2008 Jiri Slaby <jirislaby@gmail.com>
+ * Copyright (c) 2008-2009 Felix Fietkau <nbd@openwrt.org> + * Copyright (c) 2008-2009 Felix Fietkau <nbd@openwrt.org>
* *
* Permission to use, copy, modify, and distribute this software for any * Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above * purpose with or without fee is hereby granted, provided that the above
@@ -2383,31 +2384,449 @@ unsigned int ath5k_hw_get_def_antenna(st @@ -1438,31 +1439,449 @@ unsigned int ath5k_hw_get_def_antenna(st
*/ */
/* /*
@ -330,12 +330,18 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+ /* need to extrapolate above this pdgain? */ + /* need to extrapolate above this pdgain? */
+ if (target_idx <= max_idx) + if (target_idx <= max_idx)
+ continue; + continue;
+
- txpower = AR5K_TUNE_DEFAULT_TXPOWER * 2;
- if (max_power > txpower)
- txpower = max_power > AR5K_TUNE_MAX_TXPOWER ?
- AR5K_TUNE_MAX_TXPOWER : max_power;
+ if (pcdacL[vpd_size - 1] > pcdacL[vpd_size - 2]) + if (pcdacL[vpd_size - 1] > pcdacL[vpd_size - 2])
+ vpd_step = pcdacL[vpd_size - 1] - pcdacL[vpd_size - 2]; + vpd_step = pcdacL[vpd_size - 1] - pcdacL[vpd_size - 2];
+ else + else
+ vpd_step = 1; + vpd_step = 1;
+
- for (i = 0; i < AR5K_MAX_RATES; i++)
- rates[i] = txpower;
+ while ((s < (s16) target_idx) && (n_pdadc < 128)) { + while ((s < (s16) target_idx) && (n_pdadc < 128)) {
+ int tmp = pcdacL[vpd_size - 1] + + int tmp = pcdacL[vpd_size - 1] +
+ (s - max_idx) * vpd_step; + (s - max_idx) * vpd_step;
@ -343,7 +349,8 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+ s++; + s++;
+ } + }
+ } + }
+
- /* XXX setup target powers by rate */
+ while (i < AR5K_EEPROM_N_PD_GAINS) { + while (i < AR5K_EEPROM_N_PD_GAINS) {
+ gain_boundaries[i] = gain_boundaries[i - 1]; + gain_boundaries[i] = gain_boundaries[i - 1];
+ i++; + i++;
@ -374,14 +381,10 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+ } + }
+ ath5k_hw_reg_write(ah, reg, AR5K_PHY_TPC_RG1); + ath5k_hw_reg_write(ah, reg, AR5K_PHY_TPC_RG1);
- txpower = AR5K_TUNE_DEFAULT_TXPOWER * 2;
- if (max_power > txpower)
- txpower = max_power > AR5K_TUNE_MAX_TXPOWER ?
- AR5K_TUNE_MAX_TXPOWER : max_power;
+ /* + /*
+ * Write TX power values + * Write TX power values
+ */ + */
+ reg = AR5K_PHY_PCDAC_TXPOWER_BASE_2413; + reg = AR5K_PHY_PDADC_TXPOWER_BASE;
+ for (i = 0; i < (AR5K_EEPROM_POWER_TABLE_SIZE / 2); i++) { + for (i = 0; i < (AR5K_EEPROM_POWER_TABLE_SIZE / 2); i++) {
+ ath5k_hw_reg_write(ah, + ath5k_hw_reg_write(ah,
+ ((pdadc_out[4*i + 0] & 0xff) << 0) | + ((pdadc_out[4*i + 0] & 0xff) << 0) |
@ -425,13 +428,10 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+ } + }
+ ah->ah_txpower.txp_min = ch_pmin; + ah->ah_txpower.txp_min = ch_pmin;
+ ah->ah_txpower.txp_max = ch_pmax; + ah->ah_txpower.txp_max = ch_pmax;
+
- for (i = 0; i < AR5K_MAX_RATES; i++)
- rates[i] = txpower;
+ return 0; + return 0;
+} +}
+
- /* XXX setup target powers by rate */
+static void +static void
+ath5k_setup_rate_table(struct ath5k_hw *ah, u16 max_pwr, +ath5k_setup_rate_table(struct ath5k_hw *ah, u16 max_pwr,
+ struct ath5k_rate_pcal_info *rate_info) + struct ath5k_rate_pcal_info *rate_info)
@ -441,7 +441,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
+ +
+ max_pwr *= 2; + max_pwr *= 2;
+ max_pwr = min(max_pwr, (u16) ah->ah_txpower.txp_max); + max_pwr = min(max_pwr, (u16) ah->ah_txpower.txp_max);
+
+ /* apply rate limits */ + /* apply rate limits */
+ rates = ah->ah_txpower.txp_rates; + rates = ah->ah_txpower.txp_rates;
+ for (i = 0; i < 5; i++) { + for (i = 0; i < 5; i++) {
@ -479,7 +479,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
n = ARRAY_SIZE(ah->ah_txpower.txp_pcdac); n = ARRAY_SIZE(ah->ah_txpower.txp_pcdac);
min = AR5K_EEPROM_PCDAC_START; min = AR5K_EEPROM_PCDAC_START;
max = AR5K_EEPROM_PCDAC_STOP; max = AR5K_EEPROM_PCDAC_STOP;
@@ -2418,51 +2837,64 @@ static void ath5k_txpower_table(struct a @@ -1473,51 +1892,64 @@ static void ath5k_txpower_table(struct a
#else #else
min; min;
#endif #endif
@ -568,7 +568,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
} }
ath5k_hw_reg_write(ah, AR5K_TXPOWER_OFDM(3, 24) | ath5k_hw_reg_write(ah, AR5K_TXPOWER_OFDM(3, 24) |
@@ -2481,12 +2913,19 @@ ath5k_hw_txpower(struct ath5k_hw *ah, st @@ -1536,12 +1968,19 @@ ath5k_hw_txpower(struct ath5k_hw *ah, st
AR5K_TXPOWER_CCK(13, 16) | AR5K_TXPOWER_CCK(12, 8) | AR5K_TXPOWER_CCK(13, 16) | AR5K_TXPOWER_CCK(12, 8) |
AR5K_TXPOWER_CCK(11, 0), AR5K_PHY_TXPOWER_RATE4); AR5K_TXPOWER_CCK(11, 0), AR5K_PHY_TXPOWER_RATE4);
@ -592,7 +592,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
} }
--- a/drivers/net/wireless/ath5k/ath5k.h --- a/drivers/net/wireless/ath5k/ath5k.h
+++ b/drivers/net/wireless/ath5k/ath5k.h +++ b/drivers/net/wireless/ath5k/ath5k.h
@@ -207,7 +207,7 @@ @@ -204,7 +204,7 @@
#define AR5K_TUNE_CWMAX_11B 1023 #define AR5K_TUNE_CWMAX_11B 1023
#define AR5K_TUNE_CWMAX_XR 7 #define AR5K_TUNE_CWMAX_XR 7
#define AR5K_TUNE_NOISE_FLOOR -72 #define AR5K_TUNE_NOISE_FLOOR -72
@ -601,9 +601,9 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
#define AR5K_TUNE_DEFAULT_TXPOWER 30 #define AR5K_TUNE_DEFAULT_TXPOWER 30
#define AR5K_TUNE_TPC_TXPOWER true #define AR5K_TUNE_TPC_TXPOWER true
#define AR5K_TUNE_ANT_DIVERSITY true #define AR5K_TUNE_ANT_DIVERSITY true
@@ -1115,11 +1115,23 @@ struct ath5k_hw { @@ -1085,11 +1085,23 @@ struct ath5k_hw {
struct ath5k_gain ah_gain; struct ath5k_gain ah_gain;
u32 ah_offset[AR5K_MAX_RF_BANKS]; u8 ah_offset[AR5K_MAX_RF_BANKS];
+ +
struct { struct {
@ -628,7 +628,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
} ah_txpower; } ah_txpower;
--- a/drivers/net/wireless/ath5k/reg.h --- a/drivers/net/wireless/ath5k/reg.h
+++ b/drivers/net/wireless/ath5k/reg.h +++ b/drivers/net/wireless/ath5k/reg.h
@@ -1549,6 +1549,15 @@ @@ -1552,6 +1552,15 @@
/*===5212 Specific PCU registers===*/ /*===5212 Specific PCU registers===*/
@ -644,7 +644,7 @@ Signed-off-by: Felix Fietkau <nbd@openwrt.org>
/* /*
* XR (eXtended Range) mode register * XR (eXtended Range) mode register
@@ -2578,6 +2587,12 @@ @@ -2550,6 +2559,12 @@
#define AR5K_PHY_TPC_RG1 0xa258 #define AR5K_PHY_TPC_RG1 0xa258
#define AR5K_PHY_TPC_RG1_NUM_PD_GAIN 0x0000c000 #define AR5K_PHY_TPC_RG1_NUM_PD_GAIN 0x0000c000
#define AR5K_PHY_TPC_RG1_NUM_PD_GAIN_S 14 #define AR5K_PHY_TPC_RG1_NUM_PD_GAIN_S 14

View File

@ -1,6 +1,6 @@
--- a/drivers/net/wireless/ath9k/main.c --- a/drivers/net/wireless/ath9k/main.c
+++ b/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c
@@ -1026,6 +1026,9 @@ static void ath_unregister_led(struct at @@ -1023,6 +1023,9 @@ static void ath_unregister_led(struct at
static void ath_deinit_leds(struct ath_softc *sc) static void ath_deinit_leds(struct ath_softc *sc)
{ {
@ -10,7 +10,7 @@
cancel_delayed_work_sync(&sc->ath_led_blink_work); cancel_delayed_work_sync(&sc->ath_led_blink_work);
ath_unregister_led(&sc->assoc_led); ath_unregister_led(&sc->assoc_led);
sc->sc_flags &= ~SC_OP_LED_ASSOCIATED; sc->sc_flags &= ~SC_OP_LED_ASSOCIATED;
@@ -1040,6 +1043,9 @@ static void ath_init_leds(struct ath_sof @@ -1037,6 +1040,9 @@ static void ath_init_leds(struct ath_sof
char *trigger; char *trigger;
int ret; int ret;

View File

@ -1,6 +1,6 @@
--- a/config.mk --- a/config.mk
+++ b/config.mk +++ b/config.mk
@@ -98,7 +98,7 @@ ifneq ($(CONFIG_PCI),) @@ -110,7 +110,7 @@ ifneq ($(CONFIG_PCI),)
CONFIG_ATH5K=m CONFIG_ATH5K=m
# CONFIG_ATH5K_DEBUG is not set # CONFIG_ATH5K_DEBUG is not set
CONFIG_ATH9K=m CONFIG_ATH9K=m

View File

@ -1,25 +1,25 @@
--- a/drivers/net/wireless/ath9k/hw.c --- a/drivers/net/wireless/ath9k/hw.c
+++ b/drivers/net/wireless/ath9k/hw.c +++ b/drivers/net/wireless/ath9k/hw.c
@@ -500,11 +500,18 @@ static int ath9k_hw_init_macaddr(struct @@ -493,11 +493,18 @@ static int ath9k_hw_init_macaddr(struct
ahp->ah_macaddr[2 * i] = eeval >> 8; ah->macaddr[2 * i] = eeval >> 8;
ahp->ah_macaddr[2 * i + 1] = eeval & 0xff; ah->macaddr[2 * i + 1] = eeval & 0xff;
} }
- if (sum == 0 || sum == 0xffff * 3) { - if (sum == 0 || sum == 0xffff * 3) {
+ +
+ if (!is_valid_ether_addr(ahp->ah_macaddr)) { + if (!is_valid_ether_addr(ah->macaddr)) {
+ DECLARE_MAC_BUF(macbuf); + DECLARE_MAC_BUF(macbuf);
+ +
+ DPRINTF(ah->ah_sc, ATH_DBG_EEPROM, + DPRINTF(ah->ah_sc, ATH_DBG_EEPROM,
+ "eeprom contains invalid mac address: %s\n", + "eeprom contains invalid mac address: %s\n",
+ print_mac(macbuf, ahp->ah_macaddr)); + print_mac(macbuf, ah->macaddr));
+ +
+ random_ether_addr(ahp->ah_macaddr); + random_ether_addr(ah->macaddr);
DPRINTF(ah->ah_sc, ATH_DBG_EEPROM, DPRINTF(ah->ah_sc, ATH_DBG_EEPROM,
- "mac address read failed: %pM\n", - "mac address read failed: %pM\n",
- ahp->ah_macaddr); - ah->macaddr);
- return -EADDRNOTAVAIL; - return -EADDRNOTAVAIL;
+ "random mac address will be used: %s\n", + "random mac address will be used: %s\n",
+ print_mac(macbuf, ahp->ah_macaddr)); + print_mac(macbuf, ah->macaddr));
} }
return 0; return 0;