Lines Matching +full:local +full:- +full:cap +full:- +full:size
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright 2003-2005 Devicescape Software, Inc.
6 * Copyright 2013-2014 Intel Mobile Communications GmbH
8 * Copyright (C) 2018 - 2020 Intel Corporation
17 #include "driver-ops.h"
26 struct sta_info *sta = file->private_data; \
28 format_string, sta->field); \
89 char *end = buf + sizeof(buf) - 1; in sta_flags_read()
90 struct sta_info *sta = file->private_data; in sta_flags_read()
97 pos += scnprintf(pos, end - pos, "%s\n", in sta_flags_read()
109 struct sta_info *sta = file->private_data; in sta_num_ps_buf_frames_read()
114 p += scnprintf(p, sizeof(buf)+buf-p, "AC%d: %d\n", ac, in sta_num_ps_buf_frames_read()
115 skb_queue_len(&sta->ps_tx_buf[ac]) + in sta_num_ps_buf_frames_read()
116 skb_queue_len(&sta->tx_filtered[ac])); in sta_num_ps_buf_frames_read()
117 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_num_ps_buf_frames_read()
126 struct sta_info *sta = file->private_data; in sta_last_seq_ctrl_read()
128 p += scnprintf(p, sizeof(buf)+buf-p, "%x ", in sta_last_seq_ctrl_read()
129 le16_to_cpu(sta->last_seq_ctrl[i])); in sta_last_seq_ctrl_read()
130 p += scnprintf(p, sizeof(buf)+buf-p, "\n"); in sta_last_seq_ctrl_read()
131 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_last_seq_ctrl_read()
140 struct sta_info *sta = file->private_data; in sta_aqm_read()
141 struct ieee80211_local *local = sta->local; in sta_aqm_read() local
149 return -ENOMEM; in sta_aqm_read()
151 spin_lock_bh(&local->fq.lock); in sta_aqm_read()
155 bufsz+buf-p, in sta_aqm_read()
157 codel_time_to_us(sta->cparams.target), in sta_aqm_read()
158 codel_time_to_us(sta->cparams.interval), in sta_aqm_read()
159 sta->cparams.ecn ? "yes" : "no"); in sta_aqm_read()
161 bufsz+buf-p, in sta_aqm_read()
162 …"tid ac backlog-bytes backlog-packets new-flows drops marks overlimit collisions tx-bytes tx-packe… in sta_aqm_read()
164 for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) { in sta_aqm_read()
165 if (!sta->sta.txq[i]) in sta_aqm_read()
167 txqi = to_txq_info(sta->sta.txq[i]); in sta_aqm_read()
168 p += scnprintf(p, bufsz+buf-p, in sta_aqm_read()
170 txqi->txq.tid, in sta_aqm_read()
171 txqi->txq.ac, in sta_aqm_read()
172 txqi->tin.backlog_bytes, in sta_aqm_read()
173 txqi->tin.backlog_packets, in sta_aqm_read()
174 txqi->tin.flows, in sta_aqm_read()
175 txqi->cstats.drop_count, in sta_aqm_read()
176 txqi->cstats.ecn_mark, in sta_aqm_read()
177 txqi->tin.overlimit, in sta_aqm_read()
178 txqi->tin.collisions, in sta_aqm_read()
179 txqi->tin.tx_bytes, in sta_aqm_read()
180 txqi->tin.tx_packets, in sta_aqm_read()
181 txqi->flags, in sta_aqm_read()
182 test_bit(IEEE80211_TXQ_STOP, &txqi->flags) ? "STOP" : "RUN", in sta_aqm_read()
183 test_bit(IEEE80211_TXQ_AMPDU, &txqi->flags) ? " AMPDU" : "", in sta_aqm_read()
184 test_bit(IEEE80211_TXQ_NO_AMSDU, &txqi->flags) ? " NO-AMSDU" : ""); in sta_aqm_read()
188 spin_unlock_bh(&local->fq.lock); in sta_aqm_read()
190 rv = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_aqm_read()
199 struct sta_info *sta = file->private_data; in sta_airtime_read()
200 struct ieee80211_local *local = sta->sdata->local; in sta_airtime_read() local
209 return -ENOMEM; in sta_airtime_read()
212 spin_lock_bh(&local->active_txq_lock[ac]); in sta_airtime_read()
213 rx_airtime += sta->airtime[ac].rx_airtime; in sta_airtime_read()
214 tx_airtime += sta->airtime[ac].tx_airtime; in sta_airtime_read()
215 deficit[ac] = sta->airtime[ac].deficit; in sta_airtime_read()
216 spin_unlock_bh(&local->active_txq_lock[ac]); in sta_airtime_read()
219 p += scnprintf(p, bufsz + buf - p, in sta_airtime_read()
222 rx_airtime, tx_airtime, sta->airtime_weight, in sta_airtime_read()
225 rv = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_airtime_read()
233 struct sta_info *sta = file->private_data; in sta_airtime_write()
234 struct ieee80211_local *local = sta->sdata->local; in sta_airtime_write() local
238 spin_lock_bh(&local->active_txq_lock[ac]); in sta_airtime_write()
239 sta->airtime[ac].rx_airtime = 0; in sta_airtime_write()
240 sta->airtime[ac].tx_airtime = 0; in sta_airtime_write()
241 sta->airtime[ac].deficit = sta->airtime_weight; in sta_airtime_write()
242 spin_unlock_bh(&local->active_txq_lock[ac]); in sta_airtime_write()
252 struct sta_info *sta = file->private_data; in sta_aql_read()
253 struct ieee80211_local *local = sta->sdata->local; in sta_aql_read() local
262 return -ENOMEM; in sta_aql_read()
265 spin_lock_bh(&local->active_txq_lock[ac]); in sta_aql_read()
266 q_limit_l[ac] = sta->airtime[ac].aql_limit_low; in sta_aql_read()
267 q_limit_h[ac] = sta->airtime[ac].aql_limit_high; in sta_aql_read()
268 spin_unlock_bh(&local->active_txq_lock[ac]); in sta_aql_read()
269 q_depth[ac] = atomic_read(&sta->airtime[ac].aql_tx_pending); in sta_aql_read()
272 p += scnprintf(p, bufsz + buf - p, in sta_aql_read()
279 rv = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_aql_read()
287 struct sta_info *sta = file->private_data; in sta_aql_write()
292 return -EINVAL; in sta_aql_write()
295 return -EFAULT; in sta_aql_write()
297 buf[sizeof(_buf) - 1] = '\0'; in sta_aql_write()
300 return -EINVAL; in sta_aql_write()
303 return -EINVAL; in sta_aql_write()
305 sta->airtime[ac].aql_limit_low = q_limit_l; in sta_aql_write()
306 sta->airtime[ac].aql_limit_high = q_limit_h; in sta_aql_write()
318 struct sta_info *sta = file->private_data; in sta_agg_status_read()
324 p += scnprintf(p, sizeof(buf) + buf - p, "next dialog_token: %#02x\n", in sta_agg_status_read()
325 sta->ampdu_mlme.dialog_token_allocator + 1); in sta_agg_status_read()
326 p += scnprintf(p, sizeof(buf) + buf - p, in sta_agg_status_read()
332 tid_rx = rcu_dereference(sta->ampdu_mlme.tid_rx[i]); in sta_agg_status_read()
333 tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[i]); in sta_agg_status_read()
334 tid_rx_valid = test_bit(i, sta->ampdu_mlme.agg_session_valid); in sta_agg_status_read()
336 p += scnprintf(p, sizeof(buf) + buf - p, "%02d", i); in sta_agg_status_read()
337 p += scnprintf(p, sizeof(buf) + buf - p, "\t\t%x", in sta_agg_status_read()
339 p += scnprintf(p, sizeof(buf) + buf - p, "\t%#.2x", in sta_agg_status_read()
341 sta->ampdu_mlme.tid_rx_token[i] : 0); in sta_agg_status_read()
342 p += scnprintf(p, sizeof(buf) + buf - p, "\t%#.3x", in sta_agg_status_read()
343 tid_rx ? tid_rx->ssn : 0); in sta_agg_status_read()
345 p += scnprintf(p, sizeof(buf) + buf - p, "\t\t%x", !!tid_tx); in sta_agg_status_read()
346 p += scnprintf(p, sizeof(buf) + buf - p, "\t%#.2x", in sta_agg_status_read()
347 tid_tx ? tid_tx->dialog_token : 0); in sta_agg_status_read()
348 p += scnprintf(p, sizeof(buf) + buf - p, "\t%03d", in sta_agg_status_read()
349 tid_tx ? skb_queue_len(&tid_tx->pending) : 0); in sta_agg_status_read()
350 p += scnprintf(p, sizeof(buf) + buf - p, "\n"); in sta_agg_status_read()
354 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_agg_status_read()
361 struct sta_info *sta = file->private_data; in sta_agg_status_write()
368 return -EINVAL; in sta_agg_status_write()
371 return -EFAULT; in sta_agg_status_write()
373 buf[sizeof(_buf) - 1] = '\0'; in sta_agg_status_write()
377 return -EINVAL; in sta_agg_status_write()
384 return -EINVAL; in sta_agg_status_write()
388 return -EINVAL; in sta_agg_status_write()
392 return -EINVAL; in sta_agg_status_write()
396 return -EINVAL; in sta_agg_status_write()
401 return -EINVAL; in sta_agg_status_write()
405 return -EINVAL; in sta_agg_status_write()
410 return -EINVAL; in sta_agg_status_write()
414 ret = ieee80211_start_tx_ba_session(&sta->sta, tid, in sta_agg_status_write()
417 ret = ieee80211_stop_tx_ba_session(&sta->sta, tid); in sta_agg_status_write()
434 p += scnprintf(p, sizeof(buf)+buf-p, "\t" _str "\n"); \ in sta_ht_capa_read()
438 struct sta_info *sta = file->private_data; in sta_ht_capa_read()
439 struct ieee80211_sta_ht_cap *htc = &sta->sta.ht_cap; in sta_ht_capa_read()
441 p += scnprintf(p, sizeof(buf) + buf - p, "ht %ssupported\n", in sta_ht_capa_read()
442 htc->ht_supported ? "" : "not "); in sta_ht_capa_read()
443 if (htc->ht_supported) { in sta_ht_capa_read()
444 p += scnprintf(p, sizeof(buf)+buf-p, "cap: %#.4x\n", htc->cap); in sta_ht_capa_read()
446 PRINT_HT_CAP((htc->cap & BIT(0)), "RX LDPC"); in sta_ht_capa_read()
447 PRINT_HT_CAP((htc->cap & BIT(1)), "HT20/HT40"); in sta_ht_capa_read()
448 PRINT_HT_CAP(!(htc->cap & BIT(1)), "HT20"); in sta_ht_capa_read()
450 PRINT_HT_CAP(((htc->cap >> 2) & 0x3) == 0, "Static SM Power Save"); in sta_ht_capa_read()
451 PRINT_HT_CAP(((htc->cap >> 2) & 0x3) == 1, "Dynamic SM Power Save"); in sta_ht_capa_read()
452 PRINT_HT_CAP(((htc->cap >> 2) & 0x3) == 3, "SM Power Save disabled"); in sta_ht_capa_read()
454 PRINT_HT_CAP((htc->cap & BIT(4)), "RX Greenfield"); in sta_ht_capa_read()
455 PRINT_HT_CAP((htc->cap & BIT(5)), "RX HT20 SGI"); in sta_ht_capa_read()
456 PRINT_HT_CAP((htc->cap & BIT(6)), "RX HT40 SGI"); in sta_ht_capa_read()
457 PRINT_HT_CAP((htc->cap & BIT(7)), "TX STBC"); in sta_ht_capa_read()
459 PRINT_HT_CAP(((htc->cap >> 8) & 0x3) == 0, "No RX STBC"); in sta_ht_capa_read()
460 PRINT_HT_CAP(((htc->cap >> 8) & 0x3) == 1, "RX STBC 1-stream"); in sta_ht_capa_read()
461 PRINT_HT_CAP(((htc->cap >> 8) & 0x3) == 2, "RX STBC 2-streams"); in sta_ht_capa_read()
462 PRINT_HT_CAP(((htc->cap >> 8) & 0x3) == 3, "RX STBC 3-streams"); in sta_ht_capa_read()
464 PRINT_HT_CAP((htc->cap & BIT(10)), "HT Delayed Block Ack"); in sta_ht_capa_read()
466 PRINT_HT_CAP(!(htc->cap & BIT(11)), "Max AMSDU length: " in sta_ht_capa_read()
468 PRINT_HT_CAP((htc->cap & BIT(11)), "Max AMSDU length: " in sta_ht_capa_read()
477 PRINT_HT_CAP((htc->cap & BIT(12)), "DSSS/CCK HT40"); in sta_ht_capa_read()
478 PRINT_HT_CAP(!(htc->cap & BIT(12)), "No DSSS/CCK HT40"); in sta_ht_capa_read()
482 PRINT_HT_CAP((htc->cap & BIT(14)), "40 MHz Intolerant"); in sta_ht_capa_read()
484 PRINT_HT_CAP((htc->cap & BIT(15)), "L-SIG TXOP protection"); in sta_ht_capa_read()
486 p += scnprintf(p, sizeof(buf)+buf-p, "ampdu factor/density: %d/%d\n", in sta_ht_capa_read()
487 htc->ampdu_factor, htc->ampdu_density); in sta_ht_capa_read()
488 p += scnprintf(p, sizeof(buf)+buf-p, "MCS mask:"); in sta_ht_capa_read()
491 p += scnprintf(p, sizeof(buf)+buf-p, " %.2x", in sta_ht_capa_read()
492 htc->mcs.rx_mask[i]); in sta_ht_capa_read()
493 p += scnprintf(p, sizeof(buf)+buf-p, "\n"); in sta_ht_capa_read()
496 if (le16_to_cpu(htc->mcs.rx_highest)) { in sta_ht_capa_read()
497 p += scnprintf(p, sizeof(buf)+buf-p, in sta_ht_capa_read()
499 le16_to_cpu(htc->mcs.rx_highest)); in sta_ht_capa_read()
502 p += scnprintf(p, sizeof(buf)+buf-p, "MCS tx params: %x\n", in sta_ht_capa_read()
503 htc->mcs.tx_params); in sta_ht_capa_read()
506 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_ht_capa_read()
514 struct sta_info *sta = file->private_data; in sta_vht_capa_read()
515 struct ieee80211_sta_vht_cap *vhtc = &sta->sta.vht_cap; in sta_vht_capa_read()
517 p += scnprintf(p, sizeof(buf) + buf - p, "VHT %ssupported\n", in sta_vht_capa_read()
518 vhtc->vht_supported ? "" : "not "); in sta_vht_capa_read()
519 if (vhtc->vht_supported) { in sta_vht_capa_read()
520 p += scnprintf(p, sizeof(buf) + buf - p, "cap: %#.8x\n", in sta_vht_capa_read()
521 vhtc->cap); in sta_vht_capa_read()
524 if (vhtc->cap & IEEE80211_VHT_CAP_ ## a) \ in sta_vht_capa_read()
525 p += scnprintf(p, sizeof(buf) + buf - p, \ in sta_vht_capa_read()
529 switch (vhtc->cap & 0x3) { in sta_vht_capa_read()
531 p += scnprintf(p, sizeof(buf) + buf - p, in sta_vht_capa_read()
532 "\t\tMAX-MPDU-3895\n"); in sta_vht_capa_read()
535 p += scnprintf(p, sizeof(buf) + buf - p, in sta_vht_capa_read()
536 "\t\tMAX-MPDU-7991\n"); in sta_vht_capa_read()
539 p += scnprintf(p, sizeof(buf) + buf - p, in sta_vht_capa_read()
540 "\t\tMAX-MPDU-11454\n"); in sta_vht_capa_read()
543 p += scnprintf(p, sizeof(buf) + buf - p, in sta_vht_capa_read()
544 "\t\tMAX-MPDU-UNKNOWN\n"); in sta_vht_capa_read()
546 switch (vhtc->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) { in sta_vht_capa_read()
548 p += scnprintf(p, sizeof(buf) + buf - p, in sta_vht_capa_read()
552 p += scnprintf(p, sizeof(buf) + buf - p, in sta_vht_capa_read()
556 p += scnprintf(p, sizeof(buf) + buf - p, in sta_vht_capa_read()
560 p += scnprintf(p, sizeof(buf) + buf - p, in sta_vht_capa_read()
561 "\t\tUNKNOWN-MHZ: 0x%x\n", in sta_vht_capa_read()
562 (vhtc->cap >> 2) & 0x3); in sta_vht_capa_read()
565 PFLAG(SHORT_GI_80, "SHORT-GI-80"); in sta_vht_capa_read()
566 PFLAG(SHORT_GI_160, "SHORT-GI-160"); in sta_vht_capa_read()
568 p += scnprintf(p, sizeof(buf) + buf - p, in sta_vht_capa_read()
569 "\t\tRXSTBC_%d\n", (vhtc->cap >> 8) & 0x7); in sta_vht_capa_read()
570 PFLAG(SU_BEAMFORMER_CAPABLE, "SU-BEAMFORMER-CAPABLE"); in sta_vht_capa_read()
571 PFLAG(SU_BEAMFORMEE_CAPABLE, "SU-BEAMFORMEE-CAPABLE"); in sta_vht_capa_read()
572 p += scnprintf(p, sizeof(buf) + buf - p, in sta_vht_capa_read()
573 "\t\tBEAMFORMEE-STS: 0x%x\n", in sta_vht_capa_read()
574 (vhtc->cap & IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK) >> in sta_vht_capa_read()
576 p += scnprintf(p, sizeof(buf) + buf - p, in sta_vht_capa_read()
577 "\t\tSOUNDING-DIMENSIONS: 0x%x\n", in sta_vht_capa_read()
578 (vhtc->cap & IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK) in sta_vht_capa_read()
580 PFLAG(MU_BEAMFORMER_CAPABLE, "MU-BEAMFORMER-CAPABLE"); in sta_vht_capa_read()
581 PFLAG(MU_BEAMFORMEE_CAPABLE, "MU-BEAMFORMEE-CAPABLE"); in sta_vht_capa_read()
582 PFLAG(VHT_TXOP_PS, "TXOP-PS"); in sta_vht_capa_read()
583 PFLAG(HTC_VHT, "HTC-VHT"); in sta_vht_capa_read()
584 p += scnprintf(p, sizeof(buf) + buf - p, in sta_vht_capa_read()
585 "\t\tMPDU-LENGTH-EXPONENT: 0x%x\n", in sta_vht_capa_read()
586 (vhtc->cap & IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK) >> in sta_vht_capa_read()
589 "LINK-ADAPTATION-VHT-UNSOL-MFB"); in sta_vht_capa_read()
590 p += scnprintf(p, sizeof(buf) + buf - p, in sta_vht_capa_read()
591 "\t\tLINK-ADAPTATION-VHT-MRQ-MFB: 0x%x\n", in sta_vht_capa_read()
592 (vhtc->cap & IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB) >> 26); in sta_vht_capa_read()
593 PFLAG(RX_ANTENNA_PATTERN, "RX-ANTENNA-PATTERN"); in sta_vht_capa_read()
594 PFLAG(TX_ANTENNA_PATTERN, "TX-ANTENNA-PATTERN"); in sta_vht_capa_read()
596 p += scnprintf(p, sizeof(buf)+buf-p, "RX MCS: %.4x\n", in sta_vht_capa_read()
597 le16_to_cpu(vhtc->vht_mcs.rx_mcs_map)); in sta_vht_capa_read()
598 if (vhtc->vht_mcs.rx_highest) in sta_vht_capa_read()
599 p += scnprintf(p, sizeof(buf)+buf-p, in sta_vht_capa_read()
601 le16_to_cpu(vhtc->vht_mcs.rx_highest)); in sta_vht_capa_read()
602 p += scnprintf(p, sizeof(buf)+buf-p, "TX MCS: %.4x\n", in sta_vht_capa_read()
603 le16_to_cpu(vhtc->vht_mcs.tx_mcs_map)); in sta_vht_capa_read()
604 if (vhtc->vht_mcs.tx_highest) in sta_vht_capa_read()
605 p += scnprintf(p, sizeof(buf)+buf-p, in sta_vht_capa_read()
607 le16_to_cpu(vhtc->vht_mcs.tx_highest)); in sta_vht_capa_read()
611 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_vht_capa_read()
620 struct sta_info *sta = file->private_data; in sta_he_capa_read()
621 struct ieee80211_sta_he_cap *hec = &sta->sta.he_cap; in sta_he_capa_read()
622 struct ieee80211_he_mcs_nss_supp *nss = &hec->he_mcs_nss_supp; in sta_he_capa_read()
624 u8 *cap; in sta_he_capa_read() local
630 return -ENOMEM; in sta_he_capa_read()
633 p += scnprintf(p, buf_sz + buf - p, "HE %ssupported\n", in sta_he_capa_read()
634 hec->has_he ? "" : "not "); in sta_he_capa_read()
635 if (!hec->has_he) in sta_he_capa_read()
638 cap = hec->he_cap_elem.mac_cap_info; in sta_he_capa_read()
639 p += scnprintf(p, buf_sz + buf - p, in sta_he_capa_read()
640 "MAC-CAP: %#.2x %#.2x %#.2x %#.2x %#.2x %#.2x\n", in sta_he_capa_read()
641 cap[0], cap[1], cap[2], cap[3], cap[4], cap[5]); in sta_he_capa_read()
644 p += scnprintf(p, buf_sz + buf - p, "\t\t" fmt "\n", \ in sta_he_capa_read()
649 if (cap[n] & IEEE80211_HE_##t##_CAP##n##_##a) \ in sta_he_capa_read()
656 u8 idx = ((cap[i] & msk) >> (ffs(msk) - 1)) + off; \ in sta_he_capa_read()
662 if (cap[i] == IEEE80211_HE_##t ##_CAP##i##_##n##_##a) { \ in sta_he_capa_read()
669 PFLAG(MAC, 0, HTC_HE, "HTC-HE"); in sta_he_capa_read()
670 PFLAG(MAC, 0, TWT_REQ, "TWT-REQ"); in sta_he_capa_read()
671 PFLAG(MAC, 0, TWT_RES, "TWT-RES"); in sta_he_capa_read()
673 "DYNAMIC-FRAG-LEVEL-%d", NOT_SUPP, "NOT-SUPP"); in sta_he_capa_read()
675 "MAX-NUM-FRAG-MSDU-%d", UNLIMITED, "UNLIMITED"); in sta_he_capa_read()
677 PFLAG_RANGE_DEFAULT(MAC, 1, MIN_FRAG_SIZE, 128, 0, -1, in sta_he_capa_read()
678 "MIN-FRAG-SIZE-%d", UNLIMITED, "UNLIMITED"); in sta_he_capa_read()
680 "TF-MAC-PAD-DUR-%dUS", MASK, "UNKNOWN"); in sta_he_capa_read()
682 "MULTI-TID-AGG-RX-QOS-%d"); in sta_he_capa_read()
684 if (cap[0] & IEEE80211_HE_MAC_CAP0_HTC_HE) { in sta_he_capa_read()
685 switch (((cap[2] << 1) | (cap[1] >> 7)) & 0x3) { in sta_he_capa_read()
687 PRINT("LINK-ADAPTATION-NO-FEEDBACK"); in sta_he_capa_read()
690 PRINT("LINK-ADAPTATION-RESERVED"); in sta_he_capa_read()
693 PRINT("LINK-ADAPTATION-UNSOLICITED-FEEDBACK"); in sta_he_capa_read()
696 PRINT("LINK-ADAPTATION-BOTH"); in sta_he_capa_read()
701 PFLAG(MAC, 2, ALL_ACK, "ALL-ACK"); in sta_he_capa_read()
704 PFLAG(MAC, 2, BCAST_TWT, "BCAST-TWT"); in sta_he_capa_read()
705 PFLAG(MAC, 2, 32BIT_BA_BITMAP, "32BIT-BA-BITMAP"); in sta_he_capa_read()
706 PFLAG(MAC, 2, MU_CASCADING, "MU-CASCADING"); in sta_he_capa_read()
707 PFLAG(MAC, 2, ACK_EN, "ACK-EN"); in sta_he_capa_read()
709 PFLAG(MAC, 3, OMI_CONTROL, "OMI-CONTROL"); in sta_he_capa_read()
710 PFLAG(MAC, 3, OFDMA_RA, "OFDMA-RA"); in sta_he_capa_read()
712 switch (cap[3] & IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK) { in sta_he_capa_read()
714 PRINT("MAX-AMPDU-LEN-EXP-USE-VHT"); in sta_he_capa_read()
717 PRINT("MAX-AMPDU-LEN-EXP-VHT-1"); in sta_he_capa_read()
720 PRINT("MAX-AMPDU-LEN-EXP-VHT-2"); in sta_he_capa_read()
723 PRINT("MAX-AMPDU-LEN-EXP-RESERVED"); in sta_he_capa_read()
727 PFLAG(MAC, 3, AMSDU_FRAG, "AMSDU-FRAG"); in sta_he_capa_read()
728 PFLAG(MAC, 3, FLEX_TWT_SCHED, "FLEX-TWT-SCHED"); in sta_he_capa_read()
729 PFLAG(MAC, 3, RX_CTRL_FRAME_TO_MULTIBSS, "RX-CTRL-FRAME-TO-MULTIBSS"); in sta_he_capa_read()
731 PFLAG(MAC, 4, BSRP_BQRP_A_MPDU_AGG, "BSRP-BQRP-A-MPDU-AGG"); in sta_he_capa_read()
734 PFLAG(MAC, 4, SRP_RESP, "SRP-RESP"); in sta_he_capa_read()
735 PFLAG(MAC, 4, NDP_FB_REP, "NDP-FB-REP"); in sta_he_capa_read()
737 PFLAG(MAC, 4, AMDSU_IN_AMPDU, "AMSDU-IN-AMPDU"); in sta_he_capa_read()
739 PRINT("MULTI-TID-AGG-TX-QOS-%d", ((cap[5] << 1) | (cap[4] >> 7)) & 0x7); in sta_he_capa_read()
742 "SUBCHAN-SELECVITE-TRANSMISSION"); in sta_he_capa_read()
743 PFLAG(MAC, 5, UL_2x996_TONE_RU, "UL-2x996-TONE-RU"); in sta_he_capa_read()
744 PFLAG(MAC, 5, OM_CTRL_UL_MU_DATA_DIS_RX, "OM-CTRL-UL-MU-DATA-DIS-RX"); in sta_he_capa_read()
745 PFLAG(MAC, 5, HE_DYNAMIC_SM_PS, "HE-DYNAMIC-SM-PS"); in sta_he_capa_read()
746 PFLAG(MAC, 5, PUNCTURED_SOUNDING, "PUNCTURED-SOUNDING"); in sta_he_capa_read()
747 PFLAG(MAC, 5, HT_VHT_TRIG_FRAME_RX, "HT-VHT-TRIG-FRAME-RX"); in sta_he_capa_read()
749 cap = hec->he_cap_elem.phy_cap_info; in sta_he_capa_read()
750 p += scnprintf(p, buf_sz + buf - p, in sta_he_capa_read()
751 "PHY CAP: %#.2x %#.2x %#.2x %#.2x %#.2x %#.2x %#.2x %#.2x %#.2x %#.2x %#.2x\n", in sta_he_capa_read()
752 cap[0], cap[1], cap[2], cap[3], cap[4], cap[5], cap[6], in sta_he_capa_read()
753 cap[7], cap[8], cap[9], cap[10]); in sta_he_capa_read()
756 "CHANNEL-WIDTH-SET-40MHZ-IN-2G"); in sta_he_capa_read()
758 "CHANNEL-WIDTH-SET-40MHZ-80MHZ-IN-5G"); in sta_he_capa_read()
760 "CHANNEL-WIDTH-SET-160MHZ-IN-5G"); in sta_he_capa_read()
762 "CHANNEL-WIDTH-SET-80PLUS80-MHZ-IN-5G"); in sta_he_capa_read()
764 "CHANNEL-WIDTH-SET-RU-MAPPING-IN-2G"); in sta_he_capa_read()
766 "CHANNEL-WIDTH-SET-RU-MAPPING-IN-5G"); in sta_he_capa_read()
768 switch (cap[1] & IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK) { in sta_he_capa_read()
770 PRINT("PREAMBLE-PUNC-RX-80MHZ-ONLY-SECOND-20MHZ"); in sta_he_capa_read()
773 PRINT("PREAMBLE-PUNC-RX-80MHZ-ONLY-SECOND-40MHZ"); in sta_he_capa_read()
776 PRINT("PREAMBLE-PUNC-RX-160MHZ-ONLY-SECOND-20MHZ"); in sta_he_capa_read()
779 PRINT("PREAMBLE-PUNC-RX-160MHZ-ONLY-SECOND-40MHZ"); in sta_he_capa_read()
784 "IEEE80211-HE-PHY-CAP1-DEVICE-CLASS-A"); in sta_he_capa_read()
786 "LDPC-CODING-IN-PAYLOAD"); in sta_he_capa_read()
788 "HY-CAP1-HE-LTF-AND-GI-FOR-HE-PPDUS-0-8US"); in sta_he_capa_read()
789 PRINT("MIDAMBLE-RX-MAX-NSTS-%d", ((cap[2] << 1) | (cap[1] >> 7)) & 0x3); in sta_he_capa_read()
791 PFLAG(PHY, 2, NDP_4x_LTF_AND_3_2US, "NDP-4X-LTF-AND-3-2US"); in sta_he_capa_read()
792 PFLAG(PHY, 2, STBC_TX_UNDER_80MHZ, "STBC-TX-UNDER-80MHZ"); in sta_he_capa_read()
793 PFLAG(PHY, 2, STBC_RX_UNDER_80MHZ, "STBC-RX-UNDER-80MHZ"); in sta_he_capa_read()
794 PFLAG(PHY, 2, DOPPLER_TX, "DOPPLER-TX"); in sta_he_capa_read()
795 PFLAG(PHY, 2, DOPPLER_RX, "DOPPLER-RX"); in sta_he_capa_read()
796 PFLAG(PHY, 2, UL_MU_FULL_MU_MIMO, "UL-MU-FULL-MU-MIMO"); in sta_he_capa_read()
797 PFLAG(PHY, 2, UL_MU_PARTIAL_MU_MIMO, "UL-MU-PARTIAL-MU-MIMO"); in sta_he_capa_read()
799 switch (cap[3] & IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_MASK) { in sta_he_capa_read()
801 PRINT("DCM-MAX-CONST-TX-NO-DCM"); in sta_he_capa_read()
804 PRINT("DCM-MAX-CONST-TX-BPSK"); in sta_he_capa_read()
807 PRINT("DCM-MAX-CONST-TX-QPSK"); in sta_he_capa_read()
810 PRINT("DCM-MAX-CONST-TX-16-QAM"); in sta_he_capa_read()
814 PFLAG(PHY, 3, DCM_MAX_TX_NSS_1, "DCM-MAX-TX-NSS-1"); in sta_he_capa_read()
815 PFLAG(PHY, 3, DCM_MAX_TX_NSS_2, "DCM-MAX-TX-NSS-2"); in sta_he_capa_read()
817 switch (cap[3] & IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK) { in sta_he_capa_read()
819 PRINT("DCM-MAX-CONST-RX-NO-DCM"); in sta_he_capa_read()
822 PRINT("DCM-MAX-CONST-RX-BPSK"); in sta_he_capa_read()
825 PRINT("DCM-MAX-CONST-RX-QPSK"); in sta_he_capa_read()
828 PRINT("DCM-MAX-CONST-RX-16-QAM"); in sta_he_capa_read()
832 PFLAG(PHY, 3, DCM_MAX_RX_NSS_1, "DCM-MAX-RX-NSS-1"); in sta_he_capa_read()
833 PFLAG(PHY, 3, DCM_MAX_RX_NSS_2, "DCM-MAX-RX-NSS-2"); in sta_he_capa_read()
835 "RX-HE-MU-PPDU-FROM-NON-AP-STA"); in sta_he_capa_read()
836 PFLAG(PHY, 3, SU_BEAMFORMER, "SU-BEAMFORMER"); in sta_he_capa_read()
838 PFLAG(PHY, 4, SU_BEAMFORMEE, "SU-BEAMFORMEE"); in sta_he_capa_read()
839 PFLAG(PHY, 4, MU_BEAMFORMER, "MU-BEAMFORMER"); in sta_he_capa_read()
842 "BEAMFORMEE-MAX-STS-UNDER-%d"); in sta_he_capa_read()
844 "BEAMFORMEE-MAX-STS-ABOVE-%d"); in sta_he_capa_read()
847 "NUM-SND-DIM-UNDER-80MHZ-%d"); in sta_he_capa_read()
849 "NUM-SND-DIM-ABOVE-80MHZ-%d"); in sta_he_capa_read()
850 PFLAG(PHY, 5, NG16_SU_FEEDBACK, "NG16-SU-FEEDBACK"); in sta_he_capa_read()
851 PFLAG(PHY, 5, NG16_MU_FEEDBACK, "NG16-MU-FEEDBACK"); in sta_he_capa_read()
853 PFLAG(PHY, 6, CODEBOOK_SIZE_42_SU, "CODEBOOK-SIZE-42-SU"); in sta_he_capa_read()
854 PFLAG(PHY, 6, CODEBOOK_SIZE_75_MU, "CODEBOOK-SIZE-75-MU"); in sta_he_capa_read()
855 PFLAG(PHY, 6, TRIG_SU_BEAMFORMER_FB, "TRIG-SU-BEAMFORMER-FB"); in sta_he_capa_read()
856 PFLAG(PHY, 6, TRIG_MU_BEAMFORMER_FB, "TRIG-MU-BEAMFORMER-FB"); in sta_he_capa_read()
857 PFLAG(PHY, 6, TRIG_CQI_FB, "TRIG-CQI-FB"); in sta_he_capa_read()
858 PFLAG(PHY, 6, PARTIAL_BW_EXT_RANGE, "PARTIAL-BW-EXT-RANGE"); in sta_he_capa_read()
860 "PARTIAL-BANDWIDTH-DL-MUMIMO"); in sta_he_capa_read()
861 PFLAG(PHY, 6, PPE_THRESHOLD_PRESENT, "PPE-THRESHOLD-PRESENT"); in sta_he_capa_read()
863 PFLAG(PHY, 7, SRP_BASED_SR, "SRP-BASED-SR"); in sta_he_capa_read()
864 PFLAG(PHY, 7, POWER_BOOST_FACTOR_AR, "POWER-BOOST-FACTOR-AR"); in sta_he_capa_read()
866 "HE-SU-MU-PPDU-4XLTF-AND-08-US-GI"); in sta_he_capa_read()
867 PFLAG_RANGE(PHY, 7, MAX_NC, 0, 1, 1, "MAX-NC-%d"); in sta_he_capa_read()
868 PFLAG(PHY, 7, STBC_TX_ABOVE_80MHZ, "STBC-TX-ABOVE-80MHZ"); in sta_he_capa_read()
869 PFLAG(PHY, 7, STBC_RX_ABOVE_80MHZ, "STBC-RX-ABOVE-80MHZ"); in sta_he_capa_read()
872 "HE-ER-SU-PPDU-4XLTF-AND-08-US-GI"); in sta_he_capa_read()
874 "20MHZ-IN-40MHZ-HE-PPDU-IN-2G"); in sta_he_capa_read()
875 PFLAG(PHY, 8, 20MHZ_IN_160MHZ_HE_PPDU, "20MHZ-IN-160MHZ-HE-PPDU"); in sta_he_capa_read()
876 PFLAG(PHY, 8, 80MHZ_IN_160MHZ_HE_PPDU, "80MHZ-IN-160MHZ-HE-PPDU"); in sta_he_capa_read()
878 "HE-ER-SU-1XLTF-AND-08-US-GI"); in sta_he_capa_read()
880 "MIDAMBLE-RX-TX-2X-AND-1XLTF"); in sta_he_capa_read()
882 switch (cap[8] & IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_MASK) { in sta_he_capa_read()
884 PRINT("DCM-MAX-RU-242"); in sta_he_capa_read()
887 PRINT("DCM-MAX-RU-484"); in sta_he_capa_read()
890 PRINT("DCM-MAX-RU-996"); in sta_he_capa_read()
893 PRINT("DCM-MAX-RU-2x996"); in sta_he_capa_read()
898 "LONGER-THAN-16-SIGB-OFDM-SYM"); in sta_he_capa_read()
900 "NON-TRIGGERED-CQI-FEEDBACK"); in sta_he_capa_read()
902 "TX-1024-QAM-LESS-THAN-242-TONE-RU"); in sta_he_capa_read()
904 "RX-1024-QAM-LESS-THAN-242-TONE-RU"); in sta_he_capa_read()
906 "RX-FULL-BW-SU-USING-MU-WITH-COMP-SIGB"); in sta_he_capa_read()
908 "RX-FULL-BW-SU-USING-MU-WITH-NON-COMP-SIGB"); in sta_he_capa_read()
910 switch (cap[9] & IEEE80211_HE_PHY_CAP9_NOMIMAL_PKT_PADDING_MASK) { in sta_he_capa_read()
912 PRINT("NOMINAL-PACKET-PADDING-0US"); in sta_he_capa_read()
915 PRINT("NOMINAL-PACKET-PADDING-8US"); in sta_he_capa_read()
918 PRINT("NOMINAL-PACKET-PADDING-16US"); in sta_he_capa_read()
929 u16 v = le16_to_cpu(nss->f); \ in sta_he_capa_read()
930 p += scnprintf(p, buf_sz + buf - p, n ": %#.4x\n", v); \ in sta_he_capa_read()
934 PRINT(n "-%d-SUPPORT-0-7", _i / 2); \ in sta_he_capa_read()
937 PRINT(n "-%d-SUPPORT-0-9", _i / 2); \ in sta_he_capa_read()
940 PRINT(n "-%d-SUPPORT-0-11", _i / 2); \ in sta_he_capa_read()
943 PRINT(n "-%d-NOT-SUPPORTED", _i / 2); \ in sta_he_capa_read()
949 PRINT_NSS_SUPP(rx_mcs_80, "RX-MCS-80"); in sta_he_capa_read()
950 PRINT_NSS_SUPP(tx_mcs_80, "TX-MCS-80"); in sta_he_capa_read()
952 if (cap[0] & IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G) { in sta_he_capa_read()
953 PRINT_NSS_SUPP(rx_mcs_160, "RX-MCS-160"); in sta_he_capa_read()
954 PRINT_NSS_SUPP(tx_mcs_160, "TX-MCS-160"); in sta_he_capa_read()
957 if (cap[0] & in sta_he_capa_read()
959 PRINT_NSS_SUPP(rx_mcs_80p80, "RX-MCS-80P80"); in sta_he_capa_read()
960 PRINT_NSS_SUPP(tx_mcs_80p80, "TX-MCS-80P80"); in sta_he_capa_read()
966 if (!(cap[6] & IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT)) in sta_he_capa_read()
969 p += scnprintf(p, buf_sz + buf - p, "PPE-THRESHOLDS: %#.2x", in sta_he_capa_read()
970 hec->ppe_thres[0]); in sta_he_capa_read()
972 ppe_size = ieee80211_he_ppe_size(hec->ppe_thres[0], cap); in sta_he_capa_read()
974 p += scnprintf(p, buf_sz + buf - p, " %#.2x", in sta_he_capa_read()
975 hec->ppe_thres[i]); in sta_he_capa_read()
977 p += scnprintf(p, buf_sz + buf - p, "\n"); in sta_he_capa_read()
980 ret = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_he_capa_read()
988 sta->debugfs_dir, sta, &sta_ ##name## _ops);
991 debugfs_create_ulong(#name, 0400, sta->debugfs_dir, &sta->field);
995 struct ieee80211_local *local = sta->local; in ieee80211_sta_debugfs_add() local
996 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_sta_debugfs_add()
997 struct dentry *stations_dir = sta->sdata->debugfs.subdir_stations; in ieee80211_sta_debugfs_add()
1003 snprintf(mac, sizeof(mac), "%pM", sta->sta.addr); in ieee80211_sta_debugfs_add()
1014 sta->debugfs_dir = debugfs_create_dir(mac, stations_dir); in ieee80211_sta_debugfs_add()
1029 if (local->ops->wake_tx_queue) { in ieee80211_sta_debugfs_add()
1034 if (wiphy_ext_feature_isset(local->hw.wiphy, in ieee80211_sta_debugfs_add()
1038 debugfs_create_xul("driver_buffered_tids", 0400, sta->debugfs_dir, in ieee80211_sta_debugfs_add()
1039 &sta->driver_buffered_tids); in ieee80211_sta_debugfs_add()
1041 drv_sta_add_debugfs(local, sdata, &sta->sta, sta->debugfs_dir); in ieee80211_sta_debugfs_add()
1046 debugfs_remove_recursive(sta->debugfs_dir); in ieee80211_sta_debugfs_remove()
1047 sta->debugfs_dir = NULL; in ieee80211_sta_debugfs_remove()