Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

rt2x00: remove data_queue_desc struct

If the queue_init callback is implemented
by a driver it gets used instead of the
data_queue_desc based initialization.

The queue_init callback is implemented for
each drivers now, so the old initialization
method is not used anymore. Remove the unused
data_queue_desc structure and all of the
related code.

Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Acked-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Gertjan van Wingerde <gwingerde@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>

authored by

Gabor Juhos and committed by
John W. Linville
705802bf c29a32c8

+1 -64
-4
drivers/net/wireless/rt2x00/rt2x00.h
··· 649 649 const unsigned int rf_size; 650 650 const unsigned int tx_queues; 651 651 const unsigned int extra_tx_headroom; 652 - const struct data_queue_desc *rx; 653 - const struct data_queue_desc *tx; 654 - const struct data_queue_desc *bcn; 655 - const struct data_queue_desc *atim; 656 652 void (*queue_init)(struct data_queue *queue); 657 653 const struct rt2x00lib_ops *lib; 658 654 const void *drv;
+1 -41
drivers/net/wireless/rt2x00/rt2x00queue.c
··· 1276 1276 } 1277 1277 } 1278 1278 1279 - static const struct data_queue_desc * 1280 - rt2x00queue_get_qdesc_by_qid(struct rt2x00_dev *rt2x00dev, 1281 - enum data_queue_qid qid) 1282 - { 1283 - switch (qid) { 1284 - case QID_RX: 1285 - return rt2x00dev->ops->rx; 1286 - 1287 - case QID_AC_BE: 1288 - case QID_AC_BK: 1289 - case QID_AC_VO: 1290 - case QID_AC_VI: 1291 - return rt2x00dev->ops->tx; 1292 - 1293 - case QID_BEACON: 1294 - return rt2x00dev->ops->bcn; 1295 - 1296 - case QID_ATIM: 1297 - return rt2x00dev->ops->atim; 1298 - 1299 - default: 1300 - break; 1301 - } 1302 - 1303 - return NULL; 1304 - } 1305 - 1306 1279 static void rt2x00queue_init(struct rt2x00_dev *rt2x00dev, 1307 1280 struct data_queue *queue, enum data_queue_qid qid) 1308 1281 { ··· 1290 1317 queue->cw_min = 5; 1291 1318 queue->cw_max = 10; 1292 1319 1293 - if (rt2x00dev->ops->queue_init) { 1294 - rt2x00dev->ops->queue_init(queue); 1295 - } else { 1296 - const struct data_queue_desc *qdesc; 1297 - 1298 - qdesc = rt2x00queue_get_qdesc_by_qid(rt2x00dev, qid); 1299 - BUG_ON(!qdesc); 1300 - 1301 - queue->limit = qdesc->entry_num; 1302 - queue->data_size = qdesc->data_size; 1303 - queue->desc_size = qdesc->desc_size; 1304 - queue->winfo_size = qdesc->winfo_size; 1305 - queue->priv_size = qdesc->priv_size; 1306 - } 1320 + rt2x00dev->ops->queue_init(queue); 1307 1321 1308 1322 queue->threshold = DIV_ROUND_UP(queue->limit, 10); 1309 1323 }
-19
drivers/net/wireless/rt2x00/rt2x00queue.h
··· 489 489 }; 490 490 491 491 /** 492 - * struct data_queue_desc: Data queue description 493 - * 494 - * The information in this structure is used by drivers 495 - * to inform rt2x00lib about the creation of the data queue. 496 - * 497 - * @entry_num: Maximum number of entries for a queue. 498 - * @data_size: Maximum data size for the frames in this queue. 499 - * @desc_size: Hardware descriptor size for the data in this queue. 500 - * @priv_size: Size of per-queue_entry private data. 501 - */ 502 - struct data_queue_desc { 503 - unsigned short entry_num; 504 - unsigned short data_size; 505 - unsigned char desc_size; 506 - unsigned char winfo_size; 507 - unsigned short priv_size; 508 - }; 509 - 510 - /** 511 492 * queue_end - Return pointer to the last queue (HELPER MACRO). 512 493 * @__dev: Pointer to &struct rt2x00_dev 513 494 *