linux/drivers/net/wireless/rt2x00
Gabor Juhos 10af87c3d9 rt2x00: rt2x00queue: initialize data_queue fields earlier
Support for rt2800 device is broken since my
'rt2x00: rt2x00dev: use rt2x00dev->tx->limit'
patch. The changelog of that commit says that the
TX data queue is initialized already when the
rt2x00lib_probe_hw() function is called.

However as Jakub noticed it, this statement is not
correct. The queue->limit field is initialized in
the rt2x00queue_alloc_entries routine and that is
not yet called when rt2x00lib_probe_hw() runs.
Because the value of tx->limit contains zero, the
driver tries to allocate a kernel fifo with zero
size and kfifo_alloc rejects that with -EINVAL.

  PCI: Enabling device 0000:01:00.0 (0000 -> 0002)
  ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 3071, rev 021c detected
  ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 0008 detected
  ieee80211 phy1: rt2x00lib_probe_dev: Error - Failed to initialize hw
  rt2800pci: probe of 0000:01:00.0 failed with error -22

Move the data_queue field initialization from
the rt2x00queue_alloc_entries routine into the
rt2x00queue_init function. The initialization
code is not strictly related to the allocation,
and the change ensures that the queue_data fields
can be used in the probe routines.

The patch also introduces a helper function in
order to be able to get the correct data_queue_desc
structure for a given queue. This helper is only
needed temporarily and it will be removed later.

Reported-by: Jakub Kicinski <moorray@wp.pl>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-10 15:37:34 -04:00
..
Kconfig Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless 2013-04-10 09:31:39 -04:00
Makefile rt2x00: rt2x00pci: fix build error on Ralink RT3x5x SoCs 2013-04-03 14:50:06 -04:00
rt2x00.h rt2x00: Use more current logging styles, shrink object size 2013-04-22 15:20:26 -04:00
rt2x00config.c mac80211: Use a cfg80211_chan_def in ieee80211_hw_conf_chan 2013-03-25 19:19:35 +01:00
rt2x00crypto.c
rt2x00debug.c rt2x00: Use more current logging styles, shrink object size 2013-04-22 15:20:26 -04:00
rt2x00debug.h
rt2x00dev.c rt2x00: rt2x00dev: defer operational mode detection 2013-05-22 15:05:31 -04:00
rt2x00dump.h
rt2x00firmware.c rt2x00: Use more current logging styles, shrink object size 2013-04-22 15:20:26 -04:00
rt2x00leds.c rt2x00: Use more current logging styles, shrink object size 2013-04-22 15:20:26 -04:00
rt2x00leds.h
rt2x00lib.h
rt2x00link.c
rt2x00mac.c rt2x00: Use more current logging styles, shrink object size 2013-04-22 15:20:26 -04:00
rt2x00mmio.c rt2x00: Use more current logging styles, shrink object size 2013-04-22 15:20:26 -04:00
rt2x00mmio.h rt2x00: rt2x00mmio: remove unused rt2x00pci_* defines 2013-04-10 14:10:32 -04:00
rt2x00pci.c rt2x00pci: Use PCI MSIs whenever possible 2013-05-22 15:05:32 -04:00
rt2x00pci.h rt2x00: rt2x00pci: fix build error on Ralink RT3x5x SoCs 2013-04-03 14:50:06 -04:00
rt2x00queue.c rt2x00: rt2x00queue: initialize data_queue fields earlier 2013-06-10 15:37:34 -04:00
rt2x00queue.h rt2x00: provide separate information about TXWI & RXWI sizes 2013-04-22 15:20:20 -04:00
rt2x00reg.h
rt2x00soc.c rt2x00: Use more current logging styles, shrink object size 2013-04-22 15:20:26 -04:00
rt2x00soc.h
rt2x00usb.c rt2x00: Use more current logging styles, shrink object size 2013-04-22 15:20:26 -04:00
rt2x00usb.h
rt61pci.c rt2x00: rt61pci: use rt2x00dev->tx->limit 2013-05-22 15:05:30 -04:00
rt61pci.h rt2x00: Unify GPIO register field namings 2012-09-07 15:08:40 -04:00
rt73usb.c rt2x00: Use more current logging styles, shrink object size 2013-04-22 15:20:26 -04:00
rt73usb.h rt2x00: Unify GPIO register field namings 2012-09-07 15:08:40 -04:00
rt2400pci.c rt2x00: Use more current logging styles, shrink object size 2013-04-22 15:20:26 -04:00
rt2400pci.h rt2x00: Unify GPIO register field namings 2012-09-07 15:08:40 -04:00
rt2500pci.c rt2x00: Use more current logging styles, shrink object size 2013-04-22 15:20:26 -04:00
rt2500pci.h rt2x00: Unify GPIO register field namings 2012-09-07 15:08:40 -04:00
rt2500usb.c rt2x00: Use more current logging styles, shrink object size 2013-04-22 15:20:26 -04:00
rt2500usb.h rt2x00: Unify GPIO register field namings 2012-09-07 15:08:40 -04:00
rt2800.h rt2800: 5592: TXWI & RXWI descriptors size 2013-03-18 16:38:35 -04:00
rt2800lib.c rt2800: move 53xx specific bbp initialization 2013-05-24 13:18:21 -04:00
rt2800lib.h rt2x00: rt2800: convert read_eeprom functions to return an int value 2013-01-07 15:16:54 -05:00
rt2800pci.c rt2x00: rt2800pci: use rt2x00dev->tx->limit 2013-05-22 15:05:30 -04:00
rt2800pci.h rt2x00 : RT3290 chip support v4 2012-06-20 14:41:49 -04:00
rt2800usb.c rt2x00: rt2800usb: use rt2x00dev->rx->limit 2013-05-22 15:05:31 -04:00
rt2800usb.h