old mode 100644new mode 100755.. | .. |
---|
41 | 41 | } else { |
---|
42 | 42 | bool uapsd = (ps_id != LEGACY_PS_ID); |
---|
43 | 43 | rwnx_send_me_traffic_ind(rwnx_hw, sta->sta_idx, uapsd, available); |
---|
| 44 | +#ifdef CREATE_TRACE_POINTS |
---|
44 | 45 | trace_ps_traffic_update(sta->sta_idx, available, uapsd); |
---|
| 46 | +#endif |
---|
45 | 47 | } |
---|
46 | 48 | } |
---|
47 | 49 | |
---|
.. | .. |
---|
76 | 78 | struct rwnx_txq *txq; |
---|
77 | 79 | |
---|
78 | 80 | if (enable) { |
---|
| 81 | +#ifdef CREATE_TRACE_POINTS |
---|
79 | 82 | trace_ps_enable(sta); |
---|
80 | | - |
---|
| 83 | +#endif |
---|
81 | 84 | spin_lock_bh(&rwnx_hw->tx_lock); |
---|
82 | 85 | sta->ps.active = true; |
---|
83 | 86 | sta->ps.sp_cnt[LEGACY_PS_ID] = 0; |
---|
.. | .. |
---|
100 | 103 | |
---|
101 | 104 | spin_unlock_bh(&rwnx_hw->tx_lock); |
---|
102 | 105 | |
---|
103 | | - if (sta->ps.pkt_ready[LEGACY_PS_ID]) |
---|
| 106 | + /*if (sta->ps.pkt_ready[LEGACY_PS_ID]) |
---|
104 | 107 | rwnx_set_traffic_status(rwnx_hw, sta, true, LEGACY_PS_ID); |
---|
105 | 108 | |
---|
106 | 109 | if (sta->ps.pkt_ready[UAPSD_ID]) |
---|
107 | | - rwnx_set_traffic_status(rwnx_hw, sta, true, UAPSD_ID); |
---|
| 110 | + rwnx_set_traffic_status(rwnx_hw, sta, true, UAPSD_ID);*/ |
---|
108 | 111 | } else { |
---|
| 112 | +#ifdef CREATE_TRACE_POINTS |
---|
109 | 113 | trace_ps_disable(sta->sta_idx); |
---|
110 | | - |
---|
| 114 | +#endif |
---|
111 | 115 | spin_lock_bh(&rwnx_hw->tx_lock); |
---|
112 | 116 | sta->ps.active = false; |
---|
113 | 117 | |
---|
.. | .. |
---|
125 | 129 | rwnx_txq_sta_start(sta, RWNX_TXQ_STOP_STA_PS, rwnx_hw); |
---|
126 | 130 | spin_unlock_bh(&rwnx_hw->tx_lock); |
---|
127 | 131 | |
---|
128 | | - if (sta->ps.pkt_ready[LEGACY_PS_ID]) |
---|
| 132 | + /*if (sta->ps.pkt_ready[LEGACY_PS_ID]) |
---|
129 | 133 | rwnx_set_traffic_status(rwnx_hw, sta, false, LEGACY_PS_ID); |
---|
130 | 134 | |
---|
131 | 135 | if (sta->ps.pkt_ready[UAPSD_ID]) |
---|
132 | | - rwnx_set_traffic_status(rwnx_hw, sta, false, UAPSD_ID); |
---|
| 136 | + rwnx_set_traffic_status(rwnx_hw, sta, false, UAPSD_ID);*/ |
---|
133 | 137 | |
---|
134 | 138 | tasklet_schedule(&rwnx_hw->task); |
---|
135 | 139 | } |
---|
.. | .. |
---|
168 | 172 | printk("sta %pM is not in Power Save mode", sta->mac_addr); |
---|
169 | 173 | return; |
---|
170 | 174 | } |
---|
171 | | - |
---|
| 175 | +#ifdef CREATE_TRACE_POINTS |
---|
172 | 176 | trace_ps_traffic_req(sta, pkt_req, ps_id); |
---|
173 | | - |
---|
| 177 | +#endif |
---|
174 | 178 | spin_lock_bh(&rwnx_hw->tx_lock); |
---|
175 | 179 | |
---|
176 | 180 | /* Fw may ask to stop a service period with PS_SP_INTERRUPTED. This only |
---|
.. | .. |
---|
446 | 450 | if (unlikely(sta->ps.active)) { |
---|
447 | 451 | sta->ps.pkt_ready[txq->ps_id]--; |
---|
448 | 452 | sta->ps.sp_cnt[txq->ps_id]--; |
---|
449 | | - |
---|
| 453 | +#ifdef CREATE_TRACE_POINTS |
---|
450 | 454 | trace_ps_push(sta); |
---|
451 | | - |
---|
| 455 | +#endif |
---|
452 | 456 | if (((txq->ps_id == UAPSD_ID) || (vif->wdev.iftype == NL80211_IFTYPE_MESH_POINT) || (sta->tdls.active)) |
---|
453 | 457 | && !sta->ps.sp_cnt[txq->ps_id]) { |
---|
454 | 458 | sw_txhdr->desc.host.flags |= TXU_CNTRL_EOSP; |
---|
.. | .. |
---|
578 | 582 | between queue and push (because of PS) */ |
---|
579 | 583 | sw_txhdr->hw_queue = hw_queue; |
---|
580 | 584 | |
---|
581 | | - sw_txhdr->desc.host.packet_addr = hw_queue; //use packet_addr field for hw_txq |
---|
| 585 | + //sw_txhdr->desc.host.packet_addr = hw_queue; //use packet_addr field for hw_txq |
---|
| 586 | + sw_txhdr->desc.host.ac = hw_queue; //use ac field for hw_txq |
---|
582 | 587 | #ifdef CONFIG_RWNX_MUMIMO_TX |
---|
583 | 588 | /* MU group is only selected during hwq processing */ |
---|
584 | 589 | sw_txhdr->desc.host.mumimo_info = txq->mumimo_info; |
---|
.. | .. |
---|
589 | 594 | /* only for AP mode */ |
---|
590 | 595 | rwnx_set_more_data_flag(rwnx_hw, sw_txhdr); |
---|
591 | 596 | } |
---|
592 | | - |
---|
| 597 | +#ifdef CREATE_TRACE_POINTS |
---|
593 | 598 | trace_push_desc(skb, sw_txhdr, flags); |
---|
| 599 | +#endif |
---|
594 | 600 | #if 0 |
---|
595 | 601 | txq->credits--; |
---|
596 | 602 | #endif |
---|
.. | .. |
---|
607 | 613 | rwnx_ipc_txdesc_push(rwnx_hw, &sw_txhdr->desc, skb, hw_queue, user); |
---|
608 | 614 | #else |
---|
609 | 615 | #ifdef AICWF_SDIO_SUPPORT |
---|
610 | | - if (((sw_txhdr->desc.host.flags & TXU_CNTRL_MGMT) && ((*(skb->data+sw_txhdr->headroom) == 0xd0) || (*(skb->data+sw_txhdr->headroom) == 0x10))) || \ |
---|
| 616 | + if (((sw_txhdr->desc.host.flags & TXU_CNTRL_MGMT) && \ |
---|
| 617 | + ((*(skb->data+sw_txhdr->headroom) == 0xd0) || (*(skb->data+sw_txhdr->headroom) == 0x10) || (*(skb->data+sw_txhdr->headroom) == 0x30))) || \ |
---|
611 | 618 | (sw_txhdr->desc.host.ethertype == 0x8e88)) { |
---|
612 | 619 | sw_txhdr->need_cfm = 1; |
---|
613 | 620 | sw_txhdr->desc.host.status_desc_addr = ((1<<31) | rwnx_hw->sdio_env.txdesc_free_idx[0]); |
---|
.. | .. |
---|
624 | 631 | aicwf_frame_tx((void *)(rwnx_hw->sdiodev), skb); |
---|
625 | 632 | #endif |
---|
626 | 633 | #ifdef AICWF_USB_SUPPORT |
---|
627 | | - if (((sw_txhdr->desc.host.flags & TXU_CNTRL_MGMT) && ((*(skb->data+sw_txhdr->headroom) == 0xd0) || (*(skb->data+sw_txhdr->headroom) == 0x10))) || \ |
---|
| 634 | + if (((sw_txhdr->desc.host.flags & TXU_CNTRL_MGMT) && \ |
---|
| 635 | + ((*(skb->data+sw_txhdr->headroom) == 0xd0) || (*(skb->data+sw_txhdr->headroom) == 0x10) || (*(skb->data+sw_txhdr->headroom) == 0x30))) || \ |
---|
628 | 636 | (sw_txhdr->desc.host.ethertype == 0x8e88)) { |
---|
629 | 637 | printk("push need cfm flags 0x%x\n", sw_txhdr->desc.host.flags); |
---|
630 | 638 | sw_txhdr->need_cfm = 1; |
---|
.. | .. |
---|
672 | 680 | |
---|
673 | 681 | if (!sw_retry) { |
---|
674 | 682 | /* update sw desc */ |
---|
| 683 | +#if 0 |
---|
675 | 684 | sw_txhdr->desc.host.sn = cfm->sn; |
---|
676 | 685 | sw_txhdr->desc.host.pn[0] = cfm->pn[0]; |
---|
677 | 686 | sw_txhdr->desc.host.pn[1] = cfm->pn[1]; |
---|
678 | 687 | sw_txhdr->desc.host.pn[2] = cfm->pn[2]; |
---|
679 | 688 | sw_txhdr->desc.host.pn[3] = cfm->pn[3]; |
---|
680 | 689 | sw_txhdr->desc.host.timestamp = cfm->timestamp; |
---|
| 690 | +#endif |
---|
681 | 691 | sw_txhdr->desc.host.flags |= TXU_CNTRL_RETRY; |
---|
682 | 692 | |
---|
683 | 693 | #ifdef CONFIG_RWNX_AMSDUS_TX |
---|
.. | .. |
---|
866 | 876 | amsdu->pad = AMSDU_PADDING(map_len - amsdu->pad); |
---|
867 | 877 | list_add_tail(&amsdu_txhdr->list, &amsdu->hdrs); |
---|
868 | 878 | amsdu->len += map_len; |
---|
869 | | - |
---|
870 | | - rwnx_ipc_sta_buffer(rwnx_hw, sw_txhdr->txq->sta, |
---|
871 | | - sw_txhdr->txq->tid, msdu_len); |
---|
872 | 879 | |
---|
873 | 880 | trace_amsdu_subframe(sw_txhdr); |
---|
874 | 881 | return 0; |
---|
.. | .. |
---|
1095 | 1102 | (memcmp(desc->host.eth_dest_addr.array, rwnx_vif->sta.tdls_sta->mac_addr, ETH_ALEN) == 0)) { |
---|
1096 | 1103 | desc->host.flags |= TXU_CNTRL_TDLS; |
---|
1097 | 1104 | rwnx_vif->sta.tdls_sta->tdls.last_tid = desc->host.tid; |
---|
1098 | | - rwnx_vif->sta.tdls_sta->tdls.last_sn = desc->host.sn; |
---|
| 1105 | + //rwnx_vif->sta.tdls_sta->tdls.last_sn = desc->host.sn; |
---|
1099 | 1106 | } |
---|
1100 | 1107 | |
---|
1101 | 1108 | if (rwnx_vif->wdev.iftype == NL80211_IFTYPE_MESH_POINT) { |
---|
.. | .. |
---|
1122 | 1129 | /* Fill-in TX descriptor */ |
---|
1123 | 1130 | frame_oft = sizeof(struct rwnx_txhdr) - offsetof(struct rwnx_txhdr, hw_hdr) |
---|
1124 | 1131 | + hdr_pads;// + sizeof(*eth); |
---|
| 1132 | +#if 0 |
---|
1125 | 1133 | #ifdef CONFIG_RWNX_SPLIT_TX_BUF |
---|
1126 | 1134 | desc->host.packet_addr[0] = sw_txhdr->dma_addr + frame_oft; |
---|
1127 | 1135 | desc->host.packet_cnt = 1; |
---|
1128 | 1136 | #else |
---|
1129 | 1137 | desc->host.packet_addr = sw_txhdr->dma_addr + frame_oft; |
---|
| 1138 | +#endif |
---|
1130 | 1139 | #endif |
---|
1131 | 1140 | desc->host.status_desc_addr = sw_txhdr->dma_addr; |
---|
1132 | 1141 | |
---|
.. | .. |
---|
1312 | 1321 | } |
---|
1313 | 1322 | |
---|
1314 | 1323 | frame_oft = sizeof(struct rwnx_txhdr) - offsetof(struct rwnx_txhdr, hw_hdr); |
---|
| 1324 | +#if 0 |
---|
1315 | 1325 | #ifdef CONFIG_RWNX_SPLIT_TX_BUF |
---|
1316 | 1326 | desc->host.packet_addr[0] = sw_txhdr->dma_addr + frame_oft; |
---|
1317 | 1327 | desc->host.packet_cnt = 1; |
---|
1318 | 1328 | #else |
---|
1319 | 1329 | desc->host.packet_addr = sw_txhdr->dma_addr + frame_oft; |
---|
| 1330 | +#endif |
---|
1320 | 1331 | #endif |
---|
1321 | 1332 | desc->host.status_desc_addr = sw_txhdr->dma_addr; |
---|
1322 | 1333 | |
---|
.. | .. |
---|
1344 | 1355 | struct rwnx_sw_txhdr *sw_txhdr; |
---|
1345 | 1356 | struct rwnx_hwq *hwq; |
---|
1346 | 1357 | struct rwnx_txq *txq; |
---|
| 1358 | + int headroom; |
---|
1347 | 1359 | //int peek_off = offsetof(struct rwnx_hw_txhdr, cfm); |
---|
1348 | 1360 | //int peek_len = sizeof(((struct rwnx_hw_txhdr *)0)->cfm); |
---|
1349 | 1361 | |
---|
.. | .. |
---|
1366 | 1378 | |
---|
1367 | 1379 | /* Update txq and HW queue credits */ |
---|
1368 | 1380 | if (sw_txhdr->desc.host.flags & TXU_CNTRL_MGMT) { |
---|
1369 | | - trace_printk("done=%d retry_required=%d sw_retry_required=%d acknowledged=%d\n", |
---|
| 1381 | + printk("done=%d retry_required=%d sw_retry_required=%d acknowledged=%d\n", |
---|
1370 | 1382 | rwnx_txst.tx_done, rwnx_txst.retry_required, |
---|
1371 | 1383 | rwnx_txst.sw_retry_required, rwnx_txst.acknowledged); |
---|
1372 | | - |
---|
| 1384 | +#ifdef CREATE_TRACE_POINTS |
---|
1373 | 1385 | trace_mgmt_cfm(sw_txhdr->rwnx_vif->vif_index, |
---|
1374 | 1386 | (sw_txhdr->rwnx_sta) ? sw_txhdr->rwnx_sta->sta_idx : 0xFF, |
---|
1375 | 1387 | rwnx_txst.acknowledged); |
---|
1376 | | - |
---|
| 1388 | +#endif |
---|
1377 | 1389 | /* Confirm transmission to CFG80211 */ |
---|
1378 | 1390 | cfg80211_mgmt_tx_status(&sw_txhdr->rwnx_vif->wdev, |
---|
1379 | 1391 | (unsigned long)skb, |
---|
.. | .. |
---|
1393 | 1405 | rwnx_tx_retry(rwnx_hw, skb, txhdr, sw_retry); |
---|
1394 | 1406 | return 0; |
---|
1395 | 1407 | } |
---|
1396 | | - |
---|
| 1408 | +#ifdef CREATE_TRACE_POINTS |
---|
1397 | 1409 | trace_skb_confirm(skb, txq, hwq, &txhdr->hw_hdr.cfm); |
---|
1398 | | - |
---|
| 1410 | +#endif |
---|
1399 | 1411 | /* STA may have disconnect (and txq stopped) when buffers were stored |
---|
1400 | 1412 | in fw. In this case do nothing when they're returned */ |
---|
1401 | 1413 | if (txq->idx != TXQ_INACTIVE) { |
---|
.. | .. |
---|
1433 | 1445 | struct rwnx_amsdu_txhdr *amsdu_txhdr; |
---|
1434 | 1446 | list_for_each_entry(amsdu_txhdr, &sw_txhdr->amsdu.hdrs, list) { |
---|
1435 | 1447 | rwnx_amsdu_del_subframe_header(amsdu_txhdr); |
---|
1436 | | - rwnx_ipc_sta_buffer(rwnx_hw, txq->sta, txq->tid, |
---|
1437 | | - -amsdu_txhdr->msdu_len); |
---|
1438 | 1448 | consume_skb(amsdu_txhdr->skb); |
---|
1439 | 1449 | } |
---|
1440 | 1450 | } |
---|
1441 | 1451 | #endif /* CONFIG_RWNX_AMSDUS_TX */ |
---|
1442 | 1452 | |
---|
1443 | | - rwnx_ipc_sta_buffer(rwnx_hw, txq->sta, txq->tid, |
---|
1444 | | - -sw_txhdr->frame_len); |
---|
1445 | | - |
---|
| 1453 | + headroom = sw_txhdr->headroom; |
---|
1446 | 1454 | kmem_cache_free(rwnx_hw->sw_txhdr_cache, sw_txhdr); |
---|
1447 | | - skb_pull(skb, sw_txhdr->headroom); |
---|
| 1455 | + skb_pull(skb, headroom); |
---|
1448 | 1456 | consume_skb(skb); |
---|
1449 | 1457 | |
---|
1450 | 1458 | return 0; |
---|
.. | .. |
---|
1473 | 1481 | |
---|
1474 | 1482 | if (txq->idx != TXQ_INACTIVE) { |
---|
1475 | 1483 | //txq->credits += update; |
---|
| 1484 | +#ifdef CREATE_TRACE_POINTS |
---|
1476 | 1485 | trace_credit_update(txq, update); |
---|
| 1486 | +#endif |
---|
1477 | 1487 | if (txq->credits <= 0) |
---|
1478 | 1488 | rwnx_txq_stop(txq, RWNX_TXQ_STOP_FULL); |
---|
1479 | 1489 | else |
---|