/*
* Device state switch handlers.
*/
-static void rt2800pci_toggle_irq(struct rt2x00_dev *rt2x00dev,
- enum dev_state state)
+static void rt2800mmio_toggle_irq(struct rt2x00_dev *rt2x00dev,
+ enum dev_state state)
{
u32 reg;
unsigned long flags;
break;
case STATE_RADIO_IRQ_ON:
case STATE_RADIO_IRQ_OFF:
- rt2800pci_toggle_irq(rt2x00dev, state);
+ rt2800mmio_toggle_irq(rt2x00dev, state);
break;
case STATE_DEEP_SLEEP:
case STATE_SLEEP:
/*
* Interrupt functions.
*/
-static void rt2800pci_wakeup(struct rt2x00_dev *rt2x00dev)
+static void rt2800mmio_wakeup(struct rt2x00_dev *rt2x00dev)
{
struct ieee80211_conf conf = { .flags = 0 };
struct rt2x00lib_conf libconf = { .conf = &conf };
rt2800_config(rt2x00dev, &libconf, IEEE80211_CONF_CHANGE_PS);
}
-static bool rt2800pci_txdone_entry_check(struct queue_entry *entry, u32 status)
+static bool rt2800mmio_txdone_entry_check(struct queue_entry *entry, u32 status)
{
__le32 *txwi;
u32 word;
return (tx_wcid == wcid);
}
-static bool rt2800pci_txdone_find_entry(struct queue_entry *entry, void *data)
+static bool rt2800mmio_txdone_find_entry(struct queue_entry *entry, void *data)
{
u32 status = *(u32 *)data;
* To mitigate this effect, associate the tx status to the first frame
* in the tx queue with a matching wcid.
*/
- if (rt2800pci_txdone_entry_check(entry, status) &&
+ if (rt2800mmio_txdone_entry_check(entry, status) &&
!test_bit(ENTRY_DATA_STATUS_SET, &entry->flags)) {
/*
* Got a matching frame, associate the tx status with
return false;
}
-static bool rt2800pci_txdone_match_first(struct queue_entry *entry, void *data)
+static bool rt2800mmio_txdone_match_first(struct queue_entry *entry, void *data)
{
u32 status = *(u32 *)data;
/* Check the next frame */
return false;
}
-static bool rt2800pci_txdone_release_entries(struct queue_entry *entry,
- void *data)
+static bool rt2800mmio_txdone_release_entries(struct queue_entry *entry,
+ void *data)
{
if (test_bit(ENTRY_DATA_STATUS_SET, &entry->flags)) {
rt2800_txdone_entry(entry, entry->status,
return true;
}
-static bool rt2800pci_txdone(struct rt2x00_dev *rt2x00dev)
+static bool rt2800mmio_txdone(struct rt2x00_dev *rt2x00dev)
{
struct data_queue *queue;
u32 status;
*/
if (!rt2x00queue_for_each_entry(queue, Q_INDEX_DONE,
Q_INDEX, &status,
- rt2800pci_txdone_find_entry)) {
+ rt2800mmio_txdone_find_entry)) {
/*
* We cannot match the tx status to any frame, so just
* use the first one.
*/
if (!rt2x00queue_for_each_entry(queue, Q_INDEX_DONE,
Q_INDEX, &status,
- rt2800pci_txdone_match_first)) {
+ rt2800mmio_txdone_match_first)) {
rt2x00_warn(rt2x00dev, "No frame found for TX status on queue %u, dropping\n",
qid);
break;
*/
rt2x00queue_for_each_entry(queue, Q_INDEX_DONE,
Q_INDEX, NULL,
- rt2800pci_txdone_release_entries);
+ rt2800mmio_txdone_release_entries);
if (--max_tx_done == 0)
break;
return !max_tx_done;
}
-static inline void rt2800pci_enable_interrupt(struct rt2x00_dev *rt2x00dev,
- struct rt2x00_field32 irq_field)
+static inline void rt2800mmio_enable_interrupt(struct rt2x00_dev *rt2x00dev,
+ struct rt2x00_field32 irq_field)
{
u32 reg;
spin_unlock_irq(&rt2x00dev->irqmask_lock);
}
-static void rt2800pci_txstatus_tasklet(unsigned long data)
+static void rt2800mmio_txstatus_tasklet(unsigned long data)
{
struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data;
- if (rt2800pci_txdone(rt2x00dev))
+ if (rt2800mmio_txdone(rt2x00dev))
tasklet_schedule(&rt2x00dev->txstatus_tasklet);
/*
*/
}
-static void rt2800pci_pretbtt_tasklet(unsigned long data)
+static void rt2800mmio_pretbtt_tasklet(unsigned long data)
{
struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data;
rt2x00lib_pretbtt(rt2x00dev);
if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
- rt2800pci_enable_interrupt(rt2x00dev, INT_MASK_CSR_PRE_TBTT);
+ rt2800mmio_enable_interrupt(rt2x00dev, INT_MASK_CSR_PRE_TBTT);
}
-static void rt2800pci_tbtt_tasklet(unsigned long data)
+static void rt2800mmio_tbtt_tasklet(unsigned long data)
{
struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data;
struct rt2800_drv_data *drv_data = rt2x00dev->drv_data;
}
if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
- rt2800pci_enable_interrupt(rt2x00dev, INT_MASK_CSR_TBTT);
+ rt2800mmio_enable_interrupt(rt2x00dev, INT_MASK_CSR_TBTT);
}
-static void rt2800pci_rxdone_tasklet(unsigned long data)
+static void rt2800mmio_rxdone_tasklet(unsigned long data)
{
struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data;
if (rt2x00mmio_rxdone(rt2x00dev))
tasklet_schedule(&rt2x00dev->rxdone_tasklet);
else if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
- rt2800pci_enable_interrupt(rt2x00dev, INT_MASK_CSR_RX_DONE);
+ rt2800mmio_enable_interrupt(rt2x00dev, INT_MASK_CSR_RX_DONE);
}
-static void rt2800pci_autowake_tasklet(unsigned long data)
+static void rt2800mmio_autowake_tasklet(unsigned long data)
{
struct rt2x00_dev *rt2x00dev = (struct rt2x00_dev *)data;
- rt2800pci_wakeup(rt2x00dev);
+ rt2800mmio_wakeup(rt2x00dev);
if (test_bit(DEVICE_STATE_ENABLED_RADIO, &rt2x00dev->flags))
- rt2800pci_enable_interrupt(rt2x00dev, INT_MASK_CSR_AUTO_WAKEUP);
+ rt2800mmio_enable_interrupt(rt2x00dev,
+ INT_MASK_CSR_AUTO_WAKEUP);
}
-static void rt2800pci_txstatus_interrupt(struct rt2x00_dev *rt2x00dev)
+static void rt2800mmio_txstatus_interrupt(struct rt2x00_dev *rt2x00dev)
{
u32 status;
int i;
tasklet_schedule(&rt2x00dev->txstatus_tasklet);
}
-static irqreturn_t rt2800pci_interrupt(int irq, void *dev_instance)
+static irqreturn_t rt2800mmio_interrupt(int irq, void *dev_instance)
{
struct rt2x00_dev *rt2x00dev = dev_instance;
u32 reg, mask;
mask = ~reg;
if (rt2x00_get_field32(reg, INT_SOURCE_CSR_TX_FIFO_STATUS)) {
- rt2800pci_txstatus_interrupt(rt2x00dev);
+ rt2800mmio_txstatus_interrupt(rt2x00dev);
/*
* Never disable the TX_FIFO_STATUS interrupt.
*/
};
static const struct rt2x00lib_ops rt2800pci_rt2x00_ops = {
- .irq_handler = rt2800pci_interrupt,
- .txstatus_tasklet = rt2800pci_txstatus_tasklet,
- .pretbtt_tasklet = rt2800pci_pretbtt_tasklet,
- .tbtt_tasklet = rt2800pci_tbtt_tasklet,
- .rxdone_tasklet = rt2800pci_rxdone_tasklet,
- .autowake_tasklet = rt2800pci_autowake_tasklet,
+ .irq_handler = rt2800mmio_interrupt,
+ .txstatus_tasklet = rt2800mmio_txstatus_tasklet,
+ .pretbtt_tasklet = rt2800mmio_pretbtt_tasklet,
+ .tbtt_tasklet = rt2800mmio_tbtt_tasklet,
+ .rxdone_tasklet = rt2800mmio_rxdone_tasklet,
+ .autowake_tasklet = rt2800mmio_autowake_tasklet,
.probe_hw = rt2800_probe_hw,
.get_firmware_name = rt2800pci_get_firmware_name,
.check_firmware = rt2800_check_firmware,