Commit 0d7aada3 authored by Gabor Juhos's avatar Gabor Juhos Committed by John W. Linville

rt2x00: rt73usb: 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.
Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
Acked-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
Acked-by: default avatarGertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 1896b760
...@@ -2359,26 +2359,40 @@ static const struct rt2x00lib_ops rt73usb_rt2x00_ops = { ...@@ -2359,26 +2359,40 @@ static const struct rt2x00lib_ops rt73usb_rt2x00_ops = {
.config = rt73usb_config, .config = rt73usb_config,
}; };
static const struct data_queue_desc rt73usb_queue_rx = { static void rt73usb_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_usb), queue->limit = 32;
}; queue->data_size = DATA_FRAME_SIZE;
queue->desc_size = RXD_DESC_SIZE;
queue->priv_size = sizeof(struct queue_entry_priv_usb);
break;
static const struct data_queue_desc rt73usb_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_usb), queue->limit = 32;
}; queue->data_size = DATA_FRAME_SIZE;
queue->desc_size = TXD_DESC_SIZE;
queue->priv_size = sizeof(struct queue_entry_priv_usb);
break;
static const struct data_queue_desc rt73usb_queue_bcn = { case QID_BEACON:
.entry_num = 4, queue->limit = 4;
.data_size = MGMT_FRAME_SIZE, queue->data_size = MGMT_FRAME_SIZE;
.desc_size = TXINFO_SIZE, queue->desc_size = TXINFO_SIZE;
.priv_size = sizeof(struct queue_entry_priv_usb), queue->priv_size = sizeof(struct queue_entry_priv_usb);
}; break;
case QID_ATIM:
/* fallthrough */
default:
BUG();
break;
}
}
static const struct rt2x00_ops rt73usb_ops = { static const struct rt2x00_ops rt73usb_ops = {
.name = KBUILD_MODNAME, .name = KBUILD_MODNAME,
...@@ -2387,9 +2401,7 @@ static const struct rt2x00_ops rt73usb_ops = { ...@@ -2387,9 +2401,7 @@ static const struct rt2x00_ops rt73usb_ops = {
.rf_size = RF_SIZE, .rf_size = RF_SIZE,
.tx_queues = NUM_TX_QUEUES, .tx_queues = NUM_TX_QUEUES,
.extra_tx_headroom = TXD_DESC_SIZE, .extra_tx_headroom = TXD_DESC_SIZE,
.rx = &rt73usb_queue_rx, .queue_init = rt73usb_queue_init,
.tx = &rt73usb_queue_tx,
.bcn = &rt73usb_queue_bcn,
.lib = &rt73usb_rt2x00_ops, .lib = &rt73usb_rt2x00_ops,
.hw = &rt73usb_mac80211_ops, .hw = &rt73usb_mac80211_ops,
#ifdef CONFIG_RT2X00_LIB_DEBUGFS #ifdef CONFIG_RT2X00_LIB_DEBUGFS
......
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