Commit 4214852e authored by Hauke Mehrtens's avatar Hauke Mehrtens Committed by John W. Linville

b43: add support for setting the beacon listen interval

Signed-off-by: default avatarHauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0996c391
...@@ -300,6 +300,7 @@ enum { ...@@ -300,6 +300,7 @@ enum {
#define B43_SHM_SH_LFFBLIM 0x0046 /* Long frame fallback retry limit */ #define B43_SHM_SH_LFFBLIM 0x0046 /* Long frame fallback retry limit */
#define B43_SHM_SH_BEACPHYCTL 0x0054 /* Beacon PHY TX control word (see PHY TX control) */ #define B43_SHM_SH_BEACPHYCTL 0x0054 /* Beacon PHY TX control word (see PHY TX control) */
#define B43_SHM_SH_EXTNPHYCTL 0x00B0 /* Extended bytes for beacon PHY control (N) */ #define B43_SHM_SH_EXTNPHYCTL 0x00B0 /* Extended bytes for beacon PHY control (N) */
#define B43_SHM_SH_BCN_LI 0x00B6 /* beacon listen interval */
/* SHM_SHARED ACK/CTS control */ /* SHM_SHARED ACK/CTS control */
#define B43_SHM_SH_ACKCTSPHYCTL 0x0022 /* ACK/CTS PHY control word (see PHY TX control) */ #define B43_SHM_SH_ACKCTSPHYCTL 0x0022 /* ACK/CTS PHY control word (see PHY TX control) */
/* SHM_SHARED probe response variables */ /* SHM_SHARED probe response variables */
......
...@@ -3930,6 +3930,12 @@ static int b43_switch_band(struct b43_wldev *dev, ...@@ -3930,6 +3930,12 @@ static int b43_switch_band(struct b43_wldev *dev,
return 0; return 0;
} }
static void b43_set_beacon_listen_interval(struct b43_wldev *dev, u16 interval)
{
interval = min_t(u16, interval, (u16)0xFF);
b43_shm_write16(dev, B43_SHM_SHARED, B43_SHM_SH_BCN_LI, interval);
}
/* Write the short and long frame retry limit values. */ /* Write the short and long frame retry limit values. */
static void b43_set_retry_limits(struct b43_wldev *dev, static void b43_set_retry_limits(struct b43_wldev *dev,
unsigned int short_retry, unsigned int short_retry,
...@@ -3958,6 +3964,9 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed) ...@@ -3958,6 +3964,9 @@ static int b43_op_config(struct ieee80211_hw *hw, u32 changed)
mutex_lock(&wl->mutex); mutex_lock(&wl->mutex);
b43_mac_suspend(dev); b43_mac_suspend(dev);
if (changed & IEEE80211_CONF_CHANGE_LISTEN_INTERVAL)
b43_set_beacon_listen_interval(dev, conf->listen_interval);
if (changed & IEEE80211_CONF_CHANGE_CHANNEL) { if (changed & IEEE80211_CONF_CHANGE_CHANNEL) {
phy->chandef = &conf->chandef; phy->chandef = &conf->chandef;
phy->channel = conf->chandef.chan->hw_value; phy->channel = conf->chandef.chan->hw_value;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment