ath5k: new function for setting the antenna switch table
Collect all pieces concering the antenna switch table into one function. Previously it was split up between ath5k_hw_reset() and ath5k_hw_commit_eeprom_settings(). Also we need to set the antenna switch table when ath5k_hw_set_antenna_mode() is called manually (by "iw phy0 antenna set", for example). I'm not sure if we need to set the switchtable at the same place in ath5k_hw_reset() as it was before - it is set later thru ath5k_hw_set_antenna_mode() anyways - but i leave it there to avoid problems(?). Plus print switchtable registers in the debugfs file. Signed-off-by: Bruno Randolf <br1@einfach.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
39d5b2c83c
commit
0ca74027ac
@@ -425,6 +425,13 @@ static ssize_t read_file_antenna(struct file *file, char __user *user_buf,
|
||||
"AR5K_PHY_FAST_ANT_DIV_EN\t%d\n",
|
||||
(v & AR5K_PHY_FAST_ANT_DIV_EN) != 0);
|
||||
|
||||
v = ath5k_hw_reg_read(sc->ah, AR5K_PHY_ANT_SWITCH_TABLE_0);
|
||||
len += snprintf(buf+len, sizeof(buf)-len,
|
||||
"\nAR5K_PHY_ANT_SWITCH_TABLE_0\t0x%08x\n", v);
|
||||
v = ath5k_hw_reg_read(sc->ah, AR5K_PHY_ANT_SWITCH_TABLE_1);
|
||||
len += snprintf(buf+len, sizeof(buf)-len,
|
||||
"AR5K_PHY_ANT_SWITCH_TABLE_1\t0x%08x\n", v);
|
||||
|
||||
return simple_read_from_buffer(user_buf, count, ppos, buf, len);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user