Lines Matching full:cmd
61 pCmd->cmdhdr.cmd = htole16(_cmd); \
131 device_printf(dev, "unable to allocate memory for cmd tag, " in malo_hal_attach()
141 device_printf(dev, "unable to allocate memory for cmd buffer, " in malo_hal_attach()
151 device_printf(dev, "unable to load cmd buffer, error %u\n", in malo_hal_attach()
170 * Low level firmware cmd block handshake support.
188 malo_hal_waitforcmd(struct malo_hal *mh, uint16_t cmd) in malo_hal_waitforcmd() argument
194 if (mh->mh_cmdbuf[0] == le16toh(cmd)) in malo_hal_waitforcmd()
205 malo_hal_execute_cmd(struct malo_hal *mh, unsigned short cmd) in malo_hal_execute_cmd() argument
211 device_printf(mh->mh_dev, "firmware hung, skipping cmd 0x%x\n", in malo_hal_execute_cmd()
212 cmd); in malo_hal_execute_cmd()
223 if (!malo_hal_waitforcmd(mh, cmd | 0x8000)) { in malo_hal_execute_cmd()
225 "timeout waiting for f/w cmd 0x%x\n", cmd); in malo_hal_execute_cmd()
239 struct malo_cmd_caltable *cmd; in malo_hal_get_cal_table() local
244 _CMD_SETUP(cmd, struct malo_cmd_caltable, MALO_HOSTCMD_GET_CALTABLE); in malo_hal_get_cal_table()
245 cmd->annex = annex; in malo_hal_get_cal_table()
246 cmd->index = index; in malo_hal_get_cal_table()
249 if (ret == 0 && cmd->caltbl[0] != annex && annex != 0 && annex != 255) in malo_hal_get_cal_table()
536 * Return "hw specs". Note this must be the first cmd MUST be done after
542 struct malo_cmd_get_hwspec *cmd; in malo_hal_gethwspecs() local
547 _CMD_SETUP(cmd, struct malo_cmd_get_hwspec, MALO_HOSTCMD_GET_HW_SPEC); in malo_hal_gethwspecs()
548 memset(&cmd->permaddr[0], 0xff, IEEE80211_ADDR_LEN); in malo_hal_gethwspecs()
549 cmd->ul_fw_awakecookie = htole32((unsigned int)mh->mh_cmdaddr + 2048); in malo_hal_gethwspecs()
553 IEEE80211_ADDR_COPY(hw->macaddr, cmd->permaddr); in malo_hal_gethwspecs()
554 hw->wcbbase[0] = le32toh(cmd->wcbbase0) & 0x0000ffff; in malo_hal_gethwspecs()
555 hw->wcbbase[1] = le32toh(cmd->wcbbase1) & 0x0000ffff; in malo_hal_gethwspecs()
556 hw->wcbbase[2] = le32toh(cmd->wcbbase2) & 0x0000ffff; in malo_hal_gethwspecs()
557 hw->wcbbase[3] = le32toh(cmd->wcbbase3) & 0x0000ffff; in malo_hal_gethwspecs()
558 hw->rxdesc_read = le32toh(cmd->rxpdrd_ptr)& 0x0000ffff; in malo_hal_gethwspecs()
559 hw->rxdesc_write = le32toh(cmd->rxpdwr_ptr)& 0x0000ffff; in malo_hal_gethwspecs()
560 hw->regioncode = le16toh(cmd->regioncode) & 0x00ff; in malo_hal_gethwspecs()
561 hw->fw_releasenum = le32toh(cmd->fw_releasenum); in malo_hal_gethwspecs()
562 hw->maxnum_wcb = le16toh(cmd->num_wcb); in malo_hal_gethwspecs()
563 hw->maxnum_mcaddr = le16toh(cmd->num_mcastaddr); in malo_hal_gethwspecs()
564 hw->num_antenna = le16toh(cmd->num_antenna); in malo_hal_gethwspecs()
565 hw->hwversion = cmd->version; in malo_hal_gethwspecs()
566 hw->hostinterface = cmd->hostif; in malo_hal_gethwspecs()
593 struct malo_cmd_rf_antenna *cmd; in malo_hal_setantenna() local
601 _CMD_SETUP(cmd, struct malo_cmd_rf_antenna, in malo_hal_setantenna()
603 cmd->action = htole16(dirset); in malo_hal_setantenna()
608 cmd->mode = htole16(ant); in malo_hal_setantenna()
620 * XXX preamble installed after set fixed rate cmd
626 struct malo_cmd_radio_control *cmd; in malo_hal_setradio() local
631 _CMD_SETUP(cmd, struct malo_cmd_radio_control, in malo_hal_setradio()
633 cmd->action = htole16(MALO_HOSTCMD_ACT_GEN_SET); in malo_hal_setradio()
635 cmd->control = 0; in malo_hal_setradio()
637 cmd->control = htole16(preamble); in malo_hal_setradio()
638 cmd->radio_on = htole16(onoff); in malo_hal_setradio()
665 struct malo_cmd_fw_set_rf_channel *cmd; in malo_hal_setchannel() local
670 _CMD_SETUP(cmd, struct malo_cmd_fw_set_rf_channel, in malo_hal_setchannel()
672 cmd->action = htole16(MALO_HOSTCMD_ACT_GEN_SET); in malo_hal_setchannel()
673 cmd->cur_channel = chan->channel; in malo_hal_setchannel()
685 struct malo_cmd_rf_tx_power *cmd; in malo_hal_settxpower() local
693 _CMD_SETUP(cmd, struct malo_cmd_rf_tx_power, in malo_hal_settxpower()
695 cmd->action = htole16(MALO_HOSTCMD_ACT_GEN_SET_LIST); in malo_hal_settxpower()
699 cmd->power_levellist[i] = htole16(pow); in malo_hal_settxpower()
711 /* XXX need host cmd */ in malo_hal_setpromisc()
719 struct malo_cmd_fw_set_aid *cmd; in malo_hal_setassocid() local
724 _CMD_SETUP(cmd, struct malo_cmd_fw_set_aid, in malo_hal_setassocid()
726 cmd->cmdhdr.seqnum = 1; in malo_hal_setassocid()
727 cmd->associd = htole16(associd); in malo_hal_setassocid()
728 IEEE80211_ADDR_COPY(&cmd->macaddr[0], bssid); in malo_hal_setassocid()
773 * Callback from the driver on a cmd done interrupt. Nothing to do right
774 * now as we spin waiting for cmd completion.
785 struct malo_cmd_prescan *cmd; in malo_hal_prescan() local
790 _CMD_SETUP(cmd, struct malo_cmd_prescan, MALO_HOSTCMD_SET_PRE_SCAN); in malo_hal_prescan()
791 cmd->cmdhdr.seqnum = 1; in malo_hal_prescan()
803 struct malo_cmd_postscan *cmd; in malo_hal_postscan() local
808 _CMD_SETUP(cmd, struct malo_cmd_postscan, MALO_HOSTCMD_SET_POST_SCAN); in malo_hal_postscan()
809 cmd->cmdhdr.seqnum = 1; in malo_hal_postscan()
810 cmd->isibss = htole32(ibsson); in malo_hal_postscan()
811 IEEE80211_ADDR_COPY(&cmd->bssid[0], macaddr); in malo_hal_postscan()
824 struct malo_cmd_fw_setslot *cmd; in malo_hal_set_slot() local
828 _CMD_SETUP(cmd, struct malo_cmd_fw_setslot, MALO_HOSTCMD_SET_SLOT); in malo_hal_set_slot()
829 cmd->action = htole16(MALO_HOSTCMD_ACT_GEN_SET); in malo_hal_set_slot()
830 cmd->slot = (is_short == 1 ? 1 : 0); in malo_hal_set_slot()
843 struct malo_cmd_set_rate *cmd; in malo_hal_set_rate() local
847 _CMD_SETUP(cmd, struct malo_cmd_set_rate, MALO_HOSTCMD_SET_RATE); in malo_hal_set_rate()
848 cmd->aprates[0] = 2; in malo_hal_set_rate()
849 cmd->aprates[1] = 4; in malo_hal_set_rate()
850 cmd->aprates[2] = 11; in malo_hal_set_rate()
851 cmd->aprates[3] = 22; in malo_hal_set_rate()
853 cmd->aprates[4] = 0; /* XXX reserved? */ in malo_hal_set_rate()
854 cmd->aprates[5] = 12; in malo_hal_set_rate()
855 cmd->aprates[6] = 18; in malo_hal_set_rate()
856 cmd->aprates[7] = 24; in malo_hal_set_rate()
857 cmd->aprates[8] = 36; in malo_hal_set_rate()
858 cmd->aprates[9] = 48; in malo_hal_set_rate()
859 cmd->aprates[10] = 72; in malo_hal_set_rate()
860 cmd->aprates[11] = 96; in malo_hal_set_rate()
861 cmd->aprates[12] = 108; in malo_hal_set_rate()
867 if (cmd->aprates[i] == rate) { in malo_hal_set_rate()
868 cmd->rateindex = i; in malo_hal_set_rate()
869 cmd->dataratetype = 1; in malo_hal_set_rate()
885 struct malo_cmd_mcast *cmd; in malo_hal_setmcast() local
893 _CMD_SETUP(cmd, struct malo_cmd_mcast, MALO_HOSTCMD_MAC_MULTICAST_ADR); in malo_hal_setmcast()
894 memcpy(cmd->maclist, macs, nmc * IEEE80211_ADDR_LEN); in malo_hal_setmcast()
895 cmd->numaddr = htole16(nmc); in malo_hal_setmcast()
896 cmd->action = htole16(0xffff); in malo_hal_setmcast()