diff options
author | Michael Buesch <mb@bu3sch.de> | 2009-09-06 09:42:45 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-09-09 11:18:52 -0400 |
commit | b0544eb6019a33e836141156a8fbe74a9f8367b4 (patch) | |
tree | 5947b3f4f61882b83378da18063cec15a314ea6d /drivers | |
parent | 4789666e13fb0b2d45feb1b4a5119a1b997ec84c (diff) |
b43: Really disable QoS, if requested
Currently, when QoS-disable is requested, we would leave QoS enabled
in firmware, but only queue frames on one queue.
Change that and also tell firmware about disabled QoS, so it
completely ignores all the QoS parameters. Also don't upload the parameters,
if QoS is disabled.
Signed-off-by: Michael Buesch <mb@bu3sch.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/b43/main.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 0a4d0b3eceb0..d29323d50837 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -3093,7 +3093,6 @@ static int b43_op_tx(struct ieee80211_hw *hw, | |||
3093 | return NETDEV_TX_OK; | 3093 | return NETDEV_TX_OK; |
3094 | } | 3094 | } |
3095 | 3095 | ||
3096 | /* Locking: wl->irq_lock */ | ||
3097 | static void b43_qos_params_upload(struct b43_wldev *dev, | 3096 | static void b43_qos_params_upload(struct b43_wldev *dev, |
3098 | const struct ieee80211_tx_queue_params *p, | 3097 | const struct ieee80211_tx_queue_params *p, |
3099 | u16 shm_offset) | 3098 | u16 shm_offset) |
@@ -3102,6 +3101,9 @@ static void b43_qos_params_upload(struct b43_wldev *dev, | |||
3102 | int bslots, tmp; | 3101 | int bslots, tmp; |
3103 | unsigned int i; | 3102 | unsigned int i; |
3104 | 3103 | ||
3104 | if (!dev->qos_enabled) | ||
3105 | return; | ||
3106 | |||
3105 | bslots = b43_read16(dev, B43_MMIO_RNG) & p->cw_min; | 3107 | bslots = b43_read16(dev, B43_MMIO_RNG) & p->cw_min; |
3106 | 3108 | ||
3107 | memset(¶ms, 0, sizeof(params)); | 3109 | memset(¶ms, 0, sizeof(params)); |
@@ -3147,6 +3149,9 @@ static void b43_qos_upload_all(struct b43_wldev *dev) | |||
3147 | struct b43_qos_params *params; | 3149 | struct b43_qos_params *params; |
3148 | unsigned int i; | 3150 | unsigned int i; |
3149 | 3151 | ||
3152 | if (!dev->qos_enabled) | ||
3153 | return; | ||
3154 | |||
3150 | BUILD_BUG_ON(ARRAY_SIZE(b43_qos_shm_offsets) != | 3155 | BUILD_BUG_ON(ARRAY_SIZE(b43_qos_shm_offsets) != |
3151 | ARRAY_SIZE(wl->qos_params)); | 3156 | ARRAY_SIZE(wl->qos_params)); |
3152 | 3157 | ||
@@ -3206,6 +3211,16 @@ static void b43_qos_clear(struct b43_wl *wl) | |||
3206 | /* Initialize the core's QOS capabilities */ | 3211 | /* Initialize the core's QOS capabilities */ |
3207 | static void b43_qos_init(struct b43_wldev *dev) | 3212 | static void b43_qos_init(struct b43_wldev *dev) |
3208 | { | 3213 | { |
3214 | if (!dev->qos_enabled) { | ||
3215 | /* Disable QOS support. */ | ||
3216 | b43_hf_write(dev, b43_hf_read(dev) & ~B43_HF_EDCF); | ||
3217 | b43_write16(dev, B43_MMIO_IFSCTL, | ||
3218 | b43_read16(dev, B43_MMIO_IFSCTL) | ||
3219 | & ~B43_MMIO_IFSCTL_USE_EDCF); | ||
3220 | b43dbg(dev->wl, "QoS disabled\n"); | ||
3221 | return; | ||
3222 | } | ||
3223 | |||
3209 | /* Upload the current QOS parameters. */ | 3224 | /* Upload the current QOS parameters. */ |
3210 | b43_qos_upload_all(dev); | 3225 | b43_qos_upload_all(dev); |
3211 | 3226 | ||
@@ -3214,6 +3229,7 @@ static void b43_qos_init(struct b43_wldev *dev) | |||
3214 | b43_write16(dev, B43_MMIO_IFSCTL, | 3229 | b43_write16(dev, B43_MMIO_IFSCTL, |
3215 | b43_read16(dev, B43_MMIO_IFSCTL) | 3230 | b43_read16(dev, B43_MMIO_IFSCTL) |
3216 | | B43_MMIO_IFSCTL_USE_EDCF); | 3231 | | B43_MMIO_IFSCTL_USE_EDCF); |
3232 | b43dbg(dev->wl, "QoS enabled\n"); | ||
3217 | } | 3233 | } |
3218 | 3234 | ||
3219 | static int b43_op_conf_tx(struct ieee80211_hw *hw, u16 _queue, | 3235 | static int b43_op_conf_tx(struct ieee80211_hw *hw, u16 _queue, |