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 - 2021 Intel Corporation
17 #include "driver-ops.h"
26 struct sta_info *sta = file->private_data; \
28 format_string, sta->field); \
90 char *end = buf + sizeof(buf) - 1; in sta_flags_read()
91 struct sta_info *sta = file->private_data; in sta_flags_read()
98 pos += scnprintf(pos, end - pos, "%s\n", in sta_flags_read()
110 struct sta_info *sta = file->private_data; in sta_num_ps_buf_frames_read()
115 p += scnprintf(p, sizeof(buf)+buf-p, "AC%d: %d\n", ac, in sta_num_ps_buf_frames_read()
116 skb_queue_len(&sta->ps_tx_buf[ac]) + in sta_num_ps_buf_frames_read()
117 skb_queue_len(&sta->tx_filtered[ac])); in sta_num_ps_buf_frames_read()
118 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_num_ps_buf_frames_read()
127 struct sta_info *sta = file->private_data; in sta_last_seq_ctrl_read()
129 p += scnprintf(p, sizeof(buf)+buf-p, "%x ", in sta_last_seq_ctrl_read()
130 le16_to_cpu(sta->last_seq_ctrl[i])); in sta_last_seq_ctrl_read()
131 p += scnprintf(p, sizeof(buf)+buf-p, "\n"); in sta_last_seq_ctrl_read()
132 return simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_last_seq_ctrl_read()
141 struct sta_info *sta = file->private_data; in sta_aqm_read()
142 struct ieee80211_local *local = sta->local; in sta_aqm_read() local
150 return -ENOMEM; in sta_aqm_read()
152 spin_lock_bh(&local->fq.lock); in sta_aqm_read()
156 bufsz + buf - p, in sta_aqm_read()
158 codel_time_to_us(sta->cparams.target), in sta_aqm_read()
159 codel_time_to_us(sta->cparams.interval), in sta_aqm_read()
160 sta->cparams.ecn ? "yes" : "no"); in sta_aqm_read()
162 bufsz + buf - p, in sta_aqm_read()
163 …"tid ac backlog-bytes backlog-packets new-flows drops marks overlimit collisions tx-bytes tx-packe… in sta_aqm_read()
165 for (i = 0; i < ARRAY_SIZE(sta->sta.txq); i++) { in sta_aqm_read()
166 if (!sta->sta.txq[i]) in sta_aqm_read()
168 txqi = to_txq_info(sta->sta.txq[i]); in sta_aqm_read()
169 p += scnprintf(p, bufsz + buf - p, in sta_aqm_read()
171 txqi->txq.tid, in sta_aqm_read()
172 txqi->txq.ac, in sta_aqm_read()
173 txqi->tin.backlog_bytes, in sta_aqm_read()
174 txqi->tin.backlog_packets, in sta_aqm_read()
175 txqi->tin.flows, in sta_aqm_read()
176 txqi->cstats.drop_count, in sta_aqm_read()
177 txqi->cstats.ecn_mark, in sta_aqm_read()
178 txqi->tin.overlimit, in sta_aqm_read()
179 txqi->tin.collisions, in sta_aqm_read()
180 txqi->tin.tx_bytes, in sta_aqm_read()
181 txqi->tin.tx_packets, in sta_aqm_read()
182 txqi->flags, in sta_aqm_read()
183 test_bit(IEEE80211_TXQ_STOP, &txqi->flags) ? "STOP" : "RUN", in sta_aqm_read()
184 test_bit(IEEE80211_TXQ_AMPDU, &txqi->flags) ? " AMPDU" : "", in sta_aqm_read()
185 test_bit(IEEE80211_TXQ_NO_AMSDU, &txqi->flags) ? " NO-AMSDU" : ""); in sta_aqm_read()
189 spin_unlock_bh(&local->fq.lock); in sta_aqm_read()
191 rv = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_aqm_read()
200 struct sta_info *sta = file->private_data; in sta_airtime_read()
201 struct ieee80211_local *local = sta->sdata->local; in sta_airtime_read() local
210 return -ENOMEM; in sta_airtime_read()
213 spin_lock_bh(&local->active_txq_lock[ac]); in sta_airtime_read()
214 rx_airtime += sta->airtime[ac].rx_airtime; in sta_airtime_read()
215 tx_airtime += sta->airtime[ac].tx_airtime; in sta_airtime_read()
216 deficit[ac] = sta->airtime[ac].deficit; in sta_airtime_read()
217 spin_unlock_bh(&local->active_txq_lock[ac]); in sta_airtime_read()
220 p += scnprintf(p, bufsz + buf - p, in sta_airtime_read()
223 rx_airtime, tx_airtime, sta->airtime_weight, in sta_airtime_read()
226 rv = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_airtime_read()
234 struct sta_info *sta = file->private_data; in sta_airtime_write()
235 struct ieee80211_local *local = sta->sdata->local; in sta_airtime_write() local
239 spin_lock_bh(&local->active_txq_lock[ac]); in sta_airtime_write()
240 sta->airtime[ac].rx_airtime = 0; in sta_airtime_write()
241 sta->airtime[ac].tx_airtime = 0; in sta_airtime_write()
242 sta->airtime[ac].deficit = sta->airtime_weight; in sta_airtime_write()
243 spin_unlock_bh(&local->active_txq_lock[ac]); in sta_airtime_write()
253 struct sta_info *sta = file->private_data; in sta_aql_read()
254 struct ieee80211_local *local = sta->sdata->local; in sta_aql_read() local
263 return -ENOMEM; in sta_aql_read()
266 spin_lock_bh(&local->active_txq_lock[ac]); in sta_aql_read()
267 q_limit_l[ac] = sta->airtime[ac].aql_limit_low; in sta_aql_read()
268 q_limit_h[ac] = sta->airtime[ac].aql_limit_high; in sta_aql_read()
269 spin_unlock_bh(&local->active_txq_lock[ac]); in sta_aql_read()
270 q_depth[ac] = atomic_read(&sta->airtime[ac].aql_tx_pending); in sta_aql_read()
273 p += scnprintf(p, bufsz + buf - p, in sta_aql_read()
280 rv = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_aql_read()
288 struct sta_info *sta = file->private_data; in sta_aql_write()
293 return -EINVAL; in sta_aql_write()
296 return -EFAULT; in sta_aql_write()
298 buf[sizeof(_buf) - 1] = '\0'; in sta_aql_write()
301 return -EINVAL; in sta_aql_write()
304 return -EINVAL; in sta_aql_write()
306 sta->airtime[ac].aql_limit_low = q_limit_l; in sta_aql_write()
307 sta->airtime[ac].aql_limit_high = q_limit_h; in sta_aql_write()
320 struct sta_info *sta = file->private_data; in sta_agg_status_read()
327 return -ENOMEM; in sta_agg_status_read()
332 p += scnprintf(p, bufsz + buf - p, "next dialog_token: %#02x\n", in sta_agg_status_read()
333 sta->ampdu_mlme.dialog_token_allocator + 1); in sta_agg_status_read()
334 p += scnprintf(p, bufsz + buf - p, in sta_agg_status_read()
340 tid_rx = rcu_dereference(sta->ampdu_mlme.tid_rx[i]); in sta_agg_status_read()
341 tid_tx = rcu_dereference(sta->ampdu_mlme.tid_tx[i]); in sta_agg_status_read()
342 tid_rx_valid = test_bit(i, sta->ampdu_mlme.agg_session_valid); in sta_agg_status_read()
344 p += scnprintf(p, bufsz + buf - p, "%02d", i); in sta_agg_status_read()
345 p += scnprintf(p, bufsz + buf - p, "\t\t%x", in sta_agg_status_read()
347 p += scnprintf(p, bufsz + buf - p, "\t%#.2x", in sta_agg_status_read()
349 sta->ampdu_mlme.tid_rx_token[i] : 0); in sta_agg_status_read()
350 p += scnprintf(p, bufsz + buf - p, "\t%#.3x", in sta_agg_status_read()
351 tid_rx ? tid_rx->ssn : 0); in sta_agg_status_read()
353 p += scnprintf(p, bufsz + buf - p, "\t\t%x", !!tid_tx); in sta_agg_status_read()
354 p += scnprintf(p, bufsz + buf - p, "\t%#.2x", in sta_agg_status_read()
355 tid_tx ? tid_tx->dialog_token : 0); in sta_agg_status_read()
356 p += scnprintf(p, bufsz + buf - p, "\t%03d", in sta_agg_status_read()
357 tid_tx ? skb_queue_len(&tid_tx->pending) : 0); in sta_agg_status_read()
358 p += scnprintf(p, bufsz + buf - p, "\n"); in sta_agg_status_read()
362 ret = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_agg_status_read()
371 struct sta_info *sta = file->private_data; in sta_agg_status_write()
378 return -EINVAL; in sta_agg_status_write()
381 return -EFAULT; in sta_agg_status_write()
383 buf[sizeof(_buf) - 1] = '\0'; in sta_agg_status_write()
387 return -EINVAL; in sta_agg_status_write()
394 return -EINVAL; in sta_agg_status_write()
398 return -EINVAL; in sta_agg_status_write()
402 return -EINVAL; in sta_agg_status_write()
406 return -EINVAL; in sta_agg_status_write()
411 return -EINVAL; in sta_agg_status_write()
415 return -EINVAL; in sta_agg_status_write()
420 return -EINVAL; in sta_agg_status_write()
424 ret = ieee80211_start_tx_ba_session(&sta->sta, tid, in sta_agg_status_write()
427 ret = ieee80211_stop_tx_ba_session(&sta->sta, tid); in sta_agg_status_write()
444 p += scnprintf(p, bufsz + buf - p, "\t" _str "\n"); \ in sta_ht_capa_read()
449 struct sta_info *sta = file->private_data; in sta_ht_capa_read()
450 struct ieee80211_sta_ht_cap *htc = &sta->sta.deflink.ht_cap; in sta_ht_capa_read()
455 return -ENOMEM; in sta_ht_capa_read()
458 p += scnprintf(p, bufsz + buf - p, "ht %ssupported\n", in sta_ht_capa_read()
459 htc->ht_supported ? "" : "not "); in sta_ht_capa_read()
460 if (htc->ht_supported) { in sta_ht_capa_read()
461 p += scnprintf(p, bufsz + buf - p, "cap: %#.4x\n", htc->cap); in sta_ht_capa_read()
463 PRINT_HT_CAP((htc->cap & BIT(0)), "RX LDPC"); in sta_ht_capa_read()
464 PRINT_HT_CAP((htc->cap & BIT(1)), "HT20/HT40"); in sta_ht_capa_read()
465 PRINT_HT_CAP(!(htc->cap & BIT(1)), "HT20"); in sta_ht_capa_read()
467 PRINT_HT_CAP(((htc->cap >> 2) & 0x3) == 0, "Static SM Power Save"); in sta_ht_capa_read()
468 PRINT_HT_CAP(((htc->cap >> 2) & 0x3) == 1, "Dynamic SM Power Save"); in sta_ht_capa_read()
469 PRINT_HT_CAP(((htc->cap >> 2) & 0x3) == 3, "SM Power Save disabled"); in sta_ht_capa_read()
471 PRINT_HT_CAP((htc->cap & BIT(4)), "RX Greenfield"); in sta_ht_capa_read()
472 PRINT_HT_CAP((htc->cap & BIT(5)), "RX HT20 SGI"); in sta_ht_capa_read()
473 PRINT_HT_CAP((htc->cap & BIT(6)), "RX HT40 SGI"); in sta_ht_capa_read()
474 PRINT_HT_CAP((htc->cap & BIT(7)), "TX STBC"); in sta_ht_capa_read()
476 PRINT_HT_CAP(((htc->cap >> 8) & 0x3) == 0, "No RX STBC"); in sta_ht_capa_read()
477 PRINT_HT_CAP(((htc->cap >> 8) & 0x3) == 1, "RX STBC 1-stream"); in sta_ht_capa_read()
478 PRINT_HT_CAP(((htc->cap >> 8) & 0x3) == 2, "RX STBC 2-streams"); in sta_ht_capa_read()
479 PRINT_HT_CAP(((htc->cap >> 8) & 0x3) == 3, "RX STBC 3-streams"); in sta_ht_capa_read()
481 PRINT_HT_CAP((htc->cap & BIT(10)), "HT Delayed Block Ack"); in sta_ht_capa_read()
483 PRINT_HT_CAP(!(htc->cap & BIT(11)), "Max AMSDU length: " in sta_ht_capa_read()
485 PRINT_HT_CAP((htc->cap & BIT(11)), "Max AMSDU length: " in sta_ht_capa_read()
494 PRINT_HT_CAP((htc->cap & BIT(12)), "DSSS/CCK HT40"); in sta_ht_capa_read()
495 PRINT_HT_CAP(!(htc->cap & BIT(12)), "No DSSS/CCK HT40"); in sta_ht_capa_read()
499 PRINT_HT_CAP((htc->cap & BIT(14)), "40 MHz Intolerant"); in sta_ht_capa_read()
501 PRINT_HT_CAP((htc->cap & BIT(15)), "L-SIG TXOP protection"); in sta_ht_capa_read()
503 p += scnprintf(p, bufsz + buf - p, "ampdu factor/density: %d/%d\n", in sta_ht_capa_read()
504 htc->ampdu_factor, htc->ampdu_density); in sta_ht_capa_read()
505 p += scnprintf(p, bufsz + buf - p, "MCS mask:"); in sta_ht_capa_read()
508 p += scnprintf(p, bufsz + buf - p, " %.2x", in sta_ht_capa_read()
509 htc->mcs.rx_mask[i]); in sta_ht_capa_read()
510 p += scnprintf(p, bufsz + buf - p, "\n"); in sta_ht_capa_read()
513 if (le16_to_cpu(htc->mcs.rx_highest)) { in sta_ht_capa_read()
514 p += scnprintf(p, bufsz + buf - p, in sta_ht_capa_read()
516 le16_to_cpu(htc->mcs.rx_highest)); in sta_ht_capa_read()
519 p += scnprintf(p, bufsz + buf - p, "MCS tx params: %x\n", in sta_ht_capa_read()
520 htc->mcs.tx_params); in sta_ht_capa_read()
523 ret = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_ht_capa_read()
533 struct sta_info *sta = file->private_data; in sta_vht_capa_read()
534 struct ieee80211_sta_vht_cap *vhtc = &sta->sta.deflink.vht_cap; in sta_vht_capa_read()
540 return -ENOMEM; in sta_vht_capa_read()
543 p += scnprintf(p, bufsz + buf - p, "VHT %ssupported\n", in sta_vht_capa_read()
544 vhtc->vht_supported ? "" : "not "); in sta_vht_capa_read()
545 if (vhtc->vht_supported) { in sta_vht_capa_read()
546 p += scnprintf(p, bufsz + buf - p, "cap: %#.8x\n", in sta_vht_capa_read()
547 vhtc->cap); in sta_vht_capa_read()
550 if (vhtc->cap & IEEE80211_VHT_CAP_ ## a) \ in sta_vht_capa_read()
551 p += scnprintf(p, bufsz + buf - p, \ in sta_vht_capa_read()
555 switch (vhtc->cap & 0x3) { in sta_vht_capa_read()
557 p += scnprintf(p, bufsz + buf - p, in sta_vht_capa_read()
558 "\t\tMAX-MPDU-3895\n"); in sta_vht_capa_read()
561 p += scnprintf(p, bufsz + buf - p, in sta_vht_capa_read()
562 "\t\tMAX-MPDU-7991\n"); in sta_vht_capa_read()
565 p += scnprintf(p, bufsz + buf - p, in sta_vht_capa_read()
566 "\t\tMAX-MPDU-11454\n"); in sta_vht_capa_read()
569 p += scnprintf(p, bufsz + buf - p, in sta_vht_capa_read()
570 "\t\tMAX-MPDU-UNKNOWN\n"); in sta_vht_capa_read()
572 switch (vhtc->cap & IEEE80211_VHT_CAP_SUPP_CHAN_WIDTH_MASK) { in sta_vht_capa_read()
574 p += scnprintf(p, bufsz + buf - p, in sta_vht_capa_read()
578 p += scnprintf(p, bufsz + buf - p, in sta_vht_capa_read()
582 p += scnprintf(p, bufsz + buf - p, in sta_vht_capa_read()
586 p += scnprintf(p, bufsz + buf - p, in sta_vht_capa_read()
587 "\t\tUNKNOWN-MHZ: 0x%x\n", in sta_vht_capa_read()
588 (vhtc->cap >> 2) & 0x3); in sta_vht_capa_read()
591 PFLAG(SHORT_GI_80, "SHORT-GI-80"); in sta_vht_capa_read()
592 PFLAG(SHORT_GI_160, "SHORT-GI-160"); in sta_vht_capa_read()
594 p += scnprintf(p, bufsz + buf - p, in sta_vht_capa_read()
595 "\t\tRXSTBC_%d\n", (vhtc->cap >> 8) & 0x7); in sta_vht_capa_read()
596 PFLAG(SU_BEAMFORMER_CAPABLE, "SU-BEAMFORMER-CAPABLE"); in sta_vht_capa_read()
597 PFLAG(SU_BEAMFORMEE_CAPABLE, "SU-BEAMFORMEE-CAPABLE"); in sta_vht_capa_read()
598 p += scnprintf(p, bufsz + buf - p, in sta_vht_capa_read()
599 "\t\tBEAMFORMEE-STS: 0x%x\n", in sta_vht_capa_read()
600 (vhtc->cap & IEEE80211_VHT_CAP_BEAMFORMEE_STS_MASK) >> in sta_vht_capa_read()
602 p += scnprintf(p, bufsz + buf - p, in sta_vht_capa_read()
603 "\t\tSOUNDING-DIMENSIONS: 0x%x\n", in sta_vht_capa_read()
604 (vhtc->cap & IEEE80211_VHT_CAP_SOUNDING_DIMENSIONS_MASK) in sta_vht_capa_read()
606 PFLAG(MU_BEAMFORMER_CAPABLE, "MU-BEAMFORMER-CAPABLE"); in sta_vht_capa_read()
607 PFLAG(MU_BEAMFORMEE_CAPABLE, "MU-BEAMFORMEE-CAPABLE"); in sta_vht_capa_read()
608 PFLAG(VHT_TXOP_PS, "TXOP-PS"); in sta_vht_capa_read()
609 PFLAG(HTC_VHT, "HTC-VHT"); in sta_vht_capa_read()
610 p += scnprintf(p, bufsz + buf - p, in sta_vht_capa_read()
611 "\t\tMPDU-LENGTH-EXPONENT: 0x%x\n", in sta_vht_capa_read()
612 (vhtc->cap & IEEE80211_VHT_CAP_MAX_A_MPDU_LENGTH_EXPONENT_MASK) >> in sta_vht_capa_read()
615 "LINK-ADAPTATION-VHT-UNSOL-MFB"); in sta_vht_capa_read()
616 p += scnprintf(p, bufsz + buf - p, in sta_vht_capa_read()
617 "\t\tLINK-ADAPTATION-VHT-MRQ-MFB: 0x%x\n", in sta_vht_capa_read()
618 (vhtc->cap & IEEE80211_VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB) >> 26); in sta_vht_capa_read()
619 PFLAG(RX_ANTENNA_PATTERN, "RX-ANTENNA-PATTERN"); in sta_vht_capa_read()
620 PFLAG(TX_ANTENNA_PATTERN, "TX-ANTENNA-PATTERN"); in sta_vht_capa_read()
622 p += scnprintf(p, bufsz + buf - p, "RX MCS: %.4x\n", in sta_vht_capa_read()
623 le16_to_cpu(vhtc->vht_mcs.rx_mcs_map)); in sta_vht_capa_read()
624 if (vhtc->vht_mcs.rx_highest) in sta_vht_capa_read()
625 p += scnprintf(p, bufsz + buf - p, in sta_vht_capa_read()
627 le16_to_cpu(vhtc->vht_mcs.rx_highest)); in sta_vht_capa_read()
628 p += scnprintf(p, bufsz + buf - p, "TX MCS: %.4x\n", in sta_vht_capa_read()
629 le16_to_cpu(vhtc->vht_mcs.tx_mcs_map)); in sta_vht_capa_read()
630 if (vhtc->vht_mcs.tx_highest) in sta_vht_capa_read()
631 p += scnprintf(p, bufsz + buf - p, in sta_vht_capa_read()
633 le16_to_cpu(vhtc->vht_mcs.tx_highest)); in sta_vht_capa_read()
637 ret = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_vht_capa_read()
648 struct sta_info *sta = file->private_data; in sta_he_capa_read()
649 struct ieee80211_sta_he_cap *hec = &sta->sta.deflink.he_cap; in sta_he_capa_read()
650 struct ieee80211_he_mcs_nss_supp *nss = &hec->he_mcs_nss_supp; in sta_he_capa_read()
652 u8 *cap; in sta_he_capa_read() local
658 return -ENOMEM; in sta_he_capa_read()
661 p += scnprintf(p, buf_sz + buf - p, "HE %ssupported\n", in sta_he_capa_read()
662 hec->has_he ? "" : "not "); in sta_he_capa_read()
663 if (!hec->has_he) in sta_he_capa_read()
666 cap = hec->he_cap_elem.mac_cap_info; in sta_he_capa_read()
667 p += scnprintf(p, buf_sz + buf - p, in sta_he_capa_read()
668 "MAC-CAP: %#.2x %#.2x %#.2x %#.2x %#.2x %#.2x\n", in sta_he_capa_read()
669 cap[0], cap[1], cap[2], cap[3], cap[4], cap[5]); in sta_he_capa_read()
672 p += scnprintf(p, buf_sz + buf - p, "\t\t" fmt "\n", \ in sta_he_capa_read()
677 if (cap[n] & IEEE80211_HE_##t##_CAP##n##_##a) \ in sta_he_capa_read()
684 u8 idx = ((cap[i] & msk) >> (ffs(msk) - 1)) + off; \ in sta_he_capa_read()
690 if (cap[i] == IEEE80211_HE_##t ##_CAP##i##_##n##_##a) { \ in sta_he_capa_read()
697 PFLAG(MAC, 0, HTC_HE, "HTC-HE"); in sta_he_capa_read()
698 PFLAG(MAC, 0, TWT_REQ, "TWT-REQ"); in sta_he_capa_read()
699 PFLAG(MAC, 0, TWT_RES, "TWT-RES"); in sta_he_capa_read()
701 "DYNAMIC-FRAG-LEVEL-%d", NOT_SUPP, "NOT-SUPP"); in sta_he_capa_read()
703 "MAX-NUM-FRAG-MSDU-%d", UNLIMITED, "UNLIMITED"); in sta_he_capa_read()
705 PFLAG_RANGE_DEFAULT(MAC, 1, MIN_FRAG_SIZE, 128, 0, -1, in sta_he_capa_read()
706 "MIN-FRAG-SIZE-%d", UNLIMITED, "UNLIMITED"); in sta_he_capa_read()
708 "TF-MAC-PAD-DUR-%dUS", MASK, "UNKNOWN"); in sta_he_capa_read()
710 "MULTI-TID-AGG-RX-QOS-%d"); in sta_he_capa_read()
712 if (cap[0] & IEEE80211_HE_MAC_CAP0_HTC_HE) { in sta_he_capa_read()
713 switch (((cap[2] << 1) | (cap[1] >> 7)) & 0x3) { in sta_he_capa_read()
715 PRINT("LINK-ADAPTATION-NO-FEEDBACK"); in sta_he_capa_read()
718 PRINT("LINK-ADAPTATION-RESERVED"); in sta_he_capa_read()
721 PRINT("LINK-ADAPTATION-UNSOLICITED-FEEDBACK"); in sta_he_capa_read()
724 PRINT("LINK-ADAPTATION-BOTH"); in sta_he_capa_read()
729 PFLAG(MAC, 2, ALL_ACK, "ALL-ACK"); in sta_he_capa_read()
732 PFLAG(MAC, 2, BCAST_TWT, "BCAST-TWT"); in sta_he_capa_read()
733 PFLAG(MAC, 2, 32BIT_BA_BITMAP, "32BIT-BA-BITMAP"); in sta_he_capa_read()
734 PFLAG(MAC, 2, MU_CASCADING, "MU-CASCADING"); in sta_he_capa_read()
735 PFLAG(MAC, 2, ACK_EN, "ACK-EN"); in sta_he_capa_read()
737 PFLAG(MAC, 3, OMI_CONTROL, "OMI-CONTROL"); in sta_he_capa_read()
738 PFLAG(MAC, 3, OFDMA_RA, "OFDMA-RA"); in sta_he_capa_read()
740 switch (cap[3] & IEEE80211_HE_MAC_CAP3_MAX_AMPDU_LEN_EXP_MASK) { in sta_he_capa_read()
742 PRINT("MAX-AMPDU-LEN-EXP-USE-EXT-0"); in sta_he_capa_read()
745 PRINT("MAX-AMPDU-LEN-EXP-VHT-EXT-1"); in sta_he_capa_read()
748 PRINT("MAX-AMPDU-LEN-EXP-VHT-EXT-2"); in sta_he_capa_read()
751 PRINT("MAX-AMPDU-LEN-EXP-VHT-EXT-3"); in sta_he_capa_read()
755 PFLAG(MAC, 3, AMSDU_FRAG, "AMSDU-FRAG"); in sta_he_capa_read()
756 PFLAG(MAC, 3, FLEX_TWT_SCHED, "FLEX-TWT-SCHED"); in sta_he_capa_read()
757 PFLAG(MAC, 3, RX_CTRL_FRAME_TO_MULTIBSS, "RX-CTRL-FRAME-TO-MULTIBSS"); in sta_he_capa_read()
759 PFLAG(MAC, 4, BSRP_BQRP_A_MPDU_AGG, "BSRP-BQRP-A-MPDU-AGG"); in sta_he_capa_read()
762 PFLAG(MAC, 4, PSR_RESP, "PSR-RESP"); in sta_he_capa_read()
763 PFLAG(MAC, 4, NDP_FB_REP, "NDP-FB-REP"); in sta_he_capa_read()
765 PFLAG(MAC, 4, AMSDU_IN_AMPDU, "AMSDU-IN-AMPDU"); in sta_he_capa_read()
767 PRINT("MULTI-TID-AGG-TX-QOS-%d", ((cap[5] << 1) | (cap[4] >> 7)) & 0x7); in sta_he_capa_read()
770 "SUBCHAN-SELECTIVE-TRANSMISSION"); in sta_he_capa_read()
771 PFLAG(MAC, 5, UL_2x996_TONE_RU, "UL-2x996-TONE-RU"); in sta_he_capa_read()
772 PFLAG(MAC, 5, OM_CTRL_UL_MU_DATA_DIS_RX, "OM-CTRL-UL-MU-DATA-DIS-RX"); in sta_he_capa_read()
773 PFLAG(MAC, 5, HE_DYNAMIC_SM_PS, "HE-DYNAMIC-SM-PS"); in sta_he_capa_read()
774 PFLAG(MAC, 5, PUNCTURED_SOUNDING, "PUNCTURED-SOUNDING"); in sta_he_capa_read()
775 PFLAG(MAC, 5, HT_VHT_TRIG_FRAME_RX, "HT-VHT-TRIG-FRAME-RX"); in sta_he_capa_read()
777 cap = hec->he_cap_elem.phy_cap_info; in sta_he_capa_read()
778 p += scnprintf(p, buf_sz + buf - p, in sta_he_capa_read()
779 "PHY CAP: %#.2x %#.2x %#.2x %#.2x %#.2x %#.2x %#.2x %#.2x %#.2x %#.2x %#.2x\n", in sta_he_capa_read()
780 cap[0], cap[1], cap[2], cap[3], cap[4], cap[5], cap[6], in sta_he_capa_read()
781 cap[7], cap[8], cap[9], cap[10]); in sta_he_capa_read()
784 "CHANNEL-WIDTH-SET-40MHZ-IN-2G"); in sta_he_capa_read()
786 "CHANNEL-WIDTH-SET-40MHZ-80MHZ-IN-5G"); in sta_he_capa_read()
788 "CHANNEL-WIDTH-SET-160MHZ-IN-5G"); in sta_he_capa_read()
790 "CHANNEL-WIDTH-SET-80PLUS80-MHZ-IN-5G"); in sta_he_capa_read()
792 "CHANNEL-WIDTH-SET-RU-MAPPING-IN-2G"); in sta_he_capa_read()
794 "CHANNEL-WIDTH-SET-RU-MAPPING-IN-5G"); in sta_he_capa_read()
796 switch (cap[1] & IEEE80211_HE_PHY_CAP1_PREAMBLE_PUNC_RX_MASK) { in sta_he_capa_read()
798 PRINT("PREAMBLE-PUNC-RX-80MHZ-ONLY-SECOND-20MHZ"); in sta_he_capa_read()
801 PRINT("PREAMBLE-PUNC-RX-80MHZ-ONLY-SECOND-40MHZ"); in sta_he_capa_read()
804 PRINT("PREAMBLE-PUNC-RX-160MHZ-ONLY-SECOND-20MHZ"); in sta_he_capa_read()
807 PRINT("PREAMBLE-PUNC-RX-160MHZ-ONLY-SECOND-40MHZ"); in sta_he_capa_read()
812 "IEEE80211-HE-PHY-CAP1-DEVICE-CLASS-A"); in sta_he_capa_read()
814 "LDPC-CODING-IN-PAYLOAD"); in sta_he_capa_read()
816 "HY-CAP1-HE-LTF-AND-GI-FOR-HE-PPDUS-0-8US"); in sta_he_capa_read()
817 PRINT("MIDAMBLE-RX-MAX-NSTS-%d", ((cap[2] << 1) | (cap[1] >> 7)) & 0x3); in sta_he_capa_read()
819 PFLAG(PHY, 2, NDP_4x_LTF_AND_3_2US, "NDP-4X-LTF-AND-3-2US"); in sta_he_capa_read()
820 PFLAG(PHY, 2, STBC_TX_UNDER_80MHZ, "STBC-TX-UNDER-80MHZ"); in sta_he_capa_read()
821 PFLAG(PHY, 2, STBC_RX_UNDER_80MHZ, "STBC-RX-UNDER-80MHZ"); in sta_he_capa_read()
822 PFLAG(PHY, 2, DOPPLER_TX, "DOPPLER-TX"); in sta_he_capa_read()
823 PFLAG(PHY, 2, DOPPLER_RX, "DOPPLER-RX"); in sta_he_capa_read()
824 PFLAG(PHY, 2, UL_MU_FULL_MU_MIMO, "UL-MU-FULL-MU-MIMO"); in sta_he_capa_read()
825 PFLAG(PHY, 2, UL_MU_PARTIAL_MU_MIMO, "UL-MU-PARTIAL-MU-MIMO"); in sta_he_capa_read()
827 switch (cap[3] & IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_TX_MASK) { in sta_he_capa_read()
829 PRINT("DCM-MAX-CONST-TX-NO-DCM"); in sta_he_capa_read()
832 PRINT("DCM-MAX-CONST-TX-BPSK"); in sta_he_capa_read()
835 PRINT("DCM-MAX-CONST-TX-QPSK"); in sta_he_capa_read()
838 PRINT("DCM-MAX-CONST-TX-16-QAM"); in sta_he_capa_read()
842 PFLAG(PHY, 3, DCM_MAX_TX_NSS_1, "DCM-MAX-TX-NSS-1"); in sta_he_capa_read()
843 PFLAG(PHY, 3, DCM_MAX_TX_NSS_2, "DCM-MAX-TX-NSS-2"); in sta_he_capa_read()
845 switch (cap[3] & IEEE80211_HE_PHY_CAP3_DCM_MAX_CONST_RX_MASK) { in sta_he_capa_read()
847 PRINT("DCM-MAX-CONST-RX-NO-DCM"); in sta_he_capa_read()
850 PRINT("DCM-MAX-CONST-RX-BPSK"); in sta_he_capa_read()
853 PRINT("DCM-MAX-CONST-RX-QPSK"); in sta_he_capa_read()
856 PRINT("DCM-MAX-CONST-RX-16-QAM"); in sta_he_capa_read()
860 PFLAG(PHY, 3, DCM_MAX_RX_NSS_1, "DCM-MAX-RX-NSS-1"); in sta_he_capa_read()
861 PFLAG(PHY, 3, DCM_MAX_RX_NSS_2, "DCM-MAX-RX-NSS-2"); in sta_he_capa_read()
863 "RX-PARTIAL-BW-SU-IN-20MHZ-MU"); in sta_he_capa_read()
864 PFLAG(PHY, 3, SU_BEAMFORMER, "SU-BEAMFORMER"); in sta_he_capa_read()
866 PFLAG(PHY, 4, SU_BEAMFORMEE, "SU-BEAMFORMEE"); in sta_he_capa_read()
867 PFLAG(PHY, 4, MU_BEAMFORMER, "MU-BEAMFORMER"); in sta_he_capa_read()
870 "BEAMFORMEE-MAX-STS-UNDER-%d"); in sta_he_capa_read()
872 "BEAMFORMEE-MAX-STS-ABOVE-%d"); in sta_he_capa_read()
875 "NUM-SND-DIM-UNDER-80MHZ-%d"); in sta_he_capa_read()
877 "NUM-SND-DIM-ABOVE-80MHZ-%d"); in sta_he_capa_read()
878 PFLAG(PHY, 5, NG16_SU_FEEDBACK, "NG16-SU-FEEDBACK"); in sta_he_capa_read()
879 PFLAG(PHY, 5, NG16_MU_FEEDBACK, "NG16-MU-FEEDBACK"); in sta_he_capa_read()
881 PFLAG(PHY, 6, CODEBOOK_SIZE_42_SU, "CODEBOOK-SIZE-42-SU"); in sta_he_capa_read()
882 PFLAG(PHY, 6, CODEBOOK_SIZE_75_MU, "CODEBOOK-SIZE-75-MU"); in sta_he_capa_read()
883 PFLAG(PHY, 6, TRIG_SU_BEAMFORMING_FB, "TRIG-SU-BEAMFORMING-FB"); in sta_he_capa_read()
885 "MU-BEAMFORMING-PARTIAL-BW-FB"); in sta_he_capa_read()
886 PFLAG(PHY, 6, TRIG_CQI_FB, "TRIG-CQI-FB"); in sta_he_capa_read()
887 PFLAG(PHY, 6, PARTIAL_BW_EXT_RANGE, "PARTIAL-BW-EXT-RANGE"); in sta_he_capa_read()
889 "PARTIAL-BANDWIDTH-DL-MUMIMO"); in sta_he_capa_read()
890 PFLAG(PHY, 6, PPE_THRESHOLD_PRESENT, "PPE-THRESHOLD-PRESENT"); in sta_he_capa_read()
892 PFLAG(PHY, 7, PSR_BASED_SR, "PSR-BASED-SR"); in sta_he_capa_read()
893 PFLAG(PHY, 7, POWER_BOOST_FACTOR_SUPP, "POWER-BOOST-FACTOR-SUPP"); in sta_he_capa_read()
895 "HE-SU-MU-PPDU-4XLTF-AND-08-US-GI"); in sta_he_capa_read()
896 PFLAG_RANGE(PHY, 7, MAX_NC, 0, 1, 1, "MAX-NC-%d"); in sta_he_capa_read()
897 PFLAG(PHY, 7, STBC_TX_ABOVE_80MHZ, "STBC-TX-ABOVE-80MHZ"); in sta_he_capa_read()
898 PFLAG(PHY, 7, STBC_RX_ABOVE_80MHZ, "STBC-RX-ABOVE-80MHZ"); in sta_he_capa_read()
901 "HE-ER-SU-PPDU-4XLTF-AND-08-US-GI"); in sta_he_capa_read()
903 "20MHZ-IN-40MHZ-HE-PPDU-IN-2G"); in sta_he_capa_read()
904 PFLAG(PHY, 8, 20MHZ_IN_160MHZ_HE_PPDU, "20MHZ-IN-160MHZ-HE-PPDU"); in sta_he_capa_read()
905 PFLAG(PHY, 8, 80MHZ_IN_160MHZ_HE_PPDU, "80MHZ-IN-160MHZ-HE-PPDU"); in sta_he_capa_read()
907 "HE-ER-SU-1XLTF-AND-08-US-GI"); in sta_he_capa_read()
909 "MIDAMBLE-RX-TX-2X-AND-1XLTF"); in sta_he_capa_read()
911 switch (cap[8] & IEEE80211_HE_PHY_CAP8_DCM_MAX_RU_MASK) { in sta_he_capa_read()
913 PRINT("DCM-MAX-RU-242"); in sta_he_capa_read()
916 PRINT("DCM-MAX-RU-484"); in sta_he_capa_read()
919 PRINT("DCM-MAX-RU-996"); in sta_he_capa_read()
922 PRINT("DCM-MAX-RU-2x996"); in sta_he_capa_read()
927 "LONGER-THAN-16-SIGB-OFDM-SYM"); in sta_he_capa_read()
929 "NON-TRIGGERED-CQI-FEEDBACK"); in sta_he_capa_read()
931 "TX-1024-QAM-LESS-THAN-242-TONE-RU"); in sta_he_capa_read()
933 "RX-1024-QAM-LESS-THAN-242-TONE-RU"); in sta_he_capa_read()
935 "RX-FULL-BW-SU-USING-MU-WITH-COMP-SIGB"); in sta_he_capa_read()
937 "RX-FULL-BW-SU-USING-MU-WITH-NON-COMP-SIGB"); in sta_he_capa_read()
939 switch (u8_get_bits(cap[9], in sta_he_capa_read()
942 PRINT("NOMINAL-PACKET-PADDING-0US"); in sta_he_capa_read()
945 PRINT("NOMINAL-PACKET-PADDING-8US"); in sta_he_capa_read()
948 PRINT("NOMINAL-PACKET-PADDING-16US"); in sta_he_capa_read()
959 u16 v = le16_to_cpu(nss->f); \ in sta_he_capa_read()
960 p += scnprintf(p, buf_sz + buf - p, n ": %#.4x\n", v); \ in sta_he_capa_read()
964 PRINT(n "-%d-SUPPORT-0-7", _i / 2); \ in sta_he_capa_read()
967 PRINT(n "-%d-SUPPORT-0-9", _i / 2); \ in sta_he_capa_read()
970 PRINT(n "-%d-SUPPORT-0-11", _i / 2); \ in sta_he_capa_read()
973 PRINT(n "-%d-NOT-SUPPORTED", _i / 2); \ in sta_he_capa_read()
979 PRINT_NSS_SUPP(rx_mcs_80, "RX-MCS-80"); in sta_he_capa_read()
980 PRINT_NSS_SUPP(tx_mcs_80, "TX-MCS-80"); in sta_he_capa_read()
982 if (cap[0] & IEEE80211_HE_PHY_CAP0_CHANNEL_WIDTH_SET_160MHZ_IN_5G) { in sta_he_capa_read()
983 PRINT_NSS_SUPP(rx_mcs_160, "RX-MCS-160"); in sta_he_capa_read()
984 PRINT_NSS_SUPP(tx_mcs_160, "TX-MCS-160"); in sta_he_capa_read()
987 if (cap[0] & in sta_he_capa_read()
989 PRINT_NSS_SUPP(rx_mcs_80p80, "RX-MCS-80P80"); in sta_he_capa_read()
990 PRINT_NSS_SUPP(tx_mcs_80p80, "TX-MCS-80P80"); in sta_he_capa_read()
996 if (!(cap[6] & IEEE80211_HE_PHY_CAP6_PPE_THRESHOLD_PRESENT)) in sta_he_capa_read()
999 p += scnprintf(p, buf_sz + buf - p, "PPE-THRESHOLDS: %#.2x", in sta_he_capa_read()
1000 hec->ppe_thres[0]); in sta_he_capa_read()
1002 ppe_size = ieee80211_he_ppe_size(hec->ppe_thres[0], cap); in sta_he_capa_read()
1004 p += scnprintf(p, buf_sz + buf - p, " %#.2x", in sta_he_capa_read()
1005 hec->ppe_thres[i]); in sta_he_capa_read()
1007 p += scnprintf(p, buf_sz + buf - p, "\n"); in sta_he_capa_read()
1010 ret = simple_read_from_buffer(userbuf, count, ppos, buf, p - buf); in sta_he_capa_read()
1018 sta->debugfs_dir, sta, &sta_ ##name## _ops)
1021 debugfs_create_ulong(#name, 0400, sta->debugfs_dir, &sta->field);
1025 struct ieee80211_local *local = sta->local; in ieee80211_sta_debugfs_add() local
1026 struct ieee80211_sub_if_data *sdata = sta->sdata; in ieee80211_sta_debugfs_add()
1027 struct dentry *stations_dir = sta->sdata->debugfs.subdir_stations; in ieee80211_sta_debugfs_add()
1033 snprintf(mac, sizeof(mac), "%pM", sta->sta.addr); in ieee80211_sta_debugfs_add()
1044 sta->debugfs_dir = debugfs_create_dir(mac, stations_dir); in ieee80211_sta_debugfs_add()
1059 if (local->ops->wake_tx_queue) { in ieee80211_sta_debugfs_add()
1064 if (wiphy_ext_feature_isset(local->hw.wiphy, in ieee80211_sta_debugfs_add()
1068 debugfs_create_xul("driver_buffered_tids", 0400, sta->debugfs_dir, in ieee80211_sta_debugfs_add()
1069 &sta->driver_buffered_tids); in ieee80211_sta_debugfs_add()
1071 drv_sta_add_debugfs(local, sdata, &sta->sta, sta->debugfs_dir); in ieee80211_sta_debugfs_add()
1076 debugfs_remove_recursive(sta->debugfs_dir); in ieee80211_sta_debugfs_remove()
1077 sta->debugfs_dir = NULL; in ieee80211_sta_debugfs_remove()