diff options
author | Peter Denison <openwrt@marshadder.org> | 2007-06-25 19:52:55 +0000 |
---|---|---|
committer | Peter Denison <openwrt@marshadder.org> | 2007-06-25 19:52:55 +0000 |
commit | 38f683ca8545e047ca09ce4262d6839f5e38aa35 (patch) | |
tree | 9bc98534eff6f3b7550c7fa170e63c35670637cb /package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_xmit.c | |
parent | c62ae7c76e7f93c3e053ac2a92fece74c5b2c48e (diff) | |
download | upstream-38f683ca8545e047ca09ce4262d6839f5e38aa35.tar.gz upstream-38f683ca8545e047ca09ce4262d6839f5e38aa35.tar.bz2 upstream-38f683ca8545e047ca09ce4262d6839f5e38aa35.zip |
Merge bcm43xx-mac80211 driver from tree at bu3sch.de, pulled 24/6
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7734 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_xmit.c')
-rw-r--r-- | package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_xmit.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_xmit.c b/package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_xmit.c index 0b0dad4ce1..8ad39386cf 100644 --- a/package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_xmit.c +++ b/package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_xmit.c @@ -601,3 +601,51 @@ void bcm43xx_handle_hwtxstatus(struct bcm43xx_wldev *dev, bcm43xx_handle_txstatus(dev, &status); } + +/* Stop any TX operation on the device (suspend the hardware queues) */ +void bcm43xx_tx_suspend(struct bcm43xx_wldev *dev) +{ + if (bcm43xx_using_pio(dev)) + bcm43xx_pio_freeze_txqueues(dev); + else + bcm43xx_dma_tx_suspend(dev); +} + +/* Resume any TX operation on the device (resume the hardware queues) */ +void bcm43xx_tx_resume(struct bcm43xx_wldev *dev) +{ + if (bcm43xx_using_pio(dev)) + bcm43xx_pio_thaw_txqueues(dev); + else + bcm43xx_dma_tx_resume(dev); +} + +#if 0 +static void upload_qos_parms(struct bcm43xx_wldev *dev, + const u16 *parms, + u16 offset) +{ + int i; + + for (i = 0; i < BCM43xx_NR_QOSPARMS; i++) { + bcm43xx_shm_write16(dev, BCM43xx_SHM_SHARED, + offset + (i * 2), parms[i]); + } +} +#endif + +/* Initialize the QoS parameters */ +void bcm43xx_qos_init(struct bcm43xx_wldev *dev) +{ + /* FIXME: This function must probably be called from the mac80211 + * config callback. */ +return; + + bcm43xx_hf_write(dev, bcm43xx_hf_read(dev) | BCM43xx_HF_EDCF); + //FIXME kill magic + bcm43xx_write16(dev, 0x688, + bcm43xx_read16(dev, 0x688) | 0x4); + + + /*TODO: We might need some stack support here to get the values. */ +} |