Lines Matching refs:cmd

66 	pCmd->cmdhdr.cmd = htole16(_cmd);				\
136 device_printf(dev, "unable to allocate memory for cmd tag, "
146 device_printf(dev, "unable to allocate memory for cmd buffer, "
156 device_printf(dev, "unable to load cmd buffer, error %u\n",
175 * Low level firmware cmd block handshake support.
194 malo_hal_waitforcmd(struct malo_hal *mh, uint16_t cmd)
200 if (mh->mh_cmdbuf[0] == le16toh(cmd))
211 malo_hal_execute_cmd(struct malo_hal *mh, unsigned short cmd)
217 device_printf(mh->mh_dev, "firmware hung, skipping cmd 0x%x\n",
218 cmd);
229 if (!malo_hal_waitforcmd(mh, cmd | 0x8000)) {
231 "timeout waiting for f/w cmd 0x%x\n", cmd);
245 struct malo_cmd_caltable *cmd;
250 _CMD_SETUP(cmd, struct malo_cmd_caltable, MALO_HOSTCMD_GET_CALTABLE);
251 cmd->annex = annex;
252 cmd->index = index;
255 if (ret == 0 && cmd->caltbl[0] != annex && annex != 0 && annex != 255)
545 * Return "hw specs". Note this must be the first cmd MUST be done after
551 struct malo_cmd_get_hwspec *cmd;
556 _CMD_SETUP(cmd, struct malo_cmd_get_hwspec, MALO_HOSTCMD_GET_HW_SPEC);
557 memset(&cmd->permaddr[0], 0xff, IEEE80211_ADDR_LEN);
558 cmd->ul_fw_awakecookie = htole32((unsigned int)mh->mh_cmdaddr + 2048);
562 IEEE80211_ADDR_COPY(hw->macaddr, cmd->permaddr);
563 hw->wcbbase[0] = le32toh(cmd->wcbbase0) & 0x0000ffff;
564 hw->wcbbase[1] = le32toh(cmd->wcbbase1) & 0x0000ffff;
565 hw->wcbbase[2] = le32toh(cmd->wcbbase2) & 0x0000ffff;
566 hw->wcbbase[3] = le32toh(cmd->wcbbase3) & 0x0000ffff;
567 hw->rxdesc_read = le32toh(cmd->rxpdrd_ptr)& 0x0000ffff;
568 hw->rxdesc_write = le32toh(cmd->rxpdwr_ptr)& 0x0000ffff;
569 hw->regioncode = le16toh(cmd->regioncode) & 0x00ff;
570 hw->fw_releasenum = le32toh(cmd->fw_releasenum);
571 hw->maxnum_wcb = le16toh(cmd->num_wcb);
572 hw->maxnum_mcaddr = le16toh(cmd->num_mcastaddr);
573 hw->num_antenna = le16toh(cmd->num_antenna);
574 hw->hwversion = cmd->version;
575 hw->hostinterface = cmd->hostif;
602 struct malo_cmd_rf_antenna *cmd;
610 _CMD_SETUP(cmd, struct malo_cmd_rf_antenna,
612 cmd->action = htole16(dirset);
617 cmd->mode = htole16(ant);
629 * XXX preamble installed after set fixed rate cmd
635 struct malo_cmd_radio_control *cmd;
640 _CMD_SETUP(cmd, struct malo_cmd_radio_control,
642 cmd->action = htole16(MALO_HOSTCMD_ACT_GEN_SET);
644 cmd->control = 0;
646 cmd->control = htole16(preamble);
647 cmd->radio_on = htole16(onoff);
674 struct malo_cmd_fw_set_rf_channel *cmd;
679 _CMD_SETUP(cmd, struct malo_cmd_fw_set_rf_channel,
681 cmd->action = htole16(MALO_HOSTCMD_ACT_GEN_SET);
682 cmd->cur_channel = chan->channel;
694 struct malo_cmd_rf_tx_power *cmd;
702 _CMD_SETUP(cmd, struct malo_cmd_rf_tx_power,
704 cmd->action = htole16(MALO_HOSTCMD_ACT_GEN_SET_LIST);
708 cmd->power_levellist[i] = htole16(pow);
720 /* XXX need host cmd */
728 struct malo_cmd_fw_set_aid *cmd;
733 _CMD_SETUP(cmd, struct malo_cmd_fw_set_aid,
735 cmd->cmdhdr.seqnum = 1;
736 cmd->associd = htole16(associd);
737 IEEE80211_ADDR_COPY(&cmd->macaddr[0], bssid);
782 * Callback from the driver on a cmd done interrupt. Nothing to do right
783 * now as we spin waiting for cmd completion.
794 struct malo_cmd_prescan *cmd;
799 _CMD_SETUP(cmd, struct malo_cmd_prescan, MALO_HOSTCMD_SET_PRE_SCAN);
800 cmd->cmdhdr.seqnum = 1;
812 struct malo_cmd_postscan *cmd;
817 _CMD_SETUP(cmd, struct malo_cmd_postscan, MALO_HOSTCMD_SET_POST_SCAN);
818 cmd->cmdhdr.seqnum = 1;
819 cmd->isibss = htole32(ibsson);
820 IEEE80211_ADDR_COPY(&cmd->bssid[0], macaddr);
833 struct malo_cmd_fw_setslot *cmd;
837 _CMD_SETUP(cmd, struct malo_cmd_fw_setslot, MALO_HOSTCMD_SET_SLOT);
838 cmd->action = htole16(MALO_HOSTCMD_ACT_GEN_SET);
839 cmd->slot = (is_short == 1 ? 1 : 0);
852 struct malo_cmd_set_rate *cmd;
856 _CMD_SETUP(cmd, struct malo_cmd_set_rate, MALO_HOSTCMD_SET_RATE);
857 cmd->aprates[0] = 2;
858 cmd->aprates[1] = 4;
859 cmd->aprates[2] = 11;
860 cmd->aprates[3] = 22;
862 cmd->aprates[4] = 0; /* XXX reserved? */
863 cmd->aprates[5] = 12;
864 cmd->aprates[6] = 18;
865 cmd->aprates[7] = 24;
866 cmd->aprates[8] = 36;
867 cmd->aprates[9] = 48;
868 cmd->aprates[10] = 72;
869 cmd->aprates[11] = 96;
870 cmd->aprates[12] = 108;
876 if (cmd->aprates[i] == rate) {
877 cmd->rateindex = i;
878 cmd->dataratetype = 1;
894 struct malo_cmd_mcast *cmd;
902 _CMD_SETUP(cmd, struct malo_cmd_mcast, MALO_HOSTCMD_MAC_MULTICAST_ADR);
903 memcpy(cmd->maclist, macs, nmc * IEEE80211_ADDR_LEN);
904 cmd->numaddr = htole16(nmc);
905 cmd->action = htole16(0xffff);