Lines Matching refs:pdu

71 #define TX_CTRL_BUF_SIZE WB_UP(offsetof(struct node_tx, pdu) + LLCTRL_PDU_SIZE)
72 #define NTF_BUF_SIZE WB_UP(offsetof(struct node_rx_pdu, pdu) + LLCTRL_PDU_SIZE)
234 struct pdu_data *pdu; in llcp_tx_alloc() local
240 pdu = (struct pdu_data *)tx->pdu; in llcp_tx_alloc()
241 ull_pdu_data_init(pdu); in llcp_tx_alloc()
1537 static bool pdu_is_expected(struct pdu_data *pdu, struct proc_ctx *ctx) argument
1539 return (ctx->rx_opcode == pdu->llctrl.opcode || ctx->rx_greedy);
1542 static bool pdu_is_unknown(struct pdu_data *pdu, struct proc_ctx *ctx) argument
1544 return ((pdu->llctrl.opcode == PDU_DATA_LLCTRL_TYPE_UNKNOWN_RSP) &&
1545 (ctx->tx_opcode == pdu->llctrl.unknown_rsp.type));
1548 static bool pdu_is_reject(struct pdu_data *pdu, struct proc_ctx *ctx) argument
1553 return (pdu->llctrl.opcode == PDU_DATA_LLCTRL_TYPE_REJECT_IND);
1556 static bool pdu_is_reject_ext(struct pdu_data *pdu, struct proc_ctx *ctx) argument
1558 return ((pdu->llctrl.opcode == PDU_DATA_LLCTRL_TYPE_REJECT_EXT_IND) &&
1559 (ctx->tx_opcode == pdu->llctrl.reject_ext_ind.reject_opcode));
1562 static bool pdu_is_any_reject(struct pdu_data *pdu, struct proc_ctx *ctx) argument
1564 return (pdu_is_reject_ext(pdu, ctx) || pdu_is_reject(pdu, ctx));
1567 static bool pdu_is_terminate(struct pdu_data *pdu) argument
1569 return pdu->llctrl.opcode == PDU_DATA_LLCTRL_TYPE_TERMINATE_IND;
1572 #define VALIDATE_PDU_LEN(pdu, type) (pdu->len == PDU_DATA_LLCTRL_LEN(type)) argument
1575 static bool pdu_validate_conn_update_ind(struct pdu_data *pdu) argument
1577 return VALIDATE_PDU_LEN(pdu, conn_update_ind);
1580 static bool pdu_validate_chan_map_ind(struct pdu_data *pdu) argument
1582 return VALIDATE_PDU_LEN(pdu, chan_map_ind);
1586 static bool pdu_validate_terminate_ind(struct pdu_data *pdu) argument
1588 return VALIDATE_PDU_LEN(pdu, terminate_ind);
1592 static bool pdu_validate_enc_req(struct pdu_data *pdu) argument
1594 return VALIDATE_PDU_LEN(pdu, enc_req);
1599 static bool pdu_validate_enc_rsp(struct pdu_data *pdu) argument
1601 return VALIDATE_PDU_LEN(pdu, enc_rsp);
1604 static bool pdu_validate_start_enc_req(struct pdu_data *pdu) argument
1606 return VALIDATE_PDU_LEN(pdu, start_enc_req);
1611 static bool pdu_validate_start_enc_rsp(struct pdu_data *pdu) argument
1613 return VALIDATE_PDU_LEN(pdu, start_enc_rsp);
1617 static bool pdu_validate_unknown_rsp(struct pdu_data *pdu) argument
1619 return VALIDATE_PDU_LEN(pdu, unknown_rsp);
1623 static bool pdu_validate_feature_req(struct pdu_data *pdu) argument
1625 return VALIDATE_PDU_LEN(pdu, feature_req);
1630 static bool pdu_validate_feature_rsp(struct pdu_data *pdu) argument
1632 return VALIDATE_PDU_LEN(pdu, feature_rsp);
1637 static bool pdu_validate_pause_enc_req(struct pdu_data *pdu) argument
1639 return VALIDATE_PDU_LEN(pdu, pause_enc_req);
1644 static bool pdu_validate_pause_enc_rsp(struct pdu_data *pdu) argument
1646 return VALIDATE_PDU_LEN(pdu, pause_enc_rsp);
1650 static bool pdu_validate_version_ind(struct pdu_data *pdu) argument
1652 return VALIDATE_PDU_LEN(pdu, version_ind);
1655 static bool pdu_validate_reject_ind(struct pdu_data *pdu) argument
1657 return VALIDATE_PDU_LEN(pdu, reject_ind);
1661 static bool pdu_validate_per_init_feat_xchg(struct pdu_data *pdu) argument
1663 return VALIDATE_PDU_LEN(pdu, per_init_feat_xchg);
1668 static bool pdu_validate_conn_param_req(struct pdu_data *pdu) argument
1670 return VALIDATE_PDU_LEN(pdu, conn_param_req);
1674 static bool pdu_validate_conn_param_rsp(struct pdu_data *pdu) argument
1676 return VALIDATE_PDU_LEN(pdu, conn_param_rsp);
1679 static bool pdu_validate_reject_ext_ind(struct pdu_data *pdu) argument
1681 return VALIDATE_PDU_LEN(pdu, reject_ext_ind);
1685 static bool pdu_validate_ping_req(struct pdu_data *pdu) argument
1687 return VALIDATE_PDU_LEN(pdu, ping_req);
1691 static bool pdu_validate_ping_rsp(struct pdu_data *pdu) argument
1693 return VALIDATE_PDU_LEN(pdu, ping_rsp);
1697 static bool pdu_validate_length_req(struct pdu_data *pdu) argument
1699 return VALIDATE_PDU_LEN(pdu, length_req);
1703 static bool pdu_validate_length_rsp(struct pdu_data *pdu) argument
1705 return VALIDATE_PDU_LEN(pdu, length_rsp);
1709 static bool pdu_validate_phy_req(struct pdu_data *pdu) argument
1711 return VALIDATE_PDU_LEN(pdu, phy_req);
1715 static bool pdu_validate_phy_rsp(struct pdu_data *pdu) argument
1717 return VALIDATE_PDU_LEN(pdu, phy_rsp);
1720 static bool pdu_validate_phy_upd_ind(struct pdu_data *pdu) argument
1722 return VALIDATE_PDU_LEN(pdu, phy_upd_ind);
1726 static bool pdu_validate_min_used_chan_ind(struct pdu_data *pdu) argument
1728 return VALIDATE_PDU_LEN(pdu, min_used_chans_ind);
1733 static bool pdu_validate_cte_req(struct pdu_data *pdu) argument
1735 return VALIDATE_PDU_LEN(pdu, cte_req);
1740 static bool pdu_validate_cte_resp(struct pdu_data *pdu) argument
1742 return VALIDATE_PDU_LEN(pdu, cte_rsp);
1747 static bool pdu_validate_clock_accuracy_req(struct pdu_data *pdu) argument
1749 return VALIDATE_PDU_LEN(pdu, clock_accuracy_req);
1753 static bool pdu_validate_clock_accuracy_rsp(struct pdu_data *pdu) argument
1755 return VALIDATE_PDU_LEN(pdu, clock_accuracy_rsp);
1759 static bool pdu_validate_periodic_sync_ind(struct pdu_data *pdu) argument
1761 return VALIDATE_PDU_LEN(pdu, periodic_sync_ind);
1765 typedef bool (*pdu_param_validate_t)(struct pdu_data *pdu);
1842 static bool pdu_is_valid(struct pdu_data *pdu) argument
1845 if (pdu->len < 1) {
1847 pdu->llctrl.opcode = PDU_DATA_LLCTRL_TYPE_UNUSED;
1851 if (pdu->llctrl.opcode < ARRAY_SIZE(pdu_validate)) {
1854 cb = pdu_validate[pdu->llctrl.opcode].validate_cb;
1856 return cb(pdu);
1902 struct pdu_data *pdu; local
1907 pdu = (struct pdu_data *)rx->pdu;
1909 pdu_valid = pdu_is_valid(pdu);
1915 if (ctx && pdu_is_expected(pdu, ctx)) {
1920 if (ctx && pdu_is_expected(pdu, ctx)) {
1927 } else if (pdu_is_terminate(pdu)) {
1944 unexpected_l = !(pdu_is_expected(pdu, ctx_l) ||
1945 pdu_is_unknown(pdu, ctx_l) ||
1946 pdu_is_any_reject(pdu, ctx_l));
1948 unexpected_r = !(pdu_is_expected(pdu, ctx_r) ||
1949 pdu_is_unknown(pdu, ctx_r) ||
1950 pdu_is_reject_ext(pdu, ctx_r));
1991 unexpected_l = !(pdu_is_expected(pdu, ctx_l) ||
1992 pdu_is_unknown(pdu, ctx_l) ||
1993 pdu_is_any_reject(pdu, ctx_l));