Lines Matching refs:key

24 	struct ieee80211_key *key = file->private_data;			\
26 format_string, key->prop); \
77 struct ieee80211_key *key = file->private_data; in key_algorithm_read() local
78 u32 c = key->conf.cipher; in key_algorithm_read()
89 struct ieee80211_key *key = file->private_data; in key_tx_spec_write() local
93 switch (key->conf.cipher) { in key_tx_spec_write()
114 atomic64_set(&key->conf.tx_pn, pn); in key_tx_spec_write()
127 struct ieee80211_key *key = file->private_data; in key_tx_spec_read() local
129 switch (key->conf.cipher) { in key_tx_spec_read()
136 key->u.tkip.tx.iv32, in key_tx_spec_read()
137 key->u.tkip.tx.iv16); in key_tx_spec_read()
147 pn = atomic64_read(&key->conf.tx_pn); in key_tx_spec_read()
162 struct ieee80211_key *key = file->private_data; in key_rx_spec_read() local
167 switch (key->conf.cipher) { in key_rx_spec_read()
176 key->u.tkip.rx[i].iv32, in key_rx_spec_read()
177 key->u.tkip.rx[i].iv16); in key_rx_spec_read()
183 rpn = key->u.ccmp.rx_pn[i]; in key_rx_spec_read()
193 rpn = key->u.aes_cmac.rx_pn; in key_rx_spec_read()
202 rpn = key->u.aes_gmac.rx_pn; in key_rx_spec_read()
212 rpn = key->u.gcmp.rx_pn[i]; in key_rx_spec_read()
230 struct ieee80211_key *key = file->private_data; in key_replays_read() local
234 switch (key->conf.cipher) { in key_replays_read()
237 len = scnprintf(buf, sizeof(buf), "%u\n", key->u.ccmp.replays); in key_replays_read()
242 key->u.aes_cmac.replays); in key_replays_read()
247 key->u.aes_gmac.replays); in key_replays_read()
251 len = scnprintf(buf, sizeof(buf), "%u\n", key->u.gcmp.replays); in key_replays_read()
263 struct ieee80211_key *key = file->private_data; in key_icverrors_read() local
267 switch (key->conf.cipher) { in key_icverrors_read()
271 key->u.aes_cmac.icverrors); in key_icverrors_read()
276 key->u.aes_gmac.icverrors); in key_icverrors_read()
288 struct ieee80211_key *key = file->private_data; in key_mic_failures_read() local
292 if (key->conf.cipher != WLAN_CIPHER_SUITE_TKIP) in key_mic_failures_read()
295 len = scnprintf(buf, sizeof(buf), "%u\n", key->u.tkip.mic_failures); in key_mic_failures_read()
304 struct ieee80211_key *key = file->private_data; in key_key_read() local
305 int i, bufsize = 2 * key->conf.keylen + 2; in key_key_read()
313 for (i = 0; i < key->conf.keylen; i++) in key_key_read()
314 p += scnprintf(p, bufsize + buf - p, "%02x", key->conf.key[i]); in key_key_read()
320 KEY_OPS(key);
323 debugfs_create_file(#name, 0400, key->debugfs.dir, \
324 key, &key_##name##_ops);
326 debugfs_create_file(#name, 0600, key->debugfs.dir, \
327 key, &key_##name##_ops);
329 void ieee80211_debugfs_key_add(struct ieee80211_key *key) in ieee80211_debugfs_key_add() argument
335 if (!key->local->debugfs.keys) in ieee80211_debugfs_key_add()
339 key->debugfs.cnt = keycount; in ieee80211_debugfs_key_add()
341 key->debugfs.dir = debugfs_create_dir(buf, in ieee80211_debugfs_key_add()
342 key->local->debugfs.keys); in ieee80211_debugfs_key_add()
344 if (!key->debugfs.dir) in ieee80211_debugfs_key_add()
347 sta = key->sta; in ieee80211_debugfs_key_add()
351 key->debugfs.stalink = in ieee80211_debugfs_key_add()
352 debugfs_create_symlink("station", key->debugfs.dir, buf); in ieee80211_debugfs_key_add()
365 DEBUGFS_ADD(key); in ieee80211_debugfs_key_add()
369 void ieee80211_debugfs_key_remove(struct ieee80211_key *key) in ieee80211_debugfs_key_remove() argument
371 if (!key) in ieee80211_debugfs_key_remove()
374 debugfs_remove_recursive(key->debugfs.dir); in ieee80211_debugfs_key_remove()
375 key->debugfs.dir = NULL; in ieee80211_debugfs_key_remove()
381 struct ieee80211_key *key; in ieee80211_debugfs_key_update_default() local
392 key = key_mtx_dereference(sdata->local, in ieee80211_debugfs_key_update_default()
394 sprintf(buf, "../keys/%d", key->debugfs.cnt); in ieee80211_debugfs_key_update_default()
404 key = key_mtx_dereference(sdata->local, in ieee80211_debugfs_key_update_default()
406 sprintf(buf, "../keys/%d", key->debugfs.cnt); in ieee80211_debugfs_key_update_default()
416 struct ieee80211_key *key; in ieee80211_debugfs_key_add_mgmt_default() local
421 key = key_mtx_dereference(sdata->local, in ieee80211_debugfs_key_add_mgmt_default()
423 if (key) { in ieee80211_debugfs_key_add_mgmt_default()
424 sprintf(buf, "../keys/%d", key->debugfs.cnt); in ieee80211_debugfs_key_add_mgmt_default()
441 void ieee80211_debugfs_key_sta_del(struct ieee80211_key *key, in ieee80211_debugfs_key_sta_del() argument
444 debugfs_remove(key->debugfs.stalink); in ieee80211_debugfs_key_sta_del()
445 key->debugfs.stalink = NULL; in ieee80211_debugfs_key_sta_del()