summaryrefslogtreecommitdiff
path: root/package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_xmit.c
diff options
context:
space:
mode:
authorPeter Denison <openwrt@marshadder.org>2007-06-25 19:52:55 +0000
committerPeter Denison <openwrt@marshadder.org>2007-06-25 19:52:55 +0000
commita83ac994c3a6948ab83d8de78fc9d1ae55451fce (patch)
treef9d25353c69bb492a847e4a004ed5f88fc4ba03a /package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_xmit.c
parent164e789c7ae5f9369d3a89cf2e76c0bde758dba5 (diff)
downloadmtk-20170518-a83ac994c3a6948ab83d8de78fc9d1ae55451fce.zip
mtk-20170518-a83ac994c3a6948ab83d8de78fc9d1ae55451fce.tar.gz
mtk-20170518-a83ac994c3a6948ab83d8de78fc9d1ae55451fce.tar.bz2
Merge bcm43xx-mac80211 driver from tree at bu3sch.de, pulled 24/6
SVN-Revision: 7734
Diffstat (limited to 'package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_xmit.c')
-rw-r--r--package/bcm43xx-mac80211/src/bcm43xx/bcm43xx_xmit.c48
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 0b0dad4..8ad3938 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. */
+}