提交 7c030821 编写于 作者: G Gabor Juhos 提交者: John W. Linville

rt2x00: rt2500pci: implement queue_init callback

The generic rt2x00 code has been changed to allow the
drivers toimplement dynamic data_queue initialization.

Remove the static data queue descriptor structures
and implement the queue_init callback instead.

Compile tested only.
Signed-off-by: NGabor Juhos <juhosg@openwrt.org>
Acked-by: NStanislaw Gruszka <sgruszka@redhat.com>
Acked-by: NGertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 3d8979ba
...@@ -2056,33 +2056,45 @@ static const struct rt2x00lib_ops rt2500pci_rt2x00_ops = { ...@@ -2056,33 +2056,45 @@ static const struct rt2x00lib_ops rt2500pci_rt2x00_ops = {
.config = rt2500pci_config, .config = rt2500pci_config,
}; };
static const struct data_queue_desc rt2500pci_queue_rx = { static void rt2500pci_queue_init(struct data_queue *queue)
.entry_num = 32, {
.data_size = DATA_FRAME_SIZE, switch (queue->qid) {
.desc_size = RXD_DESC_SIZE, case QID_RX:
.priv_size = sizeof(struct queue_entry_priv_mmio), queue->limit = 32;
}; queue->data_size = DATA_FRAME_SIZE;
queue->desc_size = RXD_DESC_SIZE;
queue->priv_size = sizeof(struct queue_entry_priv_mmio);
break;
static const struct data_queue_desc rt2500pci_queue_tx = { case QID_AC_VO:
.entry_num = 32, case QID_AC_VI:
.data_size = DATA_FRAME_SIZE, case QID_AC_BE:
.desc_size = TXD_DESC_SIZE, case QID_AC_BK:
.priv_size = sizeof(struct queue_entry_priv_mmio), queue->limit = 32;
}; queue->data_size = DATA_FRAME_SIZE;
queue->desc_size = TXD_DESC_SIZE;
queue->priv_size = sizeof(struct queue_entry_priv_mmio);
break;
static const struct data_queue_desc rt2500pci_queue_bcn = { case QID_BEACON:
.entry_num = 1, queue->limit = 1;
.data_size = MGMT_FRAME_SIZE, queue->data_size = MGMT_FRAME_SIZE;
.desc_size = TXD_DESC_SIZE, queue->desc_size = TXD_DESC_SIZE;
.priv_size = sizeof(struct queue_entry_priv_mmio), queue->priv_size = sizeof(struct queue_entry_priv_mmio);
}; break;
static const struct data_queue_desc rt2500pci_queue_atim = { case QID_ATIM:
.entry_num = 8, queue->limit = 8;
.data_size = DATA_FRAME_SIZE, queue->data_size = DATA_FRAME_SIZE;
.desc_size = TXD_DESC_SIZE, queue->desc_size = TXD_DESC_SIZE;
.priv_size = sizeof(struct queue_entry_priv_mmio), queue->priv_size = sizeof(struct queue_entry_priv_mmio);
}; break;
default:
BUG();
break;
}
}
static const struct rt2x00_ops rt2500pci_ops = { static const struct rt2x00_ops rt2500pci_ops = {
.name = KBUILD_MODNAME, .name = KBUILD_MODNAME,
...@@ -2091,10 +2103,7 @@ static const struct rt2x00_ops rt2500pci_ops = { ...@@ -2091,10 +2103,7 @@ static const struct rt2x00_ops rt2500pci_ops = {
.rf_size = RF_SIZE, .rf_size = RF_SIZE,
.tx_queues = NUM_TX_QUEUES, .tx_queues = NUM_TX_QUEUES,
.extra_tx_headroom = 0, .extra_tx_headroom = 0,
.rx = &rt2500pci_queue_rx, .queue_init = rt2500pci_queue_init,
.tx = &rt2500pci_queue_tx,
.bcn = &rt2500pci_queue_bcn,
.atim = &rt2500pci_queue_atim,
.lib = &rt2500pci_rt2x00_ops, .lib = &rt2500pci_rt2x00_ops,
.hw = &rt2500pci_mac80211_ops, .hw = &rt2500pci_mac80211_ops,
#ifdef CONFIG_RT2X00_LIB_DEBUGFS #ifdef CONFIG_RT2X00_LIB_DEBUGFS
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册