• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-R7000-V1.0.7.12_1.2.5/components/opensource/linux/linux-2.6.36/drivers/net/wireless/rt2x00/

Lines Matching refs:rt2x00dev

38 int rt2x00usb_vendor_request(struct rt2x00_dev *rt2x00dev,
44 struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev);
51 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
67 clear_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags);
72 ERROR(rt2x00dev,
80 int rt2x00usb_vendor_req_buff_lock(struct rt2x00_dev *rt2x00dev,
87 BUG_ON(!mutex_is_locked(&rt2x00dev->csr_mutex));
92 if (unlikely(!rt2x00dev->csr.cache || buffer_length > CSR_CACHE_SIZE)) {
93 ERROR(rt2x00dev, "CSR cache not available.\n");
98 memcpy(rt2x00dev->csr.cache, buffer, buffer_length);
100 status = rt2x00usb_vendor_request(rt2x00dev, request, requesttype,
101 offset, 0, rt2x00dev->csr.cache,
105 memcpy(buffer, rt2x00dev->csr.cache, buffer_length);
111 int rt2x00usb_vendor_request_buff(struct rt2x00_dev *rt2x00dev,
120 mutex_lock(&rt2x00dev->csr_mutex);
127 status = rt2x00usb_vendor_req_buff_lock(rt2x00dev, request,
136 mutex_unlock(&rt2x00dev->csr_mutex);
142 int rt2x00usb_regbusy_read(struct rt2x00_dev *rt2x00dev,
149 if (!test_bit(DEVICE_STATE_PRESENT, &rt2x00dev->flags))
153 rt2x00usb_register_read_lock(rt2x00dev, offset, reg);
159 ERROR(rt2x00dev, "Indirect register access failed: "
173 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
176 if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags) ||
201 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
202 struct usb_device *usb_dev = to_usb_device_intf(rt2x00dev->dev);
212 length = rt2x00dev->ops->lib->get_tx_data_len(entry);
223 void rt2x00usb_kick_tx_queue(struct rt2x00_dev *rt2x00dev,
226 struct data_queue *queue = rt2x00queue_get_queue(rt2x00dev, qid);
260 void rt2x00usb_kill_tx_queue(struct rt2x00_dev *rt2x00dev,
263 struct data_queue *queue = rt2x00queue_get_queue(rt2x00dev, qid);
275 (test_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags));
300 WARNING(queue->rt2x00dev, "TX queue %d timed out, invoke reset", queue->qid);
310 ieee80211_stop_queue(queue->rt2x00dev->hw, queue->qid);
331 ieee80211_wake_queue(queue->rt2x00dev->hw, queue->qid);
334 void rt2x00usb_watchdog(struct rt2x00_dev *rt2x00dev)
338 tx_queue_for_each(rt2x00dev, queue) {
351 struct rt2x00_dev *rt2x00dev = entry->queue->rt2x00dev;
355 if (!test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags) ||
379 rt2x00lib_rxdone(rt2x00dev, entry);
385 void rt2x00usb_disable_radio(struct rt2x00_dev *rt2x00dev)
387 rt2x00usb_vendor_request_sw(rt2x00dev, USB_RX_CONTROL, 0, 0,
394 rt2x00dev->ops->lib->kill_tx_queue(rt2x00dev, QID_RX);
404 to_usb_device_intf(entry->queue->rt2x00dev->dev);
425 struct usb_device *usb_dev = to_usb_device_intf(queue->rt2x00dev->dev);
442 static int rt2x00usb_find_endpoints(struct rt2x00_dev *rt2x00dev)
444 struct usb_interface *intf = to_usb_interface(rt2x00dev->dev);
447 struct data_queue *queue = rt2x00dev->tx;
461 rt2x00usb_assign_endpoint(rt2x00dev->rx, ep_desc);
463 (queue != queue_end(rt2x00dev))) {
474 if (!rt2x00dev->rx->usb_endpoint || !rt2x00dev->tx->usb_endpoint) {
475 ERROR(rt2x00dev, "Bulk-in/Bulk-out endpoints not found\n");
484 txall_queue_for_each(rt2x00dev, queue) {
492 static int rt2x00usb_alloc_urb(struct rt2x00_dev *rt2x00dev,
511 if (rt2x00dev->bcn != queue ||
512 !test_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags))
525 static void rt2x00usb_free_urb(struct rt2x00_dev *rt2x00dev,
546 if (rt2x00dev->bcn != queue ||
547 !test_bit(DRIVER_REQUIRE_BEACON_GUARD, &rt2x00dev->flags))
557 int rt2x00usb_initialize(struct rt2x00_dev *rt2x00dev)
565 status = rt2x00usb_find_endpoints(rt2x00dev);
572 queue_for_each(rt2x00dev, queue) {
573 status = rt2x00usb_alloc_urb(rt2x00dev, queue);
581 rt2x00usb_uninitialize(rt2x00dev);
587 void rt2x00usb_uninitialize(struct rt2x00_dev *rt2x00dev)
591 queue_for_each(rt2x00dev, queue)
592 rt2x00usb_free_urb(rt2x00dev, queue);
599 static void rt2x00usb_free_reg(struct rt2x00_dev *rt2x00dev)
601 kfree(rt2x00dev->rf);
602 rt2x00dev->rf = NULL;
604 kfree(rt2x00dev->eeprom);
605 rt2x00dev->eeprom = NULL;
607 kfree(rt2x00dev->csr.cache);
608 rt2x00dev->csr.cache = NULL;
611 static int rt2x00usb_alloc_reg(struct rt2x00_dev *rt2x00dev)
613 rt2x00dev->csr.cache = kzalloc(CSR_CACHE_SIZE, GFP_KERNEL);
614 if (!rt2x00dev->csr.cache)
617 rt2x00dev->eeprom = kzalloc(rt2x00dev->ops->eeprom_size, GFP_KERNEL);
618 if (!rt2x00dev->eeprom)
621 rt2x00dev->rf = kzalloc(rt2x00dev->ops->rf_size, GFP_KERNEL);
622 if (!rt2x00dev->rf)
630 rt2x00usb_free_reg(rt2x00dev);
641 struct rt2x00_dev *rt2x00dev;
655 rt2x00dev = hw->priv;
656 rt2x00dev->dev = &usb_intf->dev;
657 rt2x00dev->ops = ops;
658 rt2x00dev->hw = hw;
660 rt2x00_set_chip_intf(rt2x00dev, RT2X00_CHIP_INTF_USB);
662 retval = rt2x00usb_alloc_reg(rt2x00dev);
666 retval = rt2x00lib_probe_dev(rt2x00dev);
673 rt2x00usb_free_reg(rt2x00dev);
690 struct rt2x00_dev *rt2x00dev = hw->priv;
695 rt2x00lib_remove_dev(rt2x00dev);
696 rt2x00usb_free_reg(rt2x00dev);
711 struct rt2x00_dev *rt2x00dev = hw->priv;
714 retval = rt2x00lib_suspend(rt2x00dev, state);
730 struct rt2x00_dev *rt2x00dev = hw->priv;
734 return rt2x00lib_resume(rt2x00dev);