Lines Matching refs:cmd

187 il_get_cmd_string(u8 cmd)  in il_get_cmd_string()  argument
189 switch (cmd) { in il_get_cmd_string()
241 il_generic_cmd_callback(struct il_priv *il, struct il_device_cmd *cmd, in il_generic_cmd_callback() argument
246 il_get_cmd_string(cmd->hdr.cmd), pkt->hdr.flags); in il_generic_cmd_callback()
250 switch (cmd->hdr.cmd) { in il_generic_cmd_callback()
254 il_get_cmd_string(cmd->hdr.cmd), pkt->hdr.flags); in il_generic_cmd_callback()
257 D_HC("back from %s (0x%08X)\n", il_get_cmd_string(cmd->hdr.cmd), in il_generic_cmd_callback()
264 il_send_cmd_async(struct il_priv *il, struct il_host_cmd *cmd) in il_send_cmd_async() argument
268 BUG_ON(!(cmd->flags & CMD_ASYNC)); in il_send_cmd_async()
271 BUG_ON(cmd->flags & CMD_WANT_SKB); in il_send_cmd_async()
274 if (!cmd->callback) in il_send_cmd_async()
275 cmd->callback = il_generic_cmd_callback; in il_send_cmd_async()
280 ret = il_enqueue_hcmd(il, cmd); in il_send_cmd_async()
283 il_get_cmd_string(cmd->id), ret); in il_send_cmd_async()
290 il_send_cmd_sync(struct il_priv *il, struct il_host_cmd *cmd) in il_send_cmd_sync() argument
297 BUG_ON(cmd->flags & CMD_ASYNC); in il_send_cmd_sync()
300 BUG_ON(cmd->callback); in il_send_cmd_sync()
303 il_get_cmd_string(cmd->id)); in il_send_cmd_sync()
307 il_get_cmd_string(cmd->id)); in il_send_cmd_sync()
309 cmd_idx = il_enqueue_hcmd(il, cmd); in il_send_cmd_sync()
313 il_get_cmd_string(cmd->id), ret); in il_send_cmd_sync()
323 il_get_cmd_string(cmd->id), in il_send_cmd_sync()
328 il_get_cmd_string(cmd->id)); in il_send_cmd_sync()
336 il_get_cmd_string(cmd->id)); in il_send_cmd_sync()
342 il_get_cmd_string(cmd->id)); in il_send_cmd_sync()
346 if ((cmd->flags & CMD_WANT_SKB) && !cmd->reply_page) { in il_send_cmd_sync()
348 il_get_cmd_string(cmd->id)); in il_send_cmd_sync()
357 if (cmd->flags & CMD_WANT_SKB) { in il_send_cmd_sync()
367 if (cmd->reply_page) { in il_send_cmd_sync()
368 il_free_pages(il, cmd->reply_page); in il_send_cmd_sync()
369 cmd->reply_page = 0; in il_send_cmd_sync()
377 il_send_cmd(struct il_priv *il, struct il_host_cmd *cmd) in il_send_cmd() argument
379 if (cmd->flags & CMD_ASYNC) in il_send_cmd()
380 return il_send_cmd_async(il, cmd); in il_send_cmd()
382 return il_send_cmd_sync(il, cmd); in il_send_cmd()
389 struct il_host_cmd cmd = { in il_send_cmd_pdu() local
395 return il_send_cmd_sync(il, &cmd); in il_send_cmd_pdu()
402 struct il_device_cmd *cmd, in il_send_cmd_pdu_async() argument
405 struct il_host_cmd cmd = { in il_send_cmd_pdu_async() local
411 cmd.flags |= CMD_ASYNC; in il_send_cmd_pdu_async()
412 cmd.callback = callback; in il_send_cmd_pdu_async()
414 return il_send_cmd_async(il, &cmd); in il_send_cmd_pdu_async()
1073 il_build_powertable_cmd(struct il_priv *il, struct il_powertable_cmd *cmd) in il_build_powertable_cmd() argument
1084 memset(cmd, 0, sizeof(*cmd)); in il_build_powertable_cmd()
1087 cmd->flags |= IL_POWER_PCI_PM_MSK; in il_build_powertable_cmd()
1093 cmd->flags = IL_POWER_DRIVER_ALLOW_SLEEP_MSK; in il_build_powertable_cmd()
1094 cmd->keep_alive_seconds = 0; in il_build_powertable_cmd()
1095 cmd->debug_flags = 0; in il_build_powertable_cmd()
1096 cmd->rx_data_timeout = cpu_to_le32(25 * 1024); in il_build_powertable_cmd()
1097 cmd->tx_data_timeout = cpu_to_le32(25 * 1024); in il_build_powertable_cmd()
1098 cmd->keep_alive_beacons = 0; in il_build_powertable_cmd()
1103 memcpy(cmd->sleep_interval, interval[0], sizeof(interval[0])); in il_build_powertable_cmd()
1106 memcpy(cmd->sleep_interval, interval[1], sizeof(interval[1])); in il_build_powertable_cmd()
1109 memcpy(cmd->sleep_interval, interval[2], sizeof(interval[2])); in il_build_powertable_cmd()
1121 __le32 tmp = cmd->sleep_interval[IL_POWER_VEC_SIZE - 1]; in il_build_powertable_cmd()
1128 cmd->flags |= IL_POWER_SLEEP_OVER_DTIM_MSK; in il_build_powertable_cmd()
1131 cmd->flags &= ~IL_POWER_SLEEP_OVER_DTIM_MSK; in il_build_powertable_cmd()
1135 if (le32_to_cpu(cmd->sleep_interval[i]) > max_sleep) in il_build_powertable_cmd()
1136 cmd->sleep_interval[i] = cpu_to_le32(max_sleep); in il_build_powertable_cmd()
1140 il_set_power(struct il_priv *il, struct il_powertable_cmd *cmd) in il_set_power() argument
1143 D_POWER("Flags value = 0x%08X\n", cmd->flags); in il_set_power()
1144 D_POWER("Tx timeout = %u\n", le32_to_cpu(cmd->tx_data_timeout)); in il_set_power()
1145 D_POWER("Rx timeout = %u\n", le32_to_cpu(cmd->rx_data_timeout)); in il_set_power()
1147 le32_to_cpu(cmd->sleep_interval[0]), in il_set_power()
1148 le32_to_cpu(cmd->sleep_interval[1]), in il_set_power()
1149 le32_to_cpu(cmd->sleep_interval[2]), in il_set_power()
1150 le32_to_cpu(cmd->sleep_interval[3]), in il_set_power()
1151 le32_to_cpu(cmd->sleep_interval[4])); in il_set_power()
1154 sizeof(struct il_powertable_cmd), cmd); in il_set_power()
1158 il_power_set_mode(struct il_priv *il, struct il_powertable_cmd *cmd, bool force) in il_power_set_mode() argument
1169 if (!memcmp(&il->power_data.sleep_cmd, cmd, sizeof(*cmd)) && !force) in il_power_set_mode()
1176 memcpy(&il->power_data.sleep_cmd_next, cmd, sizeof(*cmd)); in il_power_set_mode()
1182 if (cmd->flags & IL_POWER_DRIVER_ALLOW_SLEEP_MSK) in il_power_set_mode()
1185 ret = il_set_power(il, cmd); in il_power_set_mode()
1187 if (!(cmd->flags & IL_POWER_DRIVER_ALLOW_SLEEP_MSK)) in il_power_set_mode()
1197 memcpy(&il->power_data.sleep_cmd, cmd, sizeof(*cmd)); in il_power_set_mode()
1207 struct il_powertable_cmd cmd; in il_power_update_mode() local
1209 il_build_powertable_cmd(il, &cmd); in il_power_update_mode()
1211 return il_power_set_mode(il, &cmd, force); in il_power_update_mode()
1252 struct il_host_cmd cmd = { in il_send_scan_abort() local
1267 ret = il_send_cmd_sync(il, &cmd); in il_send_scan_abort()
1271 pkt = (struct il_rx_pkt *)cmd.reply_page; in il_send_scan_abort()
1283 il_free_pages(il, cmd.reply_page); in il_send_scan_abort()
1815 il_add_sta_callback(struct il_priv *il, struct il_device_cmd *cmd, in il_add_sta_callback() argument
1818 struct il_addsta_cmd *addsta = (struct il_addsta_cmd *)cmd->cmd.payload; in il_add_sta_callback()
1830 struct il_host_cmd cmd = { in il_send_add_sta() local
1841 cmd.callback = il_add_sta_callback; in il_send_add_sta()
1843 cmd.flags |= CMD_WANT_SKB; in il_send_add_sta()
1847 cmd.len = il->ops->build_addsta_hcmd(sta, data); in il_send_add_sta()
1848 ret = il_send_cmd(il, &cmd); in il_send_add_sta()
1854 pkt = (struct il_rx_pkt *)cmd.reply_page; in il_send_add_sta()
1857 il_free_pages(il, cmd.reply_page); in il_send_add_sta()
2090 struct il_host_cmd cmd = { in il_send_remove_station() local
2101 cmd.flags |= CMD_WANT_SKB; in il_send_remove_station()
2103 ret = il_send_cmd(il, &cmd); in il_send_remove_station()
2108 pkt = (struct il_rx_pkt *)cmd.reply_page; in il_send_remove_station()
2131 il_free_pages(il, cmd.reply_page); in il_send_remove_station()
2402 struct il_host_cmd cmd = { in il_send_lq_cmd() local
2420 BUG_ON(init && (cmd.flags & CMD_ASYNC)); in il_send_lq_cmd()
2423 ret = il_send_cmd(il, &cmd); in il_send_lq_cmd()
2427 if (cmd.flags & CMD_ASYNC) in il_send_lq_cmd()
2780 if (txq->cmd) { in il_tx_queue_free()
2782 kfree(txq->cmd[i]); in il_tx_queue_free()
2795 kfree(txq->cmd); in il_tx_queue_free()
2797 txq->cmd = NULL; in il_tx_queue_free()
2860 if (txq->cmd) { in il_cmd_queue_free()
2862 kfree(txq->cmd[i]); in il_cmd_queue_free()
2871 kfree(txq->cmd); in il_cmd_queue_free()
2873 txq->cmd = NULL; in il_cmd_queue_free()
3025 txq->cmd = in il_tx_queue_init()
3028 if (!txq->meta || !txq->cmd) in il_tx_queue_init()
3037 txq->cmd[i] = kmalloc(len, GFP_KERNEL); in il_tx_queue_init()
3038 if (!txq->cmd[i]) in il_tx_queue_init()
3066 kfree(txq->cmd[i]); in il_tx_queue_init()
3070 kfree(txq->cmd); in il_tx_queue_init()
3071 txq->cmd = NULL; in il_tx_queue_init()
3114 il_enqueue_hcmd(struct il_priv *il, struct il_host_cmd *cmd) in il_enqueue_hcmd() argument
3125 cmd->len = il->ops->get_hcmd_size(cmd->id, cmd->len); in il_enqueue_hcmd()
3126 fix_size = (u16) (cmd->len + sizeof(out_cmd->hdr)); in il_enqueue_hcmd()
3134 !(cmd->flags & CMD_SIZE_HUGE)); in il_enqueue_hcmd()
3145 if (il_queue_space(q) < ((cmd->flags & CMD_ASYNC) ? 2 : 1)) { in il_enqueue_hcmd()
3153 idx = il_get_cmd_idx(q, q->write_ptr, cmd->flags & CMD_SIZE_HUGE); in il_enqueue_hcmd()
3154 out_cmd = txq->cmd[idx]; in il_enqueue_hcmd()
3163 out_meta->flags = cmd->flags | CMD_MAPPED; in il_enqueue_hcmd()
3164 if (cmd->flags & CMD_WANT_SKB) in il_enqueue_hcmd()
3165 out_meta->source = cmd; in il_enqueue_hcmd()
3166 if (cmd->flags & CMD_ASYNC) in il_enqueue_hcmd()
3167 out_meta->callback = cmd->callback; in il_enqueue_hcmd()
3169 out_cmd->hdr.cmd = cmd->id; in il_enqueue_hcmd()
3170 memcpy(&out_cmd->cmd.payload, cmd->data, cmd->len); in il_enqueue_hcmd()
3178 if (cmd->flags & CMD_SIZE_HUGE) in il_enqueue_hcmd()
3182 switch (out_cmd->hdr.cmd) { in il_enqueue_hcmd()
3187 il_get_cmd_string(out_cmd->hdr.cmd), out_cmd->hdr.cmd, in il_enqueue_hcmd()
3194 il_get_cmd_string(out_cmd->hdr.cmd), out_cmd->hdr.cmd, in il_enqueue_hcmd()
3216 U32_PAD(cmd->len)); in il_enqueue_hcmd()
3277 struct il_device_cmd *cmd; in il_tx_cmd_complete() local
3295 cmd = txq->cmd[cmd_idx]; in il_tx_cmd_complete()
3308 meta->callback(il, cmd, pkt); in il_tx_cmd_complete()
3317 il_get_cmd_string(cmd->hdr.cmd)); in il_tx_cmd_complete()
4456 il_get_cmd_string(pkt->hdr.cmd)); in il_hdl_pm_debug_stats()