Lines Matching refs:wl_cmd
781 struct wl1251_cmd_set_keys *wl_cmd; in wl1251_op_set_key() local
790 wl_cmd = kzalloc(sizeof(*wl_cmd), GFP_KERNEL); in wl1251_op_set_key()
791 if (!wl_cmd) { in wl1251_op_set_key()
818 wl_cmd->key_action = KEY_ADD_OR_REPLACE; in wl1251_op_set_key()
821 wl_cmd->key_action = KEY_REMOVE; in wl1251_op_set_key()
828 ret = wl1251_set_key_type(wl, wl_cmd, cmd, key, addr); in wl1251_op_set_key()
834 if (wl_cmd->key_type != KEY_WEP_DEFAULT) in wl1251_op_set_key()
835 memcpy(wl_cmd->addr, addr, ETH_ALEN); in wl1251_op_set_key()
837 if ((wl_cmd->key_type == KEY_TKIP_MIC_GROUP) || in wl1251_op_set_key()
838 (wl_cmd->key_type == KEY_TKIP_MIC_PAIRWISE)) { in wl1251_op_set_key()
845 memcpy(wl_cmd->key, key->key, 16); in wl1251_op_set_key()
846 memcpy(wl_cmd->key + 16, key->key + 24, 8); in wl1251_op_set_key()
847 memcpy(wl_cmd->key + 24, key->key + 16, 8); in wl1251_op_set_key()
850 memcpy(wl_cmd->key, key->key, key->keylen); in wl1251_op_set_key()
852 wl_cmd->key_size = key->keylen; in wl1251_op_set_key()
854 wl_cmd->id = key->keyidx; in wl1251_op_set_key()
855 wl_cmd->ssid_profile = 0; in wl1251_op_set_key()
857 wl1251_dump(DEBUG_CRYPT, "TARGET KEY: ", wl_cmd, sizeof(*wl_cmd)); in wl1251_op_set_key()
859 ret = wl1251_cmd_send(wl, CMD_SET_KEYS, wl_cmd, sizeof(*wl_cmd)); in wl1251_op_set_key()
872 kfree(wl_cmd); in wl1251_op_set_key()