iprowifi4965: import two patches from FreeBSD current
could help with #16238
1/ iwn: adjust EEPROM read timeout for Intel 4965AGN M2
Reading EEPROM from Intel 4965AGN M2 takes 60 us which was causing panic
on system startup.
2/ from 561d34d705
The value for field "barker_mrc" of struct iwn2030_sensitivity_limits
was obtained from linux 3.2 wireless/iwlwifi driver code (iwl-2000.c:115
.barker_corr_th_min_mrc = 390).
Change-Id: I730bd6106e0d76da89fff041672ccbc4ef607976
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4359
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
parent
d637e0bec1
commit
0a856fec02
|
@ -1693,13 +1693,13 @@ iwn_read_prom_data(struct iwn_softc *sc, uint32_t addr, void *data, int count)
|
|||
addr += sc->prom_base;
|
||||
for (; count > 0; count -= 2, addr++) {
|
||||
IWN_WRITE(sc, IWN_EEPROM, addr << 2);
|
||||
for (ntries = 0; ntries < 10; ntries++) {
|
||||
for (ntries = 0; ntries < 20; ntries++) {
|
||||
val = IWN_READ(sc, IWN_EEPROM);
|
||||
if (val & IWN_EEPROM_READ_VALID)
|
||||
break;
|
||||
DELAY(5);
|
||||
}
|
||||
if (ntries == 10) {
|
||||
if (ntries == 20) {
|
||||
device_printf(sc->sc_dev,
|
||||
"timeout reading ROM at 0x%x\n", addr);
|
||||
return ETIMEDOUT;
|
||||
|
|
|
@ -2267,7 +2267,8 @@ static const struct iwn_sensitivity_limits iwn2030_sensitivity_limits = {
|
|||
160,310,
|
||||
97,
|
||||
97,
|
||||
110
|
||||
110,
|
||||
390
|
||||
};
|
||||
|
||||
/* Map TID to TX scheduler's FIFO. */
|
||||
|
|
Loading…
Reference in New Issue