Lines Matching defs:hdr

1271 	struct malo_cmd_header *hdr;
1273 const uint16_t psize = sizeof(*hdr) + sizeof(*body);
1275 hdr = (struct malo_cmd_header *)sc->sc_cmd;
1276 hdr->cmd = htole16(MALO_CMD_HWSPEC);
1277 hdr->size = htole16(sizeof(*body));
1278 hdr->seqnum = htole16(1);
1279 hdr->result = 0;
1281 body = (struct malo_cmd_body_spec *)(hdr + 1);
1300 struct malo_cmd_header *hdr = (struct malo_cmd_header *)sc->sc_cmd;
1303 body = (struct malo_cmd_body_spec *)(hdr + 1);
1314 struct malo_cmd_header *hdr = (struct malo_cmd_header *)sc->sc_cmd;
1315 const uint16_t psize = sizeof(*hdr);
1317 hdr->cmd = htole16(MALO_CMD_RESET);
1318 hdr->size = 0;
1319 hdr->seqnum = htole16(1);
1320 hdr->result = 0;
1336 struct malo_cmd_header *hdr;
1344 psize = sizeof(*hdr) + sizeof(*body) +
1347 hdr = (struct malo_cmd_header *)sc->sc_cmd;
1348 hdr->cmd = htole16(MALO_CMD_SCAN);
1349 hdr->seqnum = htole16(1);
1350 hdr->result = 0;
1352 body = (struct malo_cmd_body_scan *)(hdr + 1);
1382 hdr->size = htole16(psize - sizeof(*hdr));
1397 struct malo_cmd_header *hdr = (struct malo_cmd_header *)sc->sc_cmd;
1404 body = (struct malo_cmd_body_rsp_scan *)(hdr + 1);
1483 struct malo_cmd_header *hdr;
1485 const uint16_t psize = sizeof(*hdr) + sizeof(*body);
1487 hdr = (struct malo_cmd_header *)sc->sc_cmd;
1488 hdr->cmd = htole16(MALO_CMD_AUTH);
1489 hdr->size = htole16(sizeof(*body));
1490 hdr->seqnum = htole16(1);
1491 hdr->result = 0;
1493 body = (struct malo_cmd_body_auth *)(hdr + 1);
1511 struct malo_cmd_header *hdr;
1513 const uint16_t psize = sizeof(*hdr) + sizeof(*body);
1515 hdr = (struct malo_cmd_header *)sc->sc_cmd;
1516 hdr->cmd = htole16(MALO_CMD_WEP);
1517 hdr->size = htole16(sizeof(*body));
1518 hdr->seqnum = htole16(1);
1519 hdr->result = 0;
1521 body = (struct malo_cmd_body_wep *)(hdr + 1);
1568 struct malo_cmd_header *hdr;
1570 const uint16_t psize = sizeof(*hdr) + sizeof(*body);
1572 hdr = (struct malo_cmd_header *)sc->sc_cmd;
1573 hdr->cmd = htole16(MALO_CMD_SNMP);
1574 hdr->size = htole16(sizeof(*body));
1575 hdr->seqnum = htole16(1);
1576 hdr->result = 0;
1578 body = (struct malo_cmd_body_snmp *)(hdr + 1);
1620 struct malo_cmd_header *hdr;
1622 const uint16_t psize = sizeof(*hdr) + sizeof(*body);
1624 hdr = (struct malo_cmd_header *)sc->sc_cmd;
1625 hdr->cmd = htole16(MALO_CMD_RADIO);
1626 hdr->size = htole16(sizeof(*body));
1627 hdr->seqnum = htole16(1);
1628 hdr->result = 0;
1630 body = (struct malo_cmd_body_radio *)(hdr + 1);
1651 struct malo_cmd_header *hdr;
1653 const uint16_t psize = sizeof(*hdr) + sizeof(*body);
1655 hdr = (struct malo_cmd_header *)sc->sc_cmd;
1656 hdr->cmd = htole16(MALO_CMD_CHANNEL);
1657 hdr->size = htole16(sizeof(*body));
1658 hdr->seqnum = htole16(1);
1659 hdr->result = 0;
1661 body = (struct malo_cmd_body_channel *)(hdr + 1);
1680 struct malo_cmd_header *hdr;
1682 const uint16_t psize = sizeof(*hdr) + sizeof(*body);
1684 hdr = (struct malo_cmd_header *)sc->sc_cmd;
1685 hdr->cmd = htole16(MALO_CMD_TXPOWER);
1686 hdr->size = htole16(sizeof(*body));
1687 hdr->seqnum = htole16(1);
1688 hdr->result = 0;
1690 body = (struct malo_cmd_body_txpower *)(hdr + 1);
1707 struct malo_cmd_header *hdr;
1709 const uint16_t psize = sizeof(*hdr) + sizeof(*body);
1711 hdr = (struct malo_cmd_header *)sc->sc_cmd;
1712 hdr->cmd = htole16(MALO_CMD_ANTENNA);
1713 hdr->size = htole16(sizeof(*body));
1714 hdr->seqnum = htole16(1);
1715 hdr->result = 0;
1717 body = (struct malo_cmd_body_antenna *)(hdr + 1);
1751 struct malo_cmd_header *hdr;
1755 psize = sizeof(*hdr) + sizeof(*body);
1757 hdr = (struct malo_cmd_header *)sc->sc_cmd;
1758 hdr->cmd = htole16(MALO_CMD_MACCTRL);
1759 hdr->size = htole16(sizeof(*body));
1760 hdr->seqnum = htole16(1);
1761 hdr->result = 0;
1763 body = (struct malo_cmd_body_macctrl *)(hdr + 1);
1782 struct malo_cmd_header *hdr;
1784 const uint16_t psize = sizeof(*hdr) + sizeof(*body);
1786 hdr = (struct malo_cmd_header *)sc->sc_cmd;
1787 hdr->cmd = htole16(MALO_CMD_MACADDR);
1788 hdr->size = htole16(sizeof(*body));
1789 hdr->seqnum = htole16(1);
1790 hdr->result = 0;
1792 body = (struct malo_cmd_body_macaddr *)(hdr + 1);
1809 struct malo_cmd_header *hdr;
1818 psize = sizeof(*hdr) + sizeof(*body) + sizeof(*body_ssid) +
1821 hdr = (struct malo_cmd_header *)sc->sc_cmd;
1822 hdr->cmd = htole16(MALO_CMD_ASSOC);
1823 hdr->seqnum = htole16(1);
1824 hdr->result = 0;
1826 body = (struct malo_cmd_body_assoc *)(hdr + 1);
1866 hdr->size = htole16(psize - sizeof(*hdr));
1886 struct malo_cmd_header *hdr = (struct malo_cmd_header *)sc->sc_cmd;
1889 body = (struct malo_cmd_body_rsp_assoc *)(hdr + 1);
1905 struct malo_cmd_header *hdr;
1907 const uint16_t psize = sizeof(*hdr) + sizeof(*body);
1909 hdr = (struct malo_cmd_header *)sc->sc_cmd;
1910 hdr->cmd = htole16(MALO_CMD_RATE);
1911 hdr->size = htole16(sizeof(*body));
1912 hdr->seqnum = htole16(1);
1913 hdr->result = 0;
1915 body = (struct malo_cmd_body_rate *)(hdr + 1);
1977 struct malo_cmd_header *hdr = (struct malo_cmd_header *)sc->sc_cmd;
2009 hdr->cmd = le16toh(hdr->cmd);
2010 hdr->size = le16toh(hdr->size);
2011 hdr->seqnum = le16toh(hdr->seqnum);
2012 hdr->result = le16toh(hdr->result);
2015 if (!(hdr->cmd & MALO_CMD_RESP)) {
2017 "got invalid command response (0x%04x)\n", hdr->cmd);
2021 hdr->cmd &= ~MALO_CMD_RESP;
2024 if (hdr->cmd == 0x0012)
2025 hdr->cmd = MALO_CMD_ASSOC;
2028 switch (hdr->cmd) {
2115 "got unknown cmd response (0x%04x)\n", hdr->cmd);