Lines Matching refs:wl_cmd
872 struct wl1251_cmd_set_keys *wl_cmd; in wl1251_op_set_key() local
881 wl_cmd = kzalloc(sizeof(*wl_cmd), GFP_KERNEL); in wl1251_op_set_key()
882 if (!wl_cmd) { in wl1251_op_set_key()
909 wl_cmd->key_action = KEY_ADD_OR_REPLACE; in wl1251_op_set_key()
912 wl_cmd->key_action = KEY_REMOVE; in wl1251_op_set_key()
923 ret = wl1251_set_key_type(wl, wl_cmd, cmd, key, addr); in wl1251_op_set_key()
929 if (wl_cmd->key_type != KEY_WEP_DEFAULT) in wl1251_op_set_key()
930 memcpy(wl_cmd->addr, addr, ETH_ALEN); in wl1251_op_set_key()
932 if ((wl_cmd->key_type == KEY_TKIP_MIC_GROUP) || in wl1251_op_set_key()
933 (wl_cmd->key_type == KEY_TKIP_MIC_PAIRWISE)) { in wl1251_op_set_key()
940 memcpy(wl_cmd->key, key->key, 16); in wl1251_op_set_key()
941 memcpy(wl_cmd->key + 16, key->key + 24, 8); in wl1251_op_set_key()
942 memcpy(wl_cmd->key + 24, key->key + 16, 8); in wl1251_op_set_key()
945 memcpy(wl_cmd->key, key->key, key->keylen); in wl1251_op_set_key()
947 wl_cmd->key_size = key->keylen; in wl1251_op_set_key()
949 wl_cmd->id = key->keyidx; in wl1251_op_set_key()
950 wl_cmd->ssid_profile = 0; in wl1251_op_set_key()
952 wl1251_dump(DEBUG_CRYPT, "TARGET KEY: ", wl_cmd, sizeof(*wl_cmd)); in wl1251_op_set_key()
954 ret = wl1251_cmd_send(wl, CMD_SET_KEYS, wl_cmd, sizeof(*wl_cmd)); in wl1251_op_set_key()
967 kfree(wl_cmd); in wl1251_op_set_key()