Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 224622
b: refs/heads/master
c: aaa13ca
h: refs/heads/master
v: v3
  • Loading branch information
Felix Fietkau authored and John W. Linville committed Nov 18, 2010
1 parent 4e81b81 commit 1c76b79
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a05b5d45049d60a06a1b12976150572304a51928
refs/heads/master: aaa13ca2428789b3c8096b5edc175d4d78b5f504
15 changes: 15 additions & 0 deletions trunk/drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
Original file line number Diff line number Diff line change
Expand Up @@ -3271,6 +3271,18 @@ static bool ar9300_check_eeprom_header(struct ath_hw *ah, eeprom_read_op read,
return ar9300_check_header(header);
}

static int ar9300_eeprom_restore_flash(struct ath_hw *ah, u8 *mptr,
int mdata_size)
{
struct ath_common *common = ath9k_hw_common(ah);
u16 *data = (u16 *) mptr;
int i;

for (i = 0; i < mdata_size / 2; i++, data++)
ath9k_hw_nvram_read(common, i, data);

return 0;
}
/*
* Read the configuration data from the eeprom.
* The data can be put in any specified memory buffer.
Expand All @@ -3293,6 +3305,9 @@ static int ar9300_eeprom_restore_internal(struct ath_hw *ah,
struct ath_common *common = ath9k_hw_common(ah);
eeprom_read_op read;

if (ath9k_hw_use_flash(ah))
return ar9300_eeprom_restore_flash(ah, mptr, mdata_size);

word = kzalloc(2048, GFP_KERNEL);
if (!word)
return -1;
Expand Down

0 comments on commit 1c76b79

Please sign in to comment.