Lines 428-433
static int mwifiex_pm_wakeup_card_complete(struct mwifiex_adapter *adapter)
Link Here
|
428 |
*/ |
428 |
*/ |
429 |
static int mwifiex_pcie_disable_host_int(struct mwifiex_adapter *adapter) |
429 |
static int mwifiex_pcie_disable_host_int(struct mwifiex_adapter *adapter) |
430 |
{ |
430 |
{ |
|
|
431 |
mwifiex_dbg(adapter, ERROR, |
432 |
"disable_host_int"); |
431 |
if (mwifiex_pcie_ok_to_access_hw(adapter)) { |
433 |
if (mwifiex_pcie_ok_to_access_hw(adapter)) { |
432 |
if (mwifiex_write_reg(adapter, PCIE_HOST_INT_MASK, |
434 |
if (mwifiex_write_reg(adapter, PCIE_HOST_INT_MASK, |
433 |
0x00000000)) { |
435 |
0x00000000)) { |
Lines 436-441
static int mwifiex_pcie_disable_host_int(struct mwifiex_adapter *adapter)
Link Here
|
436 |
return -1; |
438 |
return -1; |
437 |
} |
439 |
} |
438 |
} |
440 |
} |
|
|
441 |
else |
442 |
mwifiex_dbg(adapter, ERROR, |
443 |
"Did NOT really disable host interrupt.\n"); |
439 |
|
444 |
|
440 |
return 0; |
445 |
return 0; |
441 |
} |
446 |
} |
Lines 448-453
static int mwifiex_pcie_disable_host_int(struct mwifiex_adapter *adapter)
Link Here
|
448 |
*/ |
453 |
*/ |
449 |
static int mwifiex_pcie_enable_host_int(struct mwifiex_adapter *adapter) |
454 |
static int mwifiex_pcie_enable_host_int(struct mwifiex_adapter *adapter) |
450 |
{ |
455 |
{ |
|
|
456 |
mwifiex_dbg(adapter, ERROR, |
457 |
"enable_host_int"); |
451 |
if (mwifiex_pcie_ok_to_access_hw(adapter)) { |
458 |
if (mwifiex_pcie_ok_to_access_hw(adapter)) { |
452 |
/* Simply write the mask to the register */ |
459 |
/* Simply write the mask to the register */ |
453 |
if (mwifiex_write_reg(adapter, PCIE_HOST_INT_MASK, |
460 |
if (mwifiex_write_reg(adapter, PCIE_HOST_INT_MASK, |
Lines 1600-1605
static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter)
Link Here
|
1600 |
|
1607 |
|
1601 |
mwifiex_dbg(adapter, CMD, |
1608 |
mwifiex_dbg(adapter, CMD, |
1602 |
"info: Rx CMD Response\n"); |
1609 |
"info: Rx CMD Response\n"); |
|
|
1610 |
mwifiex_dbg(adapter, ERROR, |
1611 |
"jpw: %s skb %p, skb->len %d, skb->data_len %d, skb->head %p, skb->data %p, skb->tail %d, skb->end %d\n", |
1612 |
__func__, skb, skb->len, skb->data_len, skb->head, skb->data, skb->tail, skb->end); |
1603 |
|
1613 |
|
1604 |
mwifiex_unmap_pci_memory(adapter, skb, PCI_DMA_FROMDEVICE); |
1614 |
mwifiex_unmap_pci_memory(adapter, skb, PCI_DMA_FROMDEVICE); |
1605 |
|
1615 |
|
Lines 1612-1617
static int mwifiex_pcie_process_cmd_complete(struct mwifiex_adapter *adapter)
Link Here
|
1612 |
|
1622 |
|
1613 |
pkt_len = *((__le16 *)skb->data); |
1623 |
pkt_len = *((__le16 *)skb->data); |
1614 |
rx_len = le16_to_cpu(pkt_len); |
1624 |
rx_len = le16_to_cpu(pkt_len); |
|
|
1625 |
if (rx_len == 0) { |
1626 |
mwifiex_dbg(adapter, ERROR, |
1627 |
"0 byte cmdrsp\n"); |
1628 |
mwifiex_map_pci_memory(adapter, skb, MWIFIEX_UPLD_SIZE, |
1629 |
PCI_DMA_FROMDEVICE); |
1630 |
return 0; |
1631 |
} |
1632 |
|
1615 |
skb_trim(skb, rx_len); |
1633 |
skb_trim(skb, rx_len); |
1616 |
skb_pull(skb, INTF_HEADER_LEN); |
1634 |
skb_pull(skb, INTF_HEADER_LEN); |
1617 |
|
1635 |
|
Lines 1678-1683
static int mwifiex_pcie_cmdrsp_complete(struct mwifiex_adapter *adapter,
Link Here
|
1678 |
struct pcie_service_card *card = adapter->card; |
1696 |
struct pcie_service_card *card = adapter->card; |
1679 |
|
1697 |
|
1680 |
if (skb) { |
1698 |
if (skb) { |
|
|
1699 |
mwifiex_dbg(adapter, ERROR, |
1700 |
"jpw: %s skb %p, skb->len %d, skb->data_len %d, skb->head %p, skb->data %p, skb->tail %d, skb->end %d\n", |
1701 |
__func__, skb, skb->len, skb->data_len, skb->head, skb->data, skb->tail, skb->end); |
1681 |
card->cmdrsp_buf = skb; |
1702 |
card->cmdrsp_buf = skb; |
1682 |
skb_push(card->cmdrsp_buf, INTF_HEADER_LEN); |
1703 |
skb_push(card->cmdrsp_buf, INTF_HEADER_LEN); |
1683 |
if (mwifiex_map_pci_memory(adapter, skb, MWIFIEX_UPLD_SIZE, |
1704 |
if (mwifiex_map_pci_memory(adapter, skb, MWIFIEX_UPLD_SIZE, |
Lines 2195-2200
static int mwifiex_process_pcie_int(struct mwifiex_adapter *adapter)
Link Here
|
2195 |
pcie_ireg = adapter->int_status; |
2216 |
pcie_ireg = adapter->int_status; |
2196 |
adapter->int_status = 0; |
2217 |
adapter->int_status = 0; |
2197 |
spin_unlock_irqrestore(&adapter->int_lock, flags); |
2218 |
spin_unlock_irqrestore(&adapter->int_lock, flags); |
|
|
2219 |
mwifiex_dbg(adapter, INTR, "popped ireg: 0x%08x\n", pcie_ireg); |
2198 |
|
2220 |
|
2199 |
while (pcie_ireg & HOST_INTR_MASK) { |
2221 |
while (pcie_ireg & HOST_INTR_MASK) { |
2200 |
if (pcie_ireg & HOST_INTR_DNLD_DONE) { |
2222 |
if (pcie_ireg & HOST_INTR_DNLD_DONE) { |
Lines 2234-2240
static int mwifiex_process_pcie_int(struct mwifiex_adapter *adapter)
Link Here
|
2234 |
if (ret) |
2256 |
if (ret) |
2235 |
return ret; |
2257 |
return ret; |
2236 |
} |
2258 |
} |
2237 |
|
2259 |
#if defined(JPW_EXPERIMENT_1) |
2238 |
if (mwifiex_pcie_ok_to_access_hw(adapter)) { |
2260 |
if (mwifiex_pcie_ok_to_access_hw(adapter)) { |
2239 |
if (mwifiex_read_reg(adapter, PCIE_HOST_INT_STATUS, |
2261 |
if (mwifiex_read_reg(adapter, PCIE_HOST_INT_STATUS, |
2240 |
&pcie_ireg)) { |
2262 |
&pcie_ireg)) { |
Lines 2254-2259
static int mwifiex_process_pcie_int(struct mwifiex_adapter *adapter)
Link Here
|
2254 |
} |
2276 |
} |
2255 |
|
2277 |
|
2256 |
} |
2278 |
} |
|
|
2279 |
#endif |
2257 |
} |
2280 |
} |
2258 |
mwifiex_dbg(adapter, INTR, |
2281 |
mwifiex_dbg(adapter, INTR, |
2259 |
"info: cmd_sent=%d data_sent=%d\n", |
2282 |
"info: cmd_sent=%d data_sent=%d\n", |