1<?xml version="1.0" encoding="UTF-8"?> 2<!DOCTYPE set PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" 3 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" []> 4<set> 5 <setinfo> 6 <title>The 802.11 subsystems – for kernel developers</title> 7 <subtitle> 8 Explaining wireless 802.11 networking in the Linux kernel 9 </subtitle> 10 11 <copyright> 12 <year>2007-2009</year> 13 <holder>Johannes Berg</holder> 14 </copyright> 15 16 <authorgroup> 17 <author> 18 <firstname>Johannes</firstname> 19 <surname>Berg</surname> 20 <affiliation> 21 <address><email>johannes@sipsolutions.net</email></address> 22 </affiliation> 23 </author> 24 </authorgroup> 25 26 <legalnotice> 27 <para> 28 This documentation is free software; you can redistribute 29 it and/or modify it under the terms of the GNU General Public 30 License version 2 as published by the Free Software Foundation. 31 </para> 32 <para> 33 This documentation is distributed in the hope that it will be 34 useful, but WITHOUT ANY WARRANTY; without even the implied 35 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 36 See the GNU General Public License for more details. 37 </para> 38 <para> 39 You should have received a copy of the GNU General Public 40 License along with this documentation; if not, write to the Free 41 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, 42 MA 02111-1307 USA 43 </para> 44 <para> 45 For more details see the file COPYING in the source 46 distribution of Linux. 47 </para> 48 </legalnotice> 49 50 <abstract> 51 <para> 52 These books attempt to give a description of the 53 various subsystems that play a role in 802.11 wireless 54 networking in Linux. Since these books are for kernel 55 developers they attempts to document the structures 56 and functions used in the kernel as well as giving a 57 higher-level overview. 58 </para> 59 <para> 60 The reader is expected to be familiar with the 802.11 61 standard as published by the IEEE in 802.11-2007 (or 62 possibly later versions). References to this standard 63 will be given as "802.11-2007 8.1.5". 64 </para> 65 </abstract> 66 </setinfo> 67 <book id="cfg80211-developers-guide"> 68 <bookinfo> 69 <title>The cfg80211 subsystem</title> 70 71 <abstract> 72<para> 73 </para><para> 74 cfg80211 is the configuration API for 802.11 devices in Linux. It bridges 75 userspace and drivers, and offers some utility functionality associated 76 with 802.11. cfg80211 must, directly or indirectly via mac80211, be used 77 by all modern wireless drivers in Linux, so that they offer a consistent 78 API through nl80211. For backward compatibility, cfg80211 also offers 79 wireless extensions to userspace, but hides them from drivers completely. 80 </para><para> 81 Additionally, cfg80211 contains code to help enforce regulatory spectrum 82 use restrictions. 83</para> 84 85 </abstract> 86 </bookinfo> 87 <chapter> 88 <title>Device registration</title> 89<para> 90 </para><para> 91 In order for a driver to use cfg80211, it must register the hardware device 92 with cfg80211. This happens through a number of hardware capability structs 93 described below. 94 </para><para> 95 The fundamental structure for each device is the 'wiphy', of which each 96 instance describes a physical wireless device connected to the system. Each 97 such wiphy can have zero, one, or many virtual interfaces associated with 98 it, which need to be identified as such by pointing the network interface's 99 <parameter>ieee80211_ptr</parameter> pointer to a <structname>struct wireless_dev</structname> which further describes 100 the wireless part of the interface, normally this struct is embedded in the 101 network interface's private data area. Drivers can optionally allow creating 102 or destroying virtual interfaces on the fly, but without at least one or the 103 ability to create some the wireless device isn't useful. 104 </para><para> 105 Each wiphy structure contains device capability information, and also has 106 a pointer to the various operations the driver offers. The definitions and 107 structures here describe these capabilities in detail. 108</para> 109 110<refentry id="API-enum-ieee80211-band"> 111<refentryinfo> 112 <title>LINUX</title> 113 <productname>Kernel Hackers Manual</productname> 114 <date>July 2017</date> 115</refentryinfo> 116<refmeta> 117 <refentrytitle><phrase>enum ieee80211_band</phrase></refentrytitle> 118 <manvolnum>9</manvolnum> 119 <refmiscinfo class="version">4.1.27</refmiscinfo> 120</refmeta> 121<refnamediv> 122 <refname>enum ieee80211_band</refname> 123 <refpurpose> 124 supported frequency bands 125 </refpurpose> 126</refnamediv> 127<refsynopsisdiv> 128 <title>Synopsis</title> 129 <programlisting> 130enum ieee80211_band { 131 IEEE80211_BAND_2GHZ, 132 IEEE80211_BAND_5GHZ, 133 IEEE80211_BAND_60GHZ, 134 IEEE80211_NUM_BANDS 135}; </programlisting> 136</refsynopsisdiv> 137<refsect1> 138 <title>Constants</title> 139 <variablelist> 140 <varlistentry> <term>IEEE80211_BAND_2GHZ</term> 141 <listitem><para> 1422.4GHz ISM band 143 </para></listitem> 144 </varlistentry> 145 <varlistentry> <term>IEEE80211_BAND_5GHZ</term> 146 <listitem><para> 147around 5GHz band (4.9-5.7) 148 </para></listitem> 149 </varlistentry> 150 <varlistentry> <term>IEEE80211_BAND_60GHZ</term> 151 <listitem><para> 152around 60 GHz band (58.32 - 64.80 GHz) 153 </para></listitem> 154 </varlistentry> 155 <varlistentry> <term>IEEE80211_NUM_BANDS</term> 156 <listitem><para> 157number of defined bands 158 </para></listitem> 159 </varlistentry> 160 </variablelist> 161</refsect1> 162<refsect1> 163<title>Device registration</title> 164<para> 165 </para><para> 166 167 The bands are assigned this way because the supported 168 bitrates differ in these bands. 169</para> 170</refsect1> 171</refentry> 172 173<refentry id="API-enum-ieee80211-channel-flags"> 174<refentryinfo> 175 <title>LINUX</title> 176 <productname>Kernel Hackers Manual</productname> 177 <date>July 2017</date> 178</refentryinfo> 179<refmeta> 180 <refentrytitle><phrase>enum ieee80211_channel_flags</phrase></refentrytitle> 181 <manvolnum>9</manvolnum> 182 <refmiscinfo class="version">4.1.27</refmiscinfo> 183</refmeta> 184<refnamediv> 185 <refname>enum ieee80211_channel_flags</refname> 186 <refpurpose> 187 channel flags 188 </refpurpose> 189</refnamediv> 190<refsynopsisdiv> 191 <title>Synopsis</title> 192 <programlisting> 193enum ieee80211_channel_flags { 194 IEEE80211_CHAN_DISABLED, 195 IEEE80211_CHAN_NO_IR, 196 IEEE80211_CHAN_RADAR, 197 IEEE80211_CHAN_NO_HT40PLUS, 198 IEEE80211_CHAN_NO_HT40MINUS, 199 IEEE80211_CHAN_NO_OFDM, 200 IEEE80211_CHAN_NO_80MHZ, 201 IEEE80211_CHAN_NO_160MHZ, 202 IEEE80211_CHAN_INDOOR_ONLY, 203 IEEE80211_CHAN_GO_CONCURRENT, 204 IEEE80211_CHAN_NO_20MHZ, 205 IEEE80211_CHAN_NO_10MHZ 206}; </programlisting> 207</refsynopsisdiv> 208<refsect1> 209 <title>Constants</title> 210 <variablelist> 211 <varlistentry> <term>IEEE80211_CHAN_DISABLED</term> 212 <listitem><para> 213This channel is disabled. 214 </para></listitem> 215 </varlistentry> 216 <varlistentry> <term>IEEE80211_CHAN_NO_IR</term> 217 <listitem><para> 218do not initiate radiation, this includes 219sending probe requests or beaconing. 220 </para></listitem> 221 </varlistentry> 222 <varlistentry> <term>IEEE80211_CHAN_RADAR</term> 223 <listitem><para> 224Radar detection is required on this channel. 225 </para></listitem> 226 </varlistentry> 227 <varlistentry> <term>IEEE80211_CHAN_NO_HT40PLUS</term> 228 <listitem><para> 229extension channel above this channel 230is not permitted. 231 </para></listitem> 232 </varlistentry> 233 <varlistentry> <term>IEEE80211_CHAN_NO_HT40MINUS</term> 234 <listitem><para> 235extension channel below this channel 236is not permitted. 237 </para></listitem> 238 </varlistentry> 239 <varlistentry> <term>IEEE80211_CHAN_NO_OFDM</term> 240 <listitem><para> 241OFDM is not allowed on this channel. 242 </para></listitem> 243 </varlistentry> 244 <varlistentry> <term>IEEE80211_CHAN_NO_80MHZ</term> 245 <listitem><para> 246If the driver supports 80 MHz on the band, 247this flag indicates that an 80 MHz channel cannot use this 248channel as the control or any of the secondary channels. 249This may be due to the driver or due to regulatory bandwidth 250restrictions. 251 </para></listitem> 252 </varlistentry> 253 <varlistentry> <term>IEEE80211_CHAN_NO_160MHZ</term> 254 <listitem><para> 255If the driver supports 160 MHz on the band, 256this flag indicates that an 160 MHz channel cannot use this 257channel as the control or any of the secondary channels. 258This may be due to the driver or due to regulatory bandwidth 259restrictions. 260 </para></listitem> 261 </varlistentry> 262 <varlistentry> <term>IEEE80211_CHAN_INDOOR_ONLY</term> 263 <listitem><para> 264see <constant>NL80211_FREQUENCY_ATTR_INDOOR_ONLY</constant> 265 </para></listitem> 266 </varlistentry> 267 <varlistentry> <term>IEEE80211_CHAN_GO_CONCURRENT</term> 268 <listitem><para> 269see <constant>NL80211_FREQUENCY_ATTR_GO_CONCURRENT</constant> 270 </para></listitem> 271 </varlistentry> 272 <varlistentry> <term>IEEE80211_CHAN_NO_20MHZ</term> 273 <listitem><para> 27420 MHz bandwidth is not permitted 275on this channel. 276 </para></listitem> 277 </varlistentry> 278 <varlistentry> <term>IEEE80211_CHAN_NO_10MHZ</term> 279 <listitem><para> 28010 MHz bandwidth is not permitted 281on this channel. 282 </para></listitem> 283 </varlistentry> 284 </variablelist> 285</refsect1> 286<refsect1> 287<title>Description</title> 288<para> 289 </para><para> 290 291 Channel flags set by the regulatory control code. 292</para> 293</refsect1> 294</refentry> 295 296<refentry id="API-struct-ieee80211-channel"> 297<refentryinfo> 298 <title>LINUX</title> 299 <productname>Kernel Hackers Manual</productname> 300 <date>July 2017</date> 301</refentryinfo> 302<refmeta> 303 <refentrytitle><phrase>struct ieee80211_channel</phrase></refentrytitle> 304 <manvolnum>9</manvolnum> 305 <refmiscinfo class="version">4.1.27</refmiscinfo> 306</refmeta> 307<refnamediv> 308 <refname>struct ieee80211_channel</refname> 309 <refpurpose> 310 channel definition 311 </refpurpose> 312</refnamediv> 313<refsynopsisdiv> 314 <title>Synopsis</title> 315 <programlisting> 316struct ieee80211_channel { 317 enum ieee80211_band band; 318 u16 center_freq; 319 u16 hw_value; 320 u32 flags; 321 int max_antenna_gain; 322 int max_power; 323 int max_reg_power; 324 bool beacon_found; 325 u32 orig_flags; 326 int orig_mag; 327 int orig_mpwr; 328 enum nl80211_dfs_state dfs_state; 329 unsigned long dfs_state_entered; 330 unsigned int dfs_cac_ms; 331}; </programlisting> 332</refsynopsisdiv> 333 <refsect1> 334 <title>Members</title> 335 <variablelist> 336 <varlistentry> <term>band</term> 337 <listitem><para> 338band this channel belongs to. 339 </para></listitem> 340 </varlistentry> 341 <varlistentry> <term>center_freq</term> 342 <listitem><para> 343center frequency in MHz 344 </para></listitem> 345 </varlistentry> 346 <varlistentry> <term>hw_value</term> 347 <listitem><para> 348hardware-specific value for the channel 349 </para></listitem> 350 </varlistentry> 351 <varlistentry> <term>flags</term> 352 <listitem><para> 353channel flags from <structname>enum</structname> ieee80211_channel_flags. 354 </para></listitem> 355 </varlistentry> 356 <varlistentry> <term>max_antenna_gain</term> 357 <listitem><para> 358maximum antenna gain in dBi 359 </para></listitem> 360 </varlistentry> 361 <varlistentry> <term>max_power</term> 362 <listitem><para> 363maximum transmission power (in dBm) 364 </para></listitem> 365 </varlistentry> 366 <varlistentry> <term>max_reg_power</term> 367 <listitem><para> 368maximum regulatory transmission power (in dBm) 369 </para></listitem> 370 </varlistentry> 371 <varlistentry> <term>beacon_found</term> 372 <listitem><para> 373helper to regulatory code to indicate when a beacon 374has been found on this channel. Use <function>regulatory_hint_found_beacon</function> 375to enable this, this is useful only on 5 GHz band. 376 </para></listitem> 377 </varlistentry> 378 <varlistentry> <term>orig_flags</term> 379 <listitem><para> 380channel flags at registration time, used by regulatory 381code to support devices with additional restrictions 382 </para></listitem> 383 </varlistentry> 384 <varlistentry> <term>orig_mag</term> 385 <listitem><para> 386internal use 387 </para></listitem> 388 </varlistentry> 389 <varlistentry> <term>orig_mpwr</term> 390 <listitem><para> 391internal use 392 </para></listitem> 393 </varlistentry> 394 <varlistentry> <term>dfs_state</term> 395 <listitem><para> 396current state of this channel. Only relevant if radar is required 397on this channel. 398 </para></listitem> 399 </varlistentry> 400 <varlistentry> <term>dfs_state_entered</term> 401 <listitem><para> 402timestamp (jiffies) when the dfs state was entered. 403 </para></listitem> 404 </varlistentry> 405 <varlistentry> <term>dfs_cac_ms</term> 406 <listitem><para> 407DFS CAC time in milliseconds, this is valid for DFS channels. 408 </para></listitem> 409 </varlistentry> 410 </variablelist> 411 </refsect1> 412<refsect1> 413<title>Description</title> 414<para> 415 </para><para> 416 417 This structure describes a single channel for use 418 with cfg80211. 419</para> 420</refsect1> 421</refentry> 422 423<refentry id="API-enum-ieee80211-rate-flags"> 424<refentryinfo> 425 <title>LINUX</title> 426 <productname>Kernel Hackers Manual</productname> 427 <date>July 2017</date> 428</refentryinfo> 429<refmeta> 430 <refentrytitle><phrase>enum ieee80211_rate_flags</phrase></refentrytitle> 431 <manvolnum>9</manvolnum> 432 <refmiscinfo class="version">4.1.27</refmiscinfo> 433</refmeta> 434<refnamediv> 435 <refname>enum ieee80211_rate_flags</refname> 436 <refpurpose> 437 rate flags 438 </refpurpose> 439</refnamediv> 440<refsynopsisdiv> 441 <title>Synopsis</title> 442 <programlisting> 443enum ieee80211_rate_flags { 444 IEEE80211_RATE_SHORT_PREAMBLE, 445 IEEE80211_RATE_MANDATORY_A, 446 IEEE80211_RATE_MANDATORY_B, 447 IEEE80211_RATE_MANDATORY_G, 448 IEEE80211_RATE_ERP_G, 449 IEEE80211_RATE_SUPPORTS_5MHZ, 450 IEEE80211_RATE_SUPPORTS_10MHZ 451}; </programlisting> 452</refsynopsisdiv> 453<refsect1> 454 <title>Constants</title> 455 <variablelist> 456 <varlistentry> <term>IEEE80211_RATE_SHORT_PREAMBLE</term> 457 <listitem><para> 458Hardware can send with short 459preamble on this bitrate; only relevant in 2.4GHz band and 460with CCK rates. 461 </para></listitem> 462 </varlistentry> 463 <varlistentry> <term>IEEE80211_RATE_MANDATORY_A</term> 464 <listitem><para> 465This bitrate is a mandatory rate 466when used with 802.11a (on the 5 GHz band); filled by the 467core code when registering the wiphy. 468 </para></listitem> 469 </varlistentry> 470 <varlistentry> <term>IEEE80211_RATE_MANDATORY_B</term> 471 <listitem><para> 472This bitrate is a mandatory rate 473when used with 802.11b (on the 2.4 GHz band); filled by the 474core code when registering the wiphy. 475 </para></listitem> 476 </varlistentry> 477 <varlistentry> <term>IEEE80211_RATE_MANDATORY_G</term> 478 <listitem><para> 479This bitrate is a mandatory rate 480when used with 802.11g (on the 2.4 GHz band); filled by the 481core code when registering the wiphy. 482 </para></listitem> 483 </varlistentry> 484 <varlistentry> <term>IEEE80211_RATE_ERP_G</term> 485 <listitem><para> 486This is an ERP rate in 802.11g mode. 487 </para></listitem> 488 </varlistentry> 489 <varlistentry> <term>IEEE80211_RATE_SUPPORTS_5MHZ</term> 490 <listitem><para> 491Rate can be used in 5 MHz mode 492 </para></listitem> 493 </varlistentry> 494 <varlistentry> <term>IEEE80211_RATE_SUPPORTS_10MHZ</term> 495 <listitem><para> 496Rate can be used in 10 MHz mode 497 </para></listitem> 498 </varlistentry> 499 </variablelist> 500</refsect1> 501<refsect1> 502<title>Description</title> 503<para> 504 </para><para> 505 506 Hardware/specification flags for rates. These are structured 507 in a way that allows using the same bitrate structure for 508 different bands/PHY modes. 509</para> 510</refsect1> 511</refentry> 512 513<refentry id="API-struct-ieee80211-rate"> 514<refentryinfo> 515 <title>LINUX</title> 516 <productname>Kernel Hackers Manual</productname> 517 <date>July 2017</date> 518</refentryinfo> 519<refmeta> 520 <refentrytitle><phrase>struct ieee80211_rate</phrase></refentrytitle> 521 <manvolnum>9</manvolnum> 522 <refmiscinfo class="version">4.1.27</refmiscinfo> 523</refmeta> 524<refnamediv> 525 <refname>struct ieee80211_rate</refname> 526 <refpurpose> 527 bitrate definition 528 </refpurpose> 529</refnamediv> 530<refsynopsisdiv> 531 <title>Synopsis</title> 532 <programlisting> 533struct ieee80211_rate { 534 u32 flags; 535 u16 bitrate; 536 u16 hw_value; 537 u16 hw_value_short; 538}; </programlisting> 539</refsynopsisdiv> 540 <refsect1> 541 <title>Members</title> 542 <variablelist> 543 <varlistentry> <term>flags</term> 544 <listitem><para> 545rate-specific flags 546 </para></listitem> 547 </varlistentry> 548 <varlistentry> <term>bitrate</term> 549 <listitem><para> 550bitrate in units of 100 Kbps 551 </para></listitem> 552 </varlistentry> 553 <varlistentry> <term>hw_value</term> 554 <listitem><para> 555driver/hardware value for this rate 556 </para></listitem> 557 </varlistentry> 558 <varlistentry> <term>hw_value_short</term> 559 <listitem><para> 560driver/hardware value for this rate when 561short preamble is used 562 </para></listitem> 563 </varlistentry> 564 </variablelist> 565 </refsect1> 566<refsect1> 567<title>Description</title> 568<para> 569 </para><para> 570 571 This structure describes a bitrate that an 802.11 PHY can 572 operate with. The two values <parameter>hw_value</parameter> and <parameter>hw_value_short</parameter> 573 are only for driver use when pointers to this structure are 574 passed around. 575</para> 576</refsect1> 577</refentry> 578 579<refentry id="API-struct-ieee80211-sta-ht-cap"> 580<refentryinfo> 581 <title>LINUX</title> 582 <productname>Kernel Hackers Manual</productname> 583 <date>July 2017</date> 584</refentryinfo> 585<refmeta> 586 <refentrytitle><phrase>struct ieee80211_sta_ht_cap</phrase></refentrytitle> 587 <manvolnum>9</manvolnum> 588 <refmiscinfo class="version">4.1.27</refmiscinfo> 589</refmeta> 590<refnamediv> 591 <refname>struct ieee80211_sta_ht_cap</refname> 592 <refpurpose> 593 STA's HT capabilities 594 </refpurpose> 595</refnamediv> 596<refsynopsisdiv> 597 <title>Synopsis</title> 598 <programlisting> 599struct ieee80211_sta_ht_cap { 600 u16 cap; 601 bool ht_supported; 602 u8 ampdu_factor; 603 u8 ampdu_density; 604 struct ieee80211_mcs_info mcs; 605}; </programlisting> 606</refsynopsisdiv> 607 <refsect1> 608 <title>Members</title> 609 <variablelist> 610 <varlistentry> <term>cap</term> 611 <listitem><para> 612HT capabilities map as described in 802.11n spec 613 </para></listitem> 614 </varlistentry> 615 <varlistentry> <term>ht_supported</term> 616 <listitem><para> 617is HT supported by the STA 618 </para></listitem> 619 </varlistentry> 620 <varlistentry> <term>ampdu_factor</term> 621 <listitem><para> 622Maximum A-MPDU length factor 623 </para></listitem> 624 </varlistentry> 625 <varlistentry> <term>ampdu_density</term> 626 <listitem><para> 627Minimum A-MPDU spacing 628 </para></listitem> 629 </varlistentry> 630 <varlistentry> <term>mcs</term> 631 <listitem><para> 632Supported MCS rates 633 </para></listitem> 634 </varlistentry> 635 </variablelist> 636 </refsect1> 637<refsect1> 638<title>Description</title> 639<para> 640 </para><para> 641 642 This structure describes most essential parameters needed 643 to describe 802.11n HT capabilities for an STA. 644</para> 645</refsect1> 646</refentry> 647 648<refentry id="API-struct-ieee80211-supported-band"> 649<refentryinfo> 650 <title>LINUX</title> 651 <productname>Kernel Hackers Manual</productname> 652 <date>July 2017</date> 653</refentryinfo> 654<refmeta> 655 <refentrytitle><phrase>struct ieee80211_supported_band</phrase></refentrytitle> 656 <manvolnum>9</manvolnum> 657 <refmiscinfo class="version">4.1.27</refmiscinfo> 658</refmeta> 659<refnamediv> 660 <refname>struct ieee80211_supported_band</refname> 661 <refpurpose> 662 frequency band definition 663 </refpurpose> 664</refnamediv> 665<refsynopsisdiv> 666 <title>Synopsis</title> 667 <programlisting> 668struct ieee80211_supported_band { 669 struct ieee80211_channel * channels; 670 struct ieee80211_rate * bitrates; 671 enum ieee80211_band band; 672 int n_channels; 673 int n_bitrates; 674 struct ieee80211_sta_ht_cap ht_cap; 675 struct ieee80211_sta_vht_cap vht_cap; 676}; </programlisting> 677</refsynopsisdiv> 678 <refsect1> 679 <title>Members</title> 680 <variablelist> 681 <varlistentry> <term>channels</term> 682 <listitem><para> 683Array of channels the hardware can operate in 684in this band. 685 </para></listitem> 686 </varlistentry> 687 <varlistentry> <term>bitrates</term> 688 <listitem><para> 689Array of bitrates the hardware can operate with 690in this band. Must be sorted to give a valid <quote>supported 691rates</quote> IE, i.e. CCK rates first, then OFDM. 692 </para></listitem> 693 </varlistentry> 694 <varlistentry> <term>band</term> 695 <listitem><para> 696the band this structure represents 697 </para></listitem> 698 </varlistentry> 699 <varlistentry> <term>n_channels</term> 700 <listitem><para> 701Number of channels in <parameter>channels</parameter> 702 </para></listitem> 703 </varlistentry> 704 <varlistentry> <term>n_bitrates</term> 705 <listitem><para> 706Number of bitrates in <parameter>bitrates</parameter> 707 </para></listitem> 708 </varlistentry> 709 <varlistentry> <term>ht_cap</term> 710 <listitem><para> 711HT capabilities in this band 712 </para></listitem> 713 </varlistentry> 714 <varlistentry> <term>vht_cap</term> 715 <listitem><para> 716VHT capabilities in this band 717 </para></listitem> 718 </varlistentry> 719 </variablelist> 720 </refsect1> 721<refsect1> 722<title>Description</title> 723<para> 724 </para><para> 725 726 This structure describes a frequency band a wiphy 727 is able to operate in. 728</para> 729</refsect1> 730</refentry> 731 732<refentry id="API-enum-cfg80211-signal-type"> 733<refentryinfo> 734 <title>LINUX</title> 735 <productname>Kernel Hackers Manual</productname> 736 <date>July 2017</date> 737</refentryinfo> 738<refmeta> 739 <refentrytitle><phrase>enum cfg80211_signal_type</phrase></refentrytitle> 740 <manvolnum>9</manvolnum> 741 <refmiscinfo class="version">4.1.27</refmiscinfo> 742</refmeta> 743<refnamediv> 744 <refname>enum cfg80211_signal_type</refname> 745 <refpurpose> 746 signal type 747 </refpurpose> 748</refnamediv> 749<refsynopsisdiv> 750 <title>Synopsis</title> 751 <programlisting> 752enum cfg80211_signal_type { 753 CFG80211_SIGNAL_TYPE_NONE, 754 CFG80211_SIGNAL_TYPE_MBM, 755 CFG80211_SIGNAL_TYPE_UNSPEC 756}; </programlisting> 757</refsynopsisdiv> 758<refsect1> 759 <title>Constants</title> 760 <variablelist> 761 <varlistentry> <term>CFG80211_SIGNAL_TYPE_NONE</term> 762 <listitem><para> 763no signal strength information available 764 </para></listitem> 765 </varlistentry> 766 <varlistentry> <term>CFG80211_SIGNAL_TYPE_MBM</term> 767 <listitem><para> 768signal strength in mBm (100*dBm) 769 </para></listitem> 770 </varlistentry> 771 <varlistentry> <term>CFG80211_SIGNAL_TYPE_UNSPEC</term> 772 <listitem><para> 773signal strength, increasing from 0 through 100 774 </para></listitem> 775 </varlistentry> 776 </variablelist> 777</refsect1> 778</refentry> 779 780<refentry id="API-enum-wiphy-params-flags"> 781<refentryinfo> 782 <title>LINUX</title> 783 <productname>Kernel Hackers Manual</productname> 784 <date>July 2017</date> 785</refentryinfo> 786<refmeta> 787 <refentrytitle><phrase>enum wiphy_params_flags</phrase></refentrytitle> 788 <manvolnum>9</manvolnum> 789 <refmiscinfo class="version">4.1.27</refmiscinfo> 790</refmeta> 791<refnamediv> 792 <refname>enum wiphy_params_flags</refname> 793 <refpurpose> 794 set_wiphy_params bitfield values 795 </refpurpose> 796</refnamediv> 797<refsynopsisdiv> 798 <title>Synopsis</title> 799 <programlisting> 800enum wiphy_params_flags { 801 WIPHY_PARAM_RETRY_SHORT, 802 WIPHY_PARAM_RETRY_LONG, 803 WIPHY_PARAM_FRAG_THRESHOLD, 804 WIPHY_PARAM_RTS_THRESHOLD, 805 WIPHY_PARAM_COVERAGE_CLASS, 806 WIPHY_PARAM_DYN_ACK 807}; </programlisting> 808</refsynopsisdiv> 809<refsect1> 810 <title>Constants</title> 811 <variablelist> 812 <varlistentry> <term>WIPHY_PARAM_RETRY_SHORT</term> 813 <listitem><para> 814wiphy->retry_short has changed 815 </para></listitem> 816 </varlistentry> 817 <varlistentry> <term>WIPHY_PARAM_RETRY_LONG</term> 818 <listitem><para> 819wiphy->retry_long has changed 820 </para></listitem> 821 </varlistentry> 822 <varlistentry> <term>WIPHY_PARAM_FRAG_THRESHOLD</term> 823 <listitem><para> 824wiphy->frag_threshold has changed 825 </para></listitem> 826 </varlistentry> 827 <varlistentry> <term>WIPHY_PARAM_RTS_THRESHOLD</term> 828 <listitem><para> 829wiphy->rts_threshold has changed 830 </para></listitem> 831 </varlistentry> 832 <varlistentry> <term>WIPHY_PARAM_COVERAGE_CLASS</term> 833 <listitem><para> 834coverage class changed 835 </para></listitem> 836 </varlistentry> 837 <varlistentry> <term>WIPHY_PARAM_DYN_ACK</term> 838 <listitem><para> 839dynack has been enabled 840 </para></listitem> 841 </varlistentry> 842 </variablelist> 843</refsect1> 844</refentry> 845 846<refentry id="API-enum-wiphy-flags"> 847<refentryinfo> 848 <title>LINUX</title> 849 <productname>Kernel Hackers Manual</productname> 850 <date>July 2017</date> 851</refentryinfo> 852<refmeta> 853 <refentrytitle><phrase>enum wiphy_flags</phrase></refentrytitle> 854 <manvolnum>9</manvolnum> 855 <refmiscinfo class="version">4.1.27</refmiscinfo> 856</refmeta> 857<refnamediv> 858 <refname>enum wiphy_flags</refname> 859 <refpurpose> 860 wiphy capability flags 861 </refpurpose> 862</refnamediv> 863<refsynopsisdiv> 864 <title>Synopsis</title> 865 <programlisting> 866enum wiphy_flags { 867 WIPHY_FLAG_NETNS_OK, 868 WIPHY_FLAG_PS_ON_BY_DEFAULT, 869 WIPHY_FLAG_4ADDR_AP, 870 WIPHY_FLAG_4ADDR_STATION, 871 WIPHY_FLAG_CONTROL_PORT_PROTOCOL, 872 WIPHY_FLAG_IBSS_RSN, 873 WIPHY_FLAG_MESH_AUTH, 874 WIPHY_FLAG_SUPPORTS_SCHED_SCAN, 875 WIPHY_FLAG_SUPPORTS_FW_ROAM, 876 WIPHY_FLAG_AP_UAPSD, 877 WIPHY_FLAG_SUPPORTS_TDLS, 878 WIPHY_FLAG_TDLS_EXTERNAL_SETUP, 879 WIPHY_FLAG_HAVE_AP_SME, 880 WIPHY_FLAG_REPORTS_OBSS, 881 WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD, 882 WIPHY_FLAG_OFFCHAN_TX, 883 WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL, 884 WIPHY_FLAG_SUPPORTS_5_10_MHZ, 885 WIPHY_FLAG_HAS_CHANNEL_SWITCH 886}; </programlisting> 887</refsynopsisdiv> 888<refsect1> 889 <title>Constants</title> 890 <variablelist> 891 <varlistentry> <term>WIPHY_FLAG_NETNS_OK</term> 892 <listitem><para> 893if not set, do not allow changing the netns of this 894wiphy at all 895 </para></listitem> 896 </varlistentry> 897 <varlistentry> <term>WIPHY_FLAG_PS_ON_BY_DEFAULT</term> 898 <listitem><para> 899if set to true, powersave will be enabled 900by default -- this flag will be set depending on the kernel's default 901on <function>wiphy_new</function>, but can be changed by the driver if it has a good 902reason to override the default 903 </para></listitem> 904 </varlistentry> 905 <varlistentry> <term>WIPHY_FLAG_4ADDR_AP</term> 906 <listitem><para> 907supports 4addr mode even on AP (with a single station 908on a VLAN interface) 909 </para></listitem> 910 </varlistentry> 911 <varlistentry> <term>WIPHY_FLAG_4ADDR_STATION</term> 912 <listitem><para> 913supports 4addr mode even as a station 914 </para></listitem> 915 </varlistentry> 916 <varlistentry> <term>WIPHY_FLAG_CONTROL_PORT_PROTOCOL</term> 917 <listitem><para> 918This device supports setting the 919control port protocol ethertype. The device also honours the 920control_port_no_encrypt flag. 921 </para></listitem> 922 </varlistentry> 923 <varlistentry> <term>WIPHY_FLAG_IBSS_RSN</term> 924 <listitem><para> 925The device supports IBSS RSN. 926 </para></listitem> 927 </varlistentry> 928 <varlistentry> <term>WIPHY_FLAG_MESH_AUTH</term> 929 <listitem><para> 930The device supports mesh authentication by routing 931auth frames to userspace. See <parameter>NL80211_MESH_SETUP_USERSPACE_AUTH</parameter>. 932 </para></listitem> 933 </varlistentry> 934 <varlistentry> <term>WIPHY_FLAG_SUPPORTS_SCHED_SCAN</term> 935 <listitem><para> 936The device supports scheduled scans. 937 </para></listitem> 938 </varlistentry> 939 <varlistentry> <term>WIPHY_FLAG_SUPPORTS_FW_ROAM</term> 940 <listitem><para> 941The device supports roaming feature in the 942firmware. 943 </para></listitem> 944 </varlistentry> 945 <varlistentry> <term>WIPHY_FLAG_AP_UAPSD</term> 946 <listitem><para> 947The device supports uapsd on AP. 948 </para></listitem> 949 </varlistentry> 950 <varlistentry> <term>WIPHY_FLAG_SUPPORTS_TDLS</term> 951 <listitem><para> 952The device supports TDLS (802.11z) operation. 953 </para></listitem> 954 </varlistentry> 955 <varlistentry> <term>WIPHY_FLAG_TDLS_EXTERNAL_SETUP</term> 956 <listitem><para> 957The device does not handle TDLS (802.11z) 958link setup/discovery operations internally. Setup, discovery and 959teardown packets should be sent through the <parameter>NL80211_CMD_TDLS_MGMT</parameter> 960command. When this flag is not set, <parameter>NL80211_CMD_TDLS_OPER</parameter> should be 961used for asking the driver/firmware to perform a TDLS operation. 962 </para></listitem> 963 </varlistentry> 964 <varlistentry> <term>WIPHY_FLAG_HAVE_AP_SME</term> 965 <listitem><para> 966device integrates AP SME 967 </para></listitem> 968 </varlistentry> 969 <varlistentry> <term>WIPHY_FLAG_REPORTS_OBSS</term> 970 <listitem><para> 971the device will report beacons from other BSSes 972when there are virtual interfaces in AP mode by calling 973<function>cfg80211_report_obss_beacon</function>. 974 </para></listitem> 975 </varlistentry> 976 <varlistentry> <term>WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD</term> 977 <listitem><para> 978When operating as an AP, the device 979responds to probe-requests in hardware. 980 </para></listitem> 981 </varlistentry> 982 <varlistentry> <term>WIPHY_FLAG_OFFCHAN_TX</term> 983 <listitem><para> 984Device supports direct off-channel TX. 985 </para></listitem> 986 </varlistentry> 987 <varlistentry> <term>WIPHY_FLAG_HAS_REMAIN_ON_CHANNEL</term> 988 <listitem><para> 989Device supports remain-on-channel call. 990 </para></listitem> 991 </varlistentry> 992 <varlistentry> <term>WIPHY_FLAG_SUPPORTS_5_10_MHZ</term> 993 <listitem><para> 994Device supports 5 MHz and 10 MHz channels. 995 </para></listitem> 996 </varlistentry> 997 <varlistentry> <term>WIPHY_FLAG_HAS_CHANNEL_SWITCH</term> 998 <listitem><para> 999Device supports channel switch in 1000beaconing mode (AP, IBSS, Mesh, ...). 1001 </para></listitem> 1002 </varlistentry> 1003 </variablelist> 1004</refsect1> 1005</refentry> 1006 1007<refentry id="API-struct-wiphy"> 1008<refentryinfo> 1009 <title>LINUX</title> 1010 <productname>Kernel Hackers Manual</productname> 1011 <date>July 2017</date> 1012</refentryinfo> 1013<refmeta> 1014 <refentrytitle><phrase>struct wiphy</phrase></refentrytitle> 1015 <manvolnum>9</manvolnum> 1016 <refmiscinfo class="version">4.1.27</refmiscinfo> 1017</refmeta> 1018<refnamediv> 1019 <refname>struct wiphy</refname> 1020 <refpurpose> 1021 wireless hardware description 1022 </refpurpose> 1023</refnamediv> 1024<refsynopsisdiv> 1025 <title>Synopsis</title> 1026 <programlisting> 1027struct wiphy { 1028 u8 perm_addr[ETH_ALEN]; 1029 u8 addr_mask[ETH_ALEN]; 1030 struct mac_address * addresses; 1031 const struct ieee80211_txrx_stypes * mgmt_stypes; 1032 const struct ieee80211_iface_combination * iface_combinations; 1033 int n_iface_combinations; 1034 u16 software_iftypes; 1035 u16 n_addresses; 1036 u16 interface_modes; 1037 u16 max_acl_mac_addrs; 1038 u32 flags; 1039 u32 regulatory_flags; 1040 u32 features; 1041 u8 ext_features[DIV_ROUND_UP(NUM_NL80211_EXT_FEATURES# 8)]; 1042 u32 ap_sme_capa; 1043 enum cfg80211_signal_type signal_type; 1044 int bss_priv_size; 1045 u8 max_scan_ssids; 1046 u8 max_sched_scan_ssids; 1047 u8 max_match_sets; 1048 u16 max_scan_ie_len; 1049 u16 max_sched_scan_ie_len; 1050 int n_cipher_suites; 1051 const u32 * cipher_suites; 1052 u8 retry_short; 1053 u8 retry_long; 1054 u32 frag_threshold; 1055 u32 rts_threshold; 1056 u8 coverage_class; 1057 char fw_version[ETHTOOL_FWVERS_LEN]; 1058 u32 hw_version; 1059#ifdef CONFIG_PM 1060 const struct wiphy_wowlan_support * wowlan; 1061 struct cfg80211_wowlan * wowlan_config; 1062#endif 1063 u16 max_remain_on_channel_duration; 1064 u8 max_num_pmkids; 1065 u32 available_antennas_tx; 1066 u32 available_antennas_rx; 1067 u32 probe_resp_offload; 1068 const u8 * extended_capabilities; 1069 const u8 * extended_capabilities_mask; 1070 u8 extended_capabilities_len; 1071 const void * privid; 1072 struct ieee80211_supported_band * bands[IEEE80211_NUM_BANDS]; 1073 void (* reg_notifier) (struct wiphy *wiphy,struct regulatory_request *request); 1074 const struct ieee80211_regdomain __rcu * regd; 1075 struct device dev; 1076 bool registered; 1077 struct dentry * debugfsdir; 1078 const struct ieee80211_ht_cap * ht_capa_mod_mask; 1079 const struct ieee80211_vht_cap * vht_capa_mod_mask; 1080 possible_net_t _net; 1081#ifdef CONFIG_CFG80211_WEXT 1082 const struct iw_handler_def * wext; 1083#endif 1084 const struct wiphy_coalesce_support * coalesce; 1085 const struct wiphy_vendor_command * vendor_commands; 1086 const struct nl80211_vendor_cmd_info * vendor_events; 1087 int n_vendor_commands; 1088 int n_vendor_events; 1089 u16 max_ap_assoc_sta; 1090 u8 max_num_csa_counters; 1091 u8 max_adj_channel_rssi_comp; 1092 char priv[0]; 1093}; </programlisting> 1094</refsynopsisdiv> 1095 <refsect1> 1096 <title>Members</title> 1097 <variablelist> 1098 <varlistentry> <term>perm_addr[ETH_ALEN]</term> 1099 <listitem><para> 1100permanent MAC address of this device 1101 </para></listitem> 1102 </varlistentry> 1103 <varlistentry> <term>addr_mask[ETH_ALEN]</term> 1104 <listitem><para> 1105If the device supports multiple MAC addresses by masking, 1106set this to a mask with variable bits set to 1, e.g. if the last 1107four bits are variable then set it to 00-00-00-00-00-0f. The actual 1108variable bits shall be determined by the interfaces added, with 1109interfaces not matching the mask being rejected to be brought up. 1110 </para></listitem> 1111 </varlistentry> 1112 <varlistentry> <term>addresses</term> 1113 <listitem><para> 1114If the device has more than one address, set this pointer 1115to a list of addresses (6 bytes each). The first one will be used 1116by default for perm_addr. In this case, the mask should be set to 1117all-zeroes. In this case it is assumed that the device can handle 1118the same number of arbitrary MAC addresses. 1119 </para></listitem> 1120 </varlistentry> 1121 <varlistentry> <term>mgmt_stypes</term> 1122 <listitem><para> 1123bitmasks of frame subtypes that can be subscribed to or 1124transmitted through nl80211, points to an array indexed by interface 1125type 1126 </para></listitem> 1127 </varlistentry> 1128 <varlistentry> <term>iface_combinations</term> 1129 <listitem><para> 1130Valid interface combinations array, should not 1131list single interface types. 1132 </para></listitem> 1133 </varlistentry> 1134 <varlistentry> <term>n_iface_combinations</term> 1135 <listitem><para> 1136number of entries in <parameter>iface_combinations</parameter> array. 1137 </para></listitem> 1138 </varlistentry> 1139 <varlistentry> <term>software_iftypes</term> 1140 <listitem><para> 1141bitmask of software interface types, these are not 1142subject to any restrictions since they are purely managed in SW. 1143 </para></listitem> 1144 </varlistentry> 1145 <varlistentry> <term>n_addresses</term> 1146 <listitem><para> 1147number of addresses in <parameter>addresses</parameter>. 1148 </para></listitem> 1149 </varlistentry> 1150 <varlistentry> <term>interface_modes</term> 1151 <listitem><para> 1152bitmask of interfaces types valid for this wiphy, 1153must be set by driver 1154 </para></listitem> 1155 </varlistentry> 1156 <varlistentry> <term>max_acl_mac_addrs</term> 1157 <listitem><para> 1158Maximum number of MAC addresses that the device 1159supports for ACL. 1160 </para></listitem> 1161 </varlistentry> 1162 <varlistentry> <term>flags</term> 1163 <listitem><para> 1164wiphy flags, see <structname>enum</structname> wiphy_flags 1165 </para></listitem> 1166 </varlistentry> 1167 <varlistentry> <term>regulatory_flags</term> 1168 <listitem><para> 1169wiphy regulatory flags, see 1170<structname>enum</structname> ieee80211_regulatory_flags 1171 </para></listitem> 1172 </varlistentry> 1173 <varlistentry> <term>features</term> 1174 <listitem><para> 1175features advertised to nl80211, see <structname>enum</structname> nl80211_feature_flags. 1176 </para></listitem> 1177 </varlistentry> 1178 <varlistentry> <term>ext_features[DIV_ROUND_UP(NUM_NL80211_EXT_FEATURES# 8)]</term> 1179 <listitem><para> 1180extended features advertised to nl80211, see 1181<structname>enum</structname> nl80211_ext_feature_index. 1182 </para></listitem> 1183 </varlistentry> 1184 <varlistentry> <term>ap_sme_capa</term> 1185 <listitem><para> 1186AP SME capabilities, flags from <structname>enum</structname> nl80211_ap_sme_features. 1187 </para></listitem> 1188 </varlistentry> 1189 <varlistentry> <term>signal_type</term> 1190 <listitem><para> 1191signal type reported in <structname>struct cfg80211_bss</structname>. 1192 </para></listitem> 1193 </varlistentry> 1194 <varlistentry> <term>bss_priv_size</term> 1195 <listitem><para> 1196each BSS struct has private data allocated with it, 1197this variable determines its size 1198 </para></listitem> 1199 </varlistentry> 1200 <varlistentry> <term>max_scan_ssids</term> 1201 <listitem><para> 1202maximum number of SSIDs the device can scan for in 1203any given scan 1204 </para></listitem> 1205 </varlistentry> 1206 <varlistentry> <term>max_sched_scan_ssids</term> 1207 <listitem><para> 1208maximum number of SSIDs the device can scan 1209for in any given scheduled scan 1210 </para></listitem> 1211 </varlistentry> 1212 <varlistentry> <term>max_match_sets</term> 1213 <listitem><para> 1214maximum number of match sets the device can handle 1215when performing a scheduled scan, 0 if filtering is not 1216supported. 1217 </para></listitem> 1218 </varlistentry> 1219 <varlistentry> <term>max_scan_ie_len</term> 1220 <listitem><para> 1221maximum length of user-controlled IEs device can 1222add to probe request frames transmitted during a scan, must not 1223include fixed IEs like supported rates 1224 </para></listitem> 1225 </varlistentry> 1226 <varlistentry> <term>max_sched_scan_ie_len</term> 1227 <listitem><para> 1228same as max_scan_ie_len, but for scheduled 1229scans 1230 </para></listitem> 1231 </varlistentry> 1232 <varlistentry> <term>n_cipher_suites</term> 1233 <listitem><para> 1234number of supported cipher suites 1235 </para></listitem> 1236 </varlistentry> 1237 <varlistentry> <term>cipher_suites</term> 1238 <listitem><para> 1239supported cipher suites 1240 </para></listitem> 1241 </varlistentry> 1242 <varlistentry> <term>retry_short</term> 1243 <listitem><para> 1244Retry limit for short frames (dot11ShortRetryLimit) 1245 </para></listitem> 1246 </varlistentry> 1247 <varlistentry> <term>retry_long</term> 1248 <listitem><para> 1249Retry limit for long frames (dot11LongRetryLimit) 1250 </para></listitem> 1251 </varlistentry> 1252 <varlistentry> <term>frag_threshold</term> 1253 <listitem><para> 1254Fragmentation threshold (dot11FragmentationThreshold); 1255-1 = fragmentation disabled, only odd values >= 256 used 1256 </para></listitem> 1257 </varlistentry> 1258 <varlistentry> <term>rts_threshold</term> 1259 <listitem><para> 1260RTS threshold (dot11RTSThreshold); -1 = RTS/CTS disabled 1261 </para></listitem> 1262 </varlistentry> 1263 <varlistentry> <term>coverage_class</term> 1264 <listitem><para> 1265current coverage class 1266 </para></listitem> 1267 </varlistentry> 1268 <varlistentry> <term>fw_version[ETHTOOL_FWVERS_LEN]</term> 1269 <listitem><para> 1270firmware version for ethtool reporting 1271 </para></listitem> 1272 </varlistentry> 1273 <varlistentry> <term>hw_version</term> 1274 <listitem><para> 1275hardware version for ethtool reporting 1276 </para></listitem> 1277 </varlistentry> 1278 <varlistentry> <term>wowlan</term> 1279 <listitem><para> 1280WoWLAN support information 1281 </para></listitem> 1282 </varlistentry> 1283 <varlistentry> <term>wowlan_config</term> 1284 <listitem><para> 1285current WoWLAN configuration; this should usually not be 1286used since access to it is necessarily racy, use the parameter passed 1287to the <function>suspend</function> operation instead. 1288 </para></listitem> 1289 </varlistentry> 1290 <varlistentry> <term>max_remain_on_channel_duration</term> 1291 <listitem><para> 1292Maximum time a remain-on-channel operation 1293may request, if implemented. 1294 </para></listitem> 1295 </varlistentry> 1296 <varlistentry> <term>max_num_pmkids</term> 1297 <listitem><para> 1298maximum number of PMKIDs supported by device 1299 </para></listitem> 1300 </varlistentry> 1301 <varlistentry> <term>available_antennas_tx</term> 1302 <listitem><para> 1303bitmap of antennas which are available to be 1304configured as TX antennas. Antenna configuration commands will be 1305rejected unless this or <parameter>available_antennas_rx</parameter> is set. 1306 </para></listitem> 1307 </varlistentry> 1308 <varlistentry> <term>available_antennas_rx</term> 1309 <listitem><para> 1310bitmap of antennas which are available to be 1311configured as RX antennas. Antenna configuration commands will be 1312rejected unless this or <parameter>available_antennas_tx</parameter> is set. 1313 </para></listitem> 1314 </varlistentry> 1315 <varlistentry> <term>probe_resp_offload</term> 1316 <listitem><para> 1317Bitmap of supported protocols for probe response offloading. 1318See <structname>enum</structname> nl80211_probe_resp_offload_support_attr. Only valid 1319when the wiphy flag <parameter>WIPHY_FLAG_AP_PROBE_RESP_OFFLOAD</parameter> is set. 1320 </para></listitem> 1321 </varlistentry> 1322 <varlistentry> <term>extended_capabilities</term> 1323 <listitem><para> 1324extended capabilities supported by the driver, 1325additional capabilities might be supported by userspace; these are 1326the 802.11 extended capabilities (<quote>Extended Capabilities element</quote>) 1327and are in the same format as in the information element. See 1328802.11-2012 8.4.2.29 for the defined fields. 1329 </para></listitem> 1330 </varlistentry> 1331 <varlistentry> <term>extended_capabilities_mask</term> 1332 <listitem><para> 1333mask of the valid values 1334 </para></listitem> 1335 </varlistentry> 1336 <varlistentry> <term>extended_capabilities_len</term> 1337 <listitem><para> 1338length of the extended capabilities 1339 </para></listitem> 1340 </varlistentry> 1341 <varlistentry> <term>privid</term> 1342 <listitem><para> 1343a pointer that drivers can use to identify if an arbitrary 1344wiphy is theirs, e.g. in global notifiers 1345 </para></listitem> 1346 </varlistentry> 1347 <varlistentry> <term>bands[IEEE80211_NUM_BANDS]</term> 1348 <listitem><para> 1349information about bands/channels supported by this device 1350 </para></listitem> 1351 </varlistentry> 1352 <varlistentry> <term>reg_notifier</term> 1353 <listitem><para> 1354the driver's regulatory notification callback, 1355note that if your driver uses <function>wiphy_apply_custom_regulatory</function> 1356the reg_notifier's request can be passed as NULL 1357 </para></listitem> 1358 </varlistentry> 1359 <varlistentry> <term>regd</term> 1360 <listitem><para> 1361the driver's regulatory domain, if one was requested via 1362the <function>regulatory_hint</function> API. This can be used by the driver 1363on the <function>reg_notifier</function> if it chooses to ignore future 1364regulatory domain changes caused by other drivers. 1365 </para></listitem> 1366 </varlistentry> 1367 <varlistentry> <term>dev</term> 1368 <listitem><para> 1369(virtual) struct device for this wiphy 1370 </para></listitem> 1371 </varlistentry> 1372 <varlistentry> <term>registered</term> 1373 <listitem><para> 1374helps synchronize suspend/resume with wiphy unregister 1375 </para></listitem> 1376 </varlistentry> 1377 <varlistentry> <term>debugfsdir</term> 1378 <listitem><para> 1379debugfs directory used for this wiphy, will be renamed 1380automatically on wiphy renames 1381 </para></listitem> 1382 </varlistentry> 1383 <varlistentry> <term>ht_capa_mod_mask</term> 1384 <listitem><para> 1385Specify what ht_cap values can be over-ridden. 1386If null, then none can be over-ridden. 1387 </para></listitem> 1388 </varlistentry> 1389 <varlistentry> <term>vht_capa_mod_mask</term> 1390 <listitem><para> 1391Specify what VHT capabilities can be over-ridden. 1392If null, then none can be over-ridden. 1393 </para></listitem> 1394 </varlistentry> 1395 <varlistentry> <term>_net</term> 1396 <listitem><para> 1397the network namespace this wiphy currently lives in 1398 </para></listitem> 1399 </varlistentry> 1400 <varlistentry> <term>wext</term> 1401 <listitem><para> 1402wireless extension handlers 1403 </para></listitem> 1404 </varlistentry> 1405 <varlistentry> <term>coalesce</term> 1406 <listitem><para> 1407packet coalescing support information 1408 </para></listitem> 1409 </varlistentry> 1410 <varlistentry> <term>vendor_commands</term> 1411 <listitem><para> 1412array of vendor commands supported by the hardware 1413 </para></listitem> 1414 </varlistentry> 1415 <varlistentry> <term>vendor_events</term> 1416 <listitem><para> 1417array of vendor events supported by the hardware 1418 </para></listitem> 1419 </varlistentry> 1420 <varlistentry> <term>n_vendor_commands</term> 1421 <listitem><para> 1422number of vendor commands 1423 </para></listitem> 1424 </varlistentry> 1425 <varlistentry> <term>n_vendor_events</term> 1426 <listitem><para> 1427number of vendor events 1428 </para></listitem> 1429 </varlistentry> 1430 <varlistentry> <term>max_ap_assoc_sta</term> 1431 <listitem><para> 1432maximum number of associated stations supported in AP mode 1433(including P2P GO) or 0 to indicate no such limit is advertised. The 1434driver is allowed to advertise a theoretical limit that it can reach in 1435some cases, but may not always reach. 1436 </para></listitem> 1437 </varlistentry> 1438 <varlistentry> <term>max_num_csa_counters</term> 1439 <listitem><para> 1440Number of supported csa_counters in beacons 1441and probe responses. This value should be set if the driver 1442wishes to limit the number of csa counters. Default (0) means 1443infinite. 1444 </para></listitem> 1445 </varlistentry> 1446 <varlistentry> <term>max_adj_channel_rssi_comp</term> 1447 <listitem><para> 1448max offset of between the channel on which the 1449frame was sent and the channel on which the frame was heard for which 1450the reported rssi is still valid. If a driver is able to compensate the 1451low rssi when a frame is heard on different channel, then it should set 1452this variable to the maximal offset for which it can compensate. 1453This value should be set in MHz. 1454 </para></listitem> 1455 </varlistentry> 1456 <varlistentry> <term>priv[0]</term> 1457 <listitem><para> 1458driver private data (sized according to <function>wiphy_new</function> parameter) 1459 </para></listitem> 1460 </varlistentry> 1461 </variablelist> 1462 </refsect1> 1463</refentry> 1464 1465<refentry id="API-struct-wireless-dev"> 1466<refentryinfo> 1467 <title>LINUX</title> 1468 <productname>Kernel Hackers Manual</productname> 1469 <date>July 2017</date> 1470</refentryinfo> 1471<refmeta> 1472 <refentrytitle><phrase>struct wireless_dev</phrase></refentrytitle> 1473 <manvolnum>9</manvolnum> 1474 <refmiscinfo class="version">4.1.27</refmiscinfo> 1475</refmeta> 1476<refnamediv> 1477 <refname>struct wireless_dev</refname> 1478 <refpurpose> 1479 wireless device state 1480 </refpurpose> 1481</refnamediv> 1482<refsynopsisdiv> 1483 <title>Synopsis</title> 1484 <programlisting> 1485struct wireless_dev { 1486 struct wiphy * wiphy; 1487 enum nl80211_iftype iftype; 1488 struct list_head list; 1489 struct net_device * netdev; 1490 u32 identifier; 1491 struct list_head mgmt_registrations; 1492 spinlock_t mgmt_registrations_lock; 1493 struct mutex mtx; 1494 bool use_4addr; 1495 bool p2p_started; 1496 u8 address[ETH_ALEN]; 1497 u8 ssid[IEEE80211_MAX_SSID_LEN]; 1498 u8 ssid_len; 1499 u8 mesh_id_len; 1500 u8 mesh_id_up_len; 1501 struct cfg80211_conn * conn; 1502 struct cfg80211_cached_keys * connect_keys; 1503 struct list_head event_list; 1504 spinlock_t event_lock; 1505 struct cfg80211_internal_bss * current_bss; 1506 struct cfg80211_chan_def preset_chandef; 1507 struct cfg80211_chan_def chandef; 1508 bool ibss_fixed; 1509 bool ibss_dfs_possible; 1510 bool ps; 1511 int ps_timeout; 1512 int beacon_interval; 1513 u32 ap_unexpected_nlportid; 1514 bool cac_started; 1515 unsigned long cac_start_time; 1516 unsigned int cac_time_ms; 1517 u32 owner_nlportid; 1518#ifdef CONFIG_CFG80211_WEXT 1519 struct wext; 1520#endif 1521}; </programlisting> 1522</refsynopsisdiv> 1523 <refsect1> 1524 <title>Members</title> 1525 <variablelist> 1526 <varlistentry> <term>wiphy</term> 1527 <listitem><para> 1528pointer to hardware description 1529 </para></listitem> 1530 </varlistentry> 1531 <varlistentry> <term>iftype</term> 1532 <listitem><para> 1533interface type 1534 </para></listitem> 1535 </varlistentry> 1536 <varlistentry> <term>list</term> 1537 <listitem><para> 1538(private) Used to collect the interfaces 1539 </para></listitem> 1540 </varlistentry> 1541 <varlistentry> <term>netdev</term> 1542 <listitem><para> 1543(private) Used to reference back to the netdev, may be <constant>NULL</constant> 1544 </para></listitem> 1545 </varlistentry> 1546 <varlistentry> <term>identifier</term> 1547 <listitem><para> 1548(private) Identifier used in nl80211 to identify this 1549wireless device if it has no netdev 1550 </para></listitem> 1551 </varlistentry> 1552 <varlistentry> <term>mgmt_registrations</term> 1553 <listitem><para> 1554list of registrations for management frames 1555 </para></listitem> 1556 </varlistentry> 1557 <varlistentry> <term>mgmt_registrations_lock</term> 1558 <listitem><para> 1559lock for the list 1560 </para></listitem> 1561 </varlistentry> 1562 <varlistentry> <term>mtx</term> 1563 <listitem><para> 1564mutex used to lock data in this struct, may be used by drivers 1565and some API functions require it held 1566 </para></listitem> 1567 </varlistentry> 1568 <varlistentry> <term>use_4addr</term> 1569 <listitem><para> 1570indicates 4addr mode is used on this interface, must be 1571set by driver (if supported) on add_interface BEFORE registering the 1572netdev and may otherwise be used by driver read-only, will be update 1573by cfg80211 on change_interface 1574 </para></listitem> 1575 </varlistentry> 1576 <varlistentry> <term>p2p_started</term> 1577 <listitem><para> 1578true if this is a P2P Device that has been started 1579 </para></listitem> 1580 </varlistentry> 1581 <varlistentry> <term>address[ETH_ALEN]</term> 1582 <listitem><para> 1583The address for this device, valid only if <parameter>netdev</parameter> is <constant>NULL</constant> 1584 </para></listitem> 1585 </varlistentry> 1586 <varlistentry> <term>ssid[IEEE80211_MAX_SSID_LEN]</term> 1587 <listitem><para> 1588(private) Used by the internal configuration code 1589 </para></listitem> 1590 </varlistentry> 1591 <varlistentry> <term>ssid_len</term> 1592 <listitem><para> 1593(private) Used by the internal configuration code 1594 </para></listitem> 1595 </varlistentry> 1596 <varlistentry> <term>mesh_id_len</term> 1597 <listitem><para> 1598(private) Used by the internal configuration code 1599 </para></listitem> 1600 </varlistentry> 1601 <varlistentry> <term>mesh_id_up_len</term> 1602 <listitem><para> 1603(private) Used by the internal configuration code 1604 </para></listitem> 1605 </varlistentry> 1606 <varlistentry> <term>conn</term> 1607 <listitem><para> 1608(private) cfg80211 software SME connection state machine data 1609 </para></listitem> 1610 </varlistentry> 1611 <varlistentry> <term>connect_keys</term> 1612 <listitem><para> 1613(private) keys to set after connection is established 1614 </para></listitem> 1615 </varlistentry> 1616 <varlistentry> <term>event_list</term> 1617 <listitem><para> 1618(private) list for internal event processing 1619 </para></listitem> 1620 </varlistentry> 1621 <varlistentry> <term>event_lock</term> 1622 <listitem><para> 1623(private) lock for event list 1624 </para></listitem> 1625 </varlistentry> 1626 <varlistentry> <term>current_bss</term> 1627 <listitem><para> 1628(private) Used by the internal configuration code 1629 </para></listitem> 1630 </varlistentry> 1631 <varlistentry> <term>preset_chandef</term> 1632 <listitem><para> 1633(private) Used by the internal configuration code to 1634track the channel to be used for AP later 1635 </para></listitem> 1636 </varlistentry> 1637 <varlistentry> <term>chandef</term> 1638 <listitem><para> 1639(private) Used by the internal configuration code to track 1640the user-set channel definition. 1641 </para></listitem> 1642 </varlistentry> 1643 <varlistentry> <term>ibss_fixed</term> 1644 <listitem><para> 1645(private) IBSS is using fixed BSSID 1646 </para></listitem> 1647 </varlistentry> 1648 <varlistentry> <term>ibss_dfs_possible</term> 1649 <listitem><para> 1650(private) IBSS may change to a DFS channel 1651 </para></listitem> 1652 </varlistentry> 1653 <varlistentry> <term>ps</term> 1654 <listitem><para> 1655powersave mode is enabled 1656 </para></listitem> 1657 </varlistentry> 1658 <varlistentry> <term>ps_timeout</term> 1659 <listitem><para> 1660dynamic powersave timeout 1661 </para></listitem> 1662 </varlistentry> 1663 <varlistentry> <term>beacon_interval</term> 1664 <listitem><para> 1665beacon interval used on this device for transmitting 1666beacons, 0 when not valid 1667 </para></listitem> 1668 </varlistentry> 1669 <varlistentry> <term>ap_unexpected_nlportid</term> 1670 <listitem><para> 1671(private) netlink port ID of application 1672registered for unexpected class 3 frames (AP mode) 1673 </para></listitem> 1674 </varlistentry> 1675 <varlistentry> <term>cac_started</term> 1676 <listitem><para> 1677true if DFS channel availability check has been started 1678 </para></listitem> 1679 </varlistentry> 1680 <varlistentry> <term>cac_start_time</term> 1681 <listitem><para> 1682timestamp (jiffies) when the dfs state was entered. 1683 </para></listitem> 1684 </varlistentry> 1685 <varlistentry> <term>cac_time_ms</term> 1686 <listitem><para> 1687CAC time in ms 1688 </para></listitem> 1689 </varlistentry> 1690 <varlistentry> <term>owner_nlportid</term> 1691 <listitem><para> 1692(private) owner socket port ID 1693 </para></listitem> 1694 </varlistentry> 1695 <varlistentry> <term>wext</term> 1696 <listitem><para> 1697(private) Used by the internal wireless extensions compat code 1698 </para></listitem> 1699 </varlistentry> 1700 </variablelist> 1701 </refsect1> 1702<refsect1> 1703<title>Description</title> 1704<para> 1705 </para><para> 1706 1707 For netdevs, this structure must be allocated by the driver 1708 that uses the ieee80211_ptr field in struct net_device (this 1709 is intentional so it can be allocated along with the netdev.) 1710 It need not be registered then as netdev registration will 1711 be intercepted by cfg80211 to see the new wireless device. 1712 </para><para> 1713 1714 For non-netdev uses, it must also be allocated by the driver 1715 in response to the cfg80211 callbacks that require it, as 1716 there's no netdev registration in that case it may not be 1717 allocated outside of callback operations that return it. 1718</para> 1719</refsect1> 1720</refentry> 1721 1722<refentry id="API-wiphy-new"> 1723<refentryinfo> 1724 <title>LINUX</title> 1725 <productname>Kernel Hackers Manual</productname> 1726 <date>July 2017</date> 1727</refentryinfo> 1728<refmeta> 1729 <refentrytitle><phrase>wiphy_new</phrase></refentrytitle> 1730 <manvolnum>9</manvolnum> 1731 <refmiscinfo class="version">4.1.27</refmiscinfo> 1732</refmeta> 1733<refnamediv> 1734 <refname>wiphy_new</refname> 1735 <refpurpose> 1736 create a new wiphy for use with cfg80211 1737 </refpurpose> 1738</refnamediv> 1739<refsynopsisdiv> 1740 <title>Synopsis</title> 1741 <funcsynopsis><funcprototype> 1742 <funcdef>struct wiphy * <function>wiphy_new </function></funcdef> 1743 <paramdef>const struct cfg80211_ops * <parameter>ops</parameter></paramdef> 1744 <paramdef>int <parameter>sizeof_priv</parameter></paramdef> 1745 </funcprototype></funcsynopsis> 1746</refsynopsisdiv> 1747<refsect1> 1748 <title>Arguments</title> 1749 <variablelist> 1750 <varlistentry> 1751 <term><parameter>ops</parameter></term> 1752 <listitem> 1753 <para> 1754 The configuration operations for this device 1755 </para> 1756 </listitem> 1757 </varlistentry> 1758 <varlistentry> 1759 <term><parameter>sizeof_priv</parameter></term> 1760 <listitem> 1761 <para> 1762 The size of the private area to allocate 1763 </para> 1764 </listitem> 1765 </varlistentry> 1766 </variablelist> 1767</refsect1> 1768<refsect1> 1769<title>Description</title> 1770<para> 1771 Create a new wiphy and associate the given operations with it. 1772 <parameter>sizeof_priv</parameter> bytes are allocated for private use. 1773</para> 1774</refsect1> 1775<refsect1> 1776<title>Return</title> 1777<para> 1778 A pointer to the new wiphy. This pointer must be 1779 assigned to each netdev's ieee80211_ptr for proper operation. 1780</para> 1781</refsect1> 1782</refentry> 1783 1784<refentry id="API-wiphy-register"> 1785<refentryinfo> 1786 <title>LINUX</title> 1787 <productname>Kernel Hackers Manual</productname> 1788 <date>July 2017</date> 1789</refentryinfo> 1790<refmeta> 1791 <refentrytitle><phrase>wiphy_register</phrase></refentrytitle> 1792 <manvolnum>9</manvolnum> 1793 <refmiscinfo class="version">4.1.27</refmiscinfo> 1794</refmeta> 1795<refnamediv> 1796 <refname>wiphy_register</refname> 1797 <refpurpose> 1798 register a wiphy with cfg80211 1799 </refpurpose> 1800</refnamediv> 1801<refsynopsisdiv> 1802 <title>Synopsis</title> 1803 <funcsynopsis><funcprototype> 1804 <funcdef>int <function>wiphy_register </function></funcdef> 1805 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 1806 </funcprototype></funcsynopsis> 1807</refsynopsisdiv> 1808<refsect1> 1809 <title>Arguments</title> 1810 <variablelist> 1811 <varlistentry> 1812 <term><parameter>wiphy</parameter></term> 1813 <listitem> 1814 <para> 1815 The wiphy to register. 1816 </para> 1817 </listitem> 1818 </varlistentry> 1819 </variablelist> 1820</refsect1> 1821<refsect1> 1822<title>Return</title> 1823<para> 1824 A non-negative wiphy index or a negative error code. 1825</para> 1826</refsect1> 1827</refentry> 1828 1829<refentry id="API-wiphy-unregister"> 1830<refentryinfo> 1831 <title>LINUX</title> 1832 <productname>Kernel Hackers Manual</productname> 1833 <date>July 2017</date> 1834</refentryinfo> 1835<refmeta> 1836 <refentrytitle><phrase>wiphy_unregister</phrase></refentrytitle> 1837 <manvolnum>9</manvolnum> 1838 <refmiscinfo class="version">4.1.27</refmiscinfo> 1839</refmeta> 1840<refnamediv> 1841 <refname>wiphy_unregister</refname> 1842 <refpurpose> 1843 deregister a wiphy from cfg80211 1844 </refpurpose> 1845</refnamediv> 1846<refsynopsisdiv> 1847 <title>Synopsis</title> 1848 <funcsynopsis><funcprototype> 1849 <funcdef>void <function>wiphy_unregister </function></funcdef> 1850 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 1851 </funcprototype></funcsynopsis> 1852</refsynopsisdiv> 1853<refsect1> 1854 <title>Arguments</title> 1855 <variablelist> 1856 <varlistentry> 1857 <term><parameter>wiphy</parameter></term> 1858 <listitem> 1859 <para> 1860 The wiphy to unregister. 1861 </para> 1862 </listitem> 1863 </varlistentry> 1864 </variablelist> 1865</refsect1> 1866<refsect1> 1867<title>Description</title> 1868<para> 1869 After this call, no more requests can be made with this priv 1870 pointer, but the call may sleep to wait for an outstanding 1871 request that is being handled. 1872</para> 1873</refsect1> 1874</refentry> 1875 1876<refentry id="API-wiphy-free"> 1877<refentryinfo> 1878 <title>LINUX</title> 1879 <productname>Kernel Hackers Manual</productname> 1880 <date>July 2017</date> 1881</refentryinfo> 1882<refmeta> 1883 <refentrytitle><phrase>wiphy_free</phrase></refentrytitle> 1884 <manvolnum>9</manvolnum> 1885 <refmiscinfo class="version">4.1.27</refmiscinfo> 1886</refmeta> 1887<refnamediv> 1888 <refname>wiphy_free</refname> 1889 <refpurpose> 1890 free wiphy 1891 </refpurpose> 1892</refnamediv> 1893<refsynopsisdiv> 1894 <title>Synopsis</title> 1895 <funcsynopsis><funcprototype> 1896 <funcdef>void <function>wiphy_free </function></funcdef> 1897 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 1898 </funcprototype></funcsynopsis> 1899</refsynopsisdiv> 1900<refsect1> 1901 <title>Arguments</title> 1902 <variablelist> 1903 <varlistentry> 1904 <term><parameter>wiphy</parameter></term> 1905 <listitem> 1906 <para> 1907 The wiphy to free 1908 </para> 1909 </listitem> 1910 </varlistentry> 1911 </variablelist> 1912</refsect1> 1913</refentry> 1914 1915 1916<refentry id="API-wiphy-name"> 1917<refentryinfo> 1918 <title>LINUX</title> 1919 <productname>Kernel Hackers Manual</productname> 1920 <date>July 2017</date> 1921</refentryinfo> 1922<refmeta> 1923 <refentrytitle><phrase>wiphy_name</phrase></refentrytitle> 1924 <manvolnum>9</manvolnum> 1925 <refmiscinfo class="version">4.1.27</refmiscinfo> 1926</refmeta> 1927<refnamediv> 1928 <refname>wiphy_name</refname> 1929 <refpurpose> 1930 get wiphy name 1931 </refpurpose> 1932</refnamediv> 1933<refsynopsisdiv> 1934 <title>Synopsis</title> 1935 <funcsynopsis><funcprototype> 1936 <funcdef>const char * <function>wiphy_name </function></funcdef> 1937 <paramdef>const struct wiphy * <parameter>wiphy</parameter></paramdef> 1938 </funcprototype></funcsynopsis> 1939</refsynopsisdiv> 1940<refsect1> 1941 <title>Arguments</title> 1942 <variablelist> 1943 <varlistentry> 1944 <term><parameter>wiphy</parameter></term> 1945 <listitem> 1946 <para> 1947 The wiphy whose name to return 1948 </para> 1949 </listitem> 1950 </varlistentry> 1951 </variablelist> 1952</refsect1> 1953<refsect1> 1954<title>Return</title> 1955<para> 1956 The name of <parameter>wiphy</parameter>. 1957</para> 1958</refsect1> 1959</refentry> 1960 1961<refentry id="API-wiphy-dev"> 1962<refentryinfo> 1963 <title>LINUX</title> 1964 <productname>Kernel Hackers Manual</productname> 1965 <date>July 2017</date> 1966</refentryinfo> 1967<refmeta> 1968 <refentrytitle><phrase>wiphy_dev</phrase></refentrytitle> 1969 <manvolnum>9</manvolnum> 1970 <refmiscinfo class="version">4.1.27</refmiscinfo> 1971</refmeta> 1972<refnamediv> 1973 <refname>wiphy_dev</refname> 1974 <refpurpose> 1975 get wiphy dev pointer 1976 </refpurpose> 1977</refnamediv> 1978<refsynopsisdiv> 1979 <title>Synopsis</title> 1980 <funcsynopsis><funcprototype> 1981 <funcdef>struct device * <function>wiphy_dev </function></funcdef> 1982 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 1983 </funcprototype></funcsynopsis> 1984</refsynopsisdiv> 1985<refsect1> 1986 <title>Arguments</title> 1987 <variablelist> 1988 <varlistentry> 1989 <term><parameter>wiphy</parameter></term> 1990 <listitem> 1991 <para> 1992 The wiphy whose device struct to look up 1993 </para> 1994 </listitem> 1995 </varlistentry> 1996 </variablelist> 1997</refsect1> 1998<refsect1> 1999<title>Return</title> 2000<para> 2001 The dev of <parameter>wiphy</parameter>. 2002</para> 2003</refsect1> 2004</refentry> 2005 2006<refentry id="API-wiphy-priv"> 2007<refentryinfo> 2008 <title>LINUX</title> 2009 <productname>Kernel Hackers Manual</productname> 2010 <date>July 2017</date> 2011</refentryinfo> 2012<refmeta> 2013 <refentrytitle><phrase>wiphy_priv</phrase></refentrytitle> 2014 <manvolnum>9</manvolnum> 2015 <refmiscinfo class="version">4.1.27</refmiscinfo> 2016</refmeta> 2017<refnamediv> 2018 <refname>wiphy_priv</refname> 2019 <refpurpose> 2020 return priv from wiphy 2021 </refpurpose> 2022</refnamediv> 2023<refsynopsisdiv> 2024 <title>Synopsis</title> 2025 <funcsynopsis><funcprototype> 2026 <funcdef>void * <function>wiphy_priv </function></funcdef> 2027 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 2028 </funcprototype></funcsynopsis> 2029</refsynopsisdiv> 2030<refsect1> 2031 <title>Arguments</title> 2032 <variablelist> 2033 <varlistentry> 2034 <term><parameter>wiphy</parameter></term> 2035 <listitem> 2036 <para> 2037 the wiphy whose priv pointer to return 2038 </para> 2039 </listitem> 2040 </varlistentry> 2041 </variablelist> 2042</refsect1> 2043<refsect1> 2044<title>Return</title> 2045<para> 2046 The priv of <parameter>wiphy</parameter>. 2047</para> 2048</refsect1> 2049</refentry> 2050 2051<refentry id="API-priv-to-wiphy"> 2052<refentryinfo> 2053 <title>LINUX</title> 2054 <productname>Kernel Hackers Manual</productname> 2055 <date>July 2017</date> 2056</refentryinfo> 2057<refmeta> 2058 <refentrytitle><phrase>priv_to_wiphy</phrase></refentrytitle> 2059 <manvolnum>9</manvolnum> 2060 <refmiscinfo class="version">4.1.27</refmiscinfo> 2061</refmeta> 2062<refnamediv> 2063 <refname>priv_to_wiphy</refname> 2064 <refpurpose> 2065 return the wiphy containing the priv 2066 </refpurpose> 2067</refnamediv> 2068<refsynopsisdiv> 2069 <title>Synopsis</title> 2070 <funcsynopsis><funcprototype> 2071 <funcdef>struct wiphy * <function>priv_to_wiphy </function></funcdef> 2072 <paramdef>void * <parameter>priv</parameter></paramdef> 2073 </funcprototype></funcsynopsis> 2074</refsynopsisdiv> 2075<refsect1> 2076 <title>Arguments</title> 2077 <variablelist> 2078 <varlistentry> 2079 <term><parameter>priv</parameter></term> 2080 <listitem> 2081 <para> 2082 a pointer previously returned by wiphy_priv 2083 </para> 2084 </listitem> 2085 </varlistentry> 2086 </variablelist> 2087</refsect1> 2088<refsect1> 2089<title>Return</title> 2090<para> 2091 The wiphy of <parameter>priv</parameter>. 2092</para> 2093</refsect1> 2094</refentry> 2095 2096<refentry id="API-set-wiphy-dev"> 2097<refentryinfo> 2098 <title>LINUX</title> 2099 <productname>Kernel Hackers Manual</productname> 2100 <date>July 2017</date> 2101</refentryinfo> 2102<refmeta> 2103 <refentrytitle><phrase>set_wiphy_dev</phrase></refentrytitle> 2104 <manvolnum>9</manvolnum> 2105 <refmiscinfo class="version">4.1.27</refmiscinfo> 2106</refmeta> 2107<refnamediv> 2108 <refname>set_wiphy_dev</refname> 2109 <refpurpose> 2110 set device pointer for wiphy 2111 </refpurpose> 2112</refnamediv> 2113<refsynopsisdiv> 2114 <title>Synopsis</title> 2115 <funcsynopsis><funcprototype> 2116 <funcdef>void <function>set_wiphy_dev </function></funcdef> 2117 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 2118 <paramdef>struct device * <parameter>dev</parameter></paramdef> 2119 </funcprototype></funcsynopsis> 2120</refsynopsisdiv> 2121<refsect1> 2122 <title>Arguments</title> 2123 <variablelist> 2124 <varlistentry> 2125 <term><parameter>wiphy</parameter></term> 2126 <listitem> 2127 <para> 2128 The wiphy whose device to bind 2129 </para> 2130 </listitem> 2131 </varlistentry> 2132 <varlistentry> 2133 <term><parameter>dev</parameter></term> 2134 <listitem> 2135 <para> 2136 The device to parent it to 2137 </para> 2138 </listitem> 2139 </varlistentry> 2140 </variablelist> 2141</refsect1> 2142</refentry> 2143 2144<refentry id="API-wdev-priv"> 2145<refentryinfo> 2146 <title>LINUX</title> 2147 <productname>Kernel Hackers Manual</productname> 2148 <date>July 2017</date> 2149</refentryinfo> 2150<refmeta> 2151 <refentrytitle><phrase>wdev_priv</phrase></refentrytitle> 2152 <manvolnum>9</manvolnum> 2153 <refmiscinfo class="version">4.1.27</refmiscinfo> 2154</refmeta> 2155<refnamediv> 2156 <refname>wdev_priv</refname> 2157 <refpurpose> 2158 return wiphy priv from wireless_dev 2159 </refpurpose> 2160</refnamediv> 2161<refsynopsisdiv> 2162 <title>Synopsis</title> 2163 <funcsynopsis><funcprototype> 2164 <funcdef>void * <function>wdev_priv </function></funcdef> 2165 <paramdef>struct wireless_dev * <parameter>wdev</parameter></paramdef> 2166 </funcprototype></funcsynopsis> 2167</refsynopsisdiv> 2168<refsect1> 2169 <title>Arguments</title> 2170 <variablelist> 2171 <varlistentry> 2172 <term><parameter>wdev</parameter></term> 2173 <listitem> 2174 <para> 2175 The wireless device whose wiphy's priv pointer to return 2176 </para> 2177 </listitem> 2178 </varlistentry> 2179 </variablelist> 2180</refsect1> 2181<refsect1> 2182<title>Return</title> 2183<para> 2184 The wiphy priv of <parameter>wdev</parameter>. 2185</para> 2186</refsect1> 2187</refentry> 2188 2189<refentry id="API-struct-ieee80211-iface-limit"> 2190<refentryinfo> 2191 <title>LINUX</title> 2192 <productname>Kernel Hackers Manual</productname> 2193 <date>July 2017</date> 2194</refentryinfo> 2195<refmeta> 2196 <refentrytitle><phrase>struct ieee80211_iface_limit</phrase></refentrytitle> 2197 <manvolnum>9</manvolnum> 2198 <refmiscinfo class="version">4.1.27</refmiscinfo> 2199</refmeta> 2200<refnamediv> 2201 <refname>struct ieee80211_iface_limit</refname> 2202 <refpurpose> 2203 limit on certain interface types 2204 </refpurpose> 2205</refnamediv> 2206<refsynopsisdiv> 2207 <title>Synopsis</title> 2208 <programlisting> 2209struct ieee80211_iface_limit { 2210 u16 max; 2211 u16 types; 2212}; </programlisting> 2213</refsynopsisdiv> 2214 <refsect1> 2215 <title>Members</title> 2216 <variablelist> 2217 <varlistentry> <term>max</term> 2218 <listitem><para> 2219maximum number of interfaces of these types 2220 </para></listitem> 2221 </varlistentry> 2222 <varlistentry> <term>types</term> 2223 <listitem><para> 2224interface types (bits) 2225 </para></listitem> 2226 </varlistentry> 2227 </variablelist> 2228 </refsect1> 2229</refentry> 2230 2231<refentry id="API-struct-ieee80211-iface-combination"> 2232<refentryinfo> 2233 <title>LINUX</title> 2234 <productname>Kernel Hackers Manual</productname> 2235 <date>July 2017</date> 2236</refentryinfo> 2237<refmeta> 2238 <refentrytitle><phrase>struct ieee80211_iface_combination</phrase></refentrytitle> 2239 <manvolnum>9</manvolnum> 2240 <refmiscinfo class="version">4.1.27</refmiscinfo> 2241</refmeta> 2242<refnamediv> 2243 <refname>struct ieee80211_iface_combination</refname> 2244 <refpurpose> 2245 possible interface combination 2246 </refpurpose> 2247</refnamediv> 2248<refsynopsisdiv> 2249 <title>Synopsis</title> 2250 <programlisting> 2251struct ieee80211_iface_combination { 2252 const struct ieee80211_iface_limit * limits; 2253 u32 num_different_channels; 2254 u16 max_interfaces; 2255 u8 n_limits; 2256 bool beacon_int_infra_match; 2257 u8 radar_detect_widths; 2258 u8 radar_detect_regions; 2259}; </programlisting> 2260</refsynopsisdiv> 2261 <refsect1> 2262 <title>Members</title> 2263 <variablelist> 2264 <varlistentry> <term>limits</term> 2265 <listitem><para> 2266limits for the given interface types 2267 </para></listitem> 2268 </varlistentry> 2269 <varlistentry> <term>num_different_channels</term> 2270 <listitem><para> 2271can use up to this many different channels 2272 </para></listitem> 2273 </varlistentry> 2274 <varlistentry> <term>max_interfaces</term> 2275 <listitem><para> 2276maximum number of interfaces in total allowed in this 2277group 2278 </para></listitem> 2279 </varlistentry> 2280 <varlistentry> <term>n_limits</term> 2281 <listitem><para> 2282number of limitations 2283 </para></listitem> 2284 </varlistentry> 2285 <varlistentry> <term>beacon_int_infra_match</term> 2286 <listitem><para> 2287In this combination, the beacon intervals 2288between infrastructure and AP types must match. This is required 2289only in special cases. 2290 </para></listitem> 2291 </varlistentry> 2292 <varlistentry> <term>radar_detect_widths</term> 2293 <listitem><para> 2294bitmap of channel widths supported for radar detection 2295 </para></listitem> 2296 </varlistentry> 2297 <varlistentry> <term>radar_detect_regions</term> 2298 <listitem><para> 2299bitmap of regions supported for radar detection 2300 </para></listitem> 2301 </varlistentry> 2302 </variablelist> 2303 </refsect1> 2304<refsect1> 2305<title>Description</title> 2306<para> 2307 With this structure the driver can describe which interface 2308 combinations it supports concurrently. 2309</para> 2310</refsect1> 2311<refsect1> 2312<title>Examples</title> 2313<informalexample><programlisting> 2314 2315 1. Allow #STA <= 1, #AP <= 1, matching BI, channels = 1, 2 total: 2316 2317 struct ieee80211_iface_limit limits1[] = { 2318 { .max = 1, .types = BIT(NL80211_IFTYPE_STATION), }, 2319 { .max = 1, .types = BIT(NL80211_IFTYPE_AP}, }, 2320 }; 2321 struct ieee80211_iface_combination combination1 = { 2322 .limits = limits1, 2323 .n_limits = ARRAY_SIZE(limits1), 2324 .max_interfaces = 2, 2325 .beacon_int_infra_match = true, 2326 }; 2327 2328 2329 2. Allow #{AP, P2P-GO} <= 8, channels = 1, 8 total: 2330 2331 struct ieee80211_iface_limit limits2[] = { 2332 { .max = 8, .types = BIT(NL80211_IFTYPE_AP) | 2333 BIT(NL80211_IFTYPE_P2P_GO), }, 2334 }; 2335 struct ieee80211_iface_combination combination2 = { 2336 .limits = limits2, 2337 .n_limits = ARRAY_SIZE(limits2), 2338 .max_interfaces = 8, 2339 .num_different_channels = 1, 2340 }; 2341 2342 2343 3. Allow #STA <= 1, #{P2P-client,P2P-GO} <= 3 on two channels, 4 total. 2344 2345 This allows for an infrastructure connection and three P2P connections. 2346 2347 struct ieee80211_iface_limit limits3[] = { 2348 { .max = 1, .types = BIT(NL80211_IFTYPE_STATION), }, 2349 { .max = 3, .types = BIT(NL80211_IFTYPE_P2P_GO) | 2350 BIT(NL80211_IFTYPE_P2P_CLIENT), }, 2351 }; 2352 struct ieee80211_iface_combination combination3 = { 2353 .limits = limits3, 2354 .n_limits = ARRAY_SIZE(limits3), 2355 .max_interfaces = 4, 2356 .num_different_channels = 2, 2357 }; 2358</programlisting></informalexample> 2359</refsect1> 2360</refentry> 2361 2362<refentry id="API-cfg80211-check-combinations"> 2363<refentryinfo> 2364 <title>LINUX</title> 2365 <productname>Kernel Hackers Manual</productname> 2366 <date>July 2017</date> 2367</refentryinfo> 2368<refmeta> 2369 <refentrytitle><phrase>cfg80211_check_combinations</phrase></refentrytitle> 2370 <manvolnum>9</manvolnum> 2371 <refmiscinfo class="version">4.1.27</refmiscinfo> 2372</refmeta> 2373<refnamediv> 2374 <refname>cfg80211_check_combinations</refname> 2375 <refpurpose> 2376 check interface combinations 2377 </refpurpose> 2378</refnamediv> 2379<refsynopsisdiv> 2380 <title>Synopsis</title> 2381 <funcsynopsis><funcprototype> 2382 <funcdef>int <function>cfg80211_check_combinations </function></funcdef> 2383 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 2384 <paramdef>const int <parameter>num_different_channels</parameter></paramdef> 2385 <paramdef>const u8 <parameter>radar_detect</parameter></paramdef> 2386 <paramdef>const int <parameter>iftype_num[NUM_NL80211_IFTYPES]</parameter></paramdef> 2387 </funcprototype></funcsynopsis> 2388</refsynopsisdiv> 2389<refsect1> 2390 <title>Arguments</title> 2391 <variablelist> 2392 <varlistentry> 2393 <term><parameter>wiphy</parameter></term> 2394 <listitem> 2395 <para> 2396 the wiphy 2397 </para> 2398 </listitem> 2399 </varlistentry> 2400 <varlistentry> 2401 <term><parameter>num_different_channels</parameter></term> 2402 <listitem> 2403 <para> 2404 the number of different channels we want 2405 to use for verification 2406 </para> 2407 </listitem> 2408 </varlistentry> 2409 <varlistentry> 2410 <term><parameter>radar_detect</parameter></term> 2411 <listitem> 2412 <para> 2413 a bitmap where each bit corresponds to a channel 2414 width where radar detection is needed, as in the definition of 2415 <structname>struct ieee80211_iface_combination</structname>.<parameter>radar_detect_widths</parameter> 2416 </para> 2417 </listitem> 2418 </varlistentry> 2419 <varlistentry> 2420 <term><parameter>iftype_num[NUM_NL80211_IFTYPES]</parameter></term> 2421 <listitem> 2422 <para> 2423 array with the numbers of interfaces of each interface 2424 type. The index is the interface type as specified in <structname>enum</structname> 2425 nl80211_iftype. 2426 </para> 2427 </listitem> 2428 </varlistentry> 2429 </variablelist> 2430</refsect1> 2431<refsect1> 2432<title>Description</title> 2433<para> 2434 This function can be called by the driver to check whether a 2435 combination of interfaces and their types are allowed according to 2436 the interface combinations. 2437</para> 2438</refsect1> 2439</refentry> 2440 2441 </chapter> 2442 <chapter> 2443 <title>Actions and configuration</title> 2444<para> 2445 </para><para> 2446 Each wireless device and each virtual interface offer a set of configuration 2447 operations and other actions that are invoked by userspace. Each of these 2448 actions is described in the operations structure, and the parameters these 2449 operations use are described separately. 2450 </para><para> 2451 Additionally, some operations are asynchronous and expect to get status 2452 information via some functions that drivers need to call. 2453 </para><para> 2454 Scanning and BSS list handling with its associated functionality is described 2455 in a separate chapter. 2456</para> 2457 2458<refentry id="API-struct-cfg80211-ops"> 2459<refentryinfo> 2460 <title>LINUX</title> 2461 <productname>Kernel Hackers Manual</productname> 2462 <date>July 2017</date> 2463</refentryinfo> 2464<refmeta> 2465 <refentrytitle><phrase>struct cfg80211_ops</phrase></refentrytitle> 2466 <manvolnum>9</manvolnum> 2467 <refmiscinfo class="version">4.1.27</refmiscinfo> 2468</refmeta> 2469<refnamediv> 2470 <refname>struct cfg80211_ops</refname> 2471 <refpurpose> 2472 backend description for wireless configuration 2473 </refpurpose> 2474</refnamediv> 2475<refsynopsisdiv> 2476 <title>Synopsis</title> 2477 <programlisting> 2478struct cfg80211_ops { 2479 int (* suspend) (struct wiphy *wiphy, struct cfg80211_wowlan *wow); 2480 int (* resume) (struct wiphy *wiphy); 2481 void (* set_wakeup) (struct wiphy *wiphy, bool enabled); 2482 struct wireless_dev * (* add_virtual_intf) (struct wiphy *wiphy,const char *name,unsigned char name_assign_type,enum nl80211_iftype type,u32 *flags,struct vif_params *params); 2483 int (* del_virtual_intf) (struct wiphy *wiphy,struct wireless_dev *wdev); 2484 int (* change_virtual_intf) (struct wiphy *wiphy,struct net_device *dev,enum nl80211_iftype type, u32 *flags,struct vif_params *params); 2485 int (* add_key) (struct wiphy *wiphy, struct net_device *netdev,u8 key_index, bool pairwise, const u8 *mac_addr,struct key_params *params); 2486 int (* get_key) (struct wiphy *wiphy, struct net_device *netdev,u8 key_index, bool pairwise, const u8 *mac_addr,void *cookie,void (*callback); 2487 int (* del_key) (struct wiphy *wiphy, struct net_device *netdev,u8 key_index, bool pairwise, const u8 *mac_addr); 2488 int (* set_default_key) (struct wiphy *wiphy,struct net_device *netdev,u8 key_index, bool unicast, bool multicast); 2489 int (* set_default_mgmt_key) (struct wiphy *wiphy,struct net_device *netdev,u8 key_index); 2490 int (* start_ap) (struct wiphy *wiphy, struct net_device *dev,struct cfg80211_ap_settings *settings); 2491 int (* change_beacon) (struct wiphy *wiphy, struct net_device *dev,struct cfg80211_beacon_data *info); 2492 int (* stop_ap) (struct wiphy *wiphy, struct net_device *dev); 2493 int (* add_station) (struct wiphy *wiphy, struct net_device *dev,const u8 *mac,struct station_parameters *params); 2494 int (* del_station) (struct wiphy *wiphy, struct net_device *dev,struct station_del_parameters *params); 2495 int (* change_station) (struct wiphy *wiphy, struct net_device *dev,const u8 *mac,struct station_parameters *params); 2496 int (* get_station) (struct wiphy *wiphy, struct net_device *dev,const u8 *mac, struct station_info *sinfo); 2497 int (* dump_station) (struct wiphy *wiphy, struct net_device *dev,int idx, u8 *mac, struct station_info *sinfo); 2498 int (* add_mpath) (struct wiphy *wiphy, struct net_device *dev,const u8 *dst, const u8 *next_hop); 2499 int (* del_mpath) (struct wiphy *wiphy, struct net_device *dev,const u8 *dst); 2500 int (* change_mpath) (struct wiphy *wiphy, struct net_device *dev,const u8 *dst, const u8 *next_hop); 2501 int (* get_mpath) (struct wiphy *wiphy, struct net_device *dev,u8 *dst, u8 *next_hop, struct mpath_info *pinfo); 2502 int (* dump_mpath) (struct wiphy *wiphy, struct net_device *dev,int idx, u8 *dst, u8 *next_hop,struct mpath_info *pinfo); 2503 int (* get_mpp) (struct wiphy *wiphy, struct net_device *dev,u8 *dst, u8 *mpp, struct mpath_info *pinfo); 2504 int (* dump_mpp) (struct wiphy *wiphy, struct net_device *dev,int idx, u8 *dst, u8 *mpp,struct mpath_info *pinfo); 2505 int (* get_mesh_config) (struct wiphy *wiphy,struct net_device *dev,struct mesh_config *conf); 2506 int (* update_mesh_config) (struct wiphy *wiphy,struct net_device *dev, u32 mask,const struct mesh_config *nconf); 2507 int (* join_mesh) (struct wiphy *wiphy, struct net_device *dev,const struct mesh_config *conf,const struct mesh_setup *setup); 2508 int (* leave_mesh) (struct wiphy *wiphy, struct net_device *dev); 2509 int (* join_ocb) (struct wiphy *wiphy, struct net_device *dev,struct ocb_setup *setup); 2510 int (* leave_ocb) (struct wiphy *wiphy, struct net_device *dev); 2511 int (* change_bss) (struct wiphy *wiphy, struct net_device *dev,struct bss_parameters *params); 2512 int (* set_txq_params) (struct wiphy *wiphy, struct net_device *dev,struct ieee80211_txq_params *params); 2513 int (* libertas_set_mesh_channel) (struct wiphy *wiphy,struct net_device *dev,struct ieee80211_channel *chan); 2514 int (* set_monitor_channel) (struct wiphy *wiphy,struct cfg80211_chan_def *chandef); 2515 int (* scan) (struct wiphy *wiphy,struct cfg80211_scan_request *request); 2516 int (* auth) (struct wiphy *wiphy, struct net_device *dev,struct cfg80211_auth_request *req); 2517 int (* assoc) (struct wiphy *wiphy, struct net_device *dev,struct cfg80211_assoc_request *req); 2518 int (* deauth) (struct wiphy *wiphy, struct net_device *dev,struct cfg80211_deauth_request *req); 2519 int (* disassoc) (struct wiphy *wiphy, struct net_device *dev,struct cfg80211_disassoc_request *req); 2520 int (* connect) (struct wiphy *wiphy, struct net_device *dev,struct cfg80211_connect_params *sme); 2521 int (* disconnect) (struct wiphy *wiphy, struct net_device *dev,u16 reason_code); 2522 int (* join_ibss) (struct wiphy *wiphy, struct net_device *dev,struct cfg80211_ibss_params *params); 2523 int (* leave_ibss) (struct wiphy *wiphy, struct net_device *dev); 2524 int (* set_mcast_rate) (struct wiphy *wiphy, struct net_device *dev,int rate[IEEE80211_NUM_BANDS]); 2525 int (* set_wiphy_params) (struct wiphy *wiphy, u32 changed); 2526 int (* set_tx_power) (struct wiphy *wiphy, struct wireless_dev *wdev,enum nl80211_tx_power_setting type, int mbm); 2527 int (* get_tx_power) (struct wiphy *wiphy, struct wireless_dev *wdev,int *dbm); 2528 int (* set_wds_peer) (struct wiphy *wiphy, struct net_device *dev,const u8 *addr); 2529 void (* rfkill_poll) (struct wiphy *wiphy); 2530#ifdef CONFIG_NL80211_TESTMODE 2531 int (* testmode_cmd) (struct wiphy *wiphy, struct wireless_dev *wdev,void *data, int len); 2532 int (* testmode_dump) (struct wiphy *wiphy, struct sk_buff *skb,struct netlink_callback *cb,void *data, int len); 2533#endif 2534 int (* set_bitrate_mask) (struct wiphy *wiphy,struct net_device *dev,const u8 *peer,const struct cfg80211_bitrate_mask *mask); 2535 int (* dump_survey) (struct wiphy *wiphy, struct net_device *netdev,int idx, struct survey_info *info); 2536 int (* set_pmksa) (struct wiphy *wiphy, struct net_device *netdev,struct cfg80211_pmksa *pmksa); 2537 int (* del_pmksa) (struct wiphy *wiphy, struct net_device *netdev,struct cfg80211_pmksa *pmksa); 2538 int (* flush_pmksa) (struct wiphy *wiphy, struct net_device *netdev); 2539 int (* remain_on_channel) (struct wiphy *wiphy,struct wireless_dev *wdev,struct ieee80211_channel *chan,unsigned int duration,u64 *cookie); 2540 int (* cancel_remain_on_channel) (struct wiphy *wiphy,struct wireless_dev *wdev,u64 cookie); 2541 int (* mgmt_tx) (struct wiphy *wiphy, struct wireless_dev *wdev,struct cfg80211_mgmt_tx_params *params,u64 *cookie); 2542 int (* mgmt_tx_cancel_wait) (struct wiphy *wiphy,struct wireless_dev *wdev,u64 cookie); 2543 int (* set_power_mgmt) (struct wiphy *wiphy, struct net_device *dev,bool enabled, int timeout); 2544 int (* set_cqm_rssi_config) (struct wiphy *wiphy,struct net_device *dev,s32 rssi_thold, u32 rssi_hyst); 2545 int (* set_cqm_txe_config) (struct wiphy *wiphy,struct net_device *dev,u32 rate, u32 pkts, u32 intvl); 2546 void (* mgmt_frame_register) (struct wiphy *wiphy,struct wireless_dev *wdev,u16 frame_type, bool reg); 2547 int (* set_antenna) (struct wiphy *wiphy, u32 tx_ant, u32 rx_ant); 2548 int (* get_antenna) (struct wiphy *wiphy, u32 *tx_ant, u32 *rx_ant); 2549 int (* sched_scan_start) (struct wiphy *wiphy,struct net_device *dev,struct cfg80211_sched_scan_request *request); 2550 int (* sched_scan_stop) (struct wiphy *wiphy, struct net_device *dev); 2551 int (* set_rekey_data) (struct wiphy *wiphy, struct net_device *dev,struct cfg80211_gtk_rekey_data *data); 2552 int (* tdls_mgmt) (struct wiphy *wiphy, struct net_device *dev,const u8 *peer, u8 action_code, u8 dialog_token,u16 status_code, u32 peer_capability,bool initiator, const u8 *buf, size_t len); 2553 int (* tdls_oper) (struct wiphy *wiphy, struct net_device *dev,const u8 *peer, enum nl80211_tdls_operation oper); 2554 int (* probe_client) (struct wiphy *wiphy, struct net_device *dev,const u8 *peer, u64 *cookie); 2555 int (* set_noack_map) (struct wiphy *wiphy,struct net_device *dev,u16 noack_map); 2556 int (* get_channel) (struct wiphy *wiphy,struct wireless_dev *wdev,struct cfg80211_chan_def *chandef); 2557 int (* start_p2p_device) (struct wiphy *wiphy,struct wireless_dev *wdev); 2558 void (* stop_p2p_device) (struct wiphy *wiphy,struct wireless_dev *wdev); 2559 int (* set_mac_acl) (struct wiphy *wiphy, struct net_device *dev,const struct cfg80211_acl_data *params); 2560 int (* start_radar_detection) (struct wiphy *wiphy,struct net_device *dev,struct cfg80211_chan_def *chandef,u32 cac_time_ms); 2561 int (* update_ft_ies) (struct wiphy *wiphy, struct net_device *dev,struct cfg80211_update_ft_ies_params *ftie); 2562 int (* crit_proto_start) (struct wiphy *wiphy,struct wireless_dev *wdev,enum nl80211_crit_proto_id protocol,u16 duration); 2563 void (* crit_proto_stop) (struct wiphy *wiphy,struct wireless_dev *wdev); 2564 int (* set_coalesce) (struct wiphy *wiphy,struct cfg80211_coalesce *coalesce); 2565 int (* channel_switch) (struct wiphy *wiphy,struct net_device *dev,struct cfg80211_csa_settings *params); 2566 int (* set_qos_map) (struct wiphy *wiphy,struct net_device *dev,struct cfg80211_qos_map *qos_map); 2567 int (* set_ap_chanwidth) (struct wiphy *wiphy, struct net_device *dev,struct cfg80211_chan_def *chandef); 2568 int (* add_tx_ts) (struct wiphy *wiphy, struct net_device *dev,u8 tsid, const u8 *peer, u8 user_prio,u16 admitted_time); 2569 int (* del_tx_ts) (struct wiphy *wiphy, struct net_device *dev,u8 tsid, const u8 *peer); 2570 int (* tdls_channel_switch) (struct wiphy *wiphy,struct net_device *dev,const u8 *addr, u8 oper_class,struct cfg80211_chan_def *chandef); 2571 void (* tdls_cancel_channel_switch) (struct wiphy *wiphy,struct net_device *dev,const u8 *addr); 2572}; </programlisting> 2573</refsynopsisdiv> 2574 <refsect1> 2575 <title>Members</title> 2576 <variablelist> 2577 <varlistentry> <term>suspend</term> 2578 <listitem><para> 2579wiphy device needs to be suspended. The variable <parameter>wow</parameter> will 2580be <constant>NULL</constant> or contain the enabled Wake-on-Wireless triggers that are 2581configured for the device. 2582 </para></listitem> 2583 </varlistentry> 2584 <varlistentry> <term>resume</term> 2585 <listitem><para> 2586wiphy device needs to be resumed 2587 </para></listitem> 2588 </varlistentry> 2589 <varlistentry> <term>set_wakeup</term> 2590 <listitem><para> 2591Called when WoWLAN is enabled/disabled, use this callback 2592to call <function>device_set_wakeup_enable</function> to enable/disable wakeup from 2593the device. 2594 </para></listitem> 2595 </varlistentry> 2596 <varlistentry> <term>add_virtual_intf</term> 2597 <listitem><para> 2598create a new virtual interface with the given name, 2599must set the struct wireless_dev's iftype. Beware: You must create 2600the new netdev in the wiphy's network namespace! Returns the struct 2601wireless_dev, or an ERR_PTR. For P2P device wdevs, the driver must 2602also set the address member in the wdev. 2603 </para></listitem> 2604 </varlistentry> 2605 <varlistentry> <term>del_virtual_intf</term> 2606 <listitem><para> 2607remove the virtual interface 2608 </para></listitem> 2609 </varlistentry> 2610 <varlistentry> <term>change_virtual_intf</term> 2611 <listitem><para> 2612change type/configuration of virtual interface, 2613keep the struct wireless_dev's iftype updated. 2614 </para></listitem> 2615 </varlistentry> 2616 <varlistentry> <term>add_key</term> 2617 <listitem><para> 2618add a key with the given parameters. <parameter>mac_addr</parameter> will be <constant>NULL</constant> 2619when adding a group key. 2620 </para></listitem> 2621 </varlistentry> 2622 <varlistentry> <term>get_key</term> 2623 <listitem><para> 2624get information about the key with the given parameters. 2625<parameter>mac_addr</parameter> will be <constant>NULL</constant> when requesting information for a group 2626key. All pointers given to the <parameter>callback</parameter> function need not be valid 2627after it returns. This function should return an error if it is 2628not possible to retrieve the key, -ENOENT if it doesn't exist. 2629 </para></listitem> 2630 </varlistentry> 2631 <varlistentry> <term>del_key</term> 2632 <listitem><para> 2633remove a key given the <parameter>mac_addr</parameter> (<constant>NULL</constant> for a group key) 2634and <parameter>key_index</parameter>, return -ENOENT if the key doesn't exist. 2635 </para></listitem> 2636 </varlistentry> 2637 <varlistentry> <term>set_default_key</term> 2638 <listitem><para> 2639set the default key on an interface 2640 </para></listitem> 2641 </varlistentry> 2642 <varlistentry> <term>set_default_mgmt_key</term> 2643 <listitem><para> 2644set the default management frame key on an interface 2645 </para></listitem> 2646 </varlistentry> 2647 <varlistentry> <term>start_ap</term> 2648 <listitem><para> 2649Start acting in AP mode defined by the parameters. 2650 </para></listitem> 2651 </varlistentry> 2652 <varlistentry> <term>change_beacon</term> 2653 <listitem><para> 2654Change the beacon parameters for an access point mode 2655interface. This should reject the call when AP mode wasn't started. 2656 </para></listitem> 2657 </varlistentry> 2658 <varlistentry> <term>stop_ap</term> 2659 <listitem><para> 2660Stop being an AP, including stopping beaconing. 2661 </para></listitem> 2662 </varlistentry> 2663 <varlistentry> <term>add_station</term> 2664 <listitem><para> 2665Add a new station. 2666 </para></listitem> 2667 </varlistentry> 2668 <varlistentry> <term>del_station</term> 2669 <listitem><para> 2670Remove a station 2671 </para></listitem> 2672 </varlistentry> 2673 <varlistentry> <term>change_station</term> 2674 <listitem><para> 2675Modify a given station. Note that flags changes are not much 2676validated in cfg80211, in particular the auth/assoc/authorized flags 2677might come to the driver in invalid combinations -- make sure to check 2678them, also against the existing state! Drivers must call 2679<function>cfg80211_check_station_change</function> to validate the information. 2680 </para></listitem> 2681 </varlistentry> 2682 <varlistentry> <term>get_station</term> 2683 <listitem><para> 2684get station information for the station identified by <parameter>mac</parameter> 2685 </para></listitem> 2686 </varlistentry> 2687 <varlistentry> <term>dump_station</term> 2688 <listitem><para> 2689dump station callback -- resume dump at index <parameter>idx</parameter> 2690 </para></listitem> 2691 </varlistentry> 2692 <varlistentry> <term>add_mpath</term> 2693 <listitem><para> 2694add a fixed mesh path 2695 </para></listitem> 2696 </varlistentry> 2697 <varlistentry> <term>del_mpath</term> 2698 <listitem><para> 2699delete a given mesh path 2700 </para></listitem> 2701 </varlistentry> 2702 <varlistentry> <term>change_mpath</term> 2703 <listitem><para> 2704change a given mesh path 2705 </para></listitem> 2706 </varlistentry> 2707 <varlistentry> <term>get_mpath</term> 2708 <listitem><para> 2709get a mesh path for the given parameters 2710 </para></listitem> 2711 </varlistentry> 2712 <varlistentry> <term>dump_mpath</term> 2713 <listitem><para> 2714dump mesh path callback -- resume dump at index <parameter>idx</parameter> 2715 </para></listitem> 2716 </varlistentry> 2717 <varlistentry> <term>get_mpp</term> 2718 <listitem><para> 2719get a mesh proxy path for the given parameters 2720 </para></listitem> 2721 </varlistentry> 2722 <varlistentry> <term>dump_mpp</term> 2723 <listitem><para> 2724dump mesh proxy path callback -- resume dump at index <parameter>idx</parameter> 2725 </para></listitem> 2726 </varlistentry> 2727 <varlistentry> <term>get_mesh_config</term> 2728 <listitem><para> 2729Get the current mesh configuration 2730 </para></listitem> 2731 </varlistentry> 2732 <varlistentry> <term>update_mesh_config</term> 2733 <listitem><para> 2734Update mesh parameters on a running mesh. 2735The mask is a bitfield which tells us which parameters to 2736set, and which to leave alone. 2737 </para></listitem> 2738 </varlistentry> 2739 <varlistentry> <term>join_mesh</term> 2740 <listitem><para> 2741join the mesh network with the specified parameters 2742(invoked with the wireless_dev mutex held) 2743 </para></listitem> 2744 </varlistentry> 2745 <varlistentry> <term>leave_mesh</term> 2746 <listitem><para> 2747leave the current mesh network 2748(invoked with the wireless_dev mutex held) 2749 </para></listitem> 2750 </varlistentry> 2751 <varlistentry> <term>join_ocb</term> 2752 <listitem><para> 2753join the OCB network with the specified parameters 2754(invoked with the wireless_dev mutex held) 2755 </para></listitem> 2756 </varlistentry> 2757 <varlistentry> <term>leave_ocb</term> 2758 <listitem><para> 2759leave the current OCB network 2760(invoked with the wireless_dev mutex held) 2761 </para></listitem> 2762 </varlistentry> 2763 <varlistentry> <term>change_bss</term> 2764 <listitem><para> 2765Modify parameters for a given BSS. 2766 </para></listitem> 2767 </varlistentry> 2768 <varlistentry> <term>set_txq_params</term> 2769 <listitem><para> 2770Set TX queue parameters 2771 </para></listitem> 2772 </varlistentry> 2773 <varlistentry> <term>libertas_set_mesh_channel</term> 2774 <listitem><para> 2775Only for backward compatibility for libertas, 2776as it doesn't implement join_mesh and needs to set the channel to 2777join the mesh instead. 2778 </para></listitem> 2779 </varlistentry> 2780 <varlistentry> <term>set_monitor_channel</term> 2781 <listitem><para> 2782Set the monitor mode channel for the device. If other 2783interfaces are active this callback should reject the configuration. 2784If no interfaces are active or the device is down, the channel should 2785be stored for when a monitor interface becomes active. 2786 </para></listitem> 2787 </varlistentry> 2788 <varlistentry> <term>scan</term> 2789 <listitem><para> 2790Request to do a scan. If returning zero, the scan request is given 2791the driver, and will be valid until passed to <function>cfg80211_scan_done</function>. 2792For scan results, call <function>cfg80211_inform_bss</function>; you can call this outside 2793the scan/scan_done bracket too. 2794 </para></listitem> 2795 </varlistentry> 2796 <varlistentry> <term>auth</term> 2797 <listitem><para> 2798Request to authenticate with the specified peer 2799(invoked with the wireless_dev mutex held) 2800 </para></listitem> 2801 </varlistentry> 2802 <varlistentry> <term>assoc</term> 2803 <listitem><para> 2804Request to (re)associate with the specified peer 2805(invoked with the wireless_dev mutex held) 2806 </para></listitem> 2807 </varlistentry> 2808 <varlistentry> <term>deauth</term> 2809 <listitem><para> 2810Request to deauthenticate from the specified peer 2811(invoked with the wireless_dev mutex held) 2812 </para></listitem> 2813 </varlistentry> 2814 <varlistentry> <term>disassoc</term> 2815 <listitem><para> 2816Request to disassociate from the specified peer 2817(invoked with the wireless_dev mutex held) 2818 </para></listitem> 2819 </varlistentry> 2820 <varlistentry> <term>connect</term> 2821 <listitem><para> 2822Connect to the ESS with the specified parameters. When connected, 2823call <function>cfg80211_connect_result</function> with status code <constant>WLAN_STATUS_SUCCESS</constant>. 2824If the connection fails for some reason, call <function>cfg80211_connect_result</function> 2825with the status from the AP. 2826(invoked with the wireless_dev mutex held) 2827 </para></listitem> 2828 </varlistentry> 2829 <varlistentry> <term>disconnect</term> 2830 <listitem><para> 2831Disconnect from the BSS/ESS. 2832(invoked with the wireless_dev mutex held) 2833 </para></listitem> 2834 </varlistentry> 2835 <varlistentry> <term>join_ibss</term> 2836 <listitem><para> 2837Join the specified IBSS (or create if necessary). Once done, call 2838<function>cfg80211_ibss_joined</function>, also call that function when changing BSSID due 2839to a merge. 2840(invoked with the wireless_dev mutex held) 2841 </para></listitem> 2842 </varlistentry> 2843 <varlistentry> <term>leave_ibss</term> 2844 <listitem><para> 2845Leave the IBSS. 2846(invoked with the wireless_dev mutex held) 2847 </para></listitem> 2848 </varlistentry> 2849 <varlistentry> <term>set_mcast_rate</term> 2850 <listitem><para> 2851Set the specified multicast rate (only if vif is in ADHOC or 2852MESH mode) 2853 </para></listitem> 2854 </varlistentry> 2855 <varlistentry> <term>set_wiphy_params</term> 2856 <listitem><para> 2857Notify that wiphy parameters have changed; 2858<parameter>changed</parameter> bitfield (see <structname>enum</structname> wiphy_params_flags) describes which values 2859have changed. The actual parameter values are available in 2860struct wiphy. If returning an error, no value should be changed. 2861 </para></listitem> 2862 </varlistentry> 2863 <varlistentry> <term>set_tx_power</term> 2864 <listitem><para> 2865set the transmit power according to the parameters, 2866the power passed is in mBm, to get dBm use <function>MBM_TO_DBM</function>. The 2867wdev may be <constant>NULL</constant> if power was set for the wiphy, and will 2868always be <constant>NULL</constant> unless the driver supports per-vif TX power 2869(as advertised by the nl80211 feature flag.) 2870 </para></listitem> 2871 </varlistentry> 2872 <varlistentry> <term>get_tx_power</term> 2873 <listitem><para> 2874store the current TX power into the dbm variable; 2875return 0 if successful 2876 </para></listitem> 2877 </varlistentry> 2878 <varlistentry> <term>set_wds_peer</term> 2879 <listitem><para> 2880set the WDS peer for a WDS interface 2881 </para></listitem> 2882 </varlistentry> 2883 <varlistentry> <term>rfkill_poll</term> 2884 <listitem><para> 2885polls the hw rfkill line, use cfg80211 reporting 2886functions to adjust rfkill hw state 2887 </para></listitem> 2888 </varlistentry> 2889 <varlistentry> <term>testmode_cmd</term> 2890 <listitem><para> 2891run a test mode command; <parameter>wdev</parameter> may be <constant>NULL</constant> 2892 </para></listitem> 2893 </varlistentry> 2894 <varlistentry> <term>testmode_dump</term> 2895 <listitem><para> 2896Implement a test mode dump. The cb->args[2] and up may be 2897used by the function, but 0 and 1 must not be touched. Additionally, 2898return error codes other than -ENOBUFS and -ENOENT will terminate the 2899dump and return to userspace with an error, so be careful. If any data 2900was passed in from userspace then the data/len arguments will be present 2901and point to the data contained in <constant>NL80211_ATTR_TESTDATA</constant>. 2902 </para></listitem> 2903 </varlistentry> 2904 <varlistentry> <term>set_bitrate_mask</term> 2905 <listitem><para> 2906set the bitrate mask configuration 2907 </para></listitem> 2908 </varlistentry> 2909 <varlistentry> <term>dump_survey</term> 2910 <listitem><para> 2911get site survey information. 2912 </para></listitem> 2913 </varlistentry> 2914 <varlistentry> <term>set_pmksa</term> 2915 <listitem><para> 2916Cache a PMKID for a BSSID. This is mostly useful for fullmac 2917devices running firmwares capable of generating the (re) association 2918RSN IE. It allows for faster roaming between WPA2 BSSIDs. 2919 </para></listitem> 2920 </varlistentry> 2921 <varlistentry> <term>del_pmksa</term> 2922 <listitem><para> 2923Delete a cached PMKID. 2924 </para></listitem> 2925 </varlistentry> 2926 <varlistentry> <term>flush_pmksa</term> 2927 <listitem><para> 2928Flush all cached PMKIDs. 2929 </para></listitem> 2930 </varlistentry> 2931 <varlistentry> <term>remain_on_channel</term> 2932 <listitem><para> 2933Request the driver to remain awake on the specified 2934channel for the specified duration to complete an off-channel 2935operation (e.g., public action frame exchange). When the driver is 2936ready on the requested channel, it must indicate this with an event 2937notification by calling <function>cfg80211_ready_on_channel</function>. 2938 </para></listitem> 2939 </varlistentry> 2940 <varlistentry> <term>cancel_remain_on_channel</term> 2941 <listitem><para> 2942Cancel an on-going remain-on-channel operation. 2943This allows the operation to be terminated prior to timeout based on 2944the duration value. 2945 </para></listitem> 2946 </varlistentry> 2947 <varlistentry> <term>mgmt_tx</term> 2948 <listitem><para> 2949Transmit a management frame. 2950 </para></listitem> 2951 </varlistentry> 2952 <varlistentry> <term>mgmt_tx_cancel_wait</term> 2953 <listitem><para> 2954Cancel the wait time from transmitting a management 2955frame on another channel 2956 </para></listitem> 2957 </varlistentry> 2958 <varlistentry> <term>set_power_mgmt</term> 2959 <listitem><para> 2960Configure WLAN power management. A timeout value of -1 2961allows the driver to adjust the dynamic ps timeout value. 2962 </para></listitem> 2963 </varlistentry> 2964 <varlistentry> <term>set_cqm_rssi_config</term> 2965 <listitem><para> 2966Configure connection quality monitor RSSI threshold. 2967 </para></listitem> 2968 </varlistentry> 2969 <varlistentry> <term>set_cqm_txe_config</term> 2970 <listitem><para> 2971Configure connection quality monitor TX error 2972thresholds. 2973 </para></listitem> 2974 </varlistentry> 2975 <varlistentry> <term>mgmt_frame_register</term> 2976 <listitem><para> 2977Notify driver that a management frame type was 2978registered. Note that this callback may not sleep, and cannot run 2979concurrently with itself. 2980 </para></listitem> 2981 </varlistentry> 2982 <varlistentry> <term>set_antenna</term> 2983 <listitem><para> 2984Set antenna configuration (tx_ant, rx_ant) on the device. 2985Parameters are bitmaps of allowed antennas to use for TX/RX. Drivers may 2986reject TX/RX mask combinations they cannot support by returning -EINVAL 2987(also see nl80211.h <parameter>NL80211_ATTR_WIPHY_ANTENNA_TX</parameter>). 2988 </para></listitem> 2989 </varlistentry> 2990 <varlistentry> <term>get_antenna</term> 2991 <listitem><para> 2992Get current antenna configuration from device (tx_ant, rx_ant). 2993 </para></listitem> 2994 </varlistentry> 2995 <varlistentry> <term>sched_scan_start</term> 2996 <listitem><para> 2997Tell the driver to start a scheduled scan. 2998 </para></listitem> 2999 </varlistentry> 3000 <varlistentry> <term>sched_scan_stop</term> 3001 <listitem><para> 3002Tell the driver to stop an ongoing scheduled scan. This 3003call must stop the scheduled scan and be ready for starting a new one 3004before it returns, i.e. <parameter>sched_scan_start</parameter> may be called immediately 3005after that again and should not fail in that case. The driver should 3006not call <function>cfg80211_sched_scan_stopped</function> for a requested stop (when this 3007method returns 0.) 3008 </para></listitem> 3009 </varlistentry> 3010 <varlistentry> <term>set_rekey_data</term> 3011 <listitem><para> 3012give the data necessary for GTK rekeying to the driver 3013 </para></listitem> 3014 </varlistentry> 3015 <varlistentry> <term>tdls_mgmt</term> 3016 <listitem><para> 3017Transmit a TDLS management frame. 3018 </para></listitem> 3019 </varlistentry> 3020 <varlistentry> <term>tdls_oper</term> 3021 <listitem><para> 3022Perform a high-level TDLS operation (e.g. TDLS link setup). 3023 </para></listitem> 3024 </varlistentry> 3025 <varlistentry> <term>probe_client</term> 3026 <listitem><para> 3027probe an associated client, must return a cookie that it 3028later passes to <function>cfg80211_probe_status</function>. 3029 </para></listitem> 3030 </varlistentry> 3031 <varlistentry> <term>set_noack_map</term> 3032 <listitem><para> 3033Set the NoAck Map for the TIDs. 3034 </para></listitem> 3035 </varlistentry> 3036 <varlistentry> <term>get_channel</term> 3037 <listitem><para> 3038Get the current operating channel for the virtual interface. 3039For monitor interfaces, it should return <constant>NULL</constant> unless there's a single 3040current monitoring channel. 3041 </para></listitem> 3042 </varlistentry> 3043 <varlistentry> <term>start_p2p_device</term> 3044 <listitem><para> 3045Start the given P2P device. 3046 </para></listitem> 3047 </varlistentry> 3048 <varlistentry> <term>stop_p2p_device</term> 3049 <listitem><para> 3050Stop the given P2P device. 3051 </para></listitem> 3052 </varlistentry> 3053 <varlistentry> <term>set_mac_acl</term> 3054 <listitem><para> 3055Sets MAC address control list in AP and P2P GO mode. 3056Parameters include ACL policy, an array of MAC address of stations 3057and the number of MAC addresses. If there is already a list in driver 3058this new list replaces the existing one. Driver has to clear its ACL 3059when number of MAC addresses entries is passed as 0. Drivers which 3060advertise the support for MAC based ACL have to implement this callback. 3061 </para></listitem> 3062 </varlistentry> 3063 <varlistentry> <term>start_radar_detection</term> 3064 <listitem><para> 3065Start radar detection in the driver. 3066 </para></listitem> 3067 </varlistentry> 3068 <varlistentry> <term>update_ft_ies</term> 3069 <listitem><para> 3070Provide updated Fast BSS Transition information to the 3071driver. If the SME is in the driver/firmware, this information can be 3072used in building Authentication and Reassociation Request frames. 3073 </para></listitem> 3074 </varlistentry> 3075 <varlistentry> <term>crit_proto_start</term> 3076 <listitem><para> 3077Indicates a critical protocol needs more link reliability 3078for a given duration (milliseconds). The protocol is provided so the 3079driver can take the most appropriate actions. 3080 </para></listitem> 3081 </varlistentry> 3082 <varlistentry> <term>crit_proto_stop</term> 3083 <listitem><para> 3084Indicates critical protocol no longer needs increased link 3085reliability. This operation can not fail. 3086 </para></listitem> 3087 </varlistentry> 3088 <varlistentry> <term>set_coalesce</term> 3089 <listitem><para> 3090Set coalesce parameters. 3091 </para></listitem> 3092 </varlistentry> 3093 <varlistentry> <term>channel_switch</term> 3094 <listitem><para> 3095initiate channel-switch procedure (with CSA). Driver is 3096responsible for veryfing if the switch is possible. Since this is 3097inherently tricky driver may decide to disconnect an interface later 3098with <function>cfg80211_stop_iface</function>. This doesn't mean driver can accept 3099everything. It should do it's best to verify requests and reject them 3100as soon as possible. 3101 </para></listitem> 3102 </varlistentry> 3103 <varlistentry> <term>set_qos_map</term> 3104 <listitem><para> 3105Set QoS mapping information to the driver 3106 </para></listitem> 3107 </varlistentry> 3108 <varlistentry> <term>set_ap_chanwidth</term> 3109 <listitem><para> 3110Set the AP (including P2P GO) mode channel width for the 3111given interface This is used e.g. for dynamic HT 20/40 MHz channel width 3112changes during the lifetime of the BSS. 3113 </para></listitem> 3114 </varlistentry> 3115 <varlistentry> <term>add_tx_ts</term> 3116 <listitem><para> 3117validate (if admitted_time is 0) or add a TX TS to the device 3118with the given parameters; action frame exchange has been handled by 3119userspace so this just has to modify the TX path to take the TS into 3120account. 3121If the admitted time is 0 just validate the parameters to make sure 3122the session can be created at all; it is valid to just always return 3123success for that but that may result in inefficient behaviour (handshake 3124with the peer followed by immediate teardown when the addition is later 3125rejected) 3126 </para></listitem> 3127 </varlistentry> 3128 <varlistentry> <term>del_tx_ts</term> 3129 <listitem><para> 3130remove an existing TX TS 3131 </para></listitem> 3132 </varlistentry> 3133 <varlistentry> <term>tdls_channel_switch</term> 3134 <listitem><para> 3135Start channel-switching with a TDLS peer. The driver 3136is responsible for continually initiating channel-switching operations 3137and returning to the base channel for communication with the AP. 3138 </para></listitem> 3139 </varlistentry> 3140 <varlistentry> <term>tdls_cancel_channel_switch</term> 3141 <listitem><para> 3142Stop channel-switching with a TDLS peer. Both 3143peers must be on the base channel when the call completes. 3144 </para></listitem> 3145 </varlistentry> 3146 </variablelist> 3147 </refsect1> 3148<refsect1> 3149<title>Description</title> 3150<para> 3151 </para><para> 3152 3153 This struct is registered by fullmac card drivers and/or wireless stacks 3154 in order to handle configuration requests on their interfaces. 3155 </para><para> 3156 3157 All callbacks except where otherwise noted should return 0 3158 on success or a negative error code. 3159 </para><para> 3160 3161 All operations are currently invoked under rtnl for consistency with the 3162 wireless extensions but this is subject to reevaluation as soon as this 3163 code is used more widely and we have a first user without wext. 3164</para> 3165</refsect1> 3166</refentry> 3167 3168<refentry id="API-struct-vif-params"> 3169<refentryinfo> 3170 <title>LINUX</title> 3171 <productname>Kernel Hackers Manual</productname> 3172 <date>July 2017</date> 3173</refentryinfo> 3174<refmeta> 3175 <refentrytitle><phrase>struct vif_params</phrase></refentrytitle> 3176 <manvolnum>9</manvolnum> 3177 <refmiscinfo class="version">4.1.27</refmiscinfo> 3178</refmeta> 3179<refnamediv> 3180 <refname>struct vif_params</refname> 3181 <refpurpose> 3182 describes virtual interface parameters 3183 </refpurpose> 3184</refnamediv> 3185<refsynopsisdiv> 3186 <title>Synopsis</title> 3187 <programlisting> 3188struct vif_params { 3189 int use_4addr; 3190 u8 macaddr[ETH_ALEN]; 3191}; </programlisting> 3192</refsynopsisdiv> 3193 <refsect1> 3194 <title>Members</title> 3195 <variablelist> 3196 <varlistentry> <term>use_4addr</term> 3197 <listitem><para> 3198use 4-address frames 3199 </para></listitem> 3200 </varlistentry> 3201 <varlistentry> <term>macaddr[ETH_ALEN]</term> 3202 <listitem><para> 3203address to use for this virtual interface. 3204If this parameter is set to zero address the driver may 3205determine the address as needed. 3206This feature is only fully supported by drivers that enable the 3207<constant>NL80211_FEATURE_MAC_ON_CREATE</constant> flag. Others may support creating 3208* only p2p devices with specified MAC. 3209 </para></listitem> 3210 </varlistentry> 3211 </variablelist> 3212 </refsect1> 3213</refentry> 3214 3215<refentry id="API-struct-key-params"> 3216<refentryinfo> 3217 <title>LINUX</title> 3218 <productname>Kernel Hackers Manual</productname> 3219 <date>July 2017</date> 3220</refentryinfo> 3221<refmeta> 3222 <refentrytitle><phrase>struct key_params</phrase></refentrytitle> 3223 <manvolnum>9</manvolnum> 3224 <refmiscinfo class="version">4.1.27</refmiscinfo> 3225</refmeta> 3226<refnamediv> 3227 <refname>struct key_params</refname> 3228 <refpurpose> 3229 key information 3230 </refpurpose> 3231</refnamediv> 3232<refsynopsisdiv> 3233 <title>Synopsis</title> 3234 <programlisting> 3235struct key_params { 3236 const u8 * key; 3237 const u8 * seq; 3238 int key_len; 3239 int seq_len; 3240 u32 cipher; 3241}; </programlisting> 3242</refsynopsisdiv> 3243 <refsect1> 3244 <title>Members</title> 3245 <variablelist> 3246 <varlistentry> <term>key</term> 3247 <listitem><para> 3248key material 3249 </para></listitem> 3250 </varlistentry> 3251 <varlistentry> <term>seq</term> 3252 <listitem><para> 3253sequence counter (IV/PN) for TKIP and CCMP keys, only used 3254with the <function>get_key</function> callback, must be in little endian, 3255length given by <parameter>seq_len</parameter>. 3256 </para></listitem> 3257 </varlistentry> 3258 <varlistentry> <term>key_len</term> 3259 <listitem><para> 3260length of key material 3261 </para></listitem> 3262 </varlistentry> 3263 <varlistentry> <term>seq_len</term> 3264 <listitem><para> 3265length of <parameter>seq</parameter>. 3266 </para></listitem> 3267 </varlistentry> 3268 <varlistentry> <term>cipher</term> 3269 <listitem><para> 3270cipher suite selector 3271 </para></listitem> 3272 </varlistentry> 3273 </variablelist> 3274 </refsect1> 3275<refsect1> 3276<title>Description</title> 3277<para> 3278 </para><para> 3279 3280 Information about a key 3281</para> 3282</refsect1> 3283</refentry> 3284 3285<refentry id="API-enum-survey-info-flags"> 3286<refentryinfo> 3287 <title>LINUX</title> 3288 <productname>Kernel Hackers Manual</productname> 3289 <date>July 2017</date> 3290</refentryinfo> 3291<refmeta> 3292 <refentrytitle><phrase>enum survey_info_flags</phrase></refentrytitle> 3293 <manvolnum>9</manvolnum> 3294 <refmiscinfo class="version">4.1.27</refmiscinfo> 3295</refmeta> 3296<refnamediv> 3297 <refname>enum survey_info_flags</refname> 3298 <refpurpose> 3299 survey information flags 3300 </refpurpose> 3301</refnamediv> 3302<refsynopsisdiv> 3303 <title>Synopsis</title> 3304 <programlisting> 3305enum survey_info_flags { 3306 SURVEY_INFO_NOISE_DBM, 3307 SURVEY_INFO_IN_USE, 3308 SURVEY_INFO_TIME, 3309 SURVEY_INFO_TIME_BUSY, 3310 SURVEY_INFO_TIME_EXT_BUSY, 3311 SURVEY_INFO_TIME_RX, 3312 SURVEY_INFO_TIME_TX, 3313 SURVEY_INFO_TIME_SCAN 3314}; </programlisting> 3315</refsynopsisdiv> 3316<refsect1> 3317 <title>Constants</title> 3318 <variablelist> 3319 <varlistentry> <term>SURVEY_INFO_NOISE_DBM</term> 3320 <listitem><para> 3321noise (in dBm) was filled in 3322 </para></listitem> 3323 </varlistentry> 3324 <varlistentry> <term>SURVEY_INFO_IN_USE</term> 3325 <listitem><para> 3326channel is currently being used 3327 </para></listitem> 3328 </varlistentry> 3329 <varlistentry> <term>SURVEY_INFO_TIME</term> 3330 <listitem><para> 3331active time (in ms) was filled in 3332 </para></listitem> 3333 </varlistentry> 3334 <varlistentry> <term>SURVEY_INFO_TIME_BUSY</term> 3335 <listitem><para> 3336busy time was filled in 3337 </para></listitem> 3338 </varlistentry> 3339 <varlistentry> <term>SURVEY_INFO_TIME_EXT_BUSY</term> 3340 <listitem><para> 3341extension channel busy time was filled in 3342 </para></listitem> 3343 </varlistentry> 3344 <varlistentry> <term>SURVEY_INFO_TIME_RX</term> 3345 <listitem><para> 3346receive time was filled in 3347 </para></listitem> 3348 </varlistentry> 3349 <varlistentry> <term>SURVEY_INFO_TIME_TX</term> 3350 <listitem><para> 3351transmit time was filled in 3352 </para></listitem> 3353 </varlistentry> 3354 <varlistentry> <term>SURVEY_INFO_TIME_SCAN</term> 3355 <listitem><para> 3356scan time was filled in 3357 </para></listitem> 3358 </varlistentry> 3359 </variablelist> 3360</refsect1> 3361<refsect1> 3362<title>Description</title> 3363<para> 3364 Used by the driver to indicate which info in <structname>struct survey_info</structname> 3365 it has filled in during the <function>get_survey</function>. 3366</para> 3367</refsect1> 3368</refentry> 3369 3370<refentry id="API-struct-survey-info"> 3371<refentryinfo> 3372 <title>LINUX</title> 3373 <productname>Kernel Hackers Manual</productname> 3374 <date>July 2017</date> 3375</refentryinfo> 3376<refmeta> 3377 <refentrytitle><phrase>struct survey_info</phrase></refentrytitle> 3378 <manvolnum>9</manvolnum> 3379 <refmiscinfo class="version">4.1.27</refmiscinfo> 3380</refmeta> 3381<refnamediv> 3382 <refname>struct survey_info</refname> 3383 <refpurpose> 3384 channel survey response 3385 </refpurpose> 3386</refnamediv> 3387<refsynopsisdiv> 3388 <title>Synopsis</title> 3389 <programlisting> 3390struct survey_info { 3391 struct ieee80211_channel * channel; 3392 u64 time; 3393 u64 time_busy; 3394 u64 time_ext_busy; 3395 u64 time_rx; 3396 u64 time_tx; 3397 u64 time_scan; 3398 u32 filled; 3399 s8 noise; 3400}; </programlisting> 3401</refsynopsisdiv> 3402 <refsect1> 3403 <title>Members</title> 3404 <variablelist> 3405 <varlistentry> <term>channel</term> 3406 <listitem><para> 3407the channel this survey record reports, may be <constant>NULL</constant> for a single 3408record to report global statistics 3409 </para></listitem> 3410 </varlistentry> 3411 <varlistentry> <term>time</term> 3412 <listitem><para> 3413amount of time in ms the radio was turn on (on the channel) 3414 </para></listitem> 3415 </varlistentry> 3416 <varlistentry> <term>time_busy</term> 3417 <listitem><para> 3418amount of time the primary channel was sensed busy 3419 </para></listitem> 3420 </varlistentry> 3421 <varlistentry> <term>time_ext_busy</term> 3422 <listitem><para> 3423amount of time the extension channel was sensed busy 3424 </para></listitem> 3425 </varlistentry> 3426 <varlistentry> <term>time_rx</term> 3427 <listitem><para> 3428amount of time the radio spent receiving data 3429 </para></listitem> 3430 </varlistentry> 3431 <varlistentry> <term>time_tx</term> 3432 <listitem><para> 3433amount of time the radio spent transmitting data 3434 </para></listitem> 3435 </varlistentry> 3436 <varlistentry> <term>time_scan</term> 3437 <listitem><para> 3438amount of time the radio spent for scanning 3439 </para></listitem> 3440 </varlistentry> 3441 <varlistentry> <term>filled</term> 3442 <listitem><para> 3443bitflag of flags from <structname>enum</structname> survey_info_flags 3444 </para></listitem> 3445 </varlistentry> 3446 <varlistentry> <term>noise</term> 3447 <listitem><para> 3448channel noise in dBm. This and all following fields are 3449optional 3450 </para></listitem> 3451 </varlistentry> 3452 </variablelist> 3453 </refsect1> 3454<refsect1> 3455<title>Description</title> 3456<para> 3457 Used by <function>dump_survey</function> to report back per-channel survey information. 3458 </para><para> 3459 3460 This structure can later be expanded with things like 3461 channel duty cycle etc. 3462</para> 3463</refsect1> 3464</refentry> 3465 3466<refentry id="API-struct-cfg80211-beacon-data"> 3467<refentryinfo> 3468 <title>LINUX</title> 3469 <productname>Kernel Hackers Manual</productname> 3470 <date>July 2017</date> 3471</refentryinfo> 3472<refmeta> 3473 <refentrytitle><phrase>struct cfg80211_beacon_data</phrase></refentrytitle> 3474 <manvolnum>9</manvolnum> 3475 <refmiscinfo class="version">4.1.27</refmiscinfo> 3476</refmeta> 3477<refnamediv> 3478 <refname>struct cfg80211_beacon_data</refname> 3479 <refpurpose> 3480 beacon data 3481 </refpurpose> 3482</refnamediv> 3483<refsynopsisdiv> 3484 <title>Synopsis</title> 3485 <programlisting> 3486struct cfg80211_beacon_data { 3487 const u8 * head; 3488 const u8 * tail; 3489 const u8 * beacon_ies; 3490 const u8 * proberesp_ies; 3491 const u8 * assocresp_ies; 3492 const u8 * probe_resp; 3493 size_t head_len; 3494 size_t tail_len; 3495 size_t beacon_ies_len; 3496 size_t proberesp_ies_len; 3497 size_t assocresp_ies_len; 3498 size_t probe_resp_len; 3499}; </programlisting> 3500</refsynopsisdiv> 3501 <refsect1> 3502 <title>Members</title> 3503 <variablelist> 3504 <varlistentry> <term>head</term> 3505 <listitem><para> 3506head portion of beacon (before TIM IE) 3507or <constant>NULL</constant> if not changed 3508 </para></listitem> 3509 </varlistentry> 3510 <varlistentry> <term>tail</term> 3511 <listitem><para> 3512tail portion of beacon (after TIM IE) 3513or <constant>NULL</constant> if not changed 3514 </para></listitem> 3515 </varlistentry> 3516 <varlistentry> <term>beacon_ies</term> 3517 <listitem><para> 3518extra information element(s) to add into Beacon frames or <constant>NULL</constant> 3519 </para></listitem> 3520 </varlistentry> 3521 <varlistentry> <term>proberesp_ies</term> 3522 <listitem><para> 3523extra information element(s) to add into Probe Response 3524frames or <constant>NULL</constant> 3525 </para></listitem> 3526 </varlistentry> 3527 <varlistentry> <term>assocresp_ies</term> 3528 <listitem><para> 3529extra information element(s) to add into (Re)Association 3530Response frames or <constant>NULL</constant> 3531 </para></listitem> 3532 </varlistentry> 3533 <varlistentry> <term>probe_resp</term> 3534 <listitem><para> 3535probe response template (AP mode only) 3536 </para></listitem> 3537 </varlistentry> 3538 <varlistentry> <term>head_len</term> 3539 <listitem><para> 3540length of <parameter>head</parameter> 3541 </para></listitem> 3542 </varlistentry> 3543 <varlistentry> <term>tail_len</term> 3544 <listitem><para> 3545length of <parameter>tail</parameter> 3546 </para></listitem> 3547 </varlistentry> 3548 <varlistentry> <term>beacon_ies_len</term> 3549 <listitem><para> 3550length of beacon_ies in octets 3551 </para></listitem> 3552 </varlistentry> 3553 <varlistentry> <term>proberesp_ies_len</term> 3554 <listitem><para> 3555length of proberesp_ies in octets 3556 </para></listitem> 3557 </varlistentry> 3558 <varlistentry> <term>assocresp_ies_len</term> 3559 <listitem><para> 3560length of assocresp_ies in octets 3561 </para></listitem> 3562 </varlistentry> 3563 <varlistentry> <term>probe_resp_len</term> 3564 <listitem><para> 3565length of probe response template (<parameter>probe_resp</parameter>) 3566 </para></listitem> 3567 </varlistentry> 3568 </variablelist> 3569 </refsect1> 3570</refentry> 3571 3572<refentry id="API-struct-cfg80211-ap-settings"> 3573<refentryinfo> 3574 <title>LINUX</title> 3575 <productname>Kernel Hackers Manual</productname> 3576 <date>July 2017</date> 3577</refentryinfo> 3578<refmeta> 3579 <refentrytitle><phrase>struct cfg80211_ap_settings</phrase></refentrytitle> 3580 <manvolnum>9</manvolnum> 3581 <refmiscinfo class="version">4.1.27</refmiscinfo> 3582</refmeta> 3583<refnamediv> 3584 <refname>struct cfg80211_ap_settings</refname> 3585 <refpurpose> 3586 AP configuration 3587 </refpurpose> 3588</refnamediv> 3589<refsynopsisdiv> 3590 <title>Synopsis</title> 3591 <programlisting> 3592struct cfg80211_ap_settings { 3593 struct cfg80211_chan_def chandef; 3594 struct cfg80211_beacon_data beacon; 3595 int beacon_interval; 3596 int dtim_period; 3597 const u8 * ssid; 3598 size_t ssid_len; 3599 enum nl80211_hidden_ssid hidden_ssid; 3600 struct cfg80211_crypto_settings crypto; 3601 bool privacy; 3602 enum nl80211_auth_type auth_type; 3603 enum nl80211_smps_mode smps_mode; 3604 int inactivity_timeout; 3605 u8 p2p_ctwindow; 3606 bool p2p_opp_ps; 3607 const struct cfg80211_acl_data * acl; 3608}; </programlisting> 3609</refsynopsisdiv> 3610 <refsect1> 3611 <title>Members</title> 3612 <variablelist> 3613 <varlistentry> <term>chandef</term> 3614 <listitem><para> 3615defines the channel to use 3616 </para></listitem> 3617 </varlistentry> 3618 <varlistentry> <term>beacon</term> 3619 <listitem><para> 3620beacon data 3621 </para></listitem> 3622 </varlistentry> 3623 <varlistentry> <term>beacon_interval</term> 3624 <listitem><para> 3625beacon interval 3626 </para></listitem> 3627 </varlistentry> 3628 <varlistentry> <term>dtim_period</term> 3629 <listitem><para> 3630DTIM period 3631 </para></listitem> 3632 </varlistentry> 3633 <varlistentry> <term>ssid</term> 3634 <listitem><para> 3635SSID to be used in the BSS (note: may be <constant>NULL</constant> if not provided from 3636user space) 3637 </para></listitem> 3638 </varlistentry> 3639 <varlistentry> <term>ssid_len</term> 3640 <listitem><para> 3641length of <parameter>ssid</parameter> 3642 </para></listitem> 3643 </varlistentry> 3644 <varlistentry> <term>hidden_ssid</term> 3645 <listitem><para> 3646whether to hide the SSID in Beacon/Probe Response frames 3647 </para></listitem> 3648 </varlistentry> 3649 <varlistentry> <term>crypto</term> 3650 <listitem><para> 3651crypto settings 3652 </para></listitem> 3653 </varlistentry> 3654 <varlistentry> <term>privacy</term> 3655 <listitem><para> 3656the BSS uses privacy 3657 </para></listitem> 3658 </varlistentry> 3659 <varlistentry> <term>auth_type</term> 3660 <listitem><para> 3661Authentication type (algorithm) 3662 </para></listitem> 3663 </varlistentry> 3664 <varlistentry> <term>smps_mode</term> 3665 <listitem><para> 3666SMPS mode 3667 </para></listitem> 3668 </varlistentry> 3669 <varlistentry> <term>inactivity_timeout</term> 3670 <listitem><para> 3671time in seconds to determine station's inactivity. 3672 </para></listitem> 3673 </varlistentry> 3674 <varlistentry> <term>p2p_ctwindow</term> 3675 <listitem><para> 3676P2P CT Window 3677 </para></listitem> 3678 </varlistentry> 3679 <varlistentry> <term>p2p_opp_ps</term> 3680 <listitem><para> 3681P2P opportunistic PS 3682 </para></listitem> 3683 </varlistentry> 3684 <varlistentry> <term>acl</term> 3685 <listitem><para> 3686ACL configuration used by the drivers which has support for 3687MAC address based access control 3688 </para></listitem> 3689 </varlistentry> 3690 </variablelist> 3691 </refsect1> 3692<refsect1> 3693<title>Description</title> 3694<para> 3695 </para><para> 3696 3697 Used to configure an AP interface. 3698</para> 3699</refsect1> 3700</refentry> 3701 3702<refentry id="API-struct-station-parameters"> 3703<refentryinfo> 3704 <title>LINUX</title> 3705 <productname>Kernel Hackers Manual</productname> 3706 <date>July 2017</date> 3707</refentryinfo> 3708<refmeta> 3709 <refentrytitle><phrase>struct station_parameters</phrase></refentrytitle> 3710 <manvolnum>9</manvolnum> 3711 <refmiscinfo class="version">4.1.27</refmiscinfo> 3712</refmeta> 3713<refnamediv> 3714 <refname>struct station_parameters</refname> 3715 <refpurpose> 3716 station parameters 3717 </refpurpose> 3718</refnamediv> 3719<refsynopsisdiv> 3720 <title>Synopsis</title> 3721 <programlisting> 3722struct station_parameters { 3723 const u8 * supported_rates; 3724 struct net_device * vlan; 3725 u32 sta_flags_mask; 3726 u32 sta_flags_set; 3727 u32 sta_modify_mask; 3728 int listen_interval; 3729 u16 aid; 3730 u8 supported_rates_len; 3731 u8 plink_action; 3732 u8 plink_state; 3733 const struct ieee80211_ht_cap * ht_capa; 3734 const struct ieee80211_vht_cap * vht_capa; 3735 u8 uapsd_queues; 3736 u8 max_sp; 3737 enum nl80211_mesh_power_mode local_pm; 3738 u16 capability; 3739 const u8 * ext_capab; 3740 u8 ext_capab_len; 3741 const u8 * supported_channels; 3742 u8 supported_channels_len; 3743 const u8 * supported_oper_classes; 3744 u8 supported_oper_classes_len; 3745 u8 opmode_notif; 3746 bool opmode_notif_used; 3747}; </programlisting> 3748</refsynopsisdiv> 3749 <refsect1> 3750 <title>Members</title> 3751 <variablelist> 3752 <varlistentry> <term>supported_rates</term> 3753 <listitem><para> 3754supported rates in IEEE 802.11 format 3755(or NULL for no change) 3756 </para></listitem> 3757 </varlistentry> 3758 <varlistentry> <term>vlan</term> 3759 <listitem><para> 3760vlan interface station should belong to 3761 </para></listitem> 3762 </varlistentry> 3763 <varlistentry> <term>sta_flags_mask</term> 3764 <listitem><para> 3765station flags that changed 3766(bitmask of BIT(NL80211_STA_FLAG_...)) 3767 </para></listitem> 3768 </varlistentry> 3769 <varlistentry> <term>sta_flags_set</term> 3770 <listitem><para> 3771station flags values 3772(bitmask of BIT(NL80211_STA_FLAG_...)) 3773 </para></listitem> 3774 </varlistentry> 3775 <varlistentry> <term>sta_modify_mask</term> 3776 <listitem><para> 3777bitmap indicating which parameters changed 3778(for those that don't have a natural <quote>no change</quote> value), 3779see <structname>enum</structname> station_parameters_apply_mask 3780 </para></listitem> 3781 </varlistentry> 3782 <varlistentry> <term>listen_interval</term> 3783 <listitem><para> 3784listen interval or -1 for no change 3785 </para></listitem> 3786 </varlistentry> 3787 <varlistentry> <term>aid</term> 3788 <listitem><para> 3789AID or zero for no change 3790 </para></listitem> 3791 </varlistentry> 3792 <varlistentry> <term>supported_rates_len</term> 3793 <listitem><para> 3794number of supported rates 3795 </para></listitem> 3796 </varlistentry> 3797 <varlistentry> <term>plink_action</term> 3798 <listitem><para> 3799plink action to take 3800 </para></listitem> 3801 </varlistentry> 3802 <varlistentry> <term>plink_state</term> 3803 <listitem><para> 3804set the peer link state for a station 3805 </para></listitem> 3806 </varlistentry> 3807 <varlistentry> <term>ht_capa</term> 3808 <listitem><para> 3809HT capabilities of station 3810 </para></listitem> 3811 </varlistentry> 3812 <varlistentry> <term>vht_capa</term> 3813 <listitem><para> 3814VHT capabilities of station 3815 </para></listitem> 3816 </varlistentry> 3817 <varlistentry> <term>uapsd_queues</term> 3818 <listitem><para> 3819bitmap of queues configured for uapsd. same format 3820as the AC bitmap in the QoS info field 3821 </para></listitem> 3822 </varlistentry> 3823 <varlistentry> <term>max_sp</term> 3824 <listitem><para> 3825max Service Period. same format as the MAX_SP in the 3826QoS info field (but already shifted down) 3827 </para></listitem> 3828 </varlistentry> 3829 <varlistentry> <term>local_pm</term> 3830 <listitem><para> 3831local link-specific mesh power save mode (no change when set 3832to unknown) 3833 </para></listitem> 3834 </varlistentry> 3835 <varlistentry> <term>capability</term> 3836 <listitem><para> 3837station capability 3838 </para></listitem> 3839 </varlistentry> 3840 <varlistentry> <term>ext_capab</term> 3841 <listitem><para> 3842extended capabilities of the station 3843 </para></listitem> 3844 </varlistentry> 3845 <varlistentry> <term>ext_capab_len</term> 3846 <listitem><para> 3847number of extended capabilities 3848 </para></listitem> 3849 </varlistentry> 3850 <varlistentry> <term>supported_channels</term> 3851 <listitem><para> 3852supported channels in IEEE 802.11 format 3853 </para></listitem> 3854 </varlistentry> 3855 <varlistentry> <term>supported_channels_len</term> 3856 <listitem><para> 3857number of supported channels 3858 </para></listitem> 3859 </varlistentry> 3860 <varlistentry> <term>supported_oper_classes</term> 3861 <listitem><para> 3862supported oper classes in IEEE 802.11 format 3863 </para></listitem> 3864 </varlistentry> 3865 <varlistentry> <term>supported_oper_classes_len</term> 3866 <listitem><para> 3867number of supported operating classes 3868 </para></listitem> 3869 </varlistentry> 3870 <varlistentry> <term>opmode_notif</term> 3871 <listitem><para> 3872operating mode field from Operating Mode Notification 3873 </para></listitem> 3874 </varlistentry> 3875 <varlistentry> <term>opmode_notif_used</term> 3876 <listitem><para> 3877information if operating mode field is used 3878 </para></listitem> 3879 </varlistentry> 3880 </variablelist> 3881 </refsect1> 3882<refsect1> 3883<title>Description</title> 3884<para> 3885 </para><para> 3886 3887 Used to change and create a new station. 3888</para> 3889</refsect1> 3890</refentry> 3891 3892<refentry id="API-enum-rate-info-flags"> 3893<refentryinfo> 3894 <title>LINUX</title> 3895 <productname>Kernel Hackers Manual</productname> 3896 <date>July 2017</date> 3897</refentryinfo> 3898<refmeta> 3899 <refentrytitle><phrase>enum rate_info_flags</phrase></refentrytitle> 3900 <manvolnum>9</manvolnum> 3901 <refmiscinfo class="version">4.1.27</refmiscinfo> 3902</refmeta> 3903<refnamediv> 3904 <refname>enum rate_info_flags</refname> 3905 <refpurpose> 3906 bitrate info flags 3907 </refpurpose> 3908</refnamediv> 3909<refsynopsisdiv> 3910 <title>Synopsis</title> 3911 <programlisting> 3912enum rate_info_flags { 3913 RATE_INFO_FLAGS_MCS, 3914 RATE_INFO_FLAGS_VHT_MCS, 3915 RATE_INFO_FLAGS_SHORT_GI, 3916 RATE_INFO_FLAGS_60G 3917}; </programlisting> 3918</refsynopsisdiv> 3919<refsect1> 3920 <title>Constants</title> 3921 <variablelist> 3922 <varlistentry> <term>RATE_INFO_FLAGS_MCS</term> 3923 <listitem><para> 3924mcs field filled with HT MCS 3925 </para></listitem> 3926 </varlistentry> 3927 <varlistentry> <term>RATE_INFO_FLAGS_VHT_MCS</term> 3928 <listitem><para> 3929mcs field filled with VHT MCS 3930 </para></listitem> 3931 </varlistentry> 3932 <varlistentry> <term>RATE_INFO_FLAGS_SHORT_GI</term> 3933 <listitem><para> 3934400ns guard interval 3935 </para></listitem> 3936 </varlistentry> 3937 <varlistentry> <term>RATE_INFO_FLAGS_60G</term> 3938 <listitem><para> 393960GHz MCS 3940 </para></listitem> 3941 </varlistentry> 3942 </variablelist> 3943</refsect1> 3944<refsect1> 3945<title>Description</title> 3946<para> 3947 </para><para> 3948 3949 Used by the driver to indicate the specific rate transmission 3950 type for 802.11n transmissions. 3951</para> 3952</refsect1> 3953</refentry> 3954 3955<refentry id="API-struct-rate-info"> 3956<refentryinfo> 3957 <title>LINUX</title> 3958 <productname>Kernel Hackers Manual</productname> 3959 <date>July 2017</date> 3960</refentryinfo> 3961<refmeta> 3962 <refentrytitle><phrase>struct rate_info</phrase></refentrytitle> 3963 <manvolnum>9</manvolnum> 3964 <refmiscinfo class="version">4.1.27</refmiscinfo> 3965</refmeta> 3966<refnamediv> 3967 <refname>struct rate_info</refname> 3968 <refpurpose> 3969 bitrate information 3970 </refpurpose> 3971</refnamediv> 3972<refsynopsisdiv> 3973 <title>Synopsis</title> 3974 <programlisting> 3975struct rate_info { 3976 u8 flags; 3977 u8 mcs; 3978 u16 legacy; 3979 u8 nss; 3980 u8 bw; 3981}; </programlisting> 3982</refsynopsisdiv> 3983 <refsect1> 3984 <title>Members</title> 3985 <variablelist> 3986 <varlistentry> <term>flags</term> 3987 <listitem><para> 3988bitflag of flags from <structname>enum</structname> rate_info_flags 3989 </para></listitem> 3990 </varlistentry> 3991 <varlistentry> <term>mcs</term> 3992 <listitem><para> 3993mcs index if struct describes a 802.11n bitrate 3994 </para></listitem> 3995 </varlistentry> 3996 <varlistentry> <term>legacy</term> 3997 <listitem><para> 3998bitrate in 100kbit/s for 802.11abg 3999 </para></listitem> 4000 </varlistentry> 4001 <varlistentry> <term>nss</term> 4002 <listitem><para> 4003number of streams (VHT only) 4004 </para></listitem> 4005 </varlistentry> 4006 <varlistentry> <term>bw</term> 4007 <listitem><para> 4008bandwidth (from <structname>enum</structname> rate_info_bw) 4009 </para></listitem> 4010 </varlistentry> 4011 </variablelist> 4012 </refsect1> 4013<refsect1> 4014<title>Description</title> 4015<para> 4016 </para><para> 4017 4018 Information about a receiving or transmitting bitrate 4019</para> 4020</refsect1> 4021</refentry> 4022 4023<refentry id="API-struct-station-info"> 4024<refentryinfo> 4025 <title>LINUX</title> 4026 <productname>Kernel Hackers Manual</productname> 4027 <date>July 2017</date> 4028</refentryinfo> 4029<refmeta> 4030 <refentrytitle><phrase>struct station_info</phrase></refentrytitle> 4031 <manvolnum>9</manvolnum> 4032 <refmiscinfo class="version">4.1.27</refmiscinfo> 4033</refmeta> 4034<refnamediv> 4035 <refname>struct station_info</refname> 4036 <refpurpose> 4037 station information 4038 </refpurpose> 4039</refnamediv> 4040<refsynopsisdiv> 4041 <title>Synopsis</title> 4042 <programlisting> 4043struct station_info { 4044 u32 filled; 4045 u32 connected_time; 4046 u32 inactive_time; 4047 u64 rx_bytes; 4048 u64 tx_bytes; 4049 u16 llid; 4050 u16 plid; 4051 u8 plink_state; 4052 s8 signal; 4053 s8 signal_avg; 4054 u8 chains; 4055 s8 chain_signal[IEEE80211_MAX_CHAINS]; 4056 s8 chain_signal_avg[IEEE80211_MAX_CHAINS]; 4057 struct rate_info txrate; 4058 struct rate_info rxrate; 4059 u32 rx_packets; 4060 u32 tx_packets; 4061 u32 tx_retries; 4062 u32 tx_failed; 4063 u32 rx_dropped_misc; 4064 struct sta_bss_parameters bss_param; 4065 struct nl80211_sta_flag_update sta_flags; 4066 int generation; 4067 const u8 * assoc_req_ies; 4068 size_t assoc_req_ies_len; 4069 u32 beacon_loss_count; 4070 s64 t_offset; 4071 enum nl80211_mesh_power_mode local_pm; 4072 enum nl80211_mesh_power_mode peer_pm; 4073 enum nl80211_mesh_power_mode nonpeer_pm; 4074 u32 expected_throughput; 4075 u64 rx_beacon; 4076 u8 rx_beacon_signal_avg; 4077 struct cfg80211_tid_stats pertid[IEEE80211_NUM_TIDS + 1]; 4078}; </programlisting> 4079</refsynopsisdiv> 4080 <refsect1> 4081 <title>Members</title> 4082 <variablelist> 4083 <varlistentry> <term>filled</term> 4084 <listitem><para> 4085bitflag of flags using the bits of <structname>enum</structname> nl80211_sta_info to 4086indicate the relevant values in this struct for them 4087 </para></listitem> 4088 </varlistentry> 4089 <varlistentry> <term>connected_time</term> 4090 <listitem><para> 4091time(in secs) since a station is last connected 4092 </para></listitem> 4093 </varlistentry> 4094 <varlistentry> <term>inactive_time</term> 4095 <listitem><para> 4096time since last station activity (tx/rx) in milliseconds 4097 </para></listitem> 4098 </varlistentry> 4099 <varlistentry> <term>rx_bytes</term> 4100 <listitem><para> 4101bytes (size of MPDUs) received from this station 4102 </para></listitem> 4103 </varlistentry> 4104 <varlistentry> <term>tx_bytes</term> 4105 <listitem><para> 4106bytes (size of MPDUs) transmitted to this station 4107 </para></listitem> 4108 </varlistentry> 4109 <varlistentry> <term>llid</term> 4110 <listitem><para> 4111mesh local link id 4112 </para></listitem> 4113 </varlistentry> 4114 <varlistentry> <term>plid</term> 4115 <listitem><para> 4116mesh peer link id 4117 </para></listitem> 4118 </varlistentry> 4119 <varlistentry> <term>plink_state</term> 4120 <listitem><para> 4121mesh peer link state 4122 </para></listitem> 4123 </varlistentry> 4124 <varlistentry> <term>signal</term> 4125 <listitem><para> 4126The signal strength, type depends on the wiphy's signal_type. 4127For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. 4128 </para></listitem> 4129 </varlistentry> 4130 <varlistentry> <term>signal_avg</term> 4131 <listitem><para> 4132Average signal strength, type depends on the wiphy's signal_type. 4133For CFG80211_SIGNAL_TYPE_MBM, value is expressed in _dBm_. 4134 </para></listitem> 4135 </varlistentry> 4136 <varlistentry> <term>chains</term> 4137 <listitem><para> 4138bitmask for filled values in <parameter>chain_signal</parameter>, <parameter>chain_signal_avg</parameter> 4139 </para></listitem> 4140 </varlistentry> 4141 <varlistentry> <term>chain_signal[IEEE80211_MAX_CHAINS]</term> 4142 <listitem><para> 4143per-chain signal strength of last received packet in dBm 4144 </para></listitem> 4145 </varlistentry> 4146 <varlistentry> <term>chain_signal_avg[IEEE80211_MAX_CHAINS]</term> 4147 <listitem><para> 4148per-chain signal strength average in dBm 4149 </para></listitem> 4150 </varlistentry> 4151 <varlistentry> <term>txrate</term> 4152 <listitem><para> 4153current unicast bitrate from this station 4154 </para></listitem> 4155 </varlistentry> 4156 <varlistentry> <term>rxrate</term> 4157 <listitem><para> 4158current unicast bitrate to this station 4159 </para></listitem> 4160 </varlistentry> 4161 <varlistentry> <term>rx_packets</term> 4162 <listitem><para> 4163packets (MSDUs & MMPDUs) received from this station 4164 </para></listitem> 4165 </varlistentry> 4166 <varlistentry> <term>tx_packets</term> 4167 <listitem><para> 4168packets (MSDUs & MMPDUs) transmitted to this station 4169 </para></listitem> 4170 </varlistentry> 4171 <varlistentry> <term>tx_retries</term> 4172 <listitem><para> 4173cumulative retry counts (MPDUs) 4174 </para></listitem> 4175 </varlistentry> 4176 <varlistentry> <term>tx_failed</term> 4177 <listitem><para> 4178number of failed transmissions (MPDUs) (retries exceeded, no ACK) 4179 </para></listitem> 4180 </varlistentry> 4181 <varlistentry> <term>rx_dropped_misc</term> 4182 <listitem><para> 4183Dropped for un-specified reason. 4184 </para></listitem> 4185 </varlistentry> 4186 <varlistentry> <term>bss_param</term> 4187 <listitem><para> 4188current BSS parameters 4189 </para></listitem> 4190 </varlistentry> 4191 <varlistentry> <term>sta_flags</term> 4192 <listitem><para> 4193station flags mask & values 4194 </para></listitem> 4195 </varlistentry> 4196 <varlistentry> <term>generation</term> 4197 <listitem><para> 4198generation number for nl80211 dumps. 4199This number should increase every time the list of stations 4200changes, i.e. when a station is added or removed, so that 4201userspace can tell whether it got a consistent snapshot. 4202 </para></listitem> 4203 </varlistentry> 4204 <varlistentry> <term>assoc_req_ies</term> 4205 <listitem><para> 4206IEs from (Re)Association Request. 4207This is used only when in AP mode with drivers that do not use 4208user space MLME/SME implementation. The information is provided for 4209the <function>cfg80211_new_sta</function> calls to notify user space of the IEs. 4210 </para></listitem> 4211 </varlistentry> 4212 <varlistentry> <term>assoc_req_ies_len</term> 4213 <listitem><para> 4214Length of assoc_req_ies buffer in octets. 4215 </para></listitem> 4216 </varlistentry> 4217 <varlistentry> <term>beacon_loss_count</term> 4218 <listitem><para> 4219Number of times beacon loss event has triggered. 4220 </para></listitem> 4221 </varlistentry> 4222 <varlistentry> <term>t_offset</term> 4223 <listitem><para> 4224Time offset of the station relative to this host. 4225 </para></listitem> 4226 </varlistentry> 4227 <varlistentry> <term>local_pm</term> 4228 <listitem><para> 4229local mesh STA power save mode 4230 </para></listitem> 4231 </varlistentry> 4232 <varlistentry> <term>peer_pm</term> 4233 <listitem><para> 4234peer mesh STA power save mode 4235 </para></listitem> 4236 </varlistentry> 4237 <varlistentry> <term>nonpeer_pm</term> 4238 <listitem><para> 4239non-peer mesh STA power save mode 4240 </para></listitem> 4241 </varlistentry> 4242 <varlistentry> <term>expected_throughput</term> 4243 <listitem><para> 4244expected throughput in kbps (including 802.11 headers) 4245towards this station. 4246 </para></listitem> 4247 </varlistentry> 4248 <varlistentry> <term>rx_beacon</term> 4249 <listitem><para> 4250number of beacons received from this peer 4251 </para></listitem> 4252 </varlistentry> 4253 <varlistentry> <term>rx_beacon_signal_avg</term> 4254 <listitem><para> 4255signal strength average (in dBm) for beacons received 4256from this peer 4257 </para></listitem> 4258 </varlistentry> 4259 <varlistentry> <term>pertid[IEEE80211_NUM_TIDS + 1]</term> 4260 <listitem><para> 4261per-TID statistics, see <structname>struct cfg80211_tid_stats</structname>, using the last 4262(IEEE80211_NUM_TIDS) index for MSDUs not encapsulated in QoS-MPDUs. 4263 </para></listitem> 4264 </varlistentry> 4265 </variablelist> 4266 </refsect1> 4267<refsect1> 4268<title>Description</title> 4269<para> 4270 </para><para> 4271 4272 Station information filled by driver for <function>get_station</function> and dump_station. 4273</para> 4274</refsect1> 4275</refentry> 4276 4277<refentry id="API-enum-monitor-flags"> 4278<refentryinfo> 4279 <title>LINUX</title> 4280 <productname>Kernel Hackers Manual</productname> 4281 <date>July 2017</date> 4282</refentryinfo> 4283<refmeta> 4284 <refentrytitle><phrase>enum monitor_flags</phrase></refentrytitle> 4285 <manvolnum>9</manvolnum> 4286 <refmiscinfo class="version">4.1.27</refmiscinfo> 4287</refmeta> 4288<refnamediv> 4289 <refname>enum monitor_flags</refname> 4290 <refpurpose> 4291 monitor flags 4292 </refpurpose> 4293</refnamediv> 4294<refsynopsisdiv> 4295 <title>Synopsis</title> 4296 <programlisting> 4297enum monitor_flags { 4298 MONITOR_FLAG_FCSFAIL, 4299 MONITOR_FLAG_PLCPFAIL, 4300 MONITOR_FLAG_CONTROL, 4301 MONITOR_FLAG_OTHER_BSS, 4302 MONITOR_FLAG_COOK_FRAMES, 4303 MONITOR_FLAG_ACTIVE 4304}; </programlisting> 4305</refsynopsisdiv> 4306<refsect1> 4307 <title>Constants</title> 4308 <variablelist> 4309 <varlistentry> <term>MONITOR_FLAG_FCSFAIL</term> 4310 <listitem><para> 4311pass frames with bad FCS 4312 </para></listitem> 4313 </varlistentry> 4314 <varlistentry> <term>MONITOR_FLAG_PLCPFAIL</term> 4315 <listitem><para> 4316pass frames with bad PLCP 4317 </para></listitem> 4318 </varlistentry> 4319 <varlistentry> <term>MONITOR_FLAG_CONTROL</term> 4320 <listitem><para> 4321pass control frames 4322 </para></listitem> 4323 </varlistentry> 4324 <varlistentry> <term>MONITOR_FLAG_OTHER_BSS</term> 4325 <listitem><para> 4326disable BSSID filtering 4327 </para></listitem> 4328 </varlistentry> 4329 <varlistentry> <term>MONITOR_FLAG_COOK_FRAMES</term> 4330 <listitem><para> 4331report frames after processing 4332 </para></listitem> 4333 </varlistentry> 4334 <varlistentry> <term>MONITOR_FLAG_ACTIVE</term> 4335 <listitem><para> 4336active monitor, ACKs frames on its MAC address 4337 </para></listitem> 4338 </varlistentry> 4339 </variablelist> 4340</refsect1> 4341<refsect1> 4342<title>Description</title> 4343<para> 4344 </para><para> 4345 4346 Monitor interface configuration flags. Note that these must be the bits 4347 according to the nl80211 flags. 4348</para> 4349</refsect1> 4350</refentry> 4351 4352<refentry id="API-enum-mpath-info-flags"> 4353<refentryinfo> 4354 <title>LINUX</title> 4355 <productname>Kernel Hackers Manual</productname> 4356 <date>July 2017</date> 4357</refentryinfo> 4358<refmeta> 4359 <refentrytitle><phrase>enum mpath_info_flags</phrase></refentrytitle> 4360 <manvolnum>9</manvolnum> 4361 <refmiscinfo class="version">4.1.27</refmiscinfo> 4362</refmeta> 4363<refnamediv> 4364 <refname>enum mpath_info_flags</refname> 4365 <refpurpose> 4366 mesh path information flags 4367 </refpurpose> 4368</refnamediv> 4369<refsynopsisdiv> 4370 <title>Synopsis</title> 4371 <programlisting> 4372enum mpath_info_flags { 4373 MPATH_INFO_FRAME_QLEN, 4374 MPATH_INFO_SN, 4375 MPATH_INFO_METRIC, 4376 MPATH_INFO_EXPTIME, 4377 MPATH_INFO_DISCOVERY_TIMEOUT, 4378 MPATH_INFO_DISCOVERY_RETRIES, 4379 MPATH_INFO_FLAGS 4380}; </programlisting> 4381</refsynopsisdiv> 4382<refsect1> 4383 <title>Constants</title> 4384 <variablelist> 4385 <varlistentry> <term>MPATH_INFO_FRAME_QLEN</term> 4386 <listitem><para> 4387<parameter>frame_qlen</parameter> filled 4388 </para></listitem> 4389 </varlistentry> 4390 <varlistentry> <term>MPATH_INFO_SN</term> 4391 <listitem><para> 4392<parameter>sn</parameter> filled 4393 </para></listitem> 4394 </varlistentry> 4395 <varlistentry> <term>MPATH_INFO_METRIC</term> 4396 <listitem><para> 4397<parameter>metric</parameter> filled 4398 </para></listitem> 4399 </varlistentry> 4400 <varlistentry> <term>MPATH_INFO_EXPTIME</term> 4401 <listitem><para> 4402<parameter>exptime</parameter> filled 4403 </para></listitem> 4404 </varlistentry> 4405 <varlistentry> <term>MPATH_INFO_DISCOVERY_TIMEOUT</term> 4406 <listitem><para> 4407<parameter>discovery_timeout</parameter> filled 4408 </para></listitem> 4409 </varlistentry> 4410 <varlistentry> <term>MPATH_INFO_DISCOVERY_RETRIES</term> 4411 <listitem><para> 4412<parameter>discovery_retries</parameter> filled 4413 </para></listitem> 4414 </varlistentry> 4415 <varlistentry> <term>MPATH_INFO_FLAGS</term> 4416 <listitem><para> 4417<parameter>flags</parameter> filled 4418 </para></listitem> 4419 </varlistentry> 4420 </variablelist> 4421</refsect1> 4422<refsect1> 4423<title>Description</title> 4424<para> 4425 </para><para> 4426 4427 Used by the driver to indicate which info in <structname>struct mpath_info</structname> it has filled 4428 in during <function>get_station</function> or <function>dump_station</function>. 4429</para> 4430</refsect1> 4431</refentry> 4432 4433<refentry id="API-struct-mpath-info"> 4434<refentryinfo> 4435 <title>LINUX</title> 4436 <productname>Kernel Hackers Manual</productname> 4437 <date>July 2017</date> 4438</refentryinfo> 4439<refmeta> 4440 <refentrytitle><phrase>struct mpath_info</phrase></refentrytitle> 4441 <manvolnum>9</manvolnum> 4442 <refmiscinfo class="version">4.1.27</refmiscinfo> 4443</refmeta> 4444<refnamediv> 4445 <refname>struct mpath_info</refname> 4446 <refpurpose> 4447 mesh path information 4448 </refpurpose> 4449</refnamediv> 4450<refsynopsisdiv> 4451 <title>Synopsis</title> 4452 <programlisting> 4453struct mpath_info { 4454 u32 filled; 4455 u32 frame_qlen; 4456 u32 sn; 4457 u32 metric; 4458 u32 exptime; 4459 u32 discovery_timeout; 4460 u8 discovery_retries; 4461 u8 flags; 4462 int generation; 4463}; </programlisting> 4464</refsynopsisdiv> 4465 <refsect1> 4466 <title>Members</title> 4467 <variablelist> 4468 <varlistentry> <term>filled</term> 4469 <listitem><para> 4470bitfield of flags from <structname>enum</structname> mpath_info_flags 4471 </para></listitem> 4472 </varlistentry> 4473 <varlistentry> <term>frame_qlen</term> 4474 <listitem><para> 4475number of queued frames for this destination 4476 </para></listitem> 4477 </varlistentry> 4478 <varlistentry> <term>sn</term> 4479 <listitem><para> 4480target sequence number 4481 </para></listitem> 4482 </varlistentry> 4483 <varlistentry> <term>metric</term> 4484 <listitem><para> 4485metric (cost) of this mesh path 4486 </para></listitem> 4487 </varlistentry> 4488 <varlistentry> <term>exptime</term> 4489 <listitem><para> 4490expiration time for the mesh path from now, in msecs 4491 </para></listitem> 4492 </varlistentry> 4493 <varlistentry> <term>discovery_timeout</term> 4494 <listitem><para> 4495total mesh path discovery timeout, in msecs 4496 </para></listitem> 4497 </varlistentry> 4498 <varlistentry> <term>discovery_retries</term> 4499 <listitem><para> 4500mesh path discovery retries 4501 </para></listitem> 4502 </varlistentry> 4503 <varlistentry> <term>flags</term> 4504 <listitem><para> 4505mesh path flags 4506 </para></listitem> 4507 </varlistentry> 4508 <varlistentry> <term>generation</term> 4509 <listitem><para> 4510generation number for nl80211 dumps. 4511This number should increase every time the list of mesh paths 4512changes, i.e. when a station is added or removed, so that 4513userspace can tell whether it got a consistent snapshot. 4514 </para></listitem> 4515 </varlistentry> 4516 </variablelist> 4517 </refsect1> 4518<refsect1> 4519<title>Description</title> 4520<para> 4521 </para><para> 4522 4523 Mesh path information filled by driver for <function>get_mpath</function> and <function>dump_mpath</function>. 4524</para> 4525</refsect1> 4526</refentry> 4527 4528<refentry id="API-struct-bss-parameters"> 4529<refentryinfo> 4530 <title>LINUX</title> 4531 <productname>Kernel Hackers Manual</productname> 4532 <date>July 2017</date> 4533</refentryinfo> 4534<refmeta> 4535 <refentrytitle><phrase>struct bss_parameters</phrase></refentrytitle> 4536 <manvolnum>9</manvolnum> 4537 <refmiscinfo class="version">4.1.27</refmiscinfo> 4538</refmeta> 4539<refnamediv> 4540 <refname>struct bss_parameters</refname> 4541 <refpurpose> 4542 BSS parameters 4543 </refpurpose> 4544</refnamediv> 4545<refsynopsisdiv> 4546 <title>Synopsis</title> 4547 <programlisting> 4548struct bss_parameters { 4549 int use_cts_prot; 4550 int use_short_preamble; 4551 int use_short_slot_time; 4552 const u8 * basic_rates; 4553 u8 basic_rates_len; 4554 int ap_isolate; 4555 int ht_opmode; 4556 s8 p2p_ctwindow; 4557 s8 p2p_opp_ps; 4558}; </programlisting> 4559</refsynopsisdiv> 4560 <refsect1> 4561 <title>Members</title> 4562 <variablelist> 4563 <varlistentry> <term>use_cts_prot</term> 4564 <listitem><para> 4565Whether to use CTS protection 4566(0 = no, 1 = yes, -1 = do not change) 4567 </para></listitem> 4568 </varlistentry> 4569 <varlistentry> <term>use_short_preamble</term> 4570 <listitem><para> 4571Whether the use of short preambles is allowed 4572(0 = no, 1 = yes, -1 = do not change) 4573 </para></listitem> 4574 </varlistentry> 4575 <varlistentry> <term>use_short_slot_time</term> 4576 <listitem><para> 4577Whether the use of short slot time is allowed 4578(0 = no, 1 = yes, -1 = do not change) 4579 </para></listitem> 4580 </varlistentry> 4581 <varlistentry> <term>basic_rates</term> 4582 <listitem><para> 4583basic rates in IEEE 802.11 format 4584(or NULL for no change) 4585 </para></listitem> 4586 </varlistentry> 4587 <varlistentry> <term>basic_rates_len</term> 4588 <listitem><para> 4589number of basic rates 4590 </para></listitem> 4591 </varlistentry> 4592 <varlistentry> <term>ap_isolate</term> 4593 <listitem><para> 4594do not forward packets between connected stations 4595 </para></listitem> 4596 </varlistentry> 4597 <varlistentry> <term>ht_opmode</term> 4598 <listitem><para> 4599HT Operation mode 4600(u16 = opmode, -1 = do not change) 4601 </para></listitem> 4602 </varlistentry> 4603 <varlistentry> <term>p2p_ctwindow</term> 4604 <listitem><para> 4605P2P CT Window (-1 = no change) 4606 </para></listitem> 4607 </varlistentry> 4608 <varlistentry> <term>p2p_opp_ps</term> 4609 <listitem><para> 4610P2P opportunistic PS (-1 = no change) 4611 </para></listitem> 4612 </varlistentry> 4613 </variablelist> 4614 </refsect1> 4615<refsect1> 4616<title>Description</title> 4617<para> 4618 </para><para> 4619 4620 Used to change BSS parameters (mainly for AP mode). 4621</para> 4622</refsect1> 4623</refentry> 4624 4625<refentry id="API-struct-ieee80211-txq-params"> 4626<refentryinfo> 4627 <title>LINUX</title> 4628 <productname>Kernel Hackers Manual</productname> 4629 <date>July 2017</date> 4630</refentryinfo> 4631<refmeta> 4632 <refentrytitle><phrase>struct ieee80211_txq_params</phrase></refentrytitle> 4633 <manvolnum>9</manvolnum> 4634 <refmiscinfo class="version">4.1.27</refmiscinfo> 4635</refmeta> 4636<refnamediv> 4637 <refname>struct ieee80211_txq_params</refname> 4638 <refpurpose> 4639 TX queue parameters 4640 </refpurpose> 4641</refnamediv> 4642<refsynopsisdiv> 4643 <title>Synopsis</title> 4644 <programlisting> 4645struct ieee80211_txq_params { 4646 enum nl80211_ac ac; 4647 u16 txop; 4648 u16 cwmin; 4649 u16 cwmax; 4650 u8 aifs; 4651}; </programlisting> 4652</refsynopsisdiv> 4653 <refsect1> 4654 <title>Members</title> 4655 <variablelist> 4656 <varlistentry> <term>ac</term> 4657 <listitem><para> 4658AC identifier 4659 </para></listitem> 4660 </varlistentry> 4661 <varlistentry> <term>txop</term> 4662 <listitem><para> 4663Maximum burst time in units of 32 usecs, 0 meaning disabled 4664 </para></listitem> 4665 </varlistentry> 4666 <varlistentry> <term>cwmin</term> 4667 <listitem><para> 4668Minimum contention window [a value of the form 2^n-1 in the range 46691..32767] 4670 </para></listitem> 4671 </varlistentry> 4672 <varlistentry> <term>cwmax</term> 4673 <listitem><para> 4674Maximum contention window [a value of the form 2^n-1 in the range 46751..32767] 4676 </para></listitem> 4677 </varlistentry> 4678 <varlistentry> <term>aifs</term> 4679 <listitem><para> 4680Arbitration interframe space [0..255] 4681 </para></listitem> 4682 </varlistentry> 4683 </variablelist> 4684 </refsect1> 4685</refentry> 4686 4687<refentry id="API-struct-cfg80211-crypto-settings"> 4688<refentryinfo> 4689 <title>LINUX</title> 4690 <productname>Kernel Hackers Manual</productname> 4691 <date>July 2017</date> 4692</refentryinfo> 4693<refmeta> 4694 <refentrytitle><phrase>struct cfg80211_crypto_settings</phrase></refentrytitle> 4695 <manvolnum>9</manvolnum> 4696 <refmiscinfo class="version">4.1.27</refmiscinfo> 4697</refmeta> 4698<refnamediv> 4699 <refname>struct cfg80211_crypto_settings</refname> 4700 <refpurpose> 4701 Crypto settings 4702 </refpurpose> 4703</refnamediv> 4704<refsynopsisdiv> 4705 <title>Synopsis</title> 4706 <programlisting> 4707struct cfg80211_crypto_settings { 4708 u32 wpa_versions; 4709 u32 cipher_group; 4710 int n_ciphers_pairwise; 4711 u32 ciphers_pairwise[NL80211_MAX_NR_CIPHER_SUITES]; 4712 int n_akm_suites; 4713 u32 akm_suites[NL80211_MAX_NR_AKM_SUITES]; 4714 bool control_port; 4715 __be16 control_port_ethertype; 4716 bool control_port_no_encrypt; 4717}; </programlisting> 4718</refsynopsisdiv> 4719 <refsect1> 4720 <title>Members</title> 4721 <variablelist> 4722 <varlistentry> <term>wpa_versions</term> 4723 <listitem><para> 4724indicates which, if any, WPA versions are enabled 4725(from enum nl80211_wpa_versions) 4726 </para></listitem> 4727 </varlistentry> 4728 <varlistentry> <term>cipher_group</term> 4729 <listitem><para> 4730group key cipher suite (or 0 if unset) 4731 </para></listitem> 4732 </varlistentry> 4733 <varlistentry> <term>n_ciphers_pairwise</term> 4734 <listitem><para> 4735number of AP supported unicast ciphers 4736 </para></listitem> 4737 </varlistentry> 4738 <varlistentry> <term>ciphers_pairwise[NL80211_MAX_NR_CIPHER_SUITES]</term> 4739 <listitem><para> 4740unicast key cipher suites 4741 </para></listitem> 4742 </varlistentry> 4743 <varlistentry> <term>n_akm_suites</term> 4744 <listitem><para> 4745number of AKM suites 4746 </para></listitem> 4747 </varlistentry> 4748 <varlistentry> <term>akm_suites[NL80211_MAX_NR_AKM_SUITES]</term> 4749 <listitem><para> 4750AKM suites 4751 </para></listitem> 4752 </varlistentry> 4753 <varlistentry> <term>control_port</term> 4754 <listitem><para> 4755Whether user space controls IEEE 802.1X port, i.e., 4756sets/clears <constant>NL80211_STA_FLAG_AUTHORIZED</constant>. If true, the driver is 4757required to assume that the port is unauthorized until authorized by 4758user space. Otherwise, port is marked authorized by default. 4759 </para></listitem> 4760 </varlistentry> 4761 <varlistentry> <term>control_port_ethertype</term> 4762 <listitem><para> 4763the control port protocol that should be 4764allowed through even on unauthorized ports 4765 </para></listitem> 4766 </varlistentry> 4767 <varlistentry> <term>control_port_no_encrypt</term> 4768 <listitem><para> 4769TRUE to prevent encryption of control port 4770protocol frames. 4771 </para></listitem> 4772 </varlistentry> 4773 </variablelist> 4774 </refsect1> 4775</refentry> 4776 4777<refentry id="API-struct-cfg80211-auth-request"> 4778<refentryinfo> 4779 <title>LINUX</title> 4780 <productname>Kernel Hackers Manual</productname> 4781 <date>July 2017</date> 4782</refentryinfo> 4783<refmeta> 4784 <refentrytitle><phrase>struct cfg80211_auth_request</phrase></refentrytitle> 4785 <manvolnum>9</manvolnum> 4786 <refmiscinfo class="version">4.1.27</refmiscinfo> 4787</refmeta> 4788<refnamediv> 4789 <refname>struct cfg80211_auth_request</refname> 4790 <refpurpose> 4791 Authentication request data 4792 </refpurpose> 4793</refnamediv> 4794<refsynopsisdiv> 4795 <title>Synopsis</title> 4796 <programlisting> 4797struct cfg80211_auth_request { 4798 struct cfg80211_bss * bss; 4799 const u8 * ie; 4800 size_t ie_len; 4801 enum nl80211_auth_type auth_type; 4802 const u8 * key; 4803 u8 key_len; 4804 u8 key_idx; 4805 const u8 * sae_data; 4806 size_t sae_data_len; 4807}; </programlisting> 4808</refsynopsisdiv> 4809 <refsect1> 4810 <title>Members</title> 4811 <variablelist> 4812 <varlistentry> <term>bss</term> 4813 <listitem><para> 4814The BSS to authenticate with, the callee must obtain a reference 4815to it if it needs to keep it. 4816 </para></listitem> 4817 </varlistentry> 4818 <varlistentry> <term>ie</term> 4819 <listitem><para> 4820Extra IEs to add to Authentication frame or <constant>NULL</constant> 4821 </para></listitem> 4822 </varlistentry> 4823 <varlistentry> <term>ie_len</term> 4824 <listitem><para> 4825Length of ie buffer in octets 4826 </para></listitem> 4827 </varlistentry> 4828 <varlistentry> <term>auth_type</term> 4829 <listitem><para> 4830Authentication type (algorithm) 4831 </para></listitem> 4832 </varlistentry> 4833 <varlistentry> <term>key</term> 4834 <listitem><para> 4835WEP key for shared key authentication 4836 </para></listitem> 4837 </varlistentry> 4838 <varlistentry> <term>key_len</term> 4839 <listitem><para> 4840length of WEP key for shared key authentication 4841 </para></listitem> 4842 </varlistentry> 4843 <varlistentry> <term>key_idx</term> 4844 <listitem><para> 4845index of WEP key for shared key authentication 4846 </para></listitem> 4847 </varlistentry> 4848 <varlistentry> <term>sae_data</term> 4849 <listitem><para> 4850Non-IE data to use with SAE or <constant>NULL</constant>. This starts with 4851Authentication transaction sequence number field. 4852 </para></listitem> 4853 </varlistentry> 4854 <varlistentry> <term>sae_data_len</term> 4855 <listitem><para> 4856Length of sae_data buffer in octets 4857 </para></listitem> 4858 </varlistentry> 4859 </variablelist> 4860 </refsect1> 4861<refsect1> 4862<title>Description</title> 4863<para> 4864 </para><para> 4865 4866 This structure provides information needed to complete IEEE 802.11 4867 authentication. 4868</para> 4869</refsect1> 4870</refentry> 4871 4872<refentry id="API-struct-cfg80211-assoc-request"> 4873<refentryinfo> 4874 <title>LINUX</title> 4875 <productname>Kernel Hackers Manual</productname> 4876 <date>July 2017</date> 4877</refentryinfo> 4878<refmeta> 4879 <refentrytitle><phrase>struct cfg80211_assoc_request</phrase></refentrytitle> 4880 <manvolnum>9</manvolnum> 4881 <refmiscinfo class="version">4.1.27</refmiscinfo> 4882</refmeta> 4883<refnamediv> 4884 <refname>struct cfg80211_assoc_request</refname> 4885 <refpurpose> 4886 (Re)Association request data 4887 </refpurpose> 4888</refnamediv> 4889<refsynopsisdiv> 4890 <title>Synopsis</title> 4891 <programlisting> 4892struct cfg80211_assoc_request { 4893 struct cfg80211_bss * bss; 4894 const u8 * ie; 4895 const u8 * prev_bssid; 4896 size_t ie_len; 4897 struct cfg80211_crypto_settings crypto; 4898 bool use_mfp; 4899 u32 flags; 4900 struct ieee80211_ht_cap ht_capa; 4901 struct ieee80211_ht_cap ht_capa_mask; 4902 struct ieee80211_vht_cap vht_capa; 4903 struct ieee80211_vht_cap vht_capa_mask; 4904}; </programlisting> 4905</refsynopsisdiv> 4906 <refsect1> 4907 <title>Members</title> 4908 <variablelist> 4909 <varlistentry> <term>bss</term> 4910 <listitem><para> 4911The BSS to associate with. If the call is successful the driver is 4912given a reference that it must give back to <function>cfg80211_send_rx_assoc</function> 4913or to <function>cfg80211_assoc_timeout</function>. To ensure proper refcounting, new 4914association requests while already associating must be rejected. 4915 </para></listitem> 4916 </varlistentry> 4917 <varlistentry> <term>ie</term> 4918 <listitem><para> 4919Extra IEs to add to (Re)Association Request frame or <constant>NULL</constant> 4920 </para></listitem> 4921 </varlistentry> 4922 <varlistentry> <term>prev_bssid</term> 4923 <listitem><para> 4924previous BSSID, if not <constant>NULL</constant> use reassociate frame 4925 </para></listitem> 4926 </varlistentry> 4927 <varlistentry> <term>ie_len</term> 4928 <listitem><para> 4929Length of ie buffer in octets 4930 </para></listitem> 4931 </varlistentry> 4932 <varlistentry> <term>crypto</term> 4933 <listitem><para> 4934crypto settings 4935 </para></listitem> 4936 </varlistentry> 4937 <varlistentry> <term>use_mfp</term> 4938 <listitem><para> 4939Use management frame protection (IEEE 802.11w) in this association 4940 </para></listitem> 4941 </varlistentry> 4942 <varlistentry> <term>flags</term> 4943 <listitem><para> 4944See <structname>enum</structname> cfg80211_assoc_req_flags 4945 </para></listitem> 4946 </varlistentry> 4947 <varlistentry> <term>ht_capa</term> 4948 <listitem><para> 4949HT Capabilities over-rides. Values set in ht_capa_mask 4950will be used in ht_capa. Un-supported values will be ignored. 4951 </para></listitem> 4952 </varlistentry> 4953 <varlistentry> <term>ht_capa_mask</term> 4954 <listitem><para> 4955The bits of ht_capa which are to be used. 4956 </para></listitem> 4957 </varlistentry> 4958 <varlistentry> <term>vht_capa</term> 4959 <listitem><para> 4960VHT capability override 4961 </para></listitem> 4962 </varlistentry> 4963 <varlistentry> <term>vht_capa_mask</term> 4964 <listitem><para> 4965VHT capability mask indicating which fields to use 4966 </para></listitem> 4967 </varlistentry> 4968 </variablelist> 4969 </refsect1> 4970<refsect1> 4971<title>Description</title> 4972<para> 4973 </para><para> 4974 4975 This structure provides information needed to complete IEEE 802.11 4976 (re)association. 4977</para> 4978</refsect1> 4979</refentry> 4980 4981<refentry id="API-struct-cfg80211-deauth-request"> 4982<refentryinfo> 4983 <title>LINUX</title> 4984 <productname>Kernel Hackers Manual</productname> 4985 <date>July 2017</date> 4986</refentryinfo> 4987<refmeta> 4988 <refentrytitle><phrase>struct cfg80211_deauth_request</phrase></refentrytitle> 4989 <manvolnum>9</manvolnum> 4990 <refmiscinfo class="version">4.1.27</refmiscinfo> 4991</refmeta> 4992<refnamediv> 4993 <refname>struct cfg80211_deauth_request</refname> 4994 <refpurpose> 4995 Deauthentication request data 4996 </refpurpose> 4997</refnamediv> 4998<refsynopsisdiv> 4999 <title>Synopsis</title> 5000 <programlisting> 5001struct cfg80211_deauth_request { 5002 const u8 * bssid; 5003 const u8 * ie; 5004 size_t ie_len; 5005 u16 reason_code; 5006 bool local_state_change; 5007}; </programlisting> 5008</refsynopsisdiv> 5009 <refsect1> 5010 <title>Members</title> 5011 <variablelist> 5012 <varlistentry> <term>bssid</term> 5013 <listitem><para> 5014the BSSID of the BSS to deauthenticate from 5015 </para></listitem> 5016 </varlistentry> 5017 <varlistentry> <term>ie</term> 5018 <listitem><para> 5019Extra IEs to add to Deauthentication frame or <constant>NULL</constant> 5020 </para></listitem> 5021 </varlistentry> 5022 <varlistentry> <term>ie_len</term> 5023 <listitem><para> 5024Length of ie buffer in octets 5025 </para></listitem> 5026 </varlistentry> 5027 <varlistentry> <term>reason_code</term> 5028 <listitem><para> 5029The reason code for the deauthentication 5030 </para></listitem> 5031 </varlistentry> 5032 <varlistentry> <term>local_state_change</term> 5033 <listitem><para> 5034if set, change local state only and 5035do not set a deauth frame 5036 </para></listitem> 5037 </varlistentry> 5038 </variablelist> 5039 </refsect1> 5040<refsect1> 5041<title>Description</title> 5042<para> 5043 </para><para> 5044 5045 This structure provides information needed to complete IEEE 802.11 5046 deauthentication. 5047</para> 5048</refsect1> 5049</refentry> 5050 5051<refentry id="API-struct-cfg80211-disassoc-request"> 5052<refentryinfo> 5053 <title>LINUX</title> 5054 <productname>Kernel Hackers Manual</productname> 5055 <date>July 2017</date> 5056</refentryinfo> 5057<refmeta> 5058 <refentrytitle><phrase>struct cfg80211_disassoc_request</phrase></refentrytitle> 5059 <manvolnum>9</manvolnum> 5060 <refmiscinfo class="version">4.1.27</refmiscinfo> 5061</refmeta> 5062<refnamediv> 5063 <refname>struct cfg80211_disassoc_request</refname> 5064 <refpurpose> 5065 Disassociation request data 5066 </refpurpose> 5067</refnamediv> 5068<refsynopsisdiv> 5069 <title>Synopsis</title> 5070 <programlisting> 5071struct cfg80211_disassoc_request { 5072 struct cfg80211_bss * bss; 5073 const u8 * ie; 5074 size_t ie_len; 5075 u16 reason_code; 5076 bool local_state_change; 5077}; </programlisting> 5078</refsynopsisdiv> 5079 <refsect1> 5080 <title>Members</title> 5081 <variablelist> 5082 <varlistentry> <term>bss</term> 5083 <listitem><para> 5084the BSS to disassociate from 5085 </para></listitem> 5086 </varlistentry> 5087 <varlistentry> <term>ie</term> 5088 <listitem><para> 5089Extra IEs to add to Disassociation frame or <constant>NULL</constant> 5090 </para></listitem> 5091 </varlistentry> 5092 <varlistentry> <term>ie_len</term> 5093 <listitem><para> 5094Length of ie buffer in octets 5095 </para></listitem> 5096 </varlistentry> 5097 <varlistentry> <term>reason_code</term> 5098 <listitem><para> 5099The reason code for the disassociation 5100 </para></listitem> 5101 </varlistentry> 5102 <varlistentry> <term>local_state_change</term> 5103 <listitem><para> 5104This is a request for a local state only, i.e., no 5105Disassociation frame is to be transmitted. 5106 </para></listitem> 5107 </varlistentry> 5108 </variablelist> 5109 </refsect1> 5110<refsect1> 5111<title>Description</title> 5112<para> 5113 </para><para> 5114 5115 This structure provides information needed to complete IEEE 802.11 5116 disassocation. 5117</para> 5118</refsect1> 5119</refentry> 5120 5121<refentry id="API-struct-cfg80211-ibss-params"> 5122<refentryinfo> 5123 <title>LINUX</title> 5124 <productname>Kernel Hackers Manual</productname> 5125 <date>July 2017</date> 5126</refentryinfo> 5127<refmeta> 5128 <refentrytitle><phrase>struct cfg80211_ibss_params</phrase></refentrytitle> 5129 <manvolnum>9</manvolnum> 5130 <refmiscinfo class="version">4.1.27</refmiscinfo> 5131</refmeta> 5132<refnamediv> 5133 <refname>struct cfg80211_ibss_params</refname> 5134 <refpurpose> 5135 IBSS parameters 5136 </refpurpose> 5137</refnamediv> 5138<refsynopsisdiv> 5139 <title>Synopsis</title> 5140 <programlisting> 5141struct cfg80211_ibss_params { 5142 const u8 * ssid; 5143 const u8 * bssid; 5144 struct cfg80211_chan_def chandef; 5145 const u8 * ie; 5146 u8 ssid_len; 5147 u8 ie_len; 5148 u16 beacon_interval; 5149 u32 basic_rates; 5150 bool channel_fixed; 5151 bool privacy; 5152 bool control_port; 5153 bool userspace_handles_dfs; 5154 int mcast_rate[IEEE80211_NUM_BANDS]; 5155 struct ieee80211_ht_cap ht_capa; 5156 struct ieee80211_ht_cap ht_capa_mask; 5157}; </programlisting> 5158</refsynopsisdiv> 5159 <refsect1> 5160 <title>Members</title> 5161 <variablelist> 5162 <varlistentry> <term>ssid</term> 5163 <listitem><para> 5164The SSID, will always be non-null. 5165 </para></listitem> 5166 </varlistentry> 5167 <varlistentry> <term>bssid</term> 5168 <listitem><para> 5169Fixed BSSID requested, maybe be <constant>NULL</constant>, if set do not 5170search for IBSSs with a different BSSID. 5171 </para></listitem> 5172 </varlistentry> 5173 <varlistentry> <term>chandef</term> 5174 <listitem><para> 5175defines the channel to use if no other IBSS to join can be found 5176 </para></listitem> 5177 </varlistentry> 5178 <varlistentry> <term>ie</term> 5179 <listitem><para> 5180information element(s) to include in the beacon 5181 </para></listitem> 5182 </varlistentry> 5183 <varlistentry> <term>ssid_len</term> 5184 <listitem><para> 5185The length of the SSID, will always be non-zero. 5186 </para></listitem> 5187 </varlistentry> 5188 <varlistentry> <term>ie_len</term> 5189 <listitem><para> 5190length of that 5191 </para></listitem> 5192 </varlistentry> 5193 <varlistentry> <term>beacon_interval</term> 5194 <listitem><para> 5195beacon interval to use 5196 </para></listitem> 5197 </varlistentry> 5198 <varlistentry> <term>basic_rates</term> 5199 <listitem><para> 5200bitmap of basic rates to use when creating the IBSS 5201 </para></listitem> 5202 </varlistentry> 5203 <varlistentry> <term>channel_fixed</term> 5204 <listitem><para> 5205The channel should be fixed -- do not search for 5206IBSSs to join on other channels. 5207 </para></listitem> 5208 </varlistentry> 5209 <varlistentry> <term>privacy</term> 5210 <listitem><para> 5211this is a protected network, keys will be configured 5212after joining 5213 </para></listitem> 5214 </varlistentry> 5215 <varlistentry> <term>control_port</term> 5216 <listitem><para> 5217whether user space controls IEEE 802.1X port, i.e., 5218sets/clears <constant>NL80211_STA_FLAG_AUTHORIZED</constant>. If true, the driver is 5219required to assume that the port is unauthorized until authorized by 5220user space. Otherwise, port is marked authorized by default. 5221 </para></listitem> 5222 </varlistentry> 5223 <varlistentry> <term>userspace_handles_dfs</term> 5224 <listitem><para> 5225whether user space controls DFS operation, i.e. 5226changes the channel when a radar is detected. This is required 5227to operate on DFS channels. 5228 </para></listitem> 5229 </varlistentry> 5230 <varlistentry> <term>mcast_rate[IEEE80211_NUM_BANDS]</term> 5231 <listitem><para> 5232per-band multicast rate index + 1 (0: disabled) 5233 </para></listitem> 5234 </varlistentry> 5235 <varlistentry> <term>ht_capa</term> 5236 <listitem><para> 5237HT Capabilities over-rides. Values set in ht_capa_mask 5238will be used in ht_capa. Un-supported values will be ignored. 5239 </para></listitem> 5240 </varlistentry> 5241 <varlistentry> <term>ht_capa_mask</term> 5242 <listitem><para> 5243The bits of ht_capa which are to be used. 5244 </para></listitem> 5245 </varlistentry> 5246 </variablelist> 5247 </refsect1> 5248<refsect1> 5249<title>Description</title> 5250<para> 5251 </para><para> 5252 5253 This structure defines the IBSS parameters for the <function>join_ibss</function> 5254 method. 5255</para> 5256</refsect1> 5257</refentry> 5258 5259<refentry id="API-struct-cfg80211-connect-params"> 5260<refentryinfo> 5261 <title>LINUX</title> 5262 <productname>Kernel Hackers Manual</productname> 5263 <date>July 2017</date> 5264</refentryinfo> 5265<refmeta> 5266 <refentrytitle><phrase>struct cfg80211_connect_params</phrase></refentrytitle> 5267 <manvolnum>9</manvolnum> 5268 <refmiscinfo class="version">4.1.27</refmiscinfo> 5269</refmeta> 5270<refnamediv> 5271 <refname>struct cfg80211_connect_params</refname> 5272 <refpurpose> 5273 Connection parameters 5274 </refpurpose> 5275</refnamediv> 5276<refsynopsisdiv> 5277 <title>Synopsis</title> 5278 <programlisting> 5279struct cfg80211_connect_params { 5280 struct ieee80211_channel * channel; 5281 struct ieee80211_channel * channel_hint; 5282 const u8 * bssid; 5283 const u8 * bssid_hint; 5284 const u8 * ssid; 5285 size_t ssid_len; 5286 enum nl80211_auth_type auth_type; 5287 const u8 * ie; 5288 size_t ie_len; 5289 bool privacy; 5290 enum nl80211_mfp mfp; 5291 struct cfg80211_crypto_settings crypto; 5292 const u8 * key; 5293 u8 key_len; 5294 u8 key_idx; 5295 u32 flags; 5296 int bg_scan_period; 5297 struct ieee80211_ht_cap ht_capa; 5298 struct ieee80211_ht_cap ht_capa_mask; 5299 struct ieee80211_vht_cap vht_capa; 5300 struct ieee80211_vht_cap vht_capa_mask; 5301}; </programlisting> 5302</refsynopsisdiv> 5303 <refsect1> 5304 <title>Members</title> 5305 <variablelist> 5306 <varlistentry> <term>channel</term> 5307 <listitem><para> 5308The channel to use or <constant>NULL</constant> if not specified (auto-select based 5309on scan results) 5310 </para></listitem> 5311 </varlistentry> 5312 <varlistentry> <term>channel_hint</term> 5313 <listitem><para> 5314The channel of the recommended BSS for initial connection or 5315<constant>NULL</constant> if not specified 5316 </para></listitem> 5317 </varlistentry> 5318 <varlistentry> <term>bssid</term> 5319 <listitem><para> 5320The AP BSSID or <constant>NULL</constant> if not specified (auto-select based on scan 5321results) 5322 </para></listitem> 5323 </varlistentry> 5324 <varlistentry> <term>bssid_hint</term> 5325 <listitem><para> 5326The recommended AP BSSID for initial connection to the BSS or 5327<constant>NULL</constant> if not specified. Unlike the <parameter>bssid</parameter> parameter, the driver is 5328allowed to ignore this <parameter>bssid_hint</parameter> if it has knowledge of a better BSS 5329to use. 5330 </para></listitem> 5331 </varlistentry> 5332 <varlistentry> <term>ssid</term> 5333 <listitem><para> 5334SSID 5335 </para></listitem> 5336 </varlistentry> 5337 <varlistentry> <term>ssid_len</term> 5338 <listitem><para> 5339Length of ssid in octets 5340 </para></listitem> 5341 </varlistentry> 5342 <varlistentry> <term>auth_type</term> 5343 <listitem><para> 5344Authentication type (algorithm) 5345 </para></listitem> 5346 </varlistentry> 5347 <varlistentry> <term>ie</term> 5348 <listitem><para> 5349IEs for association request 5350 </para></listitem> 5351 </varlistentry> 5352 <varlistentry> <term>ie_len</term> 5353 <listitem><para> 5354Length of assoc_ie in octets 5355 </para></listitem> 5356 </varlistentry> 5357 <varlistentry> <term>privacy</term> 5358 <listitem><para> 5359indicates whether privacy-enabled APs should be used 5360 </para></listitem> 5361 </varlistentry> 5362 <varlistentry> <term>mfp</term> 5363 <listitem><para> 5364indicate whether management frame protection is used 5365 </para></listitem> 5366 </varlistentry> 5367 <varlistentry> <term>crypto</term> 5368 <listitem><para> 5369crypto settings 5370 </para></listitem> 5371 </varlistentry> 5372 <varlistentry> <term>key</term> 5373 <listitem><para> 5374WEP key for shared key authentication 5375 </para></listitem> 5376 </varlistentry> 5377 <varlistentry> <term>key_len</term> 5378 <listitem><para> 5379length of WEP key for shared key authentication 5380 </para></listitem> 5381 </varlistentry> 5382 <varlistentry> <term>key_idx</term> 5383 <listitem><para> 5384index of WEP key for shared key authentication 5385 </para></listitem> 5386 </varlistentry> 5387 <varlistentry> <term>flags</term> 5388 <listitem><para> 5389See <structname>enum</structname> cfg80211_assoc_req_flags 5390 </para></listitem> 5391 </varlistentry> 5392 <varlistentry> <term>bg_scan_period</term> 5393 <listitem><para> 5394Background scan period in seconds 5395or -1 to indicate that default value is to be used. 5396 </para></listitem> 5397 </varlistentry> 5398 <varlistentry> <term>ht_capa</term> 5399 <listitem><para> 5400HT Capabilities over-rides. Values set in ht_capa_mask 5401will be used in ht_capa. Un-supported values will be ignored. 5402 </para></listitem> 5403 </varlistentry> 5404 <varlistentry> <term>ht_capa_mask</term> 5405 <listitem><para> 5406The bits of ht_capa which are to be used. 5407 </para></listitem> 5408 </varlistentry> 5409 <varlistentry> <term>vht_capa</term> 5410 <listitem><para> 5411VHT Capability overrides 5412 </para></listitem> 5413 </varlistentry> 5414 <varlistentry> <term>vht_capa_mask</term> 5415 <listitem><para> 5416The bits of vht_capa which are to be used. 5417 </para></listitem> 5418 </varlistentry> 5419 </variablelist> 5420 </refsect1> 5421<refsect1> 5422<title>Description</title> 5423<para> 5424 </para><para> 5425 5426 This structure provides information needed to complete IEEE 802.11 5427 authentication and association. 5428</para> 5429</refsect1> 5430</refentry> 5431 5432<refentry id="API-struct-cfg80211-pmksa"> 5433<refentryinfo> 5434 <title>LINUX</title> 5435 <productname>Kernel Hackers Manual</productname> 5436 <date>July 2017</date> 5437</refentryinfo> 5438<refmeta> 5439 <refentrytitle><phrase>struct cfg80211_pmksa</phrase></refentrytitle> 5440 <manvolnum>9</manvolnum> 5441 <refmiscinfo class="version">4.1.27</refmiscinfo> 5442</refmeta> 5443<refnamediv> 5444 <refname>struct cfg80211_pmksa</refname> 5445 <refpurpose> 5446 PMK Security Association 5447 </refpurpose> 5448</refnamediv> 5449<refsynopsisdiv> 5450 <title>Synopsis</title> 5451 <programlisting> 5452struct cfg80211_pmksa { 5453 const u8 * bssid; 5454 const u8 * pmkid; 5455}; </programlisting> 5456</refsynopsisdiv> 5457 <refsect1> 5458 <title>Members</title> 5459 <variablelist> 5460 <varlistentry> <term>bssid</term> 5461 <listitem><para> 5462The AP's BSSID. 5463 </para></listitem> 5464 </varlistentry> 5465 <varlistentry> <term>pmkid</term> 5466 <listitem><para> 5467The PMK material itself. 5468 </para></listitem> 5469 </varlistentry> 5470 </variablelist> 5471 </refsect1> 5472<refsect1> 5473<title>Description</title> 5474<para> 5475 </para><para> 5476 5477 This structure is passed to the set/<function>del_pmksa</function> method for PMKSA 5478 caching. 5479</para> 5480</refsect1> 5481</refentry> 5482 5483<refentry id="API-cfg80211-rx-mlme-mgmt"> 5484<refentryinfo> 5485 <title>LINUX</title> 5486 <productname>Kernel Hackers Manual</productname> 5487 <date>July 2017</date> 5488</refentryinfo> 5489<refmeta> 5490 <refentrytitle><phrase>cfg80211_rx_mlme_mgmt</phrase></refentrytitle> 5491 <manvolnum>9</manvolnum> 5492 <refmiscinfo class="version">4.1.27</refmiscinfo> 5493</refmeta> 5494<refnamediv> 5495 <refname>cfg80211_rx_mlme_mgmt</refname> 5496 <refpurpose> 5497 notification of processed MLME management frame 5498 </refpurpose> 5499</refnamediv> 5500<refsynopsisdiv> 5501 <title>Synopsis</title> 5502 <funcsynopsis><funcprototype> 5503 <funcdef>void <function>cfg80211_rx_mlme_mgmt </function></funcdef> 5504 <paramdef>struct net_device * <parameter>dev</parameter></paramdef> 5505 <paramdef>const u8 * <parameter>buf</parameter></paramdef> 5506 <paramdef>size_t <parameter>len</parameter></paramdef> 5507 </funcprototype></funcsynopsis> 5508</refsynopsisdiv> 5509<refsect1> 5510 <title>Arguments</title> 5511 <variablelist> 5512 <varlistentry> 5513 <term><parameter>dev</parameter></term> 5514 <listitem> 5515 <para> 5516 network device 5517 </para> 5518 </listitem> 5519 </varlistentry> 5520 <varlistentry> 5521 <term><parameter>buf</parameter></term> 5522 <listitem> 5523 <para> 5524 authentication frame (header + body) 5525 </para> 5526 </listitem> 5527 </varlistentry> 5528 <varlistentry> 5529 <term><parameter>len</parameter></term> 5530 <listitem> 5531 <para> 5532 length of the frame data 5533 </para> 5534 </listitem> 5535 </varlistentry> 5536 </variablelist> 5537</refsect1> 5538<refsect1> 5539<title>Description</title> 5540<para> 5541 This function is called whenever an authentication, disassociation or 5542 deauthentication frame has been received and processed in station mode. 5543</para> 5544</refsect1> 5545<refsect1> 5546<title>After being asked to authenticate via cfg80211_ops</title> 5547<para> 5548 :<function>auth</function> the driver must 5549 call either this function or <function>cfg80211_auth_timeout</function>. 5550</para> 5551</refsect1> 5552<refsect1> 5553<title>After being asked to associate via cfg80211_ops</title> 5554<para> 5555 :<function>assoc</function> the driver must 5556 call either this function or <function>cfg80211_auth_timeout</function>. 5557 While connected, the driver must calls this for received and processed 5558 disassociation and deauthentication frames. If the frame couldn't be used 5559 because it was unprotected, the driver must call the function 5560 <function>cfg80211_rx_unprot_mlme_mgmt</function> instead. 5561 </para><para> 5562 5563 This function may sleep. The caller must hold the corresponding wdev's mutex. 5564</para> 5565</refsect1> 5566</refentry> 5567 5568<refentry id="API-cfg80211-auth-timeout"> 5569<refentryinfo> 5570 <title>LINUX</title> 5571 <productname>Kernel Hackers Manual</productname> 5572 <date>July 2017</date> 5573</refentryinfo> 5574<refmeta> 5575 <refentrytitle><phrase>cfg80211_auth_timeout</phrase></refentrytitle> 5576 <manvolnum>9</manvolnum> 5577 <refmiscinfo class="version">4.1.27</refmiscinfo> 5578</refmeta> 5579<refnamediv> 5580 <refname>cfg80211_auth_timeout</refname> 5581 <refpurpose> 5582 notification of timed out authentication 5583 </refpurpose> 5584</refnamediv> 5585<refsynopsisdiv> 5586 <title>Synopsis</title> 5587 <funcsynopsis><funcprototype> 5588 <funcdef>void <function>cfg80211_auth_timeout </function></funcdef> 5589 <paramdef>struct net_device * <parameter>dev</parameter></paramdef> 5590 <paramdef>const u8 * <parameter>addr</parameter></paramdef> 5591 </funcprototype></funcsynopsis> 5592</refsynopsisdiv> 5593<refsect1> 5594 <title>Arguments</title> 5595 <variablelist> 5596 <varlistentry> 5597 <term><parameter>dev</parameter></term> 5598 <listitem> 5599 <para> 5600 network device 5601 </para> 5602 </listitem> 5603 </varlistentry> 5604 <varlistentry> 5605 <term><parameter>addr</parameter></term> 5606 <listitem> 5607 <para> 5608 The MAC address of the device with which the authentication timed out 5609 </para> 5610 </listitem> 5611 </varlistentry> 5612 </variablelist> 5613</refsect1> 5614<refsect1> 5615<title>Description</title> 5616<para> 5617 This function may sleep. The caller must hold the corresponding wdev's 5618 mutex. 5619</para> 5620</refsect1> 5621</refentry> 5622 5623<refentry id="API-cfg80211-rx-assoc-resp"> 5624<refentryinfo> 5625 <title>LINUX</title> 5626 <productname>Kernel Hackers Manual</productname> 5627 <date>July 2017</date> 5628</refentryinfo> 5629<refmeta> 5630 <refentrytitle><phrase>cfg80211_rx_assoc_resp</phrase></refentrytitle> 5631 <manvolnum>9</manvolnum> 5632 <refmiscinfo class="version">4.1.27</refmiscinfo> 5633</refmeta> 5634<refnamediv> 5635 <refname>cfg80211_rx_assoc_resp</refname> 5636 <refpurpose> 5637 notification of processed association response 5638 </refpurpose> 5639</refnamediv> 5640<refsynopsisdiv> 5641 <title>Synopsis</title> 5642 <funcsynopsis><funcprototype> 5643 <funcdef>void <function>cfg80211_rx_assoc_resp </function></funcdef> 5644 <paramdef>struct net_device * <parameter>dev</parameter></paramdef> 5645 <paramdef>struct cfg80211_bss * <parameter>bss</parameter></paramdef> 5646 <paramdef>const u8 * <parameter>buf</parameter></paramdef> 5647 <paramdef>size_t <parameter>len</parameter></paramdef> 5648 <paramdef>int <parameter>uapsd_queues</parameter></paramdef> 5649 </funcprototype></funcsynopsis> 5650</refsynopsisdiv> 5651<refsect1> 5652 <title>Arguments</title> 5653 <variablelist> 5654 <varlistentry> 5655 <term><parameter>dev</parameter></term> 5656 <listitem> 5657 <para> 5658 network device 5659 </para> 5660 </listitem> 5661 </varlistentry> 5662 <varlistentry> 5663 <term><parameter>bss</parameter></term> 5664 <listitem> 5665 <para> 5666 the BSS that association was requested with, ownership of the pointer 5667 moves to cfg80211 in this call 5668 </para> 5669 </listitem> 5670 </varlistentry> 5671 <varlistentry> 5672 <term><parameter>buf</parameter></term> 5673 <listitem> 5674 <para> 5675 authentication frame (header + body) 5676 </para> 5677 </listitem> 5678 </varlistentry> 5679 <varlistentry> 5680 <term><parameter>len</parameter></term> 5681 <listitem> 5682 <para> 5683 length of the frame data 5684 </para> 5685 </listitem> 5686 </varlistentry> 5687 <varlistentry> 5688 <term><parameter>uapsd_queues</parameter></term> 5689 <listitem> 5690 <para> 5691 bitmap of ACs configured to uapsd. -1 if n/a. 5692 </para> 5693 </listitem> 5694 </varlistentry> 5695 </variablelist> 5696</refsect1> 5697<refsect1> 5698<title>After being asked to associate via cfg80211_ops</title> 5699<para> 5700 :<function>assoc</function> the driver must 5701 call either this function or <function>cfg80211_auth_timeout</function>. 5702 </para><para> 5703 5704 This function may sleep. The caller must hold the corresponding wdev's mutex. 5705</para> 5706</refsect1> 5707</refentry> 5708 5709<refentry id="API-cfg80211-assoc-timeout"> 5710<refentryinfo> 5711 <title>LINUX</title> 5712 <productname>Kernel Hackers Manual</productname> 5713 <date>July 2017</date> 5714</refentryinfo> 5715<refmeta> 5716 <refentrytitle><phrase>cfg80211_assoc_timeout</phrase></refentrytitle> 5717 <manvolnum>9</manvolnum> 5718 <refmiscinfo class="version">4.1.27</refmiscinfo> 5719</refmeta> 5720<refnamediv> 5721 <refname>cfg80211_assoc_timeout</refname> 5722 <refpurpose> 5723 notification of timed out association 5724 </refpurpose> 5725</refnamediv> 5726<refsynopsisdiv> 5727 <title>Synopsis</title> 5728 <funcsynopsis><funcprototype> 5729 <funcdef>void <function>cfg80211_assoc_timeout </function></funcdef> 5730 <paramdef>struct net_device * <parameter>dev</parameter></paramdef> 5731 <paramdef>struct cfg80211_bss * <parameter>bss</parameter></paramdef> 5732 </funcprototype></funcsynopsis> 5733</refsynopsisdiv> 5734<refsect1> 5735 <title>Arguments</title> 5736 <variablelist> 5737 <varlistentry> 5738 <term><parameter>dev</parameter></term> 5739 <listitem> 5740 <para> 5741 network device 5742 </para> 5743 </listitem> 5744 </varlistentry> 5745 <varlistentry> 5746 <term><parameter>bss</parameter></term> 5747 <listitem> 5748 <para> 5749 The BSS entry with which association timed out. 5750 </para> 5751 </listitem> 5752 </varlistentry> 5753 </variablelist> 5754</refsect1> 5755<refsect1> 5756<title>Description</title> 5757<para> 5758 This function may sleep. The caller must hold the corresponding wdev's mutex. 5759</para> 5760</refsect1> 5761</refentry> 5762 5763<refentry id="API-cfg80211-tx-mlme-mgmt"> 5764<refentryinfo> 5765 <title>LINUX</title> 5766 <productname>Kernel Hackers Manual</productname> 5767 <date>July 2017</date> 5768</refentryinfo> 5769<refmeta> 5770 <refentrytitle><phrase>cfg80211_tx_mlme_mgmt</phrase></refentrytitle> 5771 <manvolnum>9</manvolnum> 5772 <refmiscinfo class="version">4.1.27</refmiscinfo> 5773</refmeta> 5774<refnamediv> 5775 <refname>cfg80211_tx_mlme_mgmt</refname> 5776 <refpurpose> 5777 notification of transmitted deauth/disassoc frame 5778 </refpurpose> 5779</refnamediv> 5780<refsynopsisdiv> 5781 <title>Synopsis</title> 5782 <funcsynopsis><funcprototype> 5783 <funcdef>void <function>cfg80211_tx_mlme_mgmt </function></funcdef> 5784 <paramdef>struct net_device * <parameter>dev</parameter></paramdef> 5785 <paramdef>const u8 * <parameter>buf</parameter></paramdef> 5786 <paramdef>size_t <parameter>len</parameter></paramdef> 5787 </funcprototype></funcsynopsis> 5788</refsynopsisdiv> 5789<refsect1> 5790 <title>Arguments</title> 5791 <variablelist> 5792 <varlistentry> 5793 <term><parameter>dev</parameter></term> 5794 <listitem> 5795 <para> 5796 network device 5797 </para> 5798 </listitem> 5799 </varlistentry> 5800 <varlistentry> 5801 <term><parameter>buf</parameter></term> 5802 <listitem> 5803 <para> 5804 802.11 frame (header + body) 5805 </para> 5806 </listitem> 5807 </varlistentry> 5808 <varlistentry> 5809 <term><parameter>len</parameter></term> 5810 <listitem> 5811 <para> 5812 length of the frame data 5813 </para> 5814 </listitem> 5815 </varlistentry> 5816 </variablelist> 5817</refsect1> 5818<refsect1> 5819<title>Description</title> 5820<para> 5821 This function is called whenever deauthentication has been processed in 5822 station mode. This includes both received deauthentication frames and 5823 locally generated ones. This function may sleep. The caller must hold the 5824 corresponding wdev's mutex. 5825</para> 5826</refsect1> 5827</refentry> 5828 5829<refentry id="API-cfg80211-ibss-joined"> 5830<refentryinfo> 5831 <title>LINUX</title> 5832 <productname>Kernel Hackers Manual</productname> 5833 <date>July 2017</date> 5834</refentryinfo> 5835<refmeta> 5836 <refentrytitle><phrase>cfg80211_ibss_joined</phrase></refentrytitle> 5837 <manvolnum>9</manvolnum> 5838 <refmiscinfo class="version">4.1.27</refmiscinfo> 5839</refmeta> 5840<refnamediv> 5841 <refname>cfg80211_ibss_joined</refname> 5842 <refpurpose> 5843 notify cfg80211 that device joined an IBSS 5844 </refpurpose> 5845</refnamediv> 5846<refsynopsisdiv> 5847 <title>Synopsis</title> 5848 <funcsynopsis><funcprototype> 5849 <funcdef>void <function>cfg80211_ibss_joined </function></funcdef> 5850 <paramdef>struct net_device * <parameter>dev</parameter></paramdef> 5851 <paramdef>const u8 * <parameter>bssid</parameter></paramdef> 5852 <paramdef>struct ieee80211_channel * <parameter>channel</parameter></paramdef> 5853 <paramdef>gfp_t <parameter>gfp</parameter></paramdef> 5854 </funcprototype></funcsynopsis> 5855</refsynopsisdiv> 5856<refsect1> 5857 <title>Arguments</title> 5858 <variablelist> 5859 <varlistentry> 5860 <term><parameter>dev</parameter></term> 5861 <listitem> 5862 <para> 5863 network device 5864 </para> 5865 </listitem> 5866 </varlistentry> 5867 <varlistentry> 5868 <term><parameter>bssid</parameter></term> 5869 <listitem> 5870 <para> 5871 the BSSID of the IBSS joined 5872 </para> 5873 </listitem> 5874 </varlistentry> 5875 <varlistentry> 5876 <term><parameter>channel</parameter></term> 5877 <listitem> 5878 <para> 5879 the channel of the IBSS joined 5880 </para> 5881 </listitem> 5882 </varlistentry> 5883 <varlistentry> 5884 <term><parameter>gfp</parameter></term> 5885 <listitem> 5886 <para> 5887 allocation flags 5888 </para> 5889 </listitem> 5890 </varlistentry> 5891 </variablelist> 5892</refsect1> 5893<refsect1> 5894<title>Description</title> 5895<para> 5896 This function notifies cfg80211 that the device joined an IBSS or 5897 switched to a different BSSID. Before this function can be called, 5898 either a beacon has to have been received from the IBSS, or one of 5899 the cfg80211_inform_bss{,_frame} functions must have been called 5900 with the locally generated beacon -- this guarantees that there is 5901 always a scan result for this IBSS. cfg80211 will handle the rest. 5902</para> 5903</refsect1> 5904</refentry> 5905 5906<refentry id="API-cfg80211-connect-result"> 5907<refentryinfo> 5908 <title>LINUX</title> 5909 <productname>Kernel Hackers Manual</productname> 5910 <date>July 2017</date> 5911</refentryinfo> 5912<refmeta> 5913 <refentrytitle><phrase>cfg80211_connect_result</phrase></refentrytitle> 5914 <manvolnum>9</manvolnum> 5915 <refmiscinfo class="version">4.1.27</refmiscinfo> 5916</refmeta> 5917<refnamediv> 5918 <refname>cfg80211_connect_result</refname> 5919 <refpurpose> 5920 notify cfg80211 of connection result 5921 </refpurpose> 5922</refnamediv> 5923<refsynopsisdiv> 5924 <title>Synopsis</title> 5925 <funcsynopsis><funcprototype> 5926 <funcdef>void <function>cfg80211_connect_result </function></funcdef> 5927 <paramdef>struct net_device * <parameter>dev</parameter></paramdef> 5928 <paramdef>const u8 * <parameter>bssid</parameter></paramdef> 5929 <paramdef>const u8 * <parameter>req_ie</parameter></paramdef> 5930 <paramdef>size_t <parameter>req_ie_len</parameter></paramdef> 5931 <paramdef>const u8 * <parameter>resp_ie</parameter></paramdef> 5932 <paramdef>size_t <parameter>resp_ie_len</parameter></paramdef> 5933 <paramdef>u16 <parameter>status</parameter></paramdef> 5934 <paramdef>gfp_t <parameter>gfp</parameter></paramdef> 5935 </funcprototype></funcsynopsis> 5936</refsynopsisdiv> 5937<refsect1> 5938 <title>Arguments</title> 5939 <variablelist> 5940 <varlistentry> 5941 <term><parameter>dev</parameter></term> 5942 <listitem> 5943 <para> 5944 network device 5945 </para> 5946 </listitem> 5947 </varlistentry> 5948 <varlistentry> 5949 <term><parameter>bssid</parameter></term> 5950 <listitem> 5951 <para> 5952 the BSSID of the AP 5953 </para> 5954 </listitem> 5955 </varlistentry> 5956 <varlistentry> 5957 <term><parameter>req_ie</parameter></term> 5958 <listitem> 5959 <para> 5960 association request IEs (maybe be <constant>NULL</constant>) 5961 </para> 5962 </listitem> 5963 </varlistentry> 5964 <varlistentry> 5965 <term><parameter>req_ie_len</parameter></term> 5966 <listitem> 5967 <para> 5968 association request IEs length 5969 </para> 5970 </listitem> 5971 </varlistentry> 5972 <varlistentry> 5973 <term><parameter>resp_ie</parameter></term> 5974 <listitem> 5975 <para> 5976 association response IEs (may be <constant>NULL</constant>) 5977 </para> 5978 </listitem> 5979 </varlistentry> 5980 <varlistentry> 5981 <term><parameter>resp_ie_len</parameter></term> 5982 <listitem> 5983 <para> 5984 assoc response IEs length 5985 </para> 5986 </listitem> 5987 </varlistentry> 5988 <varlistentry> 5989 <term><parameter>status</parameter></term> 5990 <listitem> 5991 <para> 5992 status code, 0 for successful connection, use 5993 <constant>WLAN_STATUS_UNSPECIFIED_FAILURE</constant> if your device cannot give you 5994 the real status code for failures. 5995 </para> 5996 </listitem> 5997 </varlistentry> 5998 <varlistentry> 5999 <term><parameter>gfp</parameter></term> 6000 <listitem> 6001 <para> 6002 allocation flags 6003 </para> 6004 </listitem> 6005 </varlistentry> 6006 </variablelist> 6007</refsect1> 6008<refsect1> 6009<title>Description</title> 6010<para> 6011 It should be called by the underlying driver whenever <function>connect</function> has 6012 succeeded. 6013</para> 6014</refsect1> 6015</refentry> 6016 6017<refentry id="API-cfg80211-roamed"> 6018<refentryinfo> 6019 <title>LINUX</title> 6020 <productname>Kernel Hackers Manual</productname> 6021 <date>July 2017</date> 6022</refentryinfo> 6023<refmeta> 6024 <refentrytitle><phrase>cfg80211_roamed</phrase></refentrytitle> 6025 <manvolnum>9</manvolnum> 6026 <refmiscinfo class="version">4.1.27</refmiscinfo> 6027</refmeta> 6028<refnamediv> 6029 <refname>cfg80211_roamed</refname> 6030 <refpurpose> 6031 notify cfg80211 of roaming 6032 </refpurpose> 6033</refnamediv> 6034<refsynopsisdiv> 6035 <title>Synopsis</title> 6036 <funcsynopsis><funcprototype> 6037 <funcdef>void <function>cfg80211_roamed </function></funcdef> 6038 <paramdef>struct net_device * <parameter>dev</parameter></paramdef> 6039 <paramdef>struct ieee80211_channel * <parameter>channel</parameter></paramdef> 6040 <paramdef>const u8 * <parameter>bssid</parameter></paramdef> 6041 <paramdef>const u8 * <parameter>req_ie</parameter></paramdef> 6042 <paramdef>size_t <parameter>req_ie_len</parameter></paramdef> 6043 <paramdef>const u8 * <parameter>resp_ie</parameter></paramdef> 6044 <paramdef>size_t <parameter>resp_ie_len</parameter></paramdef> 6045 <paramdef>gfp_t <parameter>gfp</parameter></paramdef> 6046 </funcprototype></funcsynopsis> 6047</refsynopsisdiv> 6048<refsect1> 6049 <title>Arguments</title> 6050 <variablelist> 6051 <varlistentry> 6052 <term><parameter>dev</parameter></term> 6053 <listitem> 6054 <para> 6055 network device 6056 </para> 6057 </listitem> 6058 </varlistentry> 6059 <varlistentry> 6060 <term><parameter>channel</parameter></term> 6061 <listitem> 6062 <para> 6063 the channel of the new AP 6064 </para> 6065 </listitem> 6066 </varlistentry> 6067 <varlistentry> 6068 <term><parameter>bssid</parameter></term> 6069 <listitem> 6070 <para> 6071 the BSSID of the new AP 6072 </para> 6073 </listitem> 6074 </varlistentry> 6075 <varlistentry> 6076 <term><parameter>req_ie</parameter></term> 6077 <listitem> 6078 <para> 6079 association request IEs (maybe be <constant>NULL</constant>) 6080 </para> 6081 </listitem> 6082 </varlistentry> 6083 <varlistentry> 6084 <term><parameter>req_ie_len</parameter></term> 6085 <listitem> 6086 <para> 6087 association request IEs length 6088 </para> 6089 </listitem> 6090 </varlistentry> 6091 <varlistentry> 6092 <term><parameter>resp_ie</parameter></term> 6093 <listitem> 6094 <para> 6095 association response IEs (may be <constant>NULL</constant>) 6096 </para> 6097 </listitem> 6098 </varlistentry> 6099 <varlistentry> 6100 <term><parameter>resp_ie_len</parameter></term> 6101 <listitem> 6102 <para> 6103 assoc response IEs length 6104 </para> 6105 </listitem> 6106 </varlistentry> 6107 <varlistentry> 6108 <term><parameter>gfp</parameter></term> 6109 <listitem> 6110 <para> 6111 allocation flags 6112 </para> 6113 </listitem> 6114 </varlistentry> 6115 </variablelist> 6116</refsect1> 6117<refsect1> 6118<title>Description</title> 6119<para> 6120 It should be called by the underlying driver whenever it roamed 6121 from one AP to another while connected. 6122</para> 6123</refsect1> 6124</refentry> 6125 6126<refentry id="API-cfg80211-disconnected"> 6127<refentryinfo> 6128 <title>LINUX</title> 6129 <productname>Kernel Hackers Manual</productname> 6130 <date>July 2017</date> 6131</refentryinfo> 6132<refmeta> 6133 <refentrytitle><phrase>cfg80211_disconnected</phrase></refentrytitle> 6134 <manvolnum>9</manvolnum> 6135 <refmiscinfo class="version">4.1.27</refmiscinfo> 6136</refmeta> 6137<refnamediv> 6138 <refname>cfg80211_disconnected</refname> 6139 <refpurpose> 6140 notify cfg80211 that connection was dropped 6141 </refpurpose> 6142</refnamediv> 6143<refsynopsisdiv> 6144 <title>Synopsis</title> 6145 <funcsynopsis><funcprototype> 6146 <funcdef>void <function>cfg80211_disconnected </function></funcdef> 6147 <paramdef>struct net_device * <parameter>dev</parameter></paramdef> 6148 <paramdef>u16 <parameter>reason</parameter></paramdef> 6149 <paramdef>const u8 * <parameter>ie</parameter></paramdef> 6150 <paramdef>size_t <parameter>ie_len</parameter></paramdef> 6151 <paramdef>gfp_t <parameter>gfp</parameter></paramdef> 6152 </funcprototype></funcsynopsis> 6153</refsynopsisdiv> 6154<refsect1> 6155 <title>Arguments</title> 6156 <variablelist> 6157 <varlistentry> 6158 <term><parameter>dev</parameter></term> 6159 <listitem> 6160 <para> 6161 network device 6162 </para> 6163 </listitem> 6164 </varlistentry> 6165 <varlistentry> 6166 <term><parameter>reason</parameter></term> 6167 <listitem> 6168 <para> 6169 reason code for the disconnection, set it to 0 if unknown 6170 </para> 6171 </listitem> 6172 </varlistentry> 6173 <varlistentry> 6174 <term><parameter>ie</parameter></term> 6175 <listitem> 6176 <para> 6177 information elements of the deauth/disassoc frame (may be <constant>NULL</constant>) 6178 </para> 6179 </listitem> 6180 </varlistentry> 6181 <varlistentry> 6182 <term><parameter>ie_len</parameter></term> 6183 <listitem> 6184 <para> 6185 length of IEs 6186 </para> 6187 </listitem> 6188 </varlistentry> 6189 <varlistentry> 6190 <term><parameter>gfp</parameter></term> 6191 <listitem> 6192 <para> 6193 allocation flags 6194 </para> 6195 </listitem> 6196 </varlistentry> 6197 </variablelist> 6198</refsect1> 6199<refsect1> 6200<title>Description</title> 6201<para> 6202 After it calls this function, the driver should enter an idle state 6203 and not try to connect to any AP any more. 6204</para> 6205</refsect1> 6206</refentry> 6207 6208<refentry id="API-cfg80211-ready-on-channel"> 6209<refentryinfo> 6210 <title>LINUX</title> 6211 <productname>Kernel Hackers Manual</productname> 6212 <date>July 2017</date> 6213</refentryinfo> 6214<refmeta> 6215 <refentrytitle><phrase>cfg80211_ready_on_channel</phrase></refentrytitle> 6216 <manvolnum>9</manvolnum> 6217 <refmiscinfo class="version">4.1.27</refmiscinfo> 6218</refmeta> 6219<refnamediv> 6220 <refname>cfg80211_ready_on_channel</refname> 6221 <refpurpose> 6222 notification of remain_on_channel start 6223 </refpurpose> 6224</refnamediv> 6225<refsynopsisdiv> 6226 <title>Synopsis</title> 6227 <funcsynopsis><funcprototype> 6228 <funcdef>void <function>cfg80211_ready_on_channel </function></funcdef> 6229 <paramdef>struct wireless_dev * <parameter>wdev</parameter></paramdef> 6230 <paramdef>u64 <parameter>cookie</parameter></paramdef> 6231 <paramdef>struct ieee80211_channel * <parameter>chan</parameter></paramdef> 6232 <paramdef>unsigned int <parameter>duration</parameter></paramdef> 6233 <paramdef>gfp_t <parameter>gfp</parameter></paramdef> 6234 </funcprototype></funcsynopsis> 6235</refsynopsisdiv> 6236<refsect1> 6237 <title>Arguments</title> 6238 <variablelist> 6239 <varlistentry> 6240 <term><parameter>wdev</parameter></term> 6241 <listitem> 6242 <para> 6243 wireless device 6244 </para> 6245 </listitem> 6246 </varlistentry> 6247 <varlistentry> 6248 <term><parameter>cookie</parameter></term> 6249 <listitem> 6250 <para> 6251 the request cookie 6252 </para> 6253 </listitem> 6254 </varlistentry> 6255 <varlistentry> 6256 <term><parameter>chan</parameter></term> 6257 <listitem> 6258 <para> 6259 The current channel (from remain_on_channel request) 6260 </para> 6261 </listitem> 6262 </varlistentry> 6263 <varlistentry> 6264 <term><parameter>duration</parameter></term> 6265 <listitem> 6266 <para> 6267 Duration in milliseconds that the driver intents to remain on the 6268 channel 6269 </para> 6270 </listitem> 6271 </varlistentry> 6272 <varlistentry> 6273 <term><parameter>gfp</parameter></term> 6274 <listitem> 6275 <para> 6276 allocation flags 6277 </para> 6278 </listitem> 6279 </varlistentry> 6280 </variablelist> 6281</refsect1> 6282</refentry> 6283 6284<refentry id="API-cfg80211-remain-on-channel-expired"> 6285<refentryinfo> 6286 <title>LINUX</title> 6287 <productname>Kernel Hackers Manual</productname> 6288 <date>July 2017</date> 6289</refentryinfo> 6290<refmeta> 6291 <refentrytitle><phrase>cfg80211_remain_on_channel_expired</phrase></refentrytitle> 6292 <manvolnum>9</manvolnum> 6293 <refmiscinfo class="version">4.1.27</refmiscinfo> 6294</refmeta> 6295<refnamediv> 6296 <refname>cfg80211_remain_on_channel_expired</refname> 6297 <refpurpose> 6298 remain_on_channel duration expired 6299 </refpurpose> 6300</refnamediv> 6301<refsynopsisdiv> 6302 <title>Synopsis</title> 6303 <funcsynopsis><funcprototype> 6304 <funcdef>void <function>cfg80211_remain_on_channel_expired </function></funcdef> 6305 <paramdef>struct wireless_dev * <parameter>wdev</parameter></paramdef> 6306 <paramdef>u64 <parameter>cookie</parameter></paramdef> 6307 <paramdef>struct ieee80211_channel * <parameter>chan</parameter></paramdef> 6308 <paramdef>gfp_t <parameter>gfp</parameter></paramdef> 6309 </funcprototype></funcsynopsis> 6310</refsynopsisdiv> 6311<refsect1> 6312 <title>Arguments</title> 6313 <variablelist> 6314 <varlistentry> 6315 <term><parameter>wdev</parameter></term> 6316 <listitem> 6317 <para> 6318 wireless device 6319 </para> 6320 </listitem> 6321 </varlistentry> 6322 <varlistentry> 6323 <term><parameter>cookie</parameter></term> 6324 <listitem> 6325 <para> 6326 the request cookie 6327 </para> 6328 </listitem> 6329 </varlistentry> 6330 <varlistentry> 6331 <term><parameter>chan</parameter></term> 6332 <listitem> 6333 <para> 6334 The current channel (from remain_on_channel request) 6335 </para> 6336 </listitem> 6337 </varlistentry> 6338 <varlistentry> 6339 <term><parameter>gfp</parameter></term> 6340 <listitem> 6341 <para> 6342 allocation flags 6343 </para> 6344 </listitem> 6345 </varlistentry> 6346 </variablelist> 6347</refsect1> 6348</refentry> 6349 6350<refentry id="API-cfg80211-new-sta"> 6351<refentryinfo> 6352 <title>LINUX</title> 6353 <productname>Kernel Hackers Manual</productname> 6354 <date>July 2017</date> 6355</refentryinfo> 6356<refmeta> 6357 <refentrytitle><phrase>cfg80211_new_sta</phrase></refentrytitle> 6358 <manvolnum>9</manvolnum> 6359 <refmiscinfo class="version">4.1.27</refmiscinfo> 6360</refmeta> 6361<refnamediv> 6362 <refname>cfg80211_new_sta</refname> 6363 <refpurpose> 6364 notify userspace about station 6365 </refpurpose> 6366</refnamediv> 6367<refsynopsisdiv> 6368 <title>Synopsis</title> 6369 <funcsynopsis><funcprototype> 6370 <funcdef>void <function>cfg80211_new_sta </function></funcdef> 6371 <paramdef>struct net_device * <parameter>dev</parameter></paramdef> 6372 <paramdef>const u8 * <parameter>mac_addr</parameter></paramdef> 6373 <paramdef>struct station_info * <parameter>sinfo</parameter></paramdef> 6374 <paramdef>gfp_t <parameter>gfp</parameter></paramdef> 6375 </funcprototype></funcsynopsis> 6376</refsynopsisdiv> 6377<refsect1> 6378 <title>Arguments</title> 6379 <variablelist> 6380 <varlistentry> 6381 <term><parameter>dev</parameter></term> 6382 <listitem> 6383 <para> 6384 the netdev 6385 </para> 6386 </listitem> 6387 </varlistentry> 6388 <varlistentry> 6389 <term><parameter>mac_addr</parameter></term> 6390 <listitem> 6391 <para> 6392 the station's address 6393 </para> 6394 </listitem> 6395 </varlistentry> 6396 <varlistentry> 6397 <term><parameter>sinfo</parameter></term> 6398 <listitem> 6399 <para> 6400 the station information 6401 </para> 6402 </listitem> 6403 </varlistentry> 6404 <varlistentry> 6405 <term><parameter>gfp</parameter></term> 6406 <listitem> 6407 <para> 6408 allocation flags 6409 </para> 6410 </listitem> 6411 </varlistentry> 6412 </variablelist> 6413</refsect1> 6414</refentry> 6415 6416<refentry id="API-cfg80211-rx-mgmt"> 6417<refentryinfo> 6418 <title>LINUX</title> 6419 <productname>Kernel Hackers Manual</productname> 6420 <date>July 2017</date> 6421</refentryinfo> 6422<refmeta> 6423 <refentrytitle><phrase>cfg80211_rx_mgmt</phrase></refentrytitle> 6424 <manvolnum>9</manvolnum> 6425 <refmiscinfo class="version">4.1.27</refmiscinfo> 6426</refmeta> 6427<refnamediv> 6428 <refname>cfg80211_rx_mgmt</refname> 6429 <refpurpose> 6430 notification of received, unprocessed management frame 6431 </refpurpose> 6432</refnamediv> 6433<refsynopsisdiv> 6434 <title>Synopsis</title> 6435 <funcsynopsis><funcprototype> 6436 <funcdef>bool <function>cfg80211_rx_mgmt </function></funcdef> 6437 <paramdef>struct wireless_dev * <parameter>wdev</parameter></paramdef> 6438 <paramdef>int <parameter>freq</parameter></paramdef> 6439 <paramdef>int <parameter>sig_dbm</parameter></paramdef> 6440 <paramdef>const u8 * <parameter>buf</parameter></paramdef> 6441 <paramdef>size_t <parameter>len</parameter></paramdef> 6442 <paramdef>u32 <parameter>flags</parameter></paramdef> 6443 </funcprototype></funcsynopsis> 6444</refsynopsisdiv> 6445<refsect1> 6446 <title>Arguments</title> 6447 <variablelist> 6448 <varlistentry> 6449 <term><parameter>wdev</parameter></term> 6450 <listitem> 6451 <para> 6452 wireless device receiving the frame 6453 </para> 6454 </listitem> 6455 </varlistentry> 6456 <varlistentry> 6457 <term><parameter>freq</parameter></term> 6458 <listitem> 6459 <para> 6460 Frequency on which the frame was received in MHz 6461 </para> 6462 </listitem> 6463 </varlistentry> 6464 <varlistentry> 6465 <term><parameter>sig_dbm</parameter></term> 6466 <listitem> 6467 <para> 6468 signal strength in mBm, or 0 if unknown 6469 </para> 6470 </listitem> 6471 </varlistentry> 6472 <varlistentry> 6473 <term><parameter>buf</parameter></term> 6474 <listitem> 6475 <para> 6476 Management frame (header + body) 6477 </para> 6478 </listitem> 6479 </varlistentry> 6480 <varlistentry> 6481 <term><parameter>len</parameter></term> 6482 <listitem> 6483 <para> 6484 length of the frame data 6485 </para> 6486 </listitem> 6487 </varlistentry> 6488 <varlistentry> 6489 <term><parameter>flags</parameter></term> 6490 <listitem> 6491 <para> 6492 flags, as defined in enum nl80211_rxmgmt_flags 6493 </para> 6494 </listitem> 6495 </varlistentry> 6496 </variablelist> 6497</refsect1> 6498<refsect1> 6499<title>Description</title> 6500<para> 6501 This function is called whenever an Action frame is received for a station 6502 mode interface, but is not processed in kernel. 6503</para> 6504</refsect1> 6505<refsect1> 6506<title>Return</title> 6507<para> 6508 <constant>true</constant> if a user space application has registered for this frame. 6509 For action frames, that makes it responsible for rejecting unrecognized 6510 action frames; <constant>false</constant> otherwise, in which case for action frames the 6511 driver is responsible for rejecting the frame. 6512</para> 6513</refsect1> 6514</refentry> 6515 6516<refentry id="API-cfg80211-mgmt-tx-status"> 6517<refentryinfo> 6518 <title>LINUX</title> 6519 <productname>Kernel Hackers Manual</productname> 6520 <date>July 2017</date> 6521</refentryinfo> 6522<refmeta> 6523 <refentrytitle><phrase>cfg80211_mgmt_tx_status</phrase></refentrytitle> 6524 <manvolnum>9</manvolnum> 6525 <refmiscinfo class="version">4.1.27</refmiscinfo> 6526</refmeta> 6527<refnamediv> 6528 <refname>cfg80211_mgmt_tx_status</refname> 6529 <refpurpose> 6530 notification of TX status for management frame 6531 </refpurpose> 6532</refnamediv> 6533<refsynopsisdiv> 6534 <title>Synopsis</title> 6535 <funcsynopsis><funcprototype> 6536 <funcdef>void <function>cfg80211_mgmt_tx_status </function></funcdef> 6537 <paramdef>struct wireless_dev * <parameter>wdev</parameter></paramdef> 6538 <paramdef>u64 <parameter>cookie</parameter></paramdef> 6539 <paramdef>const u8 * <parameter>buf</parameter></paramdef> 6540 <paramdef>size_t <parameter>len</parameter></paramdef> 6541 <paramdef>bool <parameter>ack</parameter></paramdef> 6542 <paramdef>gfp_t <parameter>gfp</parameter></paramdef> 6543 </funcprototype></funcsynopsis> 6544</refsynopsisdiv> 6545<refsect1> 6546 <title>Arguments</title> 6547 <variablelist> 6548 <varlistentry> 6549 <term><parameter>wdev</parameter></term> 6550 <listitem> 6551 <para> 6552 wireless device receiving the frame 6553 </para> 6554 </listitem> 6555 </varlistentry> 6556 <varlistentry> 6557 <term><parameter>cookie</parameter></term> 6558 <listitem> 6559 <para> 6560 Cookie returned by cfg80211_ops::<function>mgmt_tx</function> 6561 </para> 6562 </listitem> 6563 </varlistentry> 6564 <varlistentry> 6565 <term><parameter>buf</parameter></term> 6566 <listitem> 6567 <para> 6568 Management frame (header + body) 6569 </para> 6570 </listitem> 6571 </varlistentry> 6572 <varlistentry> 6573 <term><parameter>len</parameter></term> 6574 <listitem> 6575 <para> 6576 length of the frame data 6577 </para> 6578 </listitem> 6579 </varlistentry> 6580 <varlistentry> 6581 <term><parameter>ack</parameter></term> 6582 <listitem> 6583 <para> 6584 Whether frame was acknowledged 6585 </para> 6586 </listitem> 6587 </varlistentry> 6588 <varlistentry> 6589 <term><parameter>gfp</parameter></term> 6590 <listitem> 6591 <para> 6592 context flags 6593 </para> 6594 </listitem> 6595 </varlistentry> 6596 </variablelist> 6597</refsect1> 6598<refsect1> 6599<title>Description</title> 6600<para> 6601 This function is called whenever a management frame was requested to be 6602</para> 6603</refsect1> 6604<refsect1> 6605<title>transmitted with cfg80211_ops</title> 6606<para> 6607 :<function>mgmt_tx</function> to report the TX status of the 6608 transmission attempt. 6609</para> 6610</refsect1> 6611</refentry> 6612 6613<refentry id="API-cfg80211-cqm-rssi-notify"> 6614<refentryinfo> 6615 <title>LINUX</title> 6616 <productname>Kernel Hackers Manual</productname> 6617 <date>July 2017</date> 6618</refentryinfo> 6619<refmeta> 6620 <refentrytitle><phrase>cfg80211_cqm_rssi_notify</phrase></refentrytitle> 6621 <manvolnum>9</manvolnum> 6622 <refmiscinfo class="version">4.1.27</refmiscinfo> 6623</refmeta> 6624<refnamediv> 6625 <refname>cfg80211_cqm_rssi_notify</refname> 6626 <refpurpose> 6627 connection quality monitoring rssi event 6628 </refpurpose> 6629</refnamediv> 6630<refsynopsisdiv> 6631 <title>Synopsis</title> 6632 <funcsynopsis><funcprototype> 6633 <funcdef>void <function>cfg80211_cqm_rssi_notify </function></funcdef> 6634 <paramdef>struct net_device * <parameter>dev</parameter></paramdef> 6635 <paramdef>enum nl80211_cqm_rssi_threshold_event <parameter>rssi_event</parameter></paramdef> 6636 <paramdef>gfp_t <parameter>gfp</parameter></paramdef> 6637 </funcprototype></funcsynopsis> 6638</refsynopsisdiv> 6639<refsect1> 6640 <title>Arguments</title> 6641 <variablelist> 6642 <varlistentry> 6643 <term><parameter>dev</parameter></term> 6644 <listitem> 6645 <para> 6646 network device 6647 </para> 6648 </listitem> 6649 </varlistentry> 6650 <varlistentry> 6651 <term><parameter>rssi_event</parameter></term> 6652 <listitem> 6653 <para> 6654 the triggered RSSI event 6655 </para> 6656 </listitem> 6657 </varlistentry> 6658 <varlistentry> 6659 <term><parameter>gfp</parameter></term> 6660 <listitem> 6661 <para> 6662 context flags 6663 </para> 6664 </listitem> 6665 </varlistentry> 6666 </variablelist> 6667</refsect1> 6668<refsect1> 6669<title>Description</title> 6670<para> 6671 This function is called when a configured connection quality monitoring 6672 rssi threshold reached event occurs. 6673</para> 6674</refsect1> 6675</refentry> 6676 6677<refentry id="API-cfg80211-cqm-pktloss-notify"> 6678<refentryinfo> 6679 <title>LINUX</title> 6680 <productname>Kernel Hackers Manual</productname> 6681 <date>July 2017</date> 6682</refentryinfo> 6683<refmeta> 6684 <refentrytitle><phrase>cfg80211_cqm_pktloss_notify</phrase></refentrytitle> 6685 <manvolnum>9</manvolnum> 6686 <refmiscinfo class="version">4.1.27</refmiscinfo> 6687</refmeta> 6688<refnamediv> 6689 <refname>cfg80211_cqm_pktloss_notify</refname> 6690 <refpurpose> 6691 notify userspace about packetloss to peer 6692 </refpurpose> 6693</refnamediv> 6694<refsynopsisdiv> 6695 <title>Synopsis</title> 6696 <funcsynopsis><funcprototype> 6697 <funcdef>void <function>cfg80211_cqm_pktloss_notify </function></funcdef> 6698 <paramdef>struct net_device * <parameter>dev</parameter></paramdef> 6699 <paramdef>const u8 * <parameter>peer</parameter></paramdef> 6700 <paramdef>u32 <parameter>num_packets</parameter></paramdef> 6701 <paramdef>gfp_t <parameter>gfp</parameter></paramdef> 6702 </funcprototype></funcsynopsis> 6703</refsynopsisdiv> 6704<refsect1> 6705 <title>Arguments</title> 6706 <variablelist> 6707 <varlistentry> 6708 <term><parameter>dev</parameter></term> 6709 <listitem> 6710 <para> 6711 network device 6712 </para> 6713 </listitem> 6714 </varlistentry> 6715 <varlistentry> 6716 <term><parameter>peer</parameter></term> 6717 <listitem> 6718 <para> 6719 peer's MAC address 6720 </para> 6721 </listitem> 6722 </varlistentry> 6723 <varlistentry> 6724 <term><parameter>num_packets</parameter></term> 6725 <listitem> 6726 <para> 6727 how many packets were lost -- should be a fixed threshold 6728 but probably no less than maybe 50, or maybe a throughput dependent 6729 threshold (to account for temporary interference) 6730 </para> 6731 </listitem> 6732 </varlistentry> 6733 <varlistentry> 6734 <term><parameter>gfp</parameter></term> 6735 <listitem> 6736 <para> 6737 context flags 6738 </para> 6739 </listitem> 6740 </varlistentry> 6741 </variablelist> 6742</refsect1> 6743</refentry> 6744 6745<refentry id="API-cfg80211-michael-mic-failure"> 6746<refentryinfo> 6747 <title>LINUX</title> 6748 <productname>Kernel Hackers Manual</productname> 6749 <date>July 2017</date> 6750</refentryinfo> 6751<refmeta> 6752 <refentrytitle><phrase>cfg80211_michael_mic_failure</phrase></refentrytitle> 6753 <manvolnum>9</manvolnum> 6754 <refmiscinfo class="version">4.1.27</refmiscinfo> 6755</refmeta> 6756<refnamediv> 6757 <refname>cfg80211_michael_mic_failure</refname> 6758 <refpurpose> 6759 notification of Michael MIC failure (TKIP) 6760 </refpurpose> 6761</refnamediv> 6762<refsynopsisdiv> 6763 <title>Synopsis</title> 6764 <funcsynopsis><funcprototype> 6765 <funcdef>void <function>cfg80211_michael_mic_failure </function></funcdef> 6766 <paramdef>struct net_device * <parameter>dev</parameter></paramdef> 6767 <paramdef>const u8 * <parameter>addr</parameter></paramdef> 6768 <paramdef>enum nl80211_key_type <parameter>key_type</parameter></paramdef> 6769 <paramdef>int <parameter>key_id</parameter></paramdef> 6770 <paramdef>const u8 * <parameter>tsc</parameter></paramdef> 6771 <paramdef>gfp_t <parameter>gfp</parameter></paramdef> 6772 </funcprototype></funcsynopsis> 6773</refsynopsisdiv> 6774<refsect1> 6775 <title>Arguments</title> 6776 <variablelist> 6777 <varlistentry> 6778 <term><parameter>dev</parameter></term> 6779 <listitem> 6780 <para> 6781 network device 6782 </para> 6783 </listitem> 6784 </varlistentry> 6785 <varlistentry> 6786 <term><parameter>addr</parameter></term> 6787 <listitem> 6788 <para> 6789 The source MAC address of the frame 6790 </para> 6791 </listitem> 6792 </varlistentry> 6793 <varlistentry> 6794 <term><parameter>key_type</parameter></term> 6795 <listitem> 6796 <para> 6797 The key type that the received frame used 6798 </para> 6799 </listitem> 6800 </varlistentry> 6801 <varlistentry> 6802 <term><parameter>key_id</parameter></term> 6803 <listitem> 6804 <para> 6805 Key identifier (0..3). Can be -1 if missing. 6806 </para> 6807 </listitem> 6808 </varlistentry> 6809 <varlistentry> 6810 <term><parameter>tsc</parameter></term> 6811 <listitem> 6812 <para> 6813 The TSC value of the frame that generated the MIC failure (6 octets) 6814 </para> 6815 </listitem> 6816 </varlistentry> 6817 <varlistentry> 6818 <term><parameter>gfp</parameter></term> 6819 <listitem> 6820 <para> 6821 allocation flags 6822 </para> 6823 </listitem> 6824 </varlistentry> 6825 </variablelist> 6826</refsect1> 6827<refsect1> 6828<title>Description</title> 6829<para> 6830 This function is called whenever the local MAC detects a MIC failure in a 6831 received frame. This matches with MLME-MICHAELMICFAILURE.<function>indication</function> 6832 primitive. 6833</para> 6834</refsect1> 6835</refentry> 6836 6837 </chapter> 6838 <chapter> 6839 <title>Scanning and BSS list handling</title> 6840<para> 6841 </para><para> 6842 The scanning process itself is fairly simple, but cfg80211 offers quite 6843 a bit of helper functionality. To start a scan, the scan operation will 6844 be invoked with a scan definition. This scan definition contains the 6845 channels to scan, and the SSIDs to send probe requests for (including the 6846 wildcard, if desired). A passive scan is indicated by having no SSIDs to 6847 probe. Additionally, a scan request may contain extra information elements 6848 that should be added to the probe request. The IEs are guaranteed to be 6849 well-formed, and will not exceed the maximum length the driver advertised 6850 in the wiphy structure. 6851 </para><para> 6852 When scanning finds a BSS, cfg80211 needs to be notified of that, because 6853 it is responsible for maintaining the BSS list; the driver should not 6854 maintain a list itself. For this notification, various functions exist. 6855 </para><para> 6856 Since drivers do not maintain a BSS list, there are also a number of 6857 functions to search for a BSS and obtain information about it from the 6858 BSS structure cfg80211 maintains. The BSS list is also made available 6859 to userspace. 6860</para> 6861 6862<refentry id="API-struct-cfg80211-ssid"> 6863<refentryinfo> 6864 <title>LINUX</title> 6865 <productname>Kernel Hackers Manual</productname> 6866 <date>July 2017</date> 6867</refentryinfo> 6868<refmeta> 6869 <refentrytitle><phrase>struct cfg80211_ssid</phrase></refentrytitle> 6870 <manvolnum>9</manvolnum> 6871 <refmiscinfo class="version">4.1.27</refmiscinfo> 6872</refmeta> 6873<refnamediv> 6874 <refname>struct cfg80211_ssid</refname> 6875 <refpurpose> 6876 SSID description 6877 </refpurpose> 6878</refnamediv> 6879<refsynopsisdiv> 6880 <title>Synopsis</title> 6881 <programlisting> 6882struct cfg80211_ssid { 6883 u8 ssid[IEEE80211_MAX_SSID_LEN]; 6884 u8 ssid_len; 6885}; </programlisting> 6886</refsynopsisdiv> 6887 <refsect1> 6888 <title>Members</title> 6889 <variablelist> 6890 <varlistentry> <term>ssid[IEEE80211_MAX_SSID_LEN]</term> 6891 <listitem><para> 6892the SSID 6893 </para></listitem> 6894 </varlistentry> 6895 <varlistentry> <term>ssid_len</term> 6896 <listitem><para> 6897length of the ssid 6898 </para></listitem> 6899 </varlistentry> 6900 </variablelist> 6901 </refsect1> 6902</refentry> 6903 6904<refentry id="API-struct-cfg80211-scan-request"> 6905<refentryinfo> 6906 <title>LINUX</title> 6907 <productname>Kernel Hackers Manual</productname> 6908 <date>July 2017</date> 6909</refentryinfo> 6910<refmeta> 6911 <refentrytitle><phrase>struct cfg80211_scan_request</phrase></refentrytitle> 6912 <manvolnum>9</manvolnum> 6913 <refmiscinfo class="version">4.1.27</refmiscinfo> 6914</refmeta> 6915<refnamediv> 6916 <refname>struct cfg80211_scan_request</refname> 6917 <refpurpose> 6918 scan request description 6919 </refpurpose> 6920</refnamediv> 6921<refsynopsisdiv> 6922 <title>Synopsis</title> 6923 <programlisting> 6924struct cfg80211_scan_request { 6925 struct cfg80211_ssid * ssids; 6926 int n_ssids; 6927 u32 n_channels; 6928 enum nl80211_bss_scan_width scan_width; 6929 const u8 * ie; 6930 size_t ie_len; 6931 u32 flags; 6932 u32 rates[IEEE80211_NUM_BANDS]; 6933 struct wireless_dev * wdev; 6934 u8 mac_addr[ETH_ALEN]; 6935 u8 mac_addr_mask[ETH_ALEN]; 6936 struct wiphy * wiphy; 6937 unsigned long scan_start; 6938 bool aborted; 6939 bool notified; 6940 bool no_cck; 6941 struct ieee80211_channel * channels[0]; 6942}; </programlisting> 6943</refsynopsisdiv> 6944 <refsect1> 6945 <title>Members</title> 6946 <variablelist> 6947 <varlistentry> <term>ssids</term> 6948 <listitem><para> 6949SSIDs to scan for (active scan only) 6950 </para></listitem> 6951 </varlistentry> 6952 <varlistentry> <term>n_ssids</term> 6953 <listitem><para> 6954number of SSIDs 6955 </para></listitem> 6956 </varlistentry> 6957 <varlistentry> <term>n_channels</term> 6958 <listitem><para> 6959total number of channels to scan 6960 </para></listitem> 6961 </varlistentry> 6962 <varlistentry> <term>scan_width</term> 6963 <listitem><para> 6964channel width for scanning 6965 </para></listitem> 6966 </varlistentry> 6967 <varlistentry> <term>ie</term> 6968 <listitem><para> 6969optional information element(s) to add into Probe Request or <constant>NULL</constant> 6970 </para></listitem> 6971 </varlistentry> 6972 <varlistentry> <term>ie_len</term> 6973 <listitem><para> 6974length of ie in octets 6975 </para></listitem> 6976 </varlistentry> 6977 <varlistentry> <term>flags</term> 6978 <listitem><para> 6979bit field of flags controlling operation 6980 </para></listitem> 6981 </varlistentry> 6982 <varlistentry> <term>rates[IEEE80211_NUM_BANDS]</term> 6983 <listitem><para> 6984bitmap of rates to advertise for each band 6985 </para></listitem> 6986 </varlistentry> 6987 <varlistentry> <term>wdev</term> 6988 <listitem><para> 6989the wireless device to scan for 6990 </para></listitem> 6991 </varlistentry> 6992 <varlistentry> <term>mac_addr[ETH_ALEN]</term> 6993 <listitem><para> 6994MAC address used with randomisation 6995 </para></listitem> 6996 </varlistentry> 6997 <varlistentry> <term>mac_addr_mask[ETH_ALEN]</term> 6998 <listitem><para> 6999MAC address mask used with randomisation, bits that 7000are 0 in the mask should be randomised, bits that are 1 should 7001be taken from the <parameter>mac_addr</parameter> 7002 </para></listitem> 7003 </varlistentry> 7004 <varlistentry> <term>wiphy</term> 7005 <listitem><para> 7006the wiphy this was for 7007 </para></listitem> 7008 </varlistentry> 7009 <varlistentry> <term>scan_start</term> 7010 <listitem><para> 7011time (in jiffies) when the scan started 7012 </para></listitem> 7013 </varlistentry> 7014 <varlistentry> <term>aborted</term> 7015 <listitem><para> 7016(internal) scan request was notified as aborted 7017 </para></listitem> 7018 </varlistentry> 7019 <varlistentry> <term>notified</term> 7020 <listitem><para> 7021(internal) scan request was notified as done or aborted 7022 </para></listitem> 7023 </varlistentry> 7024 <varlistentry> <term>no_cck</term> 7025 <listitem><para> 7026used to send probe requests at non CCK rate in 2GHz band 7027 </para></listitem> 7028 </varlistentry> 7029 <varlistentry> <term>channels[0]</term> 7030 <listitem><para> 7031channels to scan on. 7032 </para></listitem> 7033 </varlistentry> 7034 </variablelist> 7035 </refsect1> 7036</refentry> 7037 7038<refentry id="API-cfg80211-scan-done"> 7039<refentryinfo> 7040 <title>LINUX</title> 7041 <productname>Kernel Hackers Manual</productname> 7042 <date>July 2017</date> 7043</refentryinfo> 7044<refmeta> 7045 <refentrytitle><phrase>cfg80211_scan_done</phrase></refentrytitle> 7046 <manvolnum>9</manvolnum> 7047 <refmiscinfo class="version">4.1.27</refmiscinfo> 7048</refmeta> 7049<refnamediv> 7050 <refname>cfg80211_scan_done</refname> 7051 <refpurpose> 7052 notify that scan finished 7053 </refpurpose> 7054</refnamediv> 7055<refsynopsisdiv> 7056 <title>Synopsis</title> 7057 <funcsynopsis><funcprototype> 7058 <funcdef>void <function>cfg80211_scan_done </function></funcdef> 7059 <paramdef>struct cfg80211_scan_request * <parameter>request</parameter></paramdef> 7060 <paramdef>bool <parameter>aborted</parameter></paramdef> 7061 </funcprototype></funcsynopsis> 7062</refsynopsisdiv> 7063<refsect1> 7064 <title>Arguments</title> 7065 <variablelist> 7066 <varlistentry> 7067 <term><parameter>request</parameter></term> 7068 <listitem> 7069 <para> 7070 the corresponding scan request 7071 </para> 7072 </listitem> 7073 </varlistentry> 7074 <varlistentry> 7075 <term><parameter>aborted</parameter></term> 7076 <listitem> 7077 <para> 7078 set to true if the scan was aborted for any reason, 7079 userspace will be notified of that 7080 </para> 7081 </listitem> 7082 </varlistentry> 7083 </variablelist> 7084</refsect1> 7085</refentry> 7086 7087<refentry id="API-struct-cfg80211-bss"> 7088<refentryinfo> 7089 <title>LINUX</title> 7090 <productname>Kernel Hackers Manual</productname> 7091 <date>July 2017</date> 7092</refentryinfo> 7093<refmeta> 7094 <refentrytitle><phrase>struct cfg80211_bss</phrase></refentrytitle> 7095 <manvolnum>9</manvolnum> 7096 <refmiscinfo class="version">4.1.27</refmiscinfo> 7097</refmeta> 7098<refnamediv> 7099 <refname>struct cfg80211_bss</refname> 7100 <refpurpose> 7101 BSS description 7102 </refpurpose> 7103</refnamediv> 7104<refsynopsisdiv> 7105 <title>Synopsis</title> 7106 <programlisting> 7107struct cfg80211_bss { 7108 struct ieee80211_channel * channel; 7109 enum nl80211_bss_scan_width scan_width; 7110 const struct cfg80211_bss_ies __rcu * ies; 7111 const struct cfg80211_bss_ies __rcu * beacon_ies; 7112 const struct cfg80211_bss_ies __rcu * proberesp_ies; 7113 struct cfg80211_bss * hidden_beacon_bss; 7114 s32 signal; 7115 u16 beacon_interval; 7116 u16 capability; 7117 u8 bssid[ETH_ALEN]; 7118 u8 priv[0]; 7119}; </programlisting> 7120</refsynopsisdiv> 7121 <refsect1> 7122 <title>Members</title> 7123 <variablelist> 7124 <varlistentry> <term>channel</term> 7125 <listitem><para> 7126channel this BSS is on 7127 </para></listitem> 7128 </varlistentry> 7129 <varlistentry> <term>scan_width</term> 7130 <listitem><para> 7131width of the control channel 7132 </para></listitem> 7133 </varlistentry> 7134 <varlistentry> <term>ies</term> 7135 <listitem><para> 7136the information elements (Note that there is no guarantee that these 7137are well-formed!); this is a pointer to either the beacon_ies or 7138proberesp_ies depending on whether Probe Response frame has been 7139received. It is always non-<constant>NULL</constant>. 7140 </para></listitem> 7141 </varlistentry> 7142 <varlistentry> <term>beacon_ies</term> 7143 <listitem><para> 7144the information elements from the last Beacon frame 7145(implementation note: if <parameter>hidden_beacon_bss</parameter> is set this struct doesn't 7146own the beacon_ies, but they're just pointers to the ones from the 7147<parameter>hidden_beacon_bss</parameter> struct) 7148 </para></listitem> 7149 </varlistentry> 7150 <varlistentry> <term>proberesp_ies</term> 7151 <listitem><para> 7152the information elements from the last Probe Response frame 7153 </para></listitem> 7154 </varlistentry> 7155 <varlistentry> <term>hidden_beacon_bss</term> 7156 <listitem><para> 7157in case this BSS struct represents a probe response from 7158a BSS that hides the SSID in its beacon, this points to the BSS struct 7159that holds the beacon data. <parameter>beacon_ies</parameter> is still valid, of course, and 7160points to the same data as hidden_beacon_bss->beacon_ies in that case. 7161 </para></listitem> 7162 </varlistentry> 7163 <varlistentry> <term>signal</term> 7164 <listitem><para> 7165signal strength value (type depends on the wiphy's signal_type) 7166 </para></listitem> 7167 </varlistentry> 7168 <varlistentry> <term>beacon_interval</term> 7169 <listitem><para> 7170the beacon interval as from the frame 7171 </para></listitem> 7172 </varlistentry> 7173 <varlistentry> <term>capability</term> 7174 <listitem><para> 7175the capability field in host byte order 7176 </para></listitem> 7177 </varlistentry> 7178 <varlistentry> <term>bssid[ETH_ALEN]</term> 7179 <listitem><para> 7180BSSID of the BSS 7181 </para></listitem> 7182 </varlistentry> 7183 <varlistentry> <term>priv[0]</term> 7184 <listitem><para> 7185private area for driver use, has at least wiphy->bss_priv_size bytes 7186 </para></listitem> 7187 </varlistentry> 7188 </variablelist> 7189 </refsect1> 7190<refsect1> 7191<title>Description</title> 7192<para> 7193 </para><para> 7194 7195 This structure describes a BSS (which may also be a mesh network) 7196 for use in scan results and similar. 7197</para> 7198</refsect1> 7199</refentry> 7200 7201<refentry id="API-cfg80211-inform-bss-width-frame"> 7202<refentryinfo> 7203 <title>LINUX</title> 7204 <productname>Kernel Hackers Manual</productname> 7205 <date>July 2017</date> 7206</refentryinfo> 7207<refmeta> 7208 <refentrytitle><phrase>cfg80211_inform_bss_width_frame</phrase></refentrytitle> 7209 <manvolnum>9</manvolnum> 7210 <refmiscinfo class="version">4.1.27</refmiscinfo> 7211</refmeta> 7212<refnamediv> 7213 <refname>cfg80211_inform_bss_width_frame</refname> 7214 <refpurpose> 7215 inform cfg80211 of a received BSS frame 7216 </refpurpose> 7217</refnamediv> 7218<refsynopsisdiv> 7219 <title>Synopsis</title> 7220 <funcsynopsis><funcprototype> 7221 <funcdef>struct cfg80211_bss * <function>cfg80211_inform_bss_width_frame </function></funcdef> 7222 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 7223 <paramdef>struct ieee80211_channel * <parameter>rx_channel</parameter></paramdef> 7224 <paramdef>enum nl80211_bss_scan_width <parameter>scan_width</parameter></paramdef> 7225 <paramdef>struct ieee80211_mgmt * <parameter>mgmt</parameter></paramdef> 7226 <paramdef>size_t <parameter>len</parameter></paramdef> 7227 <paramdef>s32 <parameter>signal</parameter></paramdef> 7228 <paramdef>gfp_t <parameter>gfp</parameter></paramdef> 7229 </funcprototype></funcsynopsis> 7230</refsynopsisdiv> 7231<refsect1> 7232 <title>Arguments</title> 7233 <variablelist> 7234 <varlistentry> 7235 <term><parameter>wiphy</parameter></term> 7236 <listitem> 7237 <para> 7238 the wiphy reporting the BSS 7239 </para> 7240 </listitem> 7241 </varlistentry> 7242 <varlistentry> 7243 <term><parameter>rx_channel</parameter></term> 7244 <listitem> 7245 <para> 7246 The channel the frame was received on 7247 </para> 7248 </listitem> 7249 </varlistentry> 7250 <varlistentry> 7251 <term><parameter>scan_width</parameter></term> 7252 <listitem> 7253 <para> 7254 width of the control channel 7255 </para> 7256 </listitem> 7257 </varlistentry> 7258 <varlistentry> 7259 <term><parameter>mgmt</parameter></term> 7260 <listitem> 7261 <para> 7262 the management frame (probe response or beacon) 7263 </para> 7264 </listitem> 7265 </varlistentry> 7266 <varlistentry> 7267 <term><parameter>len</parameter></term> 7268 <listitem> 7269 <para> 7270 length of the management frame 7271 </para> 7272 </listitem> 7273 </varlistentry> 7274 <varlistentry> 7275 <term><parameter>signal</parameter></term> 7276 <listitem> 7277 <para> 7278 the signal strength, type depends on the wiphy's signal_type 7279 </para> 7280 </listitem> 7281 </varlistentry> 7282 <varlistentry> 7283 <term><parameter>gfp</parameter></term> 7284 <listitem> 7285 <para> 7286 context flags 7287 </para> 7288 </listitem> 7289 </varlistentry> 7290 </variablelist> 7291</refsect1> 7292<refsect1> 7293<title>Description</title> 7294<para> 7295 This informs cfg80211 that BSS information was found and 7296 the BSS should be updated/added. 7297</para> 7298</refsect1> 7299<refsect1> 7300<title>Return</title> 7301<para> 7302 A referenced struct, must be released with <function>cfg80211_put_bss</function>! 7303 Or <constant>NULL</constant> on error. 7304</para> 7305</refsect1> 7306</refentry> 7307 7308<refentry id="API-cfg80211-inform-bss-width"> 7309<refentryinfo> 7310 <title>LINUX</title> 7311 <productname>Kernel Hackers Manual</productname> 7312 <date>July 2017</date> 7313</refentryinfo> 7314<refmeta> 7315 <refentrytitle><phrase>cfg80211_inform_bss_width</phrase></refentrytitle> 7316 <manvolnum>9</manvolnum> 7317 <refmiscinfo class="version">4.1.27</refmiscinfo> 7318</refmeta> 7319<refnamediv> 7320 <refname>cfg80211_inform_bss_width</refname> 7321 <refpurpose> 7322 inform cfg80211 of a new BSS 7323 </refpurpose> 7324</refnamediv> 7325<refsynopsisdiv> 7326 <title>Synopsis</title> 7327 <funcsynopsis><funcprototype> 7328 <funcdef>struct cfg80211_bss * <function>cfg80211_inform_bss_width </function></funcdef> 7329 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 7330 <paramdef>struct ieee80211_channel * <parameter>rx_channel</parameter></paramdef> 7331 <paramdef>enum nl80211_bss_scan_width <parameter>scan_width</parameter></paramdef> 7332 <paramdef>enum cfg80211_bss_frame_type <parameter>ftype</parameter></paramdef> 7333 <paramdef>const u8 * <parameter>bssid</parameter></paramdef> 7334 <paramdef>u64 <parameter>tsf</parameter></paramdef> 7335 <paramdef>u16 <parameter>capability</parameter></paramdef> 7336 <paramdef>u16 <parameter>beacon_interval</parameter></paramdef> 7337 <paramdef>const u8 * <parameter>ie</parameter></paramdef> 7338 <paramdef>size_t <parameter>ielen</parameter></paramdef> 7339 <paramdef>s32 <parameter>signal</parameter></paramdef> 7340 <paramdef>gfp_t <parameter>gfp</parameter></paramdef> 7341 </funcprototype></funcsynopsis> 7342</refsynopsisdiv> 7343<refsect1> 7344 <title>Arguments</title> 7345 <variablelist> 7346 <varlistentry> 7347 <term><parameter>wiphy</parameter></term> 7348 <listitem> 7349 <para> 7350 the wiphy reporting the BSS 7351 </para> 7352 </listitem> 7353 </varlistentry> 7354 <varlistentry> 7355 <term><parameter>rx_channel</parameter></term> 7356 <listitem> 7357 <para> 7358 The channel the frame was received on 7359 </para> 7360 </listitem> 7361 </varlistentry> 7362 <varlistentry> 7363 <term><parameter>scan_width</parameter></term> 7364 <listitem> 7365 <para> 7366 width of the control channel 7367 </para> 7368 </listitem> 7369 </varlistentry> 7370 <varlistentry> 7371 <term><parameter>ftype</parameter></term> 7372 <listitem> 7373 <para> 7374 frame type (if known) 7375 </para> 7376 </listitem> 7377 </varlistentry> 7378 <varlistentry> 7379 <term><parameter>bssid</parameter></term> 7380 <listitem> 7381 <para> 7382 the BSSID of the BSS 7383 </para> 7384 </listitem> 7385 </varlistentry> 7386 <varlistentry> 7387 <term><parameter>tsf</parameter></term> 7388 <listitem> 7389 <para> 7390 the TSF sent by the peer in the beacon/probe response (or 0) 7391 </para> 7392 </listitem> 7393 </varlistentry> 7394 <varlistentry> 7395 <term><parameter>capability</parameter></term> 7396 <listitem> 7397 <para> 7398 the capability field sent by the peer 7399 </para> 7400 </listitem> 7401 </varlistentry> 7402 <varlistentry> 7403 <term><parameter>beacon_interval</parameter></term> 7404 <listitem> 7405 <para> 7406 the beacon interval announced by the peer 7407 </para> 7408 </listitem> 7409 </varlistentry> 7410 <varlistentry> 7411 <term><parameter>ie</parameter></term> 7412 <listitem> 7413 <para> 7414 additional IEs sent by the peer 7415 </para> 7416 </listitem> 7417 </varlistentry> 7418 <varlistentry> 7419 <term><parameter>ielen</parameter></term> 7420 <listitem> 7421 <para> 7422 length of the additional IEs 7423 </para> 7424 </listitem> 7425 </varlistentry> 7426 <varlistentry> 7427 <term><parameter>signal</parameter></term> 7428 <listitem> 7429 <para> 7430 the signal strength, type depends on the wiphy's signal_type 7431 </para> 7432 </listitem> 7433 </varlistentry> 7434 <varlistentry> 7435 <term><parameter>gfp</parameter></term> 7436 <listitem> 7437 <para> 7438 context flags 7439 </para> 7440 </listitem> 7441 </varlistentry> 7442 </variablelist> 7443</refsect1> 7444<refsect1> 7445<title>Description</title> 7446<para> 7447 This informs cfg80211 that BSS information was found and 7448 the BSS should be updated/added. 7449</para> 7450</refsect1> 7451<refsect1> 7452<title>Return</title> 7453<para> 7454 A referenced struct, must be released with <function>cfg80211_put_bss</function>! 7455 Or <constant>NULL</constant> on error. 7456</para> 7457</refsect1> 7458</refentry> 7459 7460<refentry id="API-cfg80211-unlink-bss"> 7461<refentryinfo> 7462 <title>LINUX</title> 7463 <productname>Kernel Hackers Manual</productname> 7464 <date>July 2017</date> 7465</refentryinfo> 7466<refmeta> 7467 <refentrytitle><phrase>cfg80211_unlink_bss</phrase></refentrytitle> 7468 <manvolnum>9</manvolnum> 7469 <refmiscinfo class="version">4.1.27</refmiscinfo> 7470</refmeta> 7471<refnamediv> 7472 <refname>cfg80211_unlink_bss</refname> 7473 <refpurpose> 7474 unlink BSS from internal data structures 7475 </refpurpose> 7476</refnamediv> 7477<refsynopsisdiv> 7478 <title>Synopsis</title> 7479 <funcsynopsis><funcprototype> 7480 <funcdef>void <function>cfg80211_unlink_bss </function></funcdef> 7481 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 7482 <paramdef>struct cfg80211_bss * <parameter>bss</parameter></paramdef> 7483 </funcprototype></funcsynopsis> 7484</refsynopsisdiv> 7485<refsect1> 7486 <title>Arguments</title> 7487 <variablelist> 7488 <varlistentry> 7489 <term><parameter>wiphy</parameter></term> 7490 <listitem> 7491 <para> 7492 the wiphy 7493 </para> 7494 </listitem> 7495 </varlistentry> 7496 <varlistentry> 7497 <term><parameter>bss</parameter></term> 7498 <listitem> 7499 <para> 7500 the bss to remove 7501 </para> 7502 </listitem> 7503 </varlistentry> 7504 </variablelist> 7505</refsect1> 7506<refsect1> 7507<title>Description</title> 7508<para> 7509 This function removes the given BSS from the internal data structures 7510 thereby making it no longer show up in scan results etc. Use this 7511 function when you detect a BSS is gone. Normally BSSes will also time 7512 out, so it is not necessary to use this function at all. 7513</para> 7514</refsect1> 7515</refentry> 7516 7517<refentry id="API-cfg80211-find-ie"> 7518<refentryinfo> 7519 <title>LINUX</title> 7520 <productname>Kernel Hackers Manual</productname> 7521 <date>July 2017</date> 7522</refentryinfo> 7523<refmeta> 7524 <refentrytitle><phrase>cfg80211_find_ie</phrase></refentrytitle> 7525 <manvolnum>9</manvolnum> 7526 <refmiscinfo class="version">4.1.27</refmiscinfo> 7527</refmeta> 7528<refnamediv> 7529 <refname>cfg80211_find_ie</refname> 7530 <refpurpose> 7531 find information element in data 7532 </refpurpose> 7533</refnamediv> 7534<refsynopsisdiv> 7535 <title>Synopsis</title> 7536 <funcsynopsis><funcprototype> 7537 <funcdef>const u8 * <function>cfg80211_find_ie </function></funcdef> 7538 <paramdef>u8 <parameter>eid</parameter></paramdef> 7539 <paramdef>const u8 * <parameter>ies</parameter></paramdef> 7540 <paramdef>int <parameter>len</parameter></paramdef> 7541 </funcprototype></funcsynopsis> 7542</refsynopsisdiv> 7543<refsect1> 7544 <title>Arguments</title> 7545 <variablelist> 7546 <varlistentry> 7547 <term><parameter>eid</parameter></term> 7548 <listitem> 7549 <para> 7550 element ID 7551 </para> 7552 </listitem> 7553 </varlistentry> 7554 <varlistentry> 7555 <term><parameter>ies</parameter></term> 7556 <listitem> 7557 <para> 7558 data consisting of IEs 7559 </para> 7560 </listitem> 7561 </varlistentry> 7562 <varlistentry> 7563 <term><parameter>len</parameter></term> 7564 <listitem> 7565 <para> 7566 length of data 7567 </para> 7568 </listitem> 7569 </varlistentry> 7570 </variablelist> 7571</refsect1> 7572<refsect1> 7573<title>Return</title> 7574<para> 7575 <constant>NULL</constant> if the element ID could not be found or if 7576 the element is invalid (claims to be longer than the given 7577 data), or a pointer to the first byte of the requested 7578 element, that is the byte containing the element ID. 7579</para> 7580</refsect1> 7581<refsect1> 7582<title>Note</title> 7583<para> 7584 There are no checks on the element length other than 7585 having to fit into the given data. 7586</para> 7587</refsect1> 7588</refentry> 7589 7590<refentry id="API-ieee80211-bss-get-ie"> 7591<refentryinfo> 7592 <title>LINUX</title> 7593 <productname>Kernel Hackers Manual</productname> 7594 <date>July 2017</date> 7595</refentryinfo> 7596<refmeta> 7597 <refentrytitle><phrase>ieee80211_bss_get_ie</phrase></refentrytitle> 7598 <manvolnum>9</manvolnum> 7599 <refmiscinfo class="version">4.1.27</refmiscinfo> 7600</refmeta> 7601<refnamediv> 7602 <refname>ieee80211_bss_get_ie</refname> 7603 <refpurpose> 7604 find IE with given ID 7605 </refpurpose> 7606</refnamediv> 7607<refsynopsisdiv> 7608 <title>Synopsis</title> 7609 <funcsynopsis><funcprototype> 7610 <funcdef>const u8 * <function>ieee80211_bss_get_ie </function></funcdef> 7611 <paramdef>struct cfg80211_bss * <parameter>bss</parameter></paramdef> 7612 <paramdef>u8 <parameter>ie</parameter></paramdef> 7613 </funcprototype></funcsynopsis> 7614</refsynopsisdiv> 7615<refsect1> 7616 <title>Arguments</title> 7617 <variablelist> 7618 <varlistentry> 7619 <term><parameter>bss</parameter></term> 7620 <listitem> 7621 <para> 7622 the bss to search 7623 </para> 7624 </listitem> 7625 </varlistentry> 7626 <varlistentry> 7627 <term><parameter>ie</parameter></term> 7628 <listitem> 7629 <para> 7630 the IE ID 7631 </para> 7632 </listitem> 7633 </varlistentry> 7634 </variablelist> 7635</refsect1> 7636<refsect1> 7637<title>Description</title> 7638<para> 7639 Note that the return value is an RCU-protected pointer, so 7640 <function>rcu_read_lock</function> must be held when calling this function. 7641</para> 7642</refsect1> 7643<refsect1> 7644<title>Return</title> 7645<para> 7646 <constant>NULL</constant> if not found. 7647</para> 7648</refsect1> 7649</refentry> 7650 7651 </chapter> 7652 <chapter> 7653 <title>Utility functions</title> 7654<para> 7655 </para><para> 7656 cfg80211 offers a number of utility functions that can be useful. 7657</para> 7658 7659<refentry id="API-ieee80211-channel-to-frequency"> 7660<refentryinfo> 7661 <title>LINUX</title> 7662 <productname>Kernel Hackers Manual</productname> 7663 <date>July 2017</date> 7664</refentryinfo> 7665<refmeta> 7666 <refentrytitle><phrase>ieee80211_channel_to_frequency</phrase></refentrytitle> 7667 <manvolnum>9</manvolnum> 7668 <refmiscinfo class="version">4.1.27</refmiscinfo> 7669</refmeta> 7670<refnamediv> 7671 <refname>ieee80211_channel_to_frequency</refname> 7672 <refpurpose> 7673 convert channel number to frequency 7674 </refpurpose> 7675</refnamediv> 7676<refsynopsisdiv> 7677 <title>Synopsis</title> 7678 <funcsynopsis><funcprototype> 7679 <funcdef>int <function>ieee80211_channel_to_frequency </function></funcdef> 7680 <paramdef>int <parameter>chan</parameter></paramdef> 7681 <paramdef>enum ieee80211_band <parameter>band</parameter></paramdef> 7682 </funcprototype></funcsynopsis> 7683</refsynopsisdiv> 7684<refsect1> 7685 <title>Arguments</title> 7686 <variablelist> 7687 <varlistentry> 7688 <term><parameter>chan</parameter></term> 7689 <listitem> 7690 <para> 7691 channel number 7692 </para> 7693 </listitem> 7694 </varlistentry> 7695 <varlistentry> 7696 <term><parameter>band</parameter></term> 7697 <listitem> 7698 <para> 7699 band, necessary due to channel number overlap 7700 </para> 7701 </listitem> 7702 </varlistentry> 7703 </variablelist> 7704</refsect1> 7705<refsect1> 7706<title>Return</title> 7707<para> 7708 The corresponding frequency (in MHz), or 0 if the conversion failed. 7709</para> 7710</refsect1> 7711</refentry> 7712 7713<refentry id="API-ieee80211-frequency-to-channel"> 7714<refentryinfo> 7715 <title>LINUX</title> 7716 <productname>Kernel Hackers Manual</productname> 7717 <date>July 2017</date> 7718</refentryinfo> 7719<refmeta> 7720 <refentrytitle><phrase>ieee80211_frequency_to_channel</phrase></refentrytitle> 7721 <manvolnum>9</manvolnum> 7722 <refmiscinfo class="version">4.1.27</refmiscinfo> 7723</refmeta> 7724<refnamediv> 7725 <refname>ieee80211_frequency_to_channel</refname> 7726 <refpurpose> 7727 convert frequency to channel number 7728 </refpurpose> 7729</refnamediv> 7730<refsynopsisdiv> 7731 <title>Synopsis</title> 7732 <funcsynopsis><funcprototype> 7733 <funcdef>int <function>ieee80211_frequency_to_channel </function></funcdef> 7734 <paramdef>int <parameter>freq</parameter></paramdef> 7735 </funcprototype></funcsynopsis> 7736</refsynopsisdiv> 7737<refsect1> 7738 <title>Arguments</title> 7739 <variablelist> 7740 <varlistentry> 7741 <term><parameter>freq</parameter></term> 7742 <listitem> 7743 <para> 7744 center frequency 7745 </para> 7746 </listitem> 7747 </varlistentry> 7748 </variablelist> 7749</refsect1> 7750<refsect1> 7751<title>Return</title> 7752<para> 7753 The corresponding channel, or 0 if the conversion failed. 7754</para> 7755</refsect1> 7756</refentry> 7757 7758<refentry id="API-ieee80211-get-channel"> 7759<refentryinfo> 7760 <title>LINUX</title> 7761 <productname>Kernel Hackers Manual</productname> 7762 <date>July 2017</date> 7763</refentryinfo> 7764<refmeta> 7765 <refentrytitle><phrase>ieee80211_get_channel</phrase></refentrytitle> 7766 <manvolnum>9</manvolnum> 7767 <refmiscinfo class="version">4.1.27</refmiscinfo> 7768</refmeta> 7769<refnamediv> 7770 <refname>ieee80211_get_channel</refname> 7771 <refpurpose> 7772 get channel struct from wiphy for specified frequency 7773 </refpurpose> 7774</refnamediv> 7775<refsynopsisdiv> 7776 <title>Synopsis</title> 7777 <funcsynopsis><funcprototype> 7778 <funcdef>struct ieee80211_channel * <function>ieee80211_get_channel </function></funcdef> 7779 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 7780 <paramdef>int <parameter>freq</parameter></paramdef> 7781 </funcprototype></funcsynopsis> 7782</refsynopsisdiv> 7783<refsect1> 7784 <title>Arguments</title> 7785 <variablelist> 7786 <varlistentry> 7787 <term><parameter>wiphy</parameter></term> 7788 <listitem> 7789 <para> 7790 the struct wiphy to get the channel for 7791 </para> 7792 </listitem> 7793 </varlistentry> 7794 <varlistentry> 7795 <term><parameter>freq</parameter></term> 7796 <listitem> 7797 <para> 7798 the center frequency of the channel 7799 </para> 7800 </listitem> 7801 </varlistentry> 7802 </variablelist> 7803</refsect1> 7804<refsect1> 7805<title>Return</title> 7806<para> 7807 The channel struct from <parameter>wiphy</parameter> at <parameter>freq</parameter>. 7808</para> 7809</refsect1> 7810</refentry> 7811 7812<refentry id="API-ieee80211-get-response-rate"> 7813<refentryinfo> 7814 <title>LINUX</title> 7815 <productname>Kernel Hackers Manual</productname> 7816 <date>July 2017</date> 7817</refentryinfo> 7818<refmeta> 7819 <refentrytitle><phrase>ieee80211_get_response_rate</phrase></refentrytitle> 7820 <manvolnum>9</manvolnum> 7821 <refmiscinfo class="version">4.1.27</refmiscinfo> 7822</refmeta> 7823<refnamediv> 7824 <refname>ieee80211_get_response_rate</refname> 7825 <refpurpose> 7826 get basic rate for a given rate 7827 </refpurpose> 7828</refnamediv> 7829<refsynopsisdiv> 7830 <title>Synopsis</title> 7831 <funcsynopsis><funcprototype> 7832 <funcdef>struct ieee80211_rate * <function>ieee80211_get_response_rate </function></funcdef> 7833 <paramdef>struct ieee80211_supported_band * <parameter>sband</parameter></paramdef> 7834 <paramdef>u32 <parameter>basic_rates</parameter></paramdef> 7835 <paramdef>int <parameter>bitrate</parameter></paramdef> 7836 </funcprototype></funcsynopsis> 7837</refsynopsisdiv> 7838<refsect1> 7839 <title>Arguments</title> 7840 <variablelist> 7841 <varlistentry> 7842 <term><parameter>sband</parameter></term> 7843 <listitem> 7844 <para> 7845 the band to look for rates in 7846 </para> 7847 </listitem> 7848 </varlistentry> 7849 <varlistentry> 7850 <term><parameter>basic_rates</parameter></term> 7851 <listitem> 7852 <para> 7853 bitmap of basic rates 7854 </para> 7855 </listitem> 7856 </varlistentry> 7857 <varlistentry> 7858 <term><parameter>bitrate</parameter></term> 7859 <listitem> 7860 <para> 7861 the bitrate for which to find the basic rate 7862 </para> 7863 </listitem> 7864 </varlistentry> 7865 </variablelist> 7866</refsect1> 7867<refsect1> 7868<title>Return</title> 7869<para> 7870 The basic rate corresponding to a given bitrate, that 7871 is the next lower bitrate contained in the basic rate map, 7872 which is, for this function, given as a bitmap of indices of 7873 rates in the band's bitrate table. 7874</para> 7875</refsect1> 7876</refentry> 7877 7878<refentry id="API-ieee80211-hdrlen"> 7879<refentryinfo> 7880 <title>LINUX</title> 7881 <productname>Kernel Hackers Manual</productname> 7882 <date>July 2017</date> 7883</refentryinfo> 7884<refmeta> 7885 <refentrytitle><phrase>ieee80211_hdrlen</phrase></refentrytitle> 7886 <manvolnum>9</manvolnum> 7887 <refmiscinfo class="version">4.1.27</refmiscinfo> 7888</refmeta> 7889<refnamediv> 7890 <refname>ieee80211_hdrlen</refname> 7891 <refpurpose> 7892 get header length in bytes from frame control 7893 </refpurpose> 7894</refnamediv> 7895<refsynopsisdiv> 7896 <title>Synopsis</title> 7897 <funcsynopsis><funcprototype> 7898 <funcdef>unsigned int __attribute_const__ <function>ieee80211_hdrlen </function></funcdef> 7899 <paramdef>__le16 <parameter>fc</parameter></paramdef> 7900 </funcprototype></funcsynopsis> 7901</refsynopsisdiv> 7902<refsect1> 7903 <title>Arguments</title> 7904 <variablelist> 7905 <varlistentry> 7906 <term><parameter>fc</parameter></term> 7907 <listitem> 7908 <para> 7909 frame control field in little-endian format 7910 </para> 7911 </listitem> 7912 </varlistentry> 7913 </variablelist> 7914</refsect1> 7915<refsect1> 7916<title>Return</title> 7917<para> 7918 The header length in bytes. 7919</para> 7920</refsect1> 7921</refentry> 7922 7923<refentry id="API-ieee80211-get-hdrlen-from-skb"> 7924<refentryinfo> 7925 <title>LINUX</title> 7926 <productname>Kernel Hackers Manual</productname> 7927 <date>July 2017</date> 7928</refentryinfo> 7929<refmeta> 7930 <refentrytitle><phrase>ieee80211_get_hdrlen_from_skb</phrase></refentrytitle> 7931 <manvolnum>9</manvolnum> 7932 <refmiscinfo class="version">4.1.27</refmiscinfo> 7933</refmeta> 7934<refnamediv> 7935 <refname>ieee80211_get_hdrlen_from_skb</refname> 7936 <refpurpose> 7937 get header length from data 7938 </refpurpose> 7939</refnamediv> 7940<refsynopsisdiv> 7941 <title>Synopsis</title> 7942 <funcsynopsis><funcprototype> 7943 <funcdef>unsigned int <function>ieee80211_get_hdrlen_from_skb </function></funcdef> 7944 <paramdef>const struct sk_buff * <parameter>skb</parameter></paramdef> 7945 </funcprototype></funcsynopsis> 7946</refsynopsisdiv> 7947<refsect1> 7948 <title>Arguments</title> 7949 <variablelist> 7950 <varlistentry> 7951 <term><parameter>skb</parameter></term> 7952 <listitem> 7953 <para> 7954 the frame 7955 </para> 7956 </listitem> 7957 </varlistentry> 7958 </variablelist> 7959</refsect1> 7960<refsect1> 7961<title>Description</title> 7962<para> 7963 Given an skb with a raw 802.11 header at the data pointer this function 7964 returns the 802.11 header length. 7965</para> 7966</refsect1> 7967<refsect1> 7968<title>Return</title> 7969<para> 7970 The 802.11 header length in bytes (not including encryption 7971 headers). Or 0 if the data in the sk_buff is too short to contain a valid 7972 802.11 header. 7973</para> 7974</refsect1> 7975</refentry> 7976 7977<refentry id="API-struct-ieee80211-radiotap-iterator"> 7978<refentryinfo> 7979 <title>LINUX</title> 7980 <productname>Kernel Hackers Manual</productname> 7981 <date>July 2017</date> 7982</refentryinfo> 7983<refmeta> 7984 <refentrytitle><phrase>struct ieee80211_radiotap_iterator</phrase></refentrytitle> 7985 <manvolnum>9</manvolnum> 7986 <refmiscinfo class="version">4.1.27</refmiscinfo> 7987</refmeta> 7988<refnamediv> 7989 <refname>struct ieee80211_radiotap_iterator</refname> 7990 <refpurpose> 7991 tracks walk thru present radiotap args 7992 </refpurpose> 7993</refnamediv> 7994<refsynopsisdiv> 7995 <title>Synopsis</title> 7996 <programlisting> 7997struct ieee80211_radiotap_iterator { 7998 struct ieee80211_radiotap_header * _rtheader; 7999 const struct ieee80211_radiotap_vendor_namespaces * _vns; 8000 const struct ieee80211_radiotap_namespace * current_namespace; 8001 unsigned char * _arg; 8002 unsigned char * _next_ns_data; 8003 __le32 * _next_bitmap; 8004 unsigned char * this_arg; 8005 int this_arg_index; 8006 int this_arg_size; 8007 int is_radiotap_ns; 8008 int _max_length; 8009 int _arg_index; 8010 uint32_t _bitmap_shifter; 8011 int _reset_on_ext; 8012}; </programlisting> 8013</refsynopsisdiv> 8014 <refsect1> 8015 <title>Members</title> 8016 <variablelist> 8017 <varlistentry> <term>_rtheader</term> 8018 <listitem><para> 8019pointer to the radiotap header we are walking through 8020 </para></listitem> 8021 </varlistentry> 8022 <varlistentry> <term>_vns</term> 8023 <listitem><para> 8024vendor namespace definitions 8025 </para></listitem> 8026 </varlistentry> 8027 <varlistentry> <term>current_namespace</term> 8028 <listitem><para> 8029pointer to the current namespace definition 8030(or internally <constant>NULL</constant> if the current namespace is unknown) 8031 </para></listitem> 8032 </varlistentry> 8033 <varlistentry> <term>_arg</term> 8034 <listitem><para> 8035next argument pointer 8036 </para></listitem> 8037 </varlistentry> 8038 <varlistentry> <term>_next_ns_data</term> 8039 <listitem><para> 8040beginning of the next namespace's data 8041 </para></listitem> 8042 </varlistentry> 8043 <varlistentry> <term>_next_bitmap</term> 8044 <listitem><para> 8045internal pointer to next present u32 8046 </para></listitem> 8047 </varlistentry> 8048 <varlistentry> <term>this_arg</term> 8049 <listitem><para> 8050pointer to current radiotap arg; it is valid after each 8051call to <function>ieee80211_radiotap_iterator_next</function> but also after 8052<function>ieee80211_radiotap_iterator_init</function> where it will point to 8053the beginning of the actual data portion 8054 </para></listitem> 8055 </varlistentry> 8056 <varlistentry> <term>this_arg_index</term> 8057 <listitem><para> 8058index of current arg, valid after each successful call 8059to <function>ieee80211_radiotap_iterator_next</function> 8060 </para></listitem> 8061 </varlistentry> 8062 <varlistentry> <term>this_arg_size</term> 8063 <listitem><para> 8064length of the current arg, for convenience 8065 </para></listitem> 8066 </varlistentry> 8067 <varlistentry> <term>is_radiotap_ns</term> 8068 <listitem><para> 8069indicates whether the current namespace is the default 8070radiotap namespace or not 8071 </para></listitem> 8072 </varlistentry> 8073 <varlistentry> <term>_max_length</term> 8074 <listitem><para> 8075length of radiotap header in cpu byte ordering 8076 </para></listitem> 8077 </varlistentry> 8078 <varlistentry> <term>_arg_index</term> 8079 <listitem><para> 8080next argument index 8081 </para></listitem> 8082 </varlistentry> 8083 <varlistentry> <term>_bitmap_shifter</term> 8084 <listitem><para> 8085internal shifter for curr u32 bitmap, b0 set == arg present 8086 </para></listitem> 8087 </varlistentry> 8088 <varlistentry> <term>_reset_on_ext</term> 8089 <listitem><para> 8090internal; reset the arg index to 0 when going to the 8091next bitmap word 8092 </para></listitem> 8093 </varlistentry> 8094 </variablelist> 8095 </refsect1> 8096<refsect1> 8097<title>Description</title> 8098<para> 8099 Describes the radiotap parser state. Fields prefixed with an underscore 8100 must not be used by users of the parser, only by the parser internally. 8101</para> 8102</refsect1> 8103</refentry> 8104 8105 </chapter> 8106 <chapter> 8107 <title>Data path helpers</title> 8108<para> 8109 </para><para> 8110 In addition to generic utilities, cfg80211 also offers 8111 functions that help implement the data path for devices 8112 that do not do the 802.11/802.3 conversion on the device. 8113</para> 8114 8115<refentry id="API-ieee80211-data-to-8023"> 8116<refentryinfo> 8117 <title>LINUX</title> 8118 <productname>Kernel Hackers Manual</productname> 8119 <date>July 2017</date> 8120</refentryinfo> 8121<refmeta> 8122 <refentrytitle><phrase>ieee80211_data_to_8023</phrase></refentrytitle> 8123 <manvolnum>9</manvolnum> 8124 <refmiscinfo class="version">4.1.27</refmiscinfo> 8125</refmeta> 8126<refnamediv> 8127 <refname>ieee80211_data_to_8023</refname> 8128 <refpurpose> 8129 convert an 802.11 data frame to 802.3 8130 </refpurpose> 8131</refnamediv> 8132<refsynopsisdiv> 8133 <title>Synopsis</title> 8134 <funcsynopsis><funcprototype> 8135 <funcdef>int <function>ieee80211_data_to_8023 </function></funcdef> 8136 <paramdef>struct sk_buff * <parameter>skb</parameter></paramdef> 8137 <paramdef>const u8 * <parameter>addr</parameter></paramdef> 8138 <paramdef>enum nl80211_iftype <parameter>iftype</parameter></paramdef> 8139 </funcprototype></funcsynopsis> 8140</refsynopsisdiv> 8141<refsect1> 8142 <title>Arguments</title> 8143 <variablelist> 8144 <varlistentry> 8145 <term><parameter>skb</parameter></term> 8146 <listitem> 8147 <para> 8148 the 802.11 data frame 8149 </para> 8150 </listitem> 8151 </varlistentry> 8152 <varlistentry> 8153 <term><parameter>addr</parameter></term> 8154 <listitem> 8155 <para> 8156 the device MAC address 8157 </para> 8158 </listitem> 8159 </varlistentry> 8160 <varlistentry> 8161 <term><parameter>iftype</parameter></term> 8162 <listitem> 8163 <para> 8164 the virtual interface type 8165 </para> 8166 </listitem> 8167 </varlistentry> 8168 </variablelist> 8169</refsect1> 8170<refsect1> 8171<title>Return</title> 8172<para> 8173 0 on success. Non-zero on error. 8174</para> 8175</refsect1> 8176</refentry> 8177 8178<refentry id="API-ieee80211-data-from-8023"> 8179<refentryinfo> 8180 <title>LINUX</title> 8181 <productname>Kernel Hackers Manual</productname> 8182 <date>July 2017</date> 8183</refentryinfo> 8184<refmeta> 8185 <refentrytitle><phrase>ieee80211_data_from_8023</phrase></refentrytitle> 8186 <manvolnum>9</manvolnum> 8187 <refmiscinfo class="version">4.1.27</refmiscinfo> 8188</refmeta> 8189<refnamediv> 8190 <refname>ieee80211_data_from_8023</refname> 8191 <refpurpose> 8192 convert an 802.3 frame to 802.11 8193 </refpurpose> 8194</refnamediv> 8195<refsynopsisdiv> 8196 <title>Synopsis</title> 8197 <funcsynopsis><funcprototype> 8198 <funcdef>int <function>ieee80211_data_from_8023 </function></funcdef> 8199 <paramdef>struct sk_buff * <parameter>skb</parameter></paramdef> 8200 <paramdef>const u8 * <parameter>addr</parameter></paramdef> 8201 <paramdef>enum nl80211_iftype <parameter>iftype</parameter></paramdef> 8202 <paramdef>const u8 * <parameter>bssid</parameter></paramdef> 8203 <paramdef>bool <parameter>qos</parameter></paramdef> 8204 </funcprototype></funcsynopsis> 8205</refsynopsisdiv> 8206<refsect1> 8207 <title>Arguments</title> 8208 <variablelist> 8209 <varlistentry> 8210 <term><parameter>skb</parameter></term> 8211 <listitem> 8212 <para> 8213 the 802.3 frame 8214 </para> 8215 </listitem> 8216 </varlistentry> 8217 <varlistentry> 8218 <term><parameter>addr</parameter></term> 8219 <listitem> 8220 <para> 8221 the device MAC address 8222 </para> 8223 </listitem> 8224 </varlistentry> 8225 <varlistentry> 8226 <term><parameter>iftype</parameter></term> 8227 <listitem> 8228 <para> 8229 the virtual interface type 8230 </para> 8231 </listitem> 8232 </varlistentry> 8233 <varlistentry> 8234 <term><parameter>bssid</parameter></term> 8235 <listitem> 8236 <para> 8237 the network bssid (used only for iftype STATION and ADHOC) 8238 </para> 8239 </listitem> 8240 </varlistentry> 8241 <varlistentry> 8242 <term><parameter>qos</parameter></term> 8243 <listitem> 8244 <para> 8245 build 802.11 QoS data frame 8246 </para> 8247 </listitem> 8248 </varlistentry> 8249 </variablelist> 8250</refsect1> 8251<refsect1> 8252<title>Return</title> 8253<para> 8254 0 on success, or a negative error code. 8255</para> 8256</refsect1> 8257</refentry> 8258 8259<refentry id="API-ieee80211-amsdu-to-8023s"> 8260<refentryinfo> 8261 <title>LINUX</title> 8262 <productname>Kernel Hackers Manual</productname> 8263 <date>July 2017</date> 8264</refentryinfo> 8265<refmeta> 8266 <refentrytitle><phrase>ieee80211_amsdu_to_8023s</phrase></refentrytitle> 8267 <manvolnum>9</manvolnum> 8268 <refmiscinfo class="version">4.1.27</refmiscinfo> 8269</refmeta> 8270<refnamediv> 8271 <refname>ieee80211_amsdu_to_8023s</refname> 8272 <refpurpose> 8273 decode an IEEE 802.11n A-MSDU frame 8274 </refpurpose> 8275</refnamediv> 8276<refsynopsisdiv> 8277 <title>Synopsis</title> 8278 <funcsynopsis><funcprototype> 8279 <funcdef>void <function>ieee80211_amsdu_to_8023s </function></funcdef> 8280 <paramdef>struct sk_buff * <parameter>skb</parameter></paramdef> 8281 <paramdef>struct sk_buff_head * <parameter>list</parameter></paramdef> 8282 <paramdef>const u8 * <parameter>addr</parameter></paramdef> 8283 <paramdef>enum nl80211_iftype <parameter>iftype</parameter></paramdef> 8284 <paramdef>const unsigned int <parameter>extra_headroom</parameter></paramdef> 8285 <paramdef>bool <parameter>has_80211_header</parameter></paramdef> 8286 </funcprototype></funcsynopsis> 8287</refsynopsisdiv> 8288<refsect1> 8289 <title>Arguments</title> 8290 <variablelist> 8291 <varlistentry> 8292 <term><parameter>skb</parameter></term> 8293 <listitem> 8294 <para> 8295 The input IEEE 802.11n A-MSDU frame. 8296 </para> 8297 </listitem> 8298 </varlistentry> 8299 <varlistentry> 8300 <term><parameter>list</parameter></term> 8301 <listitem> 8302 <para> 8303 The output list of 802.3 frames. It must be allocated and 8304 initialized by by the caller. 8305 </para> 8306 </listitem> 8307 </varlistentry> 8308 <varlistentry> 8309 <term><parameter>addr</parameter></term> 8310 <listitem> 8311 <para> 8312 The device MAC address. 8313 </para> 8314 </listitem> 8315 </varlistentry> 8316 <varlistentry> 8317 <term><parameter>iftype</parameter></term> 8318 <listitem> 8319 <para> 8320 The device interface type. 8321 </para> 8322 </listitem> 8323 </varlistentry> 8324 <varlistentry> 8325 <term><parameter>extra_headroom</parameter></term> 8326 <listitem> 8327 <para> 8328 The hardware extra headroom for SKBs in the <parameter>list</parameter>. 8329 </para> 8330 </listitem> 8331 </varlistentry> 8332 <varlistentry> 8333 <term><parameter>has_80211_header</parameter></term> 8334 <listitem> 8335 <para> 8336 Set it true if SKB is with IEEE 802.11 header. 8337 </para> 8338 </listitem> 8339 </varlistentry> 8340 </variablelist> 8341</refsect1> 8342<refsect1> 8343<title>Description</title> 8344<para> 8345 </para><para> 8346 8347 Decode an IEEE 802.11n A-MSDU frame and convert it to a list of 8348 802.3 frames. The <parameter>list</parameter> will be empty if the decode fails. The 8349 <parameter>skb</parameter> is consumed after the function returns. 8350</para> 8351</refsect1> 8352</refentry> 8353 8354<refentry id="API-cfg80211-classify8021d"> 8355<refentryinfo> 8356 <title>LINUX</title> 8357 <productname>Kernel Hackers Manual</productname> 8358 <date>July 2017</date> 8359</refentryinfo> 8360<refmeta> 8361 <refentrytitle><phrase>cfg80211_classify8021d</phrase></refentrytitle> 8362 <manvolnum>9</manvolnum> 8363 <refmiscinfo class="version">4.1.27</refmiscinfo> 8364</refmeta> 8365<refnamediv> 8366 <refname>cfg80211_classify8021d</refname> 8367 <refpurpose> 8368 determine the 802.1p/1d tag for a data frame 8369 </refpurpose> 8370</refnamediv> 8371<refsynopsisdiv> 8372 <title>Synopsis</title> 8373 <funcsynopsis><funcprototype> 8374 <funcdef>unsigned int <function>cfg80211_classify8021d </function></funcdef> 8375 <paramdef>struct sk_buff * <parameter>skb</parameter></paramdef> 8376 <paramdef>struct cfg80211_qos_map * <parameter>qos_map</parameter></paramdef> 8377 </funcprototype></funcsynopsis> 8378</refsynopsisdiv> 8379<refsect1> 8380 <title>Arguments</title> 8381 <variablelist> 8382 <varlistentry> 8383 <term><parameter>skb</parameter></term> 8384 <listitem> 8385 <para> 8386 the data frame 8387 </para> 8388 </listitem> 8389 </varlistentry> 8390 <varlistentry> 8391 <term><parameter>qos_map</parameter></term> 8392 <listitem> 8393 <para> 8394 Interworking QoS mapping or <constant>NULL</constant> if not in use 8395 </para> 8396 </listitem> 8397 </varlistentry> 8398 </variablelist> 8399</refsect1> 8400<refsect1> 8401<title>Return</title> 8402<para> 8403 The 802.1p/1d tag. 8404</para> 8405</refsect1> 8406</refentry> 8407 8408 </chapter> 8409 <chapter> 8410 <title>Regulatory enforcement infrastructure</title> 8411<para> 8412 </para><para> 8413 TODO 8414</para> 8415 8416<refentry id="API-regulatory-hint"> 8417<refentryinfo> 8418 <title>LINUX</title> 8419 <productname>Kernel Hackers Manual</productname> 8420 <date>July 2017</date> 8421</refentryinfo> 8422<refmeta> 8423 <refentrytitle><phrase>regulatory_hint</phrase></refentrytitle> 8424 <manvolnum>9</manvolnum> 8425 <refmiscinfo class="version">4.1.27</refmiscinfo> 8426</refmeta> 8427<refnamediv> 8428 <refname>regulatory_hint</refname> 8429 <refpurpose> 8430 driver hint to the wireless core a regulatory domain 8431 </refpurpose> 8432</refnamediv> 8433<refsynopsisdiv> 8434 <title>Synopsis</title> 8435 <funcsynopsis><funcprototype> 8436 <funcdef>int <function>regulatory_hint </function></funcdef> 8437 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 8438 <paramdef>const char * <parameter>alpha2</parameter></paramdef> 8439 </funcprototype></funcsynopsis> 8440</refsynopsisdiv> 8441<refsect1> 8442 <title>Arguments</title> 8443 <variablelist> 8444 <varlistentry> 8445 <term><parameter>wiphy</parameter></term> 8446 <listitem> 8447 <para> 8448 the wireless device giving the hint (used only for reporting 8449 conflicts) 8450 </para> 8451 </listitem> 8452 </varlistentry> 8453 <varlistentry> 8454 <term><parameter>alpha2</parameter></term> 8455 <listitem> 8456 <para> 8457 the ISO/IEC 3166 alpha2 the driver claims its regulatory domain 8458 should be in. If <parameter>rd</parameter> is set this should be NULL. Note that if you 8459 set this to NULL you should still set rd->alpha2 to some accepted 8460 alpha2. 8461 </para> 8462 </listitem> 8463 </varlistentry> 8464 </variablelist> 8465</refsect1> 8466<refsect1> 8467<title>Description</title> 8468<para> 8469 Wireless drivers can use this function to hint to the wireless core 8470 what it believes should be the current regulatory domain by 8471 giving it an ISO/IEC 3166 alpha2 country code it knows its regulatory 8472 domain should be in or by providing a completely build regulatory domain. 8473 If the driver provides an ISO/IEC 3166 alpha2 userspace will be queried 8474 for a regulatory domain structure for the respective country. 8475 </para><para> 8476 8477 The wiphy must have been registered to cfg80211 prior to this call. 8478 For cfg80211 drivers this means you must first use <function>wiphy_register</function>, 8479 for mac80211 drivers you must first use <function>ieee80211_register_hw</function>. 8480 </para><para> 8481 8482 Drivers should check the return value, its possible you can get 8483 an -ENOMEM. 8484</para> 8485</refsect1> 8486<refsect1> 8487<title>Return</title> 8488<para> 8489 0 on success. -ENOMEM. 8490</para> 8491</refsect1> 8492</refentry> 8493 8494<refentry id="API-wiphy-apply-custom-regulatory"> 8495<refentryinfo> 8496 <title>LINUX</title> 8497 <productname>Kernel Hackers Manual</productname> 8498 <date>July 2017</date> 8499</refentryinfo> 8500<refmeta> 8501 <refentrytitle><phrase>wiphy_apply_custom_regulatory</phrase></refentrytitle> 8502 <manvolnum>9</manvolnum> 8503 <refmiscinfo class="version">4.1.27</refmiscinfo> 8504</refmeta> 8505<refnamediv> 8506 <refname>wiphy_apply_custom_regulatory</refname> 8507 <refpurpose> 8508 apply a custom driver regulatory domain 8509 </refpurpose> 8510</refnamediv> 8511<refsynopsisdiv> 8512 <title>Synopsis</title> 8513 <funcsynopsis><funcprototype> 8514 <funcdef>void <function>wiphy_apply_custom_regulatory </function></funcdef> 8515 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 8516 <paramdef>const struct ieee80211_regdomain * <parameter>regd</parameter></paramdef> 8517 </funcprototype></funcsynopsis> 8518</refsynopsisdiv> 8519<refsect1> 8520 <title>Arguments</title> 8521 <variablelist> 8522 <varlistentry> 8523 <term><parameter>wiphy</parameter></term> 8524 <listitem> 8525 <para> 8526 the wireless device we want to process the regulatory domain on 8527 </para> 8528 </listitem> 8529 </varlistentry> 8530 <varlistentry> 8531 <term><parameter>regd</parameter></term> 8532 <listitem> 8533 <para> 8534 the custom regulatory domain to use for this wiphy 8535 </para> 8536 </listitem> 8537 </varlistentry> 8538 </variablelist> 8539</refsect1> 8540<refsect1> 8541<title>Description</title> 8542<para> 8543 Drivers can sometimes have custom regulatory domains which do not apply 8544 to a specific country. Drivers can use this to apply such custom regulatory 8545 domains. This routine must be called prior to wiphy registration. The 8546 custom regulatory domain will be trusted completely and as such previous 8547 default channel settings will be disregarded. If no rule is found for a 8548 channel on the regulatory domain the channel will be disabled. 8549 Drivers using this for a wiphy should also set the wiphy flag 8550 REGULATORY_CUSTOM_REG or cfg80211 will set it for the wiphy 8551 that called this helper. 8552</para> 8553</refsect1> 8554</refentry> 8555 8556<refentry id="API-freq-reg-info"> 8557<refentryinfo> 8558 <title>LINUX</title> 8559 <productname>Kernel Hackers Manual</productname> 8560 <date>July 2017</date> 8561</refentryinfo> 8562<refmeta> 8563 <refentrytitle><phrase>freq_reg_info</phrase></refentrytitle> 8564 <manvolnum>9</manvolnum> 8565 <refmiscinfo class="version">4.1.27</refmiscinfo> 8566</refmeta> 8567<refnamediv> 8568 <refname>freq_reg_info</refname> 8569 <refpurpose> 8570 get regulatory information for the given frequency 8571 </refpurpose> 8572</refnamediv> 8573<refsynopsisdiv> 8574 <title>Synopsis</title> 8575 <funcsynopsis><funcprototype> 8576 <funcdef>const struct ieee80211_reg_rule * <function>freq_reg_info </function></funcdef> 8577 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 8578 <paramdef>u32 <parameter>center_freq</parameter></paramdef> 8579 </funcprototype></funcsynopsis> 8580</refsynopsisdiv> 8581<refsect1> 8582 <title>Arguments</title> 8583 <variablelist> 8584 <varlistentry> 8585 <term><parameter>wiphy</parameter></term> 8586 <listitem> 8587 <para> 8588 the wiphy for which we want to process this rule for 8589 </para> 8590 </listitem> 8591 </varlistentry> 8592 <varlistentry> 8593 <term><parameter>center_freq</parameter></term> 8594 <listitem> 8595 <para> 8596 Frequency in KHz for which we want regulatory information for 8597 </para> 8598 </listitem> 8599 </varlistentry> 8600 </variablelist> 8601</refsect1> 8602<refsect1> 8603<title>Description</title> 8604<para> 8605 Use this function to get the regulatory rule for a specific frequency on 8606 a given wireless device. If the device has a specific regulatory domain 8607 it wants to follow we respect that unless a country IE has been received 8608 and processed already. 8609</para> 8610</refsect1> 8611<refsect1> 8612<title>Return</title> 8613<para> 8614 A valid pointer, or, when an error occurs, for example if no rule 8615 can be found, the return value is encoded using <function>ERR_PTR</function>. Use <function>IS_ERR</function> to 8616 check and <function>PTR_ERR</function> to obtain the numeric return value. The numeric return 8617 value will be -ERANGE if we determine the given center_freq does not even 8618 have a regulatory rule for a frequency range in the center_freq's band. 8619 See <function>freq_in_rule_band</function> for our current definition of a band -- this is 8620 purely subjective and right now it's 802.11 specific. 8621</para> 8622</refsect1> 8623</refentry> 8624 8625 </chapter> 8626 <chapter> 8627 <title>RFkill integration</title> 8628<para> 8629 </para><para> 8630 RFkill integration in cfg80211 is almost invisible to drivers, 8631 as cfg80211 automatically registers an rfkill instance for each 8632 wireless device it knows about. Soft kill is also translated 8633 into disconnecting and turning all interfaces off, drivers are 8634 expected to turn off the device when all interfaces are down. 8635 </para><para> 8636 However, devices may have a hard RFkill line, in which case they 8637 also need to interact with the rfkill subsystem, via cfg80211. 8638 They can do this with a few helper functions documented here. 8639</para> 8640 8641<refentry id="API-wiphy-rfkill-set-hw-state"> 8642<refentryinfo> 8643 <title>LINUX</title> 8644 <productname>Kernel Hackers Manual</productname> 8645 <date>July 2017</date> 8646</refentryinfo> 8647<refmeta> 8648 <refentrytitle><phrase>wiphy_rfkill_set_hw_state</phrase></refentrytitle> 8649 <manvolnum>9</manvolnum> 8650 <refmiscinfo class="version">4.1.27</refmiscinfo> 8651</refmeta> 8652<refnamediv> 8653 <refname>wiphy_rfkill_set_hw_state</refname> 8654 <refpurpose> 8655 notify cfg80211 about hw block state 8656 </refpurpose> 8657</refnamediv> 8658<refsynopsisdiv> 8659 <title>Synopsis</title> 8660 <funcsynopsis><funcprototype> 8661 <funcdef>void <function>wiphy_rfkill_set_hw_state </function></funcdef> 8662 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 8663 <paramdef>bool <parameter>blocked</parameter></paramdef> 8664 </funcprototype></funcsynopsis> 8665</refsynopsisdiv> 8666<refsect1> 8667 <title>Arguments</title> 8668 <variablelist> 8669 <varlistentry> 8670 <term><parameter>wiphy</parameter></term> 8671 <listitem> 8672 <para> 8673 the wiphy 8674 </para> 8675 </listitem> 8676 </varlistentry> 8677 <varlistentry> 8678 <term><parameter>blocked</parameter></term> 8679 <listitem> 8680 <para> 8681 block status 8682 </para> 8683 </listitem> 8684 </varlistentry> 8685 </variablelist> 8686</refsect1> 8687</refentry> 8688 8689<refentry id="API-wiphy-rfkill-start-polling"> 8690<refentryinfo> 8691 <title>LINUX</title> 8692 <productname>Kernel Hackers Manual</productname> 8693 <date>July 2017</date> 8694</refentryinfo> 8695<refmeta> 8696 <refentrytitle><phrase>wiphy_rfkill_start_polling</phrase></refentrytitle> 8697 <manvolnum>9</manvolnum> 8698 <refmiscinfo class="version">4.1.27</refmiscinfo> 8699</refmeta> 8700<refnamediv> 8701 <refname>wiphy_rfkill_start_polling</refname> 8702 <refpurpose> 8703 start polling rfkill 8704 </refpurpose> 8705</refnamediv> 8706<refsynopsisdiv> 8707 <title>Synopsis</title> 8708 <funcsynopsis><funcprototype> 8709 <funcdef>void <function>wiphy_rfkill_start_polling </function></funcdef> 8710 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 8711 </funcprototype></funcsynopsis> 8712</refsynopsisdiv> 8713<refsect1> 8714 <title>Arguments</title> 8715 <variablelist> 8716 <varlistentry> 8717 <term><parameter>wiphy</parameter></term> 8718 <listitem> 8719 <para> 8720 the wiphy 8721 </para> 8722 </listitem> 8723 </varlistentry> 8724 </variablelist> 8725</refsect1> 8726</refentry> 8727 8728<refentry id="API-wiphy-rfkill-stop-polling"> 8729<refentryinfo> 8730 <title>LINUX</title> 8731 <productname>Kernel Hackers Manual</productname> 8732 <date>July 2017</date> 8733</refentryinfo> 8734<refmeta> 8735 <refentrytitle><phrase>wiphy_rfkill_stop_polling</phrase></refentrytitle> 8736 <manvolnum>9</manvolnum> 8737 <refmiscinfo class="version">4.1.27</refmiscinfo> 8738</refmeta> 8739<refnamediv> 8740 <refname>wiphy_rfkill_stop_polling</refname> 8741 <refpurpose> 8742 stop polling rfkill 8743 </refpurpose> 8744</refnamediv> 8745<refsynopsisdiv> 8746 <title>Synopsis</title> 8747 <funcsynopsis><funcprototype> 8748 <funcdef>void <function>wiphy_rfkill_stop_polling </function></funcdef> 8749 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 8750 </funcprototype></funcsynopsis> 8751</refsynopsisdiv> 8752<refsect1> 8753 <title>Arguments</title> 8754 <variablelist> 8755 <varlistentry> 8756 <term><parameter>wiphy</parameter></term> 8757 <listitem> 8758 <para> 8759 the wiphy 8760 </para> 8761 </listitem> 8762 </varlistentry> 8763 </variablelist> 8764</refsect1> 8765</refentry> 8766 8767 </chapter> 8768 <chapter> 8769 <title>Test mode</title> 8770<para> 8771 </para><para> 8772 Test mode is a set of utility functions to allow drivers to 8773 interact with driver-specific tools to aid, for instance, 8774 factory programming. 8775 </para><para> 8776 This chapter describes how drivers interact with it, for more 8777 information see the nl80211 book's chapter on it. 8778</para> 8779 8780<refentry id="API-cfg80211-testmode-alloc-reply-skb"> 8781<refentryinfo> 8782 <title>LINUX</title> 8783 <productname>Kernel Hackers Manual</productname> 8784 <date>July 2017</date> 8785</refentryinfo> 8786<refmeta> 8787 <refentrytitle><phrase>cfg80211_testmode_alloc_reply_skb</phrase></refentrytitle> 8788 <manvolnum>9</manvolnum> 8789 <refmiscinfo class="version">4.1.27</refmiscinfo> 8790</refmeta> 8791<refnamediv> 8792 <refname>cfg80211_testmode_alloc_reply_skb</refname> 8793 <refpurpose> 8794 allocate testmode reply 8795 </refpurpose> 8796</refnamediv> 8797<refsynopsisdiv> 8798 <title>Synopsis</title> 8799 <funcsynopsis><funcprototype> 8800 <funcdef>struct sk_buff * <function>cfg80211_testmode_alloc_reply_skb </function></funcdef> 8801 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 8802 <paramdef>int <parameter>approxlen</parameter></paramdef> 8803 </funcprototype></funcsynopsis> 8804</refsynopsisdiv> 8805<refsect1> 8806 <title>Arguments</title> 8807 <variablelist> 8808 <varlistentry> 8809 <term><parameter>wiphy</parameter></term> 8810 <listitem> 8811 <para> 8812 the wiphy 8813 </para> 8814 </listitem> 8815 </varlistentry> 8816 <varlistentry> 8817 <term><parameter>approxlen</parameter></term> 8818 <listitem> 8819 <para> 8820 an upper bound of the length of the data that will 8821 be put into the skb 8822 </para> 8823 </listitem> 8824 </varlistentry> 8825 </variablelist> 8826</refsect1> 8827<refsect1> 8828<title>Description</title> 8829<para> 8830 This function allocates and pre-fills an skb for a reply to 8831 the testmode command. Since it is intended for a reply, calling 8832 it outside of the <parameter>testmode_cmd</parameter> operation is invalid. 8833 </para><para> 8834 8835 The returned skb is pre-filled with the wiphy index and set up in 8836 a way that any data that is put into the skb (with <function>skb_put</function>, 8837 <function>nla_put</function> or similar) will end up being within the 8838 <constant>NL80211_ATTR_TESTDATA</constant> attribute, so all that needs to be done 8839 with the skb is adding data for the corresponding userspace tool 8840 which can then read that data out of the testdata attribute. You 8841 must not modify the skb in any other way. 8842 </para><para> 8843 8844 When done, call <function>cfg80211_testmode_reply</function> with the skb and return 8845 its error code as the result of the <parameter>testmode_cmd</parameter> operation. 8846</para> 8847</refsect1> 8848<refsect1> 8849<title>Return</title> 8850<para> 8851 An allocated and pre-filled skb. <constant>NULL</constant> if any errors happen. 8852</para> 8853</refsect1> 8854</refentry> 8855 8856<refentry id="API-cfg80211-testmode-reply"> 8857<refentryinfo> 8858 <title>LINUX</title> 8859 <productname>Kernel Hackers Manual</productname> 8860 <date>July 2017</date> 8861</refentryinfo> 8862<refmeta> 8863 <refentrytitle><phrase>cfg80211_testmode_reply</phrase></refentrytitle> 8864 <manvolnum>9</manvolnum> 8865 <refmiscinfo class="version">4.1.27</refmiscinfo> 8866</refmeta> 8867<refnamediv> 8868 <refname>cfg80211_testmode_reply</refname> 8869 <refpurpose> 8870 send the reply skb 8871 </refpurpose> 8872</refnamediv> 8873<refsynopsisdiv> 8874 <title>Synopsis</title> 8875 <funcsynopsis><funcprototype> 8876 <funcdef>int <function>cfg80211_testmode_reply </function></funcdef> 8877 <paramdef>struct sk_buff * <parameter>skb</parameter></paramdef> 8878 </funcprototype></funcsynopsis> 8879</refsynopsisdiv> 8880<refsect1> 8881 <title>Arguments</title> 8882 <variablelist> 8883 <varlistentry> 8884 <term><parameter>skb</parameter></term> 8885 <listitem> 8886 <para> 8887 The skb, must have been allocated with 8888 <function>cfg80211_testmode_alloc_reply_skb</function> 8889 </para> 8890 </listitem> 8891 </varlistentry> 8892 </variablelist> 8893</refsect1> 8894<refsect1> 8895<title>Description</title> 8896<para> 8897 Since calling this function will usually be the last thing 8898 before returning from the <parameter>testmode_cmd</parameter> you should return 8899 the error code. Note that this function consumes the skb 8900 regardless of the return value. 8901</para> 8902</refsect1> 8903<refsect1> 8904<title>Return</title> 8905<para> 8906 An error code or 0 on success. 8907</para> 8908</refsect1> 8909</refentry> 8910 8911<refentry id="API-cfg80211-testmode-alloc-event-skb"> 8912<refentryinfo> 8913 <title>LINUX</title> 8914 <productname>Kernel Hackers Manual</productname> 8915 <date>July 2017</date> 8916</refentryinfo> 8917<refmeta> 8918 <refentrytitle><phrase>cfg80211_testmode_alloc_event_skb</phrase></refentrytitle> 8919 <manvolnum>9</manvolnum> 8920 <refmiscinfo class="version">4.1.27</refmiscinfo> 8921</refmeta> 8922<refnamediv> 8923 <refname>cfg80211_testmode_alloc_event_skb</refname> 8924 <refpurpose> 8925 allocate testmode event 8926 </refpurpose> 8927</refnamediv> 8928<refsynopsisdiv> 8929 <title>Synopsis</title> 8930 <funcsynopsis><funcprototype> 8931 <funcdef>struct sk_buff * <function>cfg80211_testmode_alloc_event_skb </function></funcdef> 8932 <paramdef>struct wiphy * <parameter>wiphy</parameter></paramdef> 8933 <paramdef>int <parameter>approxlen</parameter></paramdef> 8934 <paramdef>gfp_t <parameter>gfp</parameter></paramdef> 8935 </funcprototype></funcsynopsis> 8936</refsynopsisdiv> 8937<refsect1> 8938 <title>Arguments</title> 8939 <variablelist> 8940 <varlistentry> 8941 <term><parameter>wiphy</parameter></term> 8942 <listitem> 8943 <para> 8944 the wiphy 8945 </para> 8946 </listitem> 8947 </varlistentry> 8948 <varlistentry> 8949 <term><parameter>approxlen</parameter></term> 8950 <listitem> 8951 <para> 8952 an upper bound of the length of the data that will 8953 be put into the skb 8954 </para> 8955 </listitem> 8956 </varlistentry> 8957 <varlistentry> 8958 <term><parameter>gfp</parameter></term> 8959 <listitem> 8960 <para> 8961 allocation flags 8962 </para> 8963 </listitem> 8964 </varlistentry> 8965 </variablelist> 8966</refsect1> 8967<refsect1> 8968<title>Description</title> 8969<para> 8970 This function allocates and pre-fills an skb for an event on the 8971 testmode multicast group. 8972 </para><para> 8973 8974 The returned skb is set up in the same way as with 8975 <function>cfg80211_testmode_alloc_reply_skb</function> but prepared for an event. As 8976 there, you should simply add data to it that will then end up in the 8977 <constant>NL80211_ATTR_TESTDATA</constant> attribute. Again, you must not modify the skb 8978 in any other way. 8979 </para><para> 8980 8981 When done filling the skb, call <function>cfg80211_testmode_event</function> with the 8982 skb to send the event. 8983</para> 8984</refsect1> 8985<refsect1> 8986<title>Return</title> 8987<para> 8988 An allocated and pre-filled skb. <constant>NULL</constant> if any errors happen. 8989</para> 8990</refsect1> 8991</refentry> 8992 8993<refentry id="API-cfg80211-testmode-event"> 8994<refentryinfo> 8995 <title>LINUX</title> 8996 <productname>Kernel Hackers Manual</productname> 8997 <date>July 2017</date> 8998</refentryinfo> 8999<refmeta> 9000 <refentrytitle><phrase>cfg80211_testmode_event</phrase></refentrytitle> 9001 <manvolnum>9</manvolnum> 9002 <refmiscinfo class="version">4.1.27</refmiscinfo> 9003</refmeta> 9004<refnamediv> 9005 <refname>cfg80211_testmode_event</refname> 9006 <refpurpose> 9007 send the event 9008 </refpurpose> 9009</refnamediv> 9010<refsynopsisdiv> 9011 <title>Synopsis</title> 9012 <funcsynopsis><funcprototype> 9013 <funcdef>void <function>cfg80211_testmode_event </function></funcdef> 9014 <paramdef>struct sk_buff * <parameter>skb</parameter></paramdef> 9015 <paramdef>gfp_t <parameter>gfp</parameter></paramdef> 9016 </funcprototype></funcsynopsis> 9017</refsynopsisdiv> 9018<refsect1> 9019 <title>Arguments</title> 9020 <variablelist> 9021 <varlistentry> 9022 <term><parameter>skb</parameter></term> 9023 <listitem> 9024 <para> 9025 The skb, must have been allocated with 9026 <function>cfg80211_testmode_alloc_event_skb</function> 9027 </para> 9028 </listitem> 9029 </varlistentry> 9030 <varlistentry> 9031 <term><parameter>gfp</parameter></term> 9032 <listitem> 9033 <para> 9034 allocation flags 9035 </para> 9036 </listitem> 9037 </varlistentry> 9038 </variablelist> 9039</refsect1> 9040<refsect1> 9041<title>Description</title> 9042<para> 9043 This function sends the given <parameter>skb</parameter>, which must have been allocated 9044 by <function>cfg80211_testmode_alloc_event_skb</function>, as an event. It always 9045 consumes it. 9046</para> 9047</refsect1> 9048</refentry> 9049 9050 </chapter> 9051 </book> 9052 <book id="mac80211-developers-guide"> 9053 <bookinfo> 9054 <title>The mac80211 subsystem</title> 9055 <abstract> 9056<para> 9057 </para><para> 9058 mac80211 is the Linux stack for 802.11 hardware that implements 9059 only partial functionality in hard- or firmware. This document 9060 defines the interface between mac80211 and low-level hardware 9061 drivers. 9062</para> 9063 9064<para> 9065 </para><para> 9066 If you're reading this document and not the header file itself, it will 9067 be incomplete because not all documentation has been converted yet. 9068</para> 9069 9070 </abstract> 9071 </bookinfo> 9072 9073 <toc></toc> 9074 9075 <!-- 9076 Generally, this document shall be ordered by increasing complexity. 9077 It is important to note that readers should be able to read only 9078 the first few sections to get a working driver and only advanced 9079 usage should require reading the full document. 9080 --> 9081 9082 <part> 9083 <title>The basic mac80211 driver interface</title> 9084 <partintro> 9085 <para> 9086 You should read and understand the information contained 9087 within this part of the book while implementing a driver. 9088 In some chapters, advanced usage is noted, that may be 9089 skipped at first. 9090 </para> 9091 <para> 9092 This part of the book only covers station and monitor mode 9093 functionality, additional information required to implement 9094 the other modes is covered in the second part of the book. 9095 </para> 9096 </partintro> 9097 9098 <chapter id="basics"> 9099 <title>Basic hardware handling</title> 9100 <para>TBD</para> 9101 <para> 9102 This chapter shall contain information on getting a hw 9103 struct allocated and registered with mac80211. 9104 </para> 9105 <para> 9106 Since it is required to allocate rates/modes before registering 9107 a hw struct, this chapter shall also contain information on setting 9108 up the rate/mode structs. 9109 </para> 9110 <para> 9111 Additionally, some discussion about the callbacks and 9112 the general programming model should be in here, including 9113 the definition of ieee80211_ops which will be referred to 9114 a lot. 9115 </para> 9116 <para> 9117 Finally, a discussion of hardware capabilities should be done 9118 with references to other parts of the book. 9119 </para> 9120 <!-- intentionally multiple !F lines to get proper order --> 9121<refentry id="API-struct-ieee80211-hw"> 9122<refentryinfo> 9123 <title>LINUX</title> 9124 <productname>Kernel Hackers Manual</productname> 9125 <date>July 2017</date> 9126</refentryinfo> 9127<refmeta> 9128 <refentrytitle><phrase>struct ieee80211_hw</phrase></refentrytitle> 9129 <manvolnum>9</manvolnum> 9130 <refmiscinfo class="version">4.1.27</refmiscinfo> 9131</refmeta> 9132<refnamediv> 9133 <refname>struct ieee80211_hw</refname> 9134 <refpurpose> 9135 hardware information and state 9136 </refpurpose> 9137</refnamediv> 9138<refsynopsisdiv> 9139 <title>Synopsis</title> 9140 <programlisting> 9141struct ieee80211_hw { 9142 struct ieee80211_conf conf; 9143 struct wiphy * wiphy; 9144 const char * rate_control_algorithm; 9145 void * priv; 9146 u32 flags; 9147 unsigned int extra_tx_headroom; 9148 unsigned int extra_beacon_tailroom; 9149 int vif_data_size; 9150 int sta_data_size; 9151 int chanctx_data_size; 9152 int txq_data_size; 9153 u16 queues; 9154 u16 max_listen_interval; 9155 s8 max_signal; 9156 u8 max_rates; 9157 u8 max_report_rates; 9158 u8 max_rate_tries; 9159 u8 max_rx_aggregation_subframes; 9160 u8 max_tx_aggregation_subframes; 9161 u8 offchannel_tx_hw_queue; 9162 u8 radiotap_mcs_details; 9163 u16 radiotap_vht_details; 9164 netdev_features_t netdev_features; 9165 u8 uapsd_queues; 9166 u8 uapsd_max_sp_len; 9167 u8 n_cipher_schemes; 9168 const struct ieee80211_cipher_scheme * cipher_schemes; 9169 int txq_ac_max_pending; 9170}; </programlisting> 9171</refsynopsisdiv> 9172 <refsect1> 9173 <title>Members</title> 9174 <variablelist> 9175 <varlistentry> <term>conf</term> 9176 <listitem><para> 9177<structname>struct ieee80211_conf</structname>, device configuration, don't use. 9178 </para></listitem> 9179 </varlistentry> 9180 <varlistentry> <term>wiphy</term> 9181 <listitem><para> 9182This points to the <structname>struct wiphy</structname> allocated for this 9183802.11 PHY. You must fill in the <parameter>perm_addr</parameter> and <parameter>dev</parameter> 9184members of this structure using <function>SET_IEEE80211_DEV</function> 9185and <function>SET_IEEE80211_PERM_ADDR</function>. Additionally, all supported 9186bands (with channels, bitrates) are registered here. 9187 </para></listitem> 9188 </varlistentry> 9189 <varlistentry> <term>rate_control_algorithm</term> 9190 <listitem><para> 9191rate control algorithm for this hardware. 9192If unset (NULL), the default algorithm will be used. Must be 9193set before calling <function>ieee80211_register_hw</function>. 9194 </para></listitem> 9195 </varlistentry> 9196 <varlistentry> <term>priv</term> 9197 <listitem><para> 9198pointer to private area that was allocated for driver use 9199along with this structure. 9200 </para></listitem> 9201 </varlistentry> 9202 <varlistentry> <term>flags</term> 9203 <listitem><para> 9204hardware flags, see <structname>enum</structname> ieee80211_hw_flags. 9205 </para></listitem> 9206 </varlistentry> 9207 <varlistentry> <term>extra_tx_headroom</term> 9208 <listitem><para> 9209headroom to reserve in each transmit skb 9210for use by the driver (e.g. for transmit headers.) 9211 </para></listitem> 9212 </varlistentry> 9213 <varlistentry> <term>extra_beacon_tailroom</term> 9214 <listitem><para> 9215tailroom to reserve in each beacon tx skb. 9216Can be used by drivers to add extra IEs. 9217 </para></listitem> 9218 </varlistentry> 9219 <varlistentry> <term>vif_data_size</term> 9220 <listitem><para> 9221size (in bytes) of the drv_priv data area 9222within <structname>struct ieee80211_vif</structname>. 9223 </para></listitem> 9224 </varlistentry> 9225 <varlistentry> <term>sta_data_size</term> 9226 <listitem><para> 9227size (in bytes) of the drv_priv data area 9228within <structname>struct ieee80211_sta</structname>. 9229 </para></listitem> 9230 </varlistentry> 9231 <varlistentry> <term>chanctx_data_size</term> 9232 <listitem><para> 9233size (in bytes) of the drv_priv data area 9234within <structname>struct ieee80211_chanctx_conf</structname>. 9235 </para></listitem> 9236 </varlistentry> 9237 <varlistentry> <term>txq_data_size</term> 9238 <listitem><para> 9239size (in bytes) of the drv_priv data area 9240within <parameter>struct</parameter> ieee80211_txq. 9241 </para></listitem> 9242 </varlistentry> 9243 <varlistentry> <term>queues</term> 9244 <listitem><para> 9245number of available hardware transmit queues for 9246data packets. WMM/QoS requires at least four, these 9247queues need to have configurable access parameters. 9248 </para></listitem> 9249 </varlistentry> 9250 <varlistentry> <term>max_listen_interval</term> 9251 <listitem><para> 9252max listen interval in units of beacon interval 9253that HW supports 9254 </para></listitem> 9255 </varlistentry> 9256 <varlistentry> <term>max_signal</term> 9257 <listitem><para> 9258Maximum value for signal (rssi) in RX information, used 9259only when <parameter>IEEE80211_HW_SIGNAL_UNSPEC</parameter> or <parameter>IEEE80211_HW_SIGNAL_DB</parameter> 9260 </para></listitem> 9261 </varlistentry> 9262 <varlistentry> <term>max_rates</term> 9263 <listitem><para> 9264maximum number of alternate rate retry stages the hw 9265can handle. 9266 </para></listitem> 9267 </varlistentry> 9268 <varlistentry> <term>max_report_rates</term> 9269 <listitem><para> 9270maximum number of alternate rate retry stages 9271the hw can report back. 9272 </para></listitem> 9273 </varlistentry> 9274 <varlistentry> <term>max_rate_tries</term> 9275 <listitem><para> 9276maximum number of tries for each stage 9277 </para></listitem> 9278 </varlistentry> 9279 <varlistentry> <term>max_rx_aggregation_subframes</term> 9280 <listitem><para> 9281maximum buffer size (number of 9282sub-frames) to be used for A-MPDU block ack receiver 9283aggregation. 9284This is only relevant if the device has restrictions on the 9285number of subframes, if it relies on mac80211 to do reordering 9286it shouldn't be set. 9287 </para></listitem> 9288 </varlistentry> 9289 <varlistentry> <term>max_tx_aggregation_subframes</term> 9290 <listitem><para> 9291maximum number of subframes in an 9292aggregate an HT driver will transmit, used by the peer as a 9293hint to size its reorder buffer. 9294 </para></listitem> 9295 </varlistentry> 9296 <varlistentry> <term>offchannel_tx_hw_queue</term> 9297 <listitem><para> 9298HW queue ID to use for offchannel TX 9299(if <constant>IEEE80211_HW_QUEUE_CONTROL</constant> is set) 9300 </para></listitem> 9301 </varlistentry> 9302 <varlistentry> <term>radiotap_mcs_details</term> 9303 <listitem><para> 9304lists which MCS information can the HW 9305reports, by default it is set to _MCS, _GI and _BW but doesn't 9306include _FMT. Use <constant>IEEE80211_RADIOTAP_MCS_HAVE_</constant>* values, only 9307adding _BW is supported today. 9308 </para></listitem> 9309 </varlistentry> 9310 <varlistentry> <term>radiotap_vht_details</term> 9311 <listitem><para> 9312lists which VHT MCS information the HW reports, 9313the default is _GI | _BANDWIDTH. 9314Use the <constant>IEEE80211_RADIOTAP_VHT_KNOWN_</constant>* values. 9315 </para></listitem> 9316 </varlistentry> 9317 <varlistentry> <term>netdev_features</term> 9318 <listitem><para> 9319netdev features to be set in each netdev created 9320from this HW. Note only HW checksum features are currently 9321compatible with mac80211. Other feature bits will be rejected. 9322 </para></listitem> 9323 </varlistentry> 9324 <varlistentry> <term>uapsd_queues</term> 9325 <listitem><para> 9326This bitmap is included in (re)association frame to indicate 9327for each access category if it is uAPSD trigger-enabled and delivery- 9328enabled. Use IEEE80211_WMM_IE_STA_QOSINFO_AC_* to set this bitmap. 9329Each bit corresponds to different AC. Value '1' in specific bit means 9330that corresponding AC is both trigger- and delivery-enabled. '0' means 9331neither enabled. 9332 </para></listitem> 9333 </varlistentry> 9334 <varlistentry> <term>uapsd_max_sp_len</term> 9335 <listitem><para> 9336maximum number of total buffered frames the WMM AP may 9337deliver to a WMM STA during any Service Period triggered by the WMM STA. 9338Use IEEE80211_WMM_IE_STA_QOSINFO_SP_* for correct values. 9339 </para></listitem> 9340 </varlistentry> 9341 <varlistentry> <term>n_cipher_schemes</term> 9342 <listitem><para> 9343a size of an array of cipher schemes definitions. 9344 </para></listitem> 9345 </varlistentry> 9346 <varlistentry> <term>cipher_schemes</term> 9347 <listitem><para> 9348a pointer to an array of cipher scheme definitions 9349supported by HW. 9350 </para></listitem> 9351 </varlistentry> 9352 <varlistentry> <term>txq_ac_max_pending</term> 9353 <listitem><para> 9354maximum number of frames per AC pending in all txq 9355entries for a vif. 9356 </para></listitem> 9357 </varlistentry> 9358 </variablelist> 9359 </refsect1> 9360<refsect1> 9361<title>Description</title> 9362<para> 9363 </para><para> 9364 9365 This structure contains the configuration and hardware 9366 information for an 802.11 PHY. 9367</para> 9368</refsect1> 9369</refentry> 9370 9371<refentry id="API-enum-ieee80211-hw-flags"> 9372<refentryinfo> 9373 <title>LINUX</title> 9374 <productname>Kernel Hackers Manual</productname> 9375 <date>July 2017</date> 9376</refentryinfo> 9377<refmeta> 9378 <refentrytitle><phrase>enum ieee80211_hw_flags</phrase></refentrytitle> 9379 <manvolnum>9</manvolnum> 9380 <refmiscinfo class="version">4.1.27</refmiscinfo> 9381</refmeta> 9382<refnamediv> 9383 <refname>enum ieee80211_hw_flags</refname> 9384 <refpurpose> 9385 hardware flags 9386 </refpurpose> 9387</refnamediv> 9388<refsynopsisdiv> 9389 <title>Synopsis</title> 9390 <programlisting> 9391enum ieee80211_hw_flags { 9392 IEEE80211_HW_HAS_RATE_CONTROL, 9393 IEEE80211_HW_RX_INCLUDES_FCS, 9394 IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING, 9395 IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE, 9396 IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE, 9397 IEEE80211_HW_SIGNAL_UNSPEC, 9398 IEEE80211_HW_SIGNAL_DBM, 9399 IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC, 9400 IEEE80211_HW_SPECTRUM_MGMT, 9401 IEEE80211_HW_AMPDU_AGGREGATION, 9402 IEEE80211_HW_SUPPORTS_PS, 9403 IEEE80211_HW_PS_NULLFUNC_STACK, 9404 IEEE80211_HW_SUPPORTS_DYNAMIC_PS, 9405 IEEE80211_HW_MFP_CAPABLE, 9406 IEEE80211_HW_WANT_MONITOR_VIF, 9407 IEEE80211_HW_NO_AUTO_VIF, 9408 IEEE80211_HW_SW_CRYPTO_CONTROL, 9409 IEEE80211_HW_REPORTS_TX_ACK_STATUS, 9410 IEEE80211_HW_CONNECTION_MONITOR, 9411 IEEE80211_HW_QUEUE_CONTROL, 9412 IEEE80211_HW_SUPPORTS_PER_STA_GTK, 9413 IEEE80211_HW_AP_LINK_PS, 9414 IEEE80211_HW_TX_AMPDU_SETUP_IN_HW, 9415 IEEE80211_HW_SUPPORTS_RC_TABLE, 9416 IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF, 9417 IEEE80211_HW_TIMING_BEACON_ONLY, 9418 IEEE80211_HW_SUPPORTS_HT_CCK_RATES, 9419 IEEE80211_HW_CHANCTX_STA_CSA, 9420 IEEE80211_HW_SUPPORTS_CLONED_SKBS, 9421 IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS 9422}; </programlisting> 9423</refsynopsisdiv> 9424<refsect1> 9425 <title>Constants</title> 9426 <variablelist> 9427 <varlistentry> <term>IEEE80211_HW_HAS_RATE_CONTROL</term> 9428 <listitem><para> 9429The hardware or firmware includes rate control, and cannot be 9430controlled by the stack. As such, no rate control algorithm 9431should be instantiated, and the TX rate reported to userspace 9432will be taken from the TX status instead of the rate control 9433algorithm. 9434Note that this requires that the driver implement a number of 9435callbacks so it has the correct information, it needs to have 9436the <parameter>set_rts_threshold</parameter> callback and must look at the BSS config 9437<parameter>use_cts_prot</parameter> for G/N protection, <parameter>use_short_slot</parameter> for slot 9438timing in 2.4 GHz and <parameter>use_short_preamble</parameter> for preambles for 9439CCK frames. 9440 </para></listitem> 9441 </varlistentry> 9442 <varlistentry> <term>IEEE80211_HW_RX_INCLUDES_FCS</term> 9443 <listitem><para> 9444Indicates that received frames passed to the stack include 9445the FCS at the end. 9446 </para></listitem> 9447 </varlistentry> 9448 <varlistentry> <term>IEEE80211_HW_HOST_BROADCAST_PS_BUFFERING</term> 9449 <listitem><para> 9450Some wireless LAN chipsets buffer broadcast/multicast frames 9451for power saving stations in the hardware/firmware and others 9452rely on the host system for such buffering. This option is used 9453to configure the IEEE 802.11 upper layer to buffer broadcast and 9454multicast frames when there are power saving stations so that 9455the driver can fetch them with <function>ieee80211_get_buffered_bc</function>. 9456 </para></listitem> 9457 </varlistentry> 9458 <varlistentry> <term>IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE</term> 9459 <listitem><para> 9460Hardware is not capable of short slot operation on the 2.4 GHz band. 9461 </para></listitem> 9462 </varlistentry> 9463 <varlistentry> <term>IEEE80211_HW_2GHZ_SHORT_PREAMBLE_INCAPABLE</term> 9464 <listitem><para> 9465Hardware is not capable of receiving frames with short preamble on 9466the 2.4 GHz band. 9467 </para></listitem> 9468 </varlistentry> 9469 <varlistentry> <term>IEEE80211_HW_SIGNAL_UNSPEC</term> 9470 <listitem><para> 9471Hardware can provide signal values but we don't know its units. We 9472expect values between 0 and <parameter>max_signal</parameter>. 9473If possible please provide dB or dBm instead. 9474 </para></listitem> 9475 </varlistentry> 9476 <varlistentry> <term>IEEE80211_HW_SIGNAL_DBM</term> 9477 <listitem><para> 9478Hardware gives signal values in dBm, decibel difference from 9479one milliwatt. This is the preferred method since it is standardized 9480between different devices. <parameter>max_signal</parameter> does not need to be set. 9481 </para></listitem> 9482 </varlistentry> 9483 <varlistentry> <term>IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC</term> 9484 <listitem><para> 9485This device needs to get data from beacon before association (i.e. 9486dtim_period). 9487 </para></listitem> 9488 </varlistentry> 9489 <varlistentry> <term>IEEE80211_HW_SPECTRUM_MGMT</term> 9490 <listitem><para> 9491Hardware supports spectrum management defined in 802.11h 9492Measurement, Channel Switch, Quieting, TPC 9493 </para></listitem> 9494 </varlistentry> 9495 <varlistentry> <term>IEEE80211_HW_AMPDU_AGGREGATION</term> 9496 <listitem><para> 9497Hardware supports 11n A-MPDU aggregation. 9498 </para></listitem> 9499 </varlistentry> 9500 <varlistentry> <term>IEEE80211_HW_SUPPORTS_PS</term> 9501 <listitem><para> 9502Hardware has power save support (i.e. can go to sleep). 9503 </para></listitem> 9504 </varlistentry> 9505 <varlistentry> <term>IEEE80211_HW_PS_NULLFUNC_STACK</term> 9506 <listitem><para> 9507Hardware requires nullfunc frame handling in stack, implies 9508stack support for dynamic PS. 9509 </para></listitem> 9510 </varlistentry> 9511 <varlistentry> <term>IEEE80211_HW_SUPPORTS_DYNAMIC_PS</term> 9512 <listitem><para> 9513Hardware has support for dynamic PS. 9514 </para></listitem> 9515 </varlistentry> 9516 <varlistentry> <term>IEEE80211_HW_MFP_CAPABLE</term> 9517 <listitem><para> 9518Hardware supports management frame protection (MFP, IEEE 802.11w). 9519 </para></listitem> 9520 </varlistentry> 9521 <varlistentry> <term>IEEE80211_HW_WANT_MONITOR_VIF</term> 9522 <listitem><para> 9523The driver would like to be informed of 9524a virtual monitor interface when monitor interfaces are the only 9525active interfaces. 9526 </para></listitem> 9527 </varlistentry> 9528 <varlistentry> <term>IEEE80211_HW_NO_AUTO_VIF</term> 9529 <listitem><para> 9530The driver would like for no wlanX to 9531be created. It is expected user-space will create vifs as 9532desired (and thus have them named as desired). 9533 </para></listitem> 9534 </varlistentry> 9535 <varlistentry> <term>IEEE80211_HW_SW_CRYPTO_CONTROL</term> 9536 <listitem><para> 9537The driver wants to control which of the 9538crypto algorithms can be done in software - so don't automatically 9539try to fall back to it if hardware crypto fails, but do so only if 9540the driver returns 1. This also forces the driver to advertise its 9541supported cipher suites. 9542 </para></listitem> 9543 </varlistentry> 9544 <varlistentry> <term>IEEE80211_HW_REPORTS_TX_ACK_STATUS</term> 9545 <listitem><para> 9546Hardware can provide ack status reports of Tx frames to 9547the stack. 9548 </para></listitem> 9549 </varlistentry> 9550 <varlistentry> <term>IEEE80211_HW_CONNECTION_MONITOR</term> 9551 <listitem><para> 9552The hardware performs its own connection monitoring, including 9553periodic keep-alives to the AP and probing the AP on beacon loss. 9554 </para></listitem> 9555 </varlistentry> 9556 <varlistentry> <term>IEEE80211_HW_QUEUE_CONTROL</term> 9557 <listitem><para> 9558The driver wants to control per-interface 9559queue mapping in order to use different queues (not just one per AC) 9560for different virtual interfaces. See the doc section on HW queue 9561control for more details. 9562 </para></listitem> 9563 </varlistentry> 9564 <varlistentry> <term>IEEE80211_HW_SUPPORTS_PER_STA_GTK</term> 9565 <listitem><para> 9566The device's crypto engine supports 9567per-station GTKs as used by IBSS RSN or during fast transition. If 9568the device doesn't support per-station GTKs, but can be asked not 9569to decrypt group addressed frames, then IBSS RSN support is still 9570possible but software crypto will be used. Advertise the wiphy flag 9571only in that case. 9572 </para></listitem> 9573 </varlistentry> 9574 <varlistentry> <term>IEEE80211_HW_AP_LINK_PS</term> 9575 <listitem><para> 9576When operating in AP mode the device 9577autonomously manages the PS status of connected stations. When 9578this flag is set mac80211 will not trigger PS mode for connected 9579stations based on the PM bit of incoming frames. 9580Use <function>ieee80211_start_ps</function>/<function>ieee8021_end_ps</function> to manually configure 9581the PS mode of connected stations. 9582 </para></listitem> 9583 </varlistentry> 9584 <varlistentry> <term>IEEE80211_HW_TX_AMPDU_SETUP_IN_HW</term> 9585 <listitem><para> 9586The device handles TX A-MPDU session 9587setup strictly in HW. mac80211 should not attempt to do this in 9588software. 9589 </para></listitem> 9590 </varlistentry> 9591 <varlistentry> <term>IEEE80211_HW_SUPPORTS_RC_TABLE</term> 9592 <listitem><para> 9593The driver supports using a rate 9594selection table provided by the rate control algorithm. 9595 </para></listitem> 9596 </varlistentry> 9597 <varlistentry> <term>IEEE80211_HW_P2P_DEV_ADDR_FOR_INTF</term> 9598 <listitem><para> 9599Use the P2P Device address for any 9600P2P Interface. This will be honoured even if more than one interface 9601is supported. 9602 </para></listitem> 9603 </varlistentry> 9604 <varlistentry> <term>IEEE80211_HW_TIMING_BEACON_ONLY</term> 9605 <listitem><para> 9606Use sync timing from beacon frames 9607only, to allow getting TBTT of a DTIM beacon. 9608 </para></listitem> 9609 </varlistentry> 9610 <varlistentry> <term>IEEE80211_HW_SUPPORTS_HT_CCK_RATES</term> 9611 <listitem><para> 9612Hardware supports mixing HT/CCK rates 9613and can cope with CCK rates in an aggregation session (e.g. by not 9614using aggregation for such frames.) 9615 </para></listitem> 9616 </varlistentry> 9617 <varlistentry> <term>IEEE80211_HW_CHANCTX_STA_CSA</term> 9618 <listitem><para> 9619Support 802.11h based channel-switch (CSA) 9620for a single active channel while using channel contexts. When support 9621is not enabled the default action is to disconnect when getting the 9622CSA frame. 9623 </para></listitem> 9624 </varlistentry> 9625 <varlistentry> <term>IEEE80211_HW_SUPPORTS_CLONED_SKBS</term> 9626 <listitem><para> 9627The driver will never modify the payload 9628or tailroom of TX skbs without copying them first. 9629 </para></listitem> 9630 </varlistentry> 9631 <varlistentry> <term>IEEE80211_SINGLE_HW_SCAN_ON_ALL_BANDS</term> 9632 <listitem><para> 9633The HW supports scanning on all bands 9634in one command, mac80211 doesn't have to run separate scans per band. 9635 </para></listitem> 9636 </varlistentry> 9637 </variablelist> 9638</refsect1> 9639<refsect1> 9640<title>Description</title> 9641<para> 9642 </para><para> 9643 9644 These flags are used to indicate hardware capabilities to 9645 the stack. Generally, flags here should have their meaning 9646 done in a way that the simplest hardware doesn't need setting 9647 any particular flags. There are some exceptions to this rule, 9648 however, so you are advised to review these flags carefully. 9649</para> 9650</refsect1> 9651</refentry> 9652 9653<refentry id="API-SET-IEEE80211-DEV"> 9654<refentryinfo> 9655 <title>LINUX</title> 9656 <productname>Kernel Hackers Manual</productname> 9657 <date>July 2017</date> 9658</refentryinfo> 9659<refmeta> 9660 <refentrytitle><phrase>SET_IEEE80211_DEV</phrase></refentrytitle> 9661 <manvolnum>9</manvolnum> 9662 <refmiscinfo class="version">4.1.27</refmiscinfo> 9663</refmeta> 9664<refnamediv> 9665 <refname>SET_IEEE80211_DEV</refname> 9666 <refpurpose> 9667 set device for 802.11 hardware 9668 </refpurpose> 9669</refnamediv> 9670<refsynopsisdiv> 9671 <title>Synopsis</title> 9672 <funcsynopsis><funcprototype> 9673 <funcdef>void <function>SET_IEEE80211_DEV </function></funcdef> 9674 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 9675 <paramdef>struct device * <parameter>dev</parameter></paramdef> 9676 </funcprototype></funcsynopsis> 9677</refsynopsisdiv> 9678<refsect1> 9679 <title>Arguments</title> 9680 <variablelist> 9681 <varlistentry> 9682 <term><parameter>hw</parameter></term> 9683 <listitem> 9684 <para> 9685 the <structname>struct ieee80211_hw</structname> to set the device for 9686 </para> 9687 </listitem> 9688 </varlistentry> 9689 <varlistentry> 9690 <term><parameter>dev</parameter></term> 9691 <listitem> 9692 <para> 9693 the <structname>struct device</structname> of this 802.11 device 9694 </para> 9695 </listitem> 9696 </varlistentry> 9697 </variablelist> 9698</refsect1> 9699</refentry> 9700 9701<refentry id="API-SET-IEEE80211-PERM-ADDR"> 9702<refentryinfo> 9703 <title>LINUX</title> 9704 <productname>Kernel Hackers Manual</productname> 9705 <date>July 2017</date> 9706</refentryinfo> 9707<refmeta> 9708 <refentrytitle><phrase>SET_IEEE80211_PERM_ADDR</phrase></refentrytitle> 9709 <manvolnum>9</manvolnum> 9710 <refmiscinfo class="version">4.1.27</refmiscinfo> 9711</refmeta> 9712<refnamediv> 9713 <refname>SET_IEEE80211_PERM_ADDR</refname> 9714 <refpurpose> 9715 set the permanent MAC address for 802.11 hardware 9716 </refpurpose> 9717</refnamediv> 9718<refsynopsisdiv> 9719 <title>Synopsis</title> 9720 <funcsynopsis><funcprototype> 9721 <funcdef>void <function>SET_IEEE80211_PERM_ADDR </function></funcdef> 9722 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 9723 <paramdef>u8 * <parameter>addr</parameter></paramdef> 9724 </funcprototype></funcsynopsis> 9725</refsynopsisdiv> 9726<refsect1> 9727 <title>Arguments</title> 9728 <variablelist> 9729 <varlistentry> 9730 <term><parameter>hw</parameter></term> 9731 <listitem> 9732 <para> 9733 the <structname>struct ieee80211_hw</structname> to set the MAC address for 9734 </para> 9735 </listitem> 9736 </varlistentry> 9737 <varlistentry> 9738 <term><parameter>addr</parameter></term> 9739 <listitem> 9740 <para> 9741 the address to set 9742 </para> 9743 </listitem> 9744 </varlistentry> 9745 </variablelist> 9746</refsect1> 9747</refentry> 9748 9749<refentry id="API-struct-ieee80211-ops"> 9750<refentryinfo> 9751 <title>LINUX</title> 9752 <productname>Kernel Hackers Manual</productname> 9753 <date>July 2017</date> 9754</refentryinfo> 9755<refmeta> 9756 <refentrytitle><phrase>struct ieee80211_ops</phrase></refentrytitle> 9757 <manvolnum>9</manvolnum> 9758 <refmiscinfo class="version">4.1.27</refmiscinfo> 9759</refmeta> 9760<refnamediv> 9761 <refname>struct ieee80211_ops</refname> 9762 <refpurpose> 9763 callbacks from mac80211 to the driver 9764 </refpurpose> 9765</refnamediv> 9766<refsynopsisdiv> 9767 <title>Synopsis</title> 9768 <programlisting> 9769struct ieee80211_ops { 9770 void (* tx) (struct ieee80211_hw *hw,struct ieee80211_tx_control *control,struct sk_buff *skb); 9771 int (* start) (struct ieee80211_hw *hw); 9772 void (* stop) (struct ieee80211_hw *hw); 9773#ifdef CONFIG_PM 9774 int (* suspend) (struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan); 9775 int (* resume) (struct ieee80211_hw *hw); 9776 void (* set_wakeup) (struct ieee80211_hw *hw, bool enabled); 9777#endif 9778 int (* add_interface) (struct ieee80211_hw *hw,struct ieee80211_vif *vif); 9779 int (* change_interface) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,enum nl80211_iftype new_type, bool p2p); 9780 void (* remove_interface) (struct ieee80211_hw *hw,struct ieee80211_vif *vif); 9781 int (* config) (struct ieee80211_hw *hw, u32 changed); 9782 void (* bss_info_changed) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_bss_conf *info,u32 changed); 9783 int (* start_ap) (struct ieee80211_hw *hw, struct ieee80211_vif *vif); 9784 void (* stop_ap) (struct ieee80211_hw *hw, struct ieee80211_vif *vif); 9785 u64 (* prepare_multicast) (struct ieee80211_hw *hw,struct netdev_hw_addr_list *mc_list); 9786 void (* configure_filter) (struct ieee80211_hw *hw,unsigned int changed_flags,unsigned int *total_flags,u64 multicast); 9787 int (* set_tim) (struct ieee80211_hw *hw, struct ieee80211_sta *sta,bool set); 9788 int (* set_key) (struct ieee80211_hw *hw, enum set_key_cmd cmd,struct ieee80211_vif *vif, struct ieee80211_sta *sta,struct ieee80211_key_conf *key); 9789 void (* update_tkip_key) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_key_conf *conf,struct ieee80211_sta *sta,u32 iv32, u16 *phase1key); 9790 void (* set_rekey_data) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct cfg80211_gtk_rekey_data *data); 9791 void (* set_default_unicast_key) (struct ieee80211_hw *hw,struct ieee80211_vif *vif, int idx); 9792 int (* hw_scan) (struct ieee80211_hw *hw, struct ieee80211_vif *vif,struct ieee80211_scan_request *req); 9793 void (* cancel_hw_scan) (struct ieee80211_hw *hw,struct ieee80211_vif *vif); 9794 int (* sched_scan_start) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct cfg80211_sched_scan_request *req,struct ieee80211_scan_ies *ies); 9795 int (* sched_scan_stop) (struct ieee80211_hw *hw,struct ieee80211_vif *vif); 9796 void (* sw_scan_start) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,const u8 *mac_addr); 9797 void (* sw_scan_complete) (struct ieee80211_hw *hw,struct ieee80211_vif *vif); 9798 int (* get_stats) (struct ieee80211_hw *hw,struct ieee80211_low_level_stats *stats); 9799 void (* get_tkip_seq) (struct ieee80211_hw *hw, u8 hw_key_idx,u32 *iv32, u16 *iv16); 9800 int (* set_frag_threshold) (struct ieee80211_hw *hw, u32 value); 9801 int (* set_rts_threshold) (struct ieee80211_hw *hw, u32 value); 9802 int (* sta_add) (struct ieee80211_hw *hw, struct ieee80211_vif *vif,struct ieee80211_sta *sta); 9803 int (* sta_remove) (struct ieee80211_hw *hw, struct ieee80211_vif *vif,struct ieee80211_sta *sta); 9804#ifdef CONFIG_MAC80211_DEBUGFS 9805 void (* sta_add_debugfs) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_sta *sta,struct dentry *dir); 9806 void (* sta_remove_debugfs) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_sta *sta,struct dentry *dir); 9807#endif 9808 void (* sta_notify) (struct ieee80211_hw *hw, struct ieee80211_vif *vif,enum sta_notify_cmd, struct ieee80211_sta *sta); 9809 int (* sta_state) (struct ieee80211_hw *hw, struct ieee80211_vif *vif,struct ieee80211_sta *sta,enum ieee80211_sta_state old_state,enum ieee80211_sta_state new_state); 9810 void (* sta_pre_rcu_remove) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_sta *sta); 9811 void (* sta_rc_update) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_sta *sta,u32 changed); 9812 void (* sta_rate_tbl_update) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_sta *sta); 9813 void (* sta_statistics) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_sta *sta,struct station_info *sinfo); 9814 int (* conf_tx) (struct ieee80211_hw *hw,struct ieee80211_vif *vif, u16 ac,const struct ieee80211_tx_queue_params *params); 9815 u64 (* get_tsf) (struct ieee80211_hw *hw, struct ieee80211_vif *vif); 9816 void (* set_tsf) (struct ieee80211_hw *hw, struct ieee80211_vif *vif,u64 tsf); 9817 void (* reset_tsf) (struct ieee80211_hw *hw, struct ieee80211_vif *vif); 9818 int (* tx_last_beacon) (struct ieee80211_hw *hw); 9819 int (* ampdu_action) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,enum ieee80211_ampdu_mlme_action action,struct ieee80211_sta *sta, u16 tid, u16 *ssn,u8 buf_size); 9820 int (* get_survey) (struct ieee80211_hw *hw, int idx,struct survey_info *survey); 9821 void (* rfkill_poll) (struct ieee80211_hw *hw); 9822 void (* set_coverage_class) (struct ieee80211_hw *hw, s16 coverage_class); 9823#ifdef CONFIG_NL80211_TESTMODE 9824 int (* testmode_cmd) (struct ieee80211_hw *hw, struct ieee80211_vif *vif,void *data, int len); 9825 int (* testmode_dump) (struct ieee80211_hw *hw, struct sk_buff *skb,struct netlink_callback *cb,void *data, int len); 9826#endif 9827 void (* flush) (struct ieee80211_hw *hw, struct ieee80211_vif *vif,u32 queues, bool drop); 9828 void (* channel_switch) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_channel_switch *ch_switch); 9829 int (* set_antenna) (struct ieee80211_hw *hw, u32 tx_ant, u32 rx_ant); 9830 int (* get_antenna) (struct ieee80211_hw *hw, u32 *tx_ant, u32 *rx_ant); 9831 int (* remain_on_channel) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_channel *chan,int duration,enum ieee80211_roc_type type); 9832 int (* cancel_remain_on_channel) (struct ieee80211_hw *hw); 9833 int (* set_ringparam) (struct ieee80211_hw *hw, u32 tx, u32 rx); 9834 void (* get_ringparam) (struct ieee80211_hw *hw,u32 *tx, u32 *tx_max, u32 *rx, u32 *rx_max); 9835 bool (* tx_frames_pending) (struct ieee80211_hw *hw); 9836 int (* set_bitrate_mask) (struct ieee80211_hw *hw, struct ieee80211_vif *vif,const struct cfg80211_bitrate_mask *mask); 9837 void (* event_callback) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,const struct ieee80211_event *event); 9838 void (* allow_buffered_frames) (struct ieee80211_hw *hw,struct ieee80211_sta *sta,u16 tids, int num_frames,enum ieee80211_frame_release_type reason,bool more_data); 9839 void (* release_buffered_frames) (struct ieee80211_hw *hw,struct ieee80211_sta *sta,u16 tids, int num_frames,enum ieee80211_frame_release_type reason,bool more_data); 9840 int (* get_et_sset_count) (struct ieee80211_hw *hw,struct ieee80211_vif *vif, int sset); 9841 void (* get_et_stats) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ethtool_stats *stats, u64 *data); 9842 void (* get_et_strings) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,u32 sset, u8 *data); 9843 void (* mgd_prepare_tx) (struct ieee80211_hw *hw,struct ieee80211_vif *vif); 9844 void (* mgd_protect_tdls_discover) (struct ieee80211_hw *hw,struct ieee80211_vif *vif); 9845 int (* add_chanctx) (struct ieee80211_hw *hw,struct ieee80211_chanctx_conf *ctx); 9846 void (* remove_chanctx) (struct ieee80211_hw *hw,struct ieee80211_chanctx_conf *ctx); 9847 void (* change_chanctx) (struct ieee80211_hw *hw,struct ieee80211_chanctx_conf *ctx,u32 changed); 9848 int (* assign_vif_chanctx) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_chanctx_conf *ctx); 9849 void (* unassign_vif_chanctx) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_chanctx_conf *ctx); 9850 int (* switch_vif_chanctx) (struct ieee80211_hw *hw,struct ieee80211_vif_chanctx_switch *vifs,int n_vifs,enum ieee80211_chanctx_switch_mode mode); 9851 void (* reconfig_complete) (struct ieee80211_hw *hw,enum ieee80211_reconfig_type reconfig_type); 9852#if IS_ENABLED(CONFIG_IPV6) 9853 void (* ipv6_addr_change) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct inet6_dev *idev); 9854#endif 9855 void (* channel_switch_beacon) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct cfg80211_chan_def *chandef); 9856 int (* pre_channel_switch) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_channel_switch *ch_switch); 9857 int (* post_channel_switch) (struct ieee80211_hw *hw,struct ieee80211_vif *vif); 9858 int (* join_ibss) (struct ieee80211_hw *hw, struct ieee80211_vif *vif); 9859 void (* leave_ibss) (struct ieee80211_hw *hw, struct ieee80211_vif *vif); 9860 u32 (* get_expected_throughput) (struct ieee80211_sta *sta); 9861 int (* get_txpower) (struct ieee80211_hw *hw, struct ieee80211_vif *vif,int *dbm); 9862 int (* tdls_channel_switch) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_sta *sta, u8 oper_class,struct cfg80211_chan_def *chandef,struct sk_buff *tmpl_skb, u32 ch_sw_tm_ie); 9863 void (* tdls_cancel_channel_switch) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_sta *sta); 9864 void (* tdls_recv_channel_switch) (struct ieee80211_hw *hw,struct ieee80211_vif *vif,struct ieee80211_tdls_ch_sw_params *params); 9865 void (* wake_tx_queue) (struct ieee80211_hw *hw,struct ieee80211_txq *txq); 9866}; </programlisting> 9867</refsynopsisdiv> 9868 <refsect1> 9869 <title>Members</title> 9870 <variablelist> 9871 <varlistentry> <term>tx</term> 9872 <listitem><para> 9873Handler that 802.11 module calls for each transmitted frame. 9874skb contains the buffer starting from the IEEE 802.11 header. 9875The low-level driver should send the frame out based on 9876configuration in the TX control data. This handler should, 9877preferably, never fail and stop queues appropriately. 9878Must be atomic. 9879 </para></listitem> 9880 </varlistentry> 9881 <varlistentry> <term>start</term> 9882 <listitem><para> 9883Called before the first netdevice attached to the hardware 9884is enabled. This should turn on the hardware and must turn on 9885frame reception (for possibly enabled monitor interfaces.) 9886Returns negative error codes, these may be seen in userspace, 9887or zero. 9888When the device is started it should not have a MAC address 9889to avoid acknowledging frames before a non-monitor device 9890is added. 9891Must be implemented and can sleep. 9892 </para></listitem> 9893 </varlistentry> 9894 <varlistentry> <term>stop</term> 9895 <listitem><para> 9896Called after last netdevice attached to the hardware 9897is disabled. This should turn off the hardware (at least 9898it must turn off frame reception.) 9899May be called right after add_interface if that rejects 9900an interface. If you added any work onto the mac80211 workqueue 9901you should ensure to cancel it on this callback. 9902Must be implemented and can sleep. 9903 </para></listitem> 9904 </varlistentry> 9905 <varlistentry> <term>suspend</term> 9906 <listitem><para> 9907Suspend the device; mac80211 itself will quiesce before and 9908stop transmitting and doing any other configuration, and then 9909ask the device to suspend. This is only invoked when WoWLAN is 9910configured, otherwise the device is deconfigured completely and 9911reconfigured at resume time. 9912The driver may also impose special conditions under which it 9913wants to use the <quote>normal</quote> suspend (deconfigure), say if it only 9914supports WoWLAN when the device is associated. In this case, it 9915must return 1 from this function. 9916 </para></listitem> 9917 </varlistentry> 9918 <varlistentry> <term>resume</term> 9919 <listitem><para> 9920If WoWLAN was configured, this indicates that mac80211 is 9921now resuming its operation, after this the device must be fully 9922functional again. If this returns an error, the only way out is 9923to also unregister the device. If it returns 1, then mac80211 9924will also go through the regular complete restart on resume. 9925 </para></listitem> 9926 </varlistentry> 9927 <varlistentry> <term>set_wakeup</term> 9928 <listitem><para> 9929Enable or disable wakeup when WoWLAN configuration is 9930modified. The reason is that <function>device_set_wakeup_enable</function> is 9931supposed to be called when the configuration changes, not only 9932in <function>suspend</function>. 9933 </para></listitem> 9934 </varlistentry> 9935 <varlistentry> <term>add_interface</term> 9936 <listitem><para> 9937Called when a netdevice attached to the hardware is 9938enabled. Because it is not called for monitor mode devices, <parameter>start</parameter> 9939and <parameter>stop</parameter> must be implemented. 9940The driver should perform any initialization it needs before 9941the device can be enabled. The initial configuration for the 9942interface is given in the conf parameter. 9943The callback may refuse to add an interface by returning a 9944negative error code (which will be seen in userspace.) 9945Must be implemented and can sleep. 9946 </para></listitem> 9947 </varlistentry> 9948 <varlistentry> <term>change_interface</term> 9949 <listitem><para> 9950Called when a netdevice changes type. This callback 9951is optional, but only if it is supported can interface types be 9952switched while the interface is UP. The callback may sleep. 9953Note that while an interface is being switched, it will not be 9954found by the interface iteration callbacks. 9955 </para></listitem> 9956 </varlistentry> 9957 <varlistentry> <term>remove_interface</term> 9958 <listitem><para> 9959Notifies a driver that an interface is going down. 9960The <parameter>stop</parameter> callback is called after this if it is the last interface 9961and no monitor interfaces are present. 9962When all interfaces are removed, the MAC address in the hardware 9963must be cleared so the device no longer acknowledges packets, 9964the mac_addr member of the conf structure is, however, set to the 9965MAC address of the device going away. 9966Hence, this callback must be implemented. It can sleep. 9967 </para></listitem> 9968 </varlistentry> 9969 <varlistentry> <term>config</term> 9970 <listitem><para> 9971Handler for configuration requests. IEEE 802.11 code calls this 9972function to change hardware configuration, e.g., channel. 9973This function should never fail but returns a negative error code 9974if it does. The callback can sleep. 9975 </para></listitem> 9976 </varlistentry> 9977 <varlistentry> <term>bss_info_changed</term> 9978 <listitem><para> 9979Handler for configuration requests related to BSS 9980parameters that may vary during BSS's lifespan, and may affect low 9981level driver (e.g. assoc/disassoc status, erp parameters). 9982This function should not be used if no BSS has been set, unless 9983for association indication. The <parameter>changed</parameter> parameter indicates which 9984of the bss parameters has changed when a call is made. The callback 9985can sleep. 9986 </para></listitem> 9987 </varlistentry> 9988 <varlistentry> <term>start_ap</term> 9989 <listitem><para> 9990Start operation on the AP interface, this is called after all the 9991information in bss_conf is set and beacon can be retrieved. A channel 9992context is bound before this is called. Note that if the driver uses 9993software scan or ROC, this (and <parameter>stop_ap</parameter>) isn't called when the AP is 9994just <quote>paused</quote> for scanning/ROC, which is indicated by the beacon being 9995disabled/enabled via <parameter>bss_info_changed</parameter>. 9996 </para></listitem> 9997 </varlistentry> 9998 <varlistentry> <term>stop_ap</term> 9999 <listitem><para> 10000Stop operation on the AP interface. 10001 </para></listitem> 10002 </varlistentry> 10003 <varlistentry> <term>prepare_multicast</term> 10004 <listitem><para> 10005Prepare for multicast filter configuration. 10006This callback is optional, and its return value is passed 10007to <function>configure_filter</function>. This callback must be atomic. 10008 </para></listitem> 10009 </varlistentry> 10010 <varlistentry> <term>configure_filter</term> 10011 <listitem><para> 10012Configure the device's RX filter. 10013See the section <quote>Frame filtering</quote> for more information. 10014This callback must be implemented and can sleep. 10015 </para></listitem> 10016 </varlistentry> 10017 <varlistentry> <term>set_tim</term> 10018 <listitem><para> 10019Set TIM bit. mac80211 calls this function when a TIM bit 10020must be set or cleared for a given STA. Must be atomic. 10021 </para></listitem> 10022 </varlistentry> 10023 <varlistentry> <term>set_key</term> 10024 <listitem><para> 10025See the section <quote>Hardware crypto acceleration</quote> 10026This callback is only called between add_interface and 10027remove_interface calls, i.e. while the given virtual interface 10028is enabled. 10029Returns a negative error code if the key can't be added. 10030The callback can sleep. 10031 </para></listitem> 10032 </varlistentry> 10033 <varlistentry> <term>update_tkip_key</term> 10034 <listitem><para> 10035See the section <quote>Hardware crypto acceleration</quote> 10036This callback will be called in the context of Rx. Called for drivers 10037which set IEEE80211_KEY_FLAG_TKIP_REQ_RX_P1_KEY. 10038The callback must be atomic. 10039 </para></listitem> 10040 </varlistentry> 10041 <varlistentry> <term>set_rekey_data</term> 10042 <listitem><para> 10043If the device supports GTK rekeying, for example while the 10044host is suspended, it can assign this callback to retrieve the data 10045necessary to do GTK rekeying, this is the KEK, KCK and replay counter. 10046After rekeying was done it should (for example during resume) notify 10047userspace of the new replay counter using <function>ieee80211_gtk_rekey_notify</function>. 10048 </para></listitem> 10049 </varlistentry> 10050 <varlistentry> <term>set_default_unicast_key</term> 10051 <listitem><para> 10052Set the default (unicast) key index, useful for 10053WEP when the device sends data packets autonomously, e.g. for ARP 10054offloading. The index can be 0-3, or -1 for unsetting it. 10055 </para></listitem> 10056 </varlistentry> 10057 <varlistentry> <term>hw_scan</term> 10058 <listitem><para> 10059Ask the hardware to service the scan request, no need to start 10060the scan state machine in stack. The scan must honour the channel 10061configuration done by the regulatory agent in the wiphy's 10062registered bands. The hardware (or the driver) needs to make sure 10063that power save is disabled. 10064The <parameter>req</parameter> ie/ie_len members are rewritten by mac80211 to contain the 10065entire IEs after the SSID, so that drivers need not look at these 10066at all but just send them after the SSID -- mac80211 includes the 10067(extended) supported rates and HT information (where applicable). 10068When the scan finishes, <function>ieee80211_scan_completed</function> must be called; 10069note that it also must be called when the scan cannot finish due to 10070any error unless this callback returned a negative error code. 10071The callback can sleep. 10072 </para></listitem> 10073 </varlistentry> 10074 <varlistentry> <term>cancel_hw_scan</term> 10075 <listitem><para> 10076Ask the low-level tp cancel the active hw scan. 10077The driver should ask the hardware to cancel the scan (if possible), 10078but the scan will be completed only after the driver will call 10079<function>ieee80211_scan_completed</function>. 10080This callback is needed for wowlan, to prevent enqueueing a new 10081scan_work after the low-level driver was already suspended. 10082The callback can sleep. 10083 </para></listitem> 10084 </varlistentry> 10085 <varlistentry> <term>sched_scan_start</term> 10086 <listitem><para> 10087Ask the hardware to start scanning repeatedly at 10088specific intervals. The driver must call the 10089<function>ieee80211_sched_scan_results</function> function whenever it finds results. 10090This process will continue until sched_scan_stop is called. 10091 </para></listitem> 10092 </varlistentry> 10093 <varlistentry> <term>sched_scan_stop</term> 10094 <listitem><para> 10095Tell the hardware to stop an ongoing scheduled scan. 10096In this case, <function>ieee80211_sched_scan_stopped</function> must not be called. 10097 </para></listitem> 10098 </varlistentry> 10099 <varlistentry> <term>sw_scan_start</term> 10100 <listitem><para> 10101Notifier function that is called just before a software scan 10102is started. Can be NULL, if the driver doesn't need this notification. 10103The mac_addr parameter allows supporting NL80211_SCAN_FLAG_RANDOM_ADDR, 10104the driver may set the NL80211_FEATURE_SCAN_RANDOM_MAC_ADDR flag if it 10105can use this parameter. The callback can sleep. 10106 </para></listitem> 10107 </varlistentry> 10108 <varlistentry> <term>sw_scan_complete</term> 10109 <listitem><para> 10110Notifier function that is called just after a 10111software scan finished. Can be NULL, if the driver doesn't need 10112this notification. 10113The callback can sleep. 10114 </para></listitem> 10115 </varlistentry> 10116 <varlistentry> <term>get_stats</term> 10117 <listitem><para> 10118Return low-level statistics. 10119Returns zero if statistics are available. 10120The callback can sleep. 10121 </para></listitem> 10122 </varlistentry> 10123 <varlistentry> <term>get_tkip_seq</term> 10124 <listitem><para> 10125If your device implements TKIP encryption in hardware this 10126callback should be provided to read the TKIP transmit IVs (both IV32 10127and IV16) for the given key from hardware. 10128The callback must be atomic. 10129 </para></listitem> 10130 </varlistentry> 10131 <varlistentry> <term>set_frag_threshold</term> 10132 <listitem><para> 10133Configuration of fragmentation threshold. Assign this 10134if the device does fragmentation by itself; if this callback is 10135implemented then the stack will not do fragmentation. 10136The callback can sleep. 10137 </para></listitem> 10138 </varlistentry> 10139 <varlistentry> <term>set_rts_threshold</term> 10140 <listitem><para> 10141Configuration of RTS threshold (if device needs it) 10142The callback can sleep. 10143 </para></listitem> 10144 </varlistentry> 10145 <varlistentry> <term>sta_add</term> 10146 <listitem><para> 10147Notifies low level driver about addition of an associated station, 10148AP, IBSS/WDS/mesh peer etc. This callback can sleep. 10149 </para></listitem> 10150 </varlistentry> 10151 <varlistentry> <term>sta_remove</term> 10152 <listitem><para> 10153Notifies low level driver about removal of an associated 10154station, AP, IBSS/WDS/mesh peer etc. Note that after the callback 10155returns it isn't safe to use the pointer, not even RCU protected; 10156no RCU grace period is guaranteed between returning here and freeing 10157the station. See <parameter>sta_pre_rcu_remove</parameter> if needed. 10158This callback can sleep. 10159 </para></listitem> 10160 </varlistentry> 10161 <varlistentry> <term>sta_add_debugfs</term> 10162 <listitem><para> 10163Drivers can use this callback to add debugfs files 10164when a station is added to mac80211's station list. This callback 10165and <parameter>sta_remove_debugfs</parameter> should be within a CONFIG_MAC80211_DEBUGFS 10166conditional. This callback can sleep. 10167 </para></listitem> 10168 </varlistentry> 10169 <varlistentry> <term>sta_remove_debugfs</term> 10170 <listitem><para> 10171Remove the debugfs files which were added using 10172<parameter>sta_add_debugfs</parameter>. This callback can sleep. 10173 </para></listitem> 10174 </varlistentry> 10175 <varlistentry> <term>sta_notify</term> 10176 <listitem><para> 10177Notifies low level driver about power state transition of an 10178associated station, AP, IBSS/WDS/mesh peer etc. For a VIF operating 10179in AP mode, this callback will not be called when the flag 10180<constant>IEEE80211_HW_AP_LINK_PS</constant> is set. Must be atomic. 10181 </para></listitem> 10182 </varlistentry> 10183 <varlistentry> <term>sta_state</term> 10184 <listitem><para> 10185Notifies low level driver about state transition of a 10186station (which can be the AP, a client, IBSS/WDS/mesh peer etc.) 10187This callback is mutually exclusive with <parameter>sta_add</parameter>/<parameter>sta_remove</parameter>. 10188It must not fail for down transitions but may fail for transitions 10189up the list of states. Also note that after the callback returns it 10190isn't safe to use the pointer, not even RCU protected - no RCU grace 10191period is guaranteed between returning here and freeing the station. 10192See <parameter>sta_pre_rcu_remove</parameter> if needed. 10193The callback can sleep. 10194 </para></listitem> 10195 </varlistentry> 10196 <varlistentry> <term>sta_pre_rcu_remove</term> 10197 <listitem><para> 10198Notify driver about station removal before RCU 10199synchronisation. This is useful if a driver needs to have station 10200pointers protected using RCU, it can then use this call to clear 10201the pointers instead of waiting for an RCU grace period to elapse 10202in <parameter>sta_state</parameter>. 10203The callback can sleep. 10204 </para></listitem> 10205 </varlistentry> 10206 <varlistentry> <term>sta_rc_update</term> 10207 <listitem><para> 10208Notifies the driver of changes to the bitrates that can be 10209used to transmit to the station. The changes are advertised with bits 10210from <structname>enum</structname> ieee80211_rate_control_changed and the values are reflected 10211in the station data. This callback should only be used when the driver 10212uses hardware rate control (<constant>IEEE80211_HW_HAS_RATE_CONTROL</constant>) since 10213otherwise the rate control algorithm is notified directly. 10214Must be atomic. 10215 </para></listitem> 10216 </varlistentry> 10217 <varlistentry> <term>sta_rate_tbl_update</term> 10218 <listitem><para> 10219Notifies the driver that the rate table changed. This 10220is only used if the configured rate control algorithm actually uses 10221the new rate table API, and is therefore optional. Must be atomic. 10222 </para></listitem> 10223 </varlistentry> 10224 <varlistentry> <term>sta_statistics</term> 10225 <listitem><para> 10226Get statistics for this station. For example with beacon 10227filtering, the statistics kept by mac80211 might not be accurate, so 10228let the driver pre-fill the statistics. The driver can fill most of 10229the values (indicating which by setting the filled bitmap), but not 10230all of them make sense - see the source for which ones are possible. 10231Statistics that the driver doesn't fill will be filled by mac80211. 10232The callback can sleep. 10233 </para></listitem> 10234 </varlistentry> 10235 <varlistentry> <term>conf_tx</term> 10236 <listitem><para> 10237Configure TX queue parameters (EDCF (aifs, cw_min, cw_max), 10238bursting) for a hardware TX queue. 10239Returns a negative error code on failure. 10240The callback can sleep. 10241 </para></listitem> 10242 </varlistentry> 10243 <varlistentry> <term>get_tsf</term> 10244 <listitem><para> 10245Get the current TSF timer value from firmware/hardware. Currently, 10246this is only used for IBSS mode BSSID merging and debugging. Is not a 10247required function. 10248The callback can sleep. 10249 </para></listitem> 10250 </varlistentry> 10251 <varlistentry> <term>set_tsf</term> 10252 <listitem><para> 10253Set the TSF timer to the specified value in the firmware/hardware. 10254Currently, this is only used for IBSS mode debugging. Is not a 10255required function. 10256The callback can sleep. 10257 </para></listitem> 10258 </varlistentry> 10259 <varlistentry> <term>reset_tsf</term> 10260 <listitem><para> 10261Reset the TSF timer and allow firmware/hardware to synchronize 10262with other STAs in the IBSS. This is only used in IBSS mode. This 10263function is optional if the firmware/hardware takes full care of 10264TSF synchronization. 10265The callback can sleep. 10266 </para></listitem> 10267 </varlistentry> 10268 <varlistentry> <term>tx_last_beacon</term> 10269 <listitem><para> 10270Determine whether the last IBSS beacon was sent by us. 10271This is needed only for IBSS mode and the result of this function is 10272used to determine whether to reply to Probe Requests. 10273Returns non-zero if this device sent the last beacon. 10274The callback can sleep. 10275 </para></listitem> 10276 </varlistentry> 10277 <varlistentry> <term>ampdu_action</term> 10278 <listitem><para> 10279Perform a certain A-MPDU action 10280The RA/TID combination determines the destination and TID we want 10281the ampdu action to be performed for. The action is defined through 10282ieee80211_ampdu_mlme_action. Starting sequence number (<parameter>ssn</parameter>) 10283is the first frame we expect to perform the action on. Notice 10284that TX/RX_STOP can pass NULL for this parameter. 10285The <parameter>buf_size</parameter> parameter is only valid when the action is set to 10286<constant>IEEE80211_AMPDU_TX_OPERATIONAL</constant> and indicates the peer's reorder 10287buffer size (number of subframes) for this session -- the driver 10288may neither send aggregates containing more subframes than this 10289nor send aggregates in a way that lost frames would exceed the 10290buffer size. If just limiting the aggregate size, this would be 10291 </para></listitem> 10292 </varlistentry> 10293 <varlistentry> <term>get_survey</term> 10294 <listitem><para> 10295Return per-channel survey information 10296 </para></listitem> 10297 </varlistentry> 10298 <varlistentry> <term>rfkill_poll</term> 10299 <listitem><para> 10300Poll rfkill hardware state. If you need this, you also 10301need to set wiphy->rfkill_poll to <constant>true</constant> before registration, 10302and need to call <function>wiphy_rfkill_set_hw_state</function> in the callback. 10303The callback can sleep. 10304 </para></listitem> 10305 </varlistentry> 10306 <varlistentry> <term>set_coverage_class</term> 10307 <listitem><para> 10308Set slot time for given coverage class as specified 10309in IEEE 802.11-2007 section 17.3.8.6 and modify ACK timeout 10310accordingly; coverage class equals to -1 to enable ACK timeout 10311estimation algorithm (dynack). To disable dynack set valid value for 10312coverage class. This callback is not required and may sleep. 10313 </para></listitem> 10314 </varlistentry> 10315 <varlistentry> <term>testmode_cmd</term> 10316 <listitem><para> 10317Implement a cfg80211 test mode command. The passed <parameter>vif</parameter> may 10318be <constant>NULL</constant>. The callback can sleep. 10319 </para></listitem> 10320 </varlistentry> 10321 <varlistentry> <term>testmode_dump</term> 10322 <listitem><para> 10323Implement a cfg80211 test mode dump. The callback can sleep. 10324 </para></listitem> 10325 </varlistentry> 10326 <varlistentry> <term>flush</term> 10327 <listitem><para> 10328Flush all pending frames from the hardware queue, making sure 10329that the hardware queues are empty. The <parameter>queues</parameter> parameter is a bitmap 10330of queues to flush, which is useful if different virtual interfaces 10331use different hardware queues; it may also indicate all queues. 10332If the parameter <parameter>drop</parameter> is set to <constant>true</constant>, pending frames may be dropped. 10333Note that vif can be NULL. 10334The callback can sleep. 10335 </para></listitem> 10336 </varlistentry> 10337 <varlistentry> <term>channel_switch</term> 10338 <listitem><para> 10339Drivers that need (or want) to offload the channel 10340switch operation for CSAs received from the AP may implement this 10341callback. They must then call <function>ieee80211_chswitch_done</function> to indicate 10342completion of the channel switch. 10343 </para></listitem> 10344 </varlistentry> 10345 <varlistentry> <term>set_antenna</term> 10346 <listitem><para> 10347Set antenna configuration (tx_ant, rx_ant) on the device. 10348Parameters are bitmaps of allowed antennas to use for TX/RX. Drivers may 10349reject TX/RX mask combinations they cannot support by returning -EINVAL 10350(also see nl80211.h <parameter>NL80211_ATTR_WIPHY_ANTENNA_TX</parameter>). 10351 </para></listitem> 10352 </varlistentry> 10353 <varlistentry> <term>get_antenna</term> 10354 <listitem><para> 10355Get current antenna configuration from device (tx_ant, rx_ant). 10356 </para></listitem> 10357 </varlistentry> 10358 <varlistentry> <term>remain_on_channel</term> 10359 <listitem><para> 10360Starts an off-channel period on the given channel, must 10361call back to <function>ieee80211_ready_on_channel</function> when on that channel. Note 10362that normal channel traffic is not stopped as this is intended for hw 10363offload. Frames to transmit on the off-channel channel are transmitted 10364normally except for the <constant>IEEE80211_TX_CTL_TX_OFFCHAN</constant> flag. When the 10365duration (which will always be non-zero) expires, the driver must call 10366<function>ieee80211_remain_on_channel_expired</function>. 10367Note that this callback may be called while the device is in IDLE and 10368must be accepted in this case. 10369This callback may sleep. 10370 </para></listitem> 10371 </varlistentry> 10372 <varlistentry> <term>cancel_remain_on_channel</term> 10373 <listitem><para> 10374Requests that an ongoing off-channel period is 10375aborted before it expires. This callback may sleep. 10376 </para></listitem> 10377 </varlistentry> 10378 <varlistentry> <term>set_ringparam</term> 10379 <listitem><para> 10380Set tx and rx ring sizes. 10381 </para></listitem> 10382 </varlistentry> 10383 <varlistentry> <term>get_ringparam</term> 10384 <listitem><para> 10385Get tx and rx ring current and maximum sizes. 10386 </para></listitem> 10387 </varlistentry> 10388 <varlistentry> <term>tx_frames_pending</term> 10389 <listitem><para> 10390Check if there is any pending frame in the hardware 10391queues before entering power save. 10392 </para></listitem> 10393 </varlistentry> 10394 <varlistentry> <term>set_bitrate_mask</term> 10395 <listitem><para> 10396Set a mask of rates to be used for rate control selection 10397when transmitting a frame. Currently only legacy rates are handled. 10398The callback can sleep. 10399 </para></listitem> 10400 </varlistentry> 10401 <varlistentry> <term>event_callback</term> 10402 <listitem><para> 10403Notify driver about any event in mac80211. See 10404<structname>enum</structname> ieee80211_event_type for the different types. 10405The callback can sleep. 10406 </para></listitem> 10407 </varlistentry> 10408 <varlistentry> <term>allow_buffered_frames</term> 10409 <listitem><para> 10410Prepare device to allow the given number of frames 10411to go out to the given station. The frames will be sent by mac80211 10412via the usual TX path after this call. The TX information for frames 10413released will also have the <constant>IEEE80211_TX_CTL_NO_PS_BUFFER</constant> flag set 10414and the last one will also have <constant>IEEE80211_TX_STATUS_EOSP</constant> set. In case 10415frames from multiple TIDs are released and the driver might reorder 10416them between the TIDs, it must set the <constant>IEEE80211_TX_STATUS_EOSP</constant> flag 10417on the last frame and clear it on all others and also handle the EOSP 10418bit in the QoS header correctly. Alternatively, it can also call the 10419<function>ieee80211_sta_eosp</function> function. 10420The <parameter>tids</parameter> parameter is a bitmap and tells the driver which TIDs the 10421frames will be on; it will at most have two bits set. 10422This callback must be atomic. 10423 </para></listitem> 10424 </varlistentry> 10425 <varlistentry> <term>release_buffered_frames</term> 10426 <listitem><para> 10427Release buffered frames according to the given 10428parameters. In the case where the driver buffers some frames for 10429sleeping stations mac80211 will use this callback to tell the driver 10430to release some frames, either for PS-poll or uAPSD. 10431Note that if the <parameter>more_data</parameter> parameter is <constant>false</constant> the driver must check 10432if there are more frames on the given TIDs, and if there are more than 10433the frames being released then it must still set the more-data bit in 10434the frame. If the <parameter>more_data</parameter> parameter is <constant>true</constant>, then of course the 10435more-data bit must always be set. 10436The <parameter>tids</parameter> parameter tells the driver which TIDs to release frames 10437from, for PS-poll it will always have only a single bit set. 10438In the case this is used for a PS-poll initiated release, the 10439<parameter>num_frames</parameter> parameter will always be 1 so code can be shared. In 10440this case the driver must also set <constant>IEEE80211_TX_STATUS_EOSP</constant> flag 10441on the TX status (and must report TX status) so that the PS-poll 10442period is properly ended. This is used to avoid sending multiple 10443responses for a retried PS-poll frame. 10444In the case this is used for uAPSD, the <parameter>num_frames</parameter> parameter may be 10445bigger than one, but the driver may send fewer frames (it must send 10446at least one, however). In this case it is also responsible for 10447setting the EOSP flag in the QoS header of the frames. Also, when the 10448service period ends, the driver must set <constant>IEEE80211_TX_STATUS_EOSP</constant> 10449on the last frame in the SP. Alternatively, it may call the function 10450<function>ieee80211_sta_eosp</function> to inform mac80211 of the end of the SP. 10451This callback must be atomic. 10452 </para></listitem> 10453 </varlistentry> 10454 <varlistentry> <term>get_et_sset_count</term> 10455 <listitem><para> 10456Ethtool API to get string-set count. 10457 </para></listitem> 10458 </varlistentry> 10459 <varlistentry> <term>get_et_stats</term> 10460 <listitem><para> 10461Ethtool API to get a set of u64 stats. 10462 </para></listitem> 10463 </varlistentry> 10464 <varlistentry> <term>get_et_strings</term> 10465 <listitem><para> 10466Ethtool API to get a set of strings to describe stats 10467and perhaps other supported types of ethtool data-sets. 10468 </para></listitem> 10469 </varlistentry> 10470 <varlistentry> <term>mgd_prepare_tx</term> 10471 <listitem><para> 10472Prepare for transmitting a management frame for association 10473before associated. In multi-channel scenarios, a virtual interface is 10474bound to a channel before it is associated, but as it isn't associated 10475yet it need not necessarily be given airtime, in particular since any 10476transmission to a P2P GO needs to be synchronized against the GO's 10477powersave state. mac80211 will call this function before transmitting a 10478management frame prior to having successfully associated to allow the 10479driver to give it channel time for the transmission, to get a response 10480and to be able to synchronize with the GO. 10481The callback will be called before each transmission and upon return 10482mac80211 will transmit the frame right away. 10483The callback is optional and can (should!) sleep. 10484 </para></listitem> 10485 </varlistentry> 10486 <varlistentry> <term>mgd_protect_tdls_discover</term> 10487 <listitem><para> 10488Protect a TDLS discovery session. After sending 10489a TDLS discovery-request, we expect a reply to arrive on the AP's 10490channel. We must stay on the channel (no PSM, scan, etc.), since a TDLS 10491setup-response is a direct packet not buffered by the AP. 10492mac80211 will call this function just before the transmission of a TDLS 10493discovery-request. The recommended period of protection is at least 104942 * (DTIM period). 10495The callback is optional and can sleep. 10496 </para></listitem> 10497 </varlistentry> 10498 <varlistentry> <term>add_chanctx</term> 10499 <listitem><para> 10500Notifies device driver about new channel context creation. 10501 </para></listitem> 10502 </varlistentry> 10503 <varlistentry> <term>remove_chanctx</term> 10504 <listitem><para> 10505Notifies device driver about channel context destruction. 10506 </para></listitem> 10507 </varlistentry> 10508 <varlistentry> <term>change_chanctx</term> 10509 <listitem><para> 10510Notifies device driver about channel context changes that 10511may happen when combining different virtual interfaces on the same 10512channel context with different settings 10513 </para></listitem> 10514 </varlistentry> 10515 <varlistentry> <term>assign_vif_chanctx</term> 10516 <listitem><para> 10517Notifies device driver about channel context being bound 10518to vif. Possible use is for hw queue remapping. 10519 </para></listitem> 10520 </varlistentry> 10521 <varlistentry> <term>unassign_vif_chanctx</term> 10522 <listitem><para> 10523Notifies device driver about channel context being 10524unbound from vif. 10525 </para></listitem> 10526 </varlistentry> 10527 <varlistentry> <term>switch_vif_chanctx</term> 10528 <listitem><para> 10529switch a number of vifs from one chanctx to 10530another, as specified in the list of 10531<parameter>ieee80211_vif_chanctx_switch</parameter> passed to the driver, according 10532to the mode defined in <structname>ieee80211_chanctx_switch_mode</structname>. 10533 </para></listitem> 10534 </varlistentry> 10535 <varlistentry> <term>reconfig_complete</term> 10536 <listitem><para> 10537Called after a call to <function>ieee80211_restart_hw</function> and 10538during resume, when the reconfiguration has completed. 10539This can help the driver implement the reconfiguration step (and 10540indicate mac80211 is ready to receive frames). 10541This callback may sleep. 10542 </para></listitem> 10543 </varlistentry> 10544 <varlistentry> <term>ipv6_addr_change</term> 10545 <listitem><para> 10546IPv6 address assignment on the given interface changed. 10547Currently, this is only called for managed or P2P client interfaces. 10548This callback is optional; it must not sleep. 10549 </para></listitem> 10550 </varlistentry> 10551 <varlistentry> <term>channel_switch_beacon</term> 10552 <listitem><para> 10553Starts a channel switch to a new channel. 10554Beacons are modified to include CSA or ECSA IEs before calling this 10555function. The corresponding count fields in these IEs must be 10556decremented, and when they reach 1 the driver must call 10557<function>ieee80211_csa_finish</function>. Drivers which use <function>ieee80211_beacon_get</function> 10558get the csa counter decremented by mac80211, but must check if it is 105591 using <function>ieee80211_csa_is_complete</function> after the beacon has been 10560transmitted and then call <function>ieee80211_csa_finish</function>. 10561If the CSA count starts as zero or 1, this function will not be called, 10562since there won't be any time to beacon before the switch anyway. 10563 </para></listitem> 10564 </varlistentry> 10565 <varlistentry> <term>pre_channel_switch</term> 10566 <listitem><para> 10567This is an optional callback that is called 10568before a channel switch procedure is started (ie. when a STA 10569gets a CSA or an userspace initiated channel-switch), allowing 10570the driver to prepare for the channel switch. 10571 </para></listitem> 10572 </varlistentry> 10573 <varlistentry> <term>post_channel_switch</term> 10574 <listitem><para> 10575This is an optional callback that is called 10576after a channel switch procedure is completed, allowing the 10577driver to go back to a normal configuration. 10578 </para></listitem> 10579 </varlistentry> 10580 <varlistentry> <term>join_ibss</term> 10581 <listitem><para> 10582Join an IBSS (on an IBSS interface); this is called after all 10583information in bss_conf is set up and the beacon can be retrieved. A 10584channel context is bound before this is called. 10585 </para></listitem> 10586 </varlistentry> 10587 <varlistentry> <term>leave_ibss</term> 10588 <listitem><para> 10589Leave the IBSS again. 10590 </para></listitem> 10591 </varlistentry> 10592 <varlistentry> <term>get_expected_throughput</term> 10593 <listitem><para> 10594extract the expected throughput towards the 10595specified station. The returned value is expressed in Kbps. It returns 0 10596if the RC algorithm does not have proper data to provide. 10597 </para></listitem> 10598 </varlistentry> 10599 <varlistentry> <term>get_txpower</term> 10600 <listitem><para> 10601get current maximum tx power (in dBm) based on configuration 10602and hardware limits. 10603 </para></listitem> 10604 </varlistentry> 10605 <varlistentry> <term>tdls_channel_switch</term> 10606 <listitem><para> 10607Start channel-switching with a TDLS peer. The driver 10608is responsible for continually initiating channel-switching operations 10609and returning to the base channel for communication with the AP. The 10610driver receives a channel-switch request template and the location of 10611the switch-timing IE within the template as part of the invocation. 10612The template is valid only within the call, and the driver can 10613optionally copy the skb for further re-use. 10614 </para></listitem> 10615 </varlistentry> 10616 <varlistentry> <term>tdls_cancel_channel_switch</term> 10617 <listitem><para> 10618Stop channel-switching with a TDLS peer. Both 10619peers must be on the base channel when the call completes. 10620 </para></listitem> 10621 </varlistentry> 10622 <varlistentry> <term>tdls_recv_channel_switch</term> 10623 <listitem><para> 10624a TDLS channel-switch related frame (request or 10625response) has been received from a remote peer. The driver gets 10626parameters parsed from the incoming frame and may use them to continue 10627an ongoing channel-switch operation. In addition, a channel-switch 10628response template is provided, together with the location of the 10629switch-timing IE within the template. The skb can only be used within 10630the function call. 10631 </para></listitem> 10632 </varlistentry> 10633 <varlistentry> <term>wake_tx_queue</term> 10634 <listitem><para> 10635Called when new packets have been added to the queue. 10636 </para></listitem> 10637 </varlistentry> 10638 </variablelist> 10639 </refsect1> 10640<refsect1> 10641<title>Description</title> 10642<para> 10643 </para><para> 10644 10645 This structure contains various callbacks that the driver may 10646 handle or, in some cases, must handle, for example to configure 10647 the hardware to a new channel or to transmit a frame. 10648</para> 10649</refsect1> 10650<refsect1> 10651<title>possible with a buf_size of 8</title> 10652<para> 10653 - TX: 1.....7 10654 - RX: 2....7 (lost frame #1) 10655 - TX: 8..1... 10656 which is invalid since #1 was now re-transmitted well past the 10657 buffer size of 8. Correct ways to retransmit #1 would be: 10658 - TX: 1 or 18 or 81 10659 Even <quote>189</quote> would be wrong since 1 could be lost again. 10660 </para><para> 10661 10662 Returns a negative error code on failure. 10663 The callback can sleep. 10664</para> 10665</refsect1> 10666</refentry> 10667 10668<refentry id="API-ieee80211-alloc-hw"> 10669<refentryinfo> 10670 <title>LINUX</title> 10671 <productname>Kernel Hackers Manual</productname> 10672 <date>July 2017</date> 10673</refentryinfo> 10674<refmeta> 10675 <refentrytitle><phrase>ieee80211_alloc_hw</phrase></refentrytitle> 10676 <manvolnum>9</manvolnum> 10677 <refmiscinfo class="version">4.1.27</refmiscinfo> 10678</refmeta> 10679<refnamediv> 10680 <refname>ieee80211_alloc_hw</refname> 10681 <refpurpose> 10682 Allocate a new hardware device 10683 </refpurpose> 10684</refnamediv> 10685<refsynopsisdiv> 10686 <title>Synopsis</title> 10687 <funcsynopsis><funcprototype> 10688 <funcdef>struct ieee80211_hw * <function>ieee80211_alloc_hw </function></funcdef> 10689 <paramdef>size_t <parameter>priv_data_len</parameter></paramdef> 10690 <paramdef>const struct ieee80211_ops * <parameter>ops</parameter></paramdef> 10691 </funcprototype></funcsynopsis> 10692</refsynopsisdiv> 10693<refsect1> 10694 <title>Arguments</title> 10695 <variablelist> 10696 <varlistentry> 10697 <term><parameter>priv_data_len</parameter></term> 10698 <listitem> 10699 <para> 10700 length of private data 10701 </para> 10702 </listitem> 10703 </varlistentry> 10704 <varlistentry> 10705 <term><parameter>ops</parameter></term> 10706 <listitem> 10707 <para> 10708 callbacks for this device 10709 </para> 10710 </listitem> 10711 </varlistentry> 10712 </variablelist> 10713</refsect1> 10714<refsect1> 10715<title>Description</title> 10716<para> 10717 </para><para> 10718 10719 This must be called once for each hardware device. The returned pointer 10720 must be used to refer to this device when calling other functions. 10721 mac80211 allocates a private data area for the driver pointed to by 10722 <parameter>priv</parameter> in <structname>struct ieee80211_hw</structname>, the size of this area is given as 10723 <parameter>priv_data_len</parameter>. 10724</para> 10725</refsect1> 10726<refsect1> 10727<title>Return</title> 10728<para> 10729 A pointer to the new hardware device, or <constant>NULL</constant> on error. 10730</para> 10731</refsect1> 10732</refentry> 10733 10734<refentry id="API-ieee80211-register-hw"> 10735<refentryinfo> 10736 <title>LINUX</title> 10737 <productname>Kernel Hackers Manual</productname> 10738 <date>July 2017</date> 10739</refentryinfo> 10740<refmeta> 10741 <refentrytitle><phrase>ieee80211_register_hw</phrase></refentrytitle> 10742 <manvolnum>9</manvolnum> 10743 <refmiscinfo class="version">4.1.27</refmiscinfo> 10744</refmeta> 10745<refnamediv> 10746 <refname>ieee80211_register_hw</refname> 10747 <refpurpose> 10748 Register hardware device 10749 </refpurpose> 10750</refnamediv> 10751<refsynopsisdiv> 10752 <title>Synopsis</title> 10753 <funcsynopsis><funcprototype> 10754 <funcdef>int <function>ieee80211_register_hw </function></funcdef> 10755 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 10756 </funcprototype></funcsynopsis> 10757</refsynopsisdiv> 10758<refsect1> 10759 <title>Arguments</title> 10760 <variablelist> 10761 <varlistentry> 10762 <term><parameter>hw</parameter></term> 10763 <listitem> 10764 <para> 10765 the device to register as returned by <function>ieee80211_alloc_hw</function> 10766 </para> 10767 </listitem> 10768 </varlistentry> 10769 </variablelist> 10770</refsect1> 10771<refsect1> 10772<title>Description</title> 10773<para> 10774 </para><para> 10775 10776 You must call this function before any other functions in 10777 mac80211. Note that before a hardware can be registered, you 10778 need to fill the contained wiphy's information. 10779</para> 10780</refsect1> 10781<refsect1> 10782<title>Return</title> 10783<para> 10784 0 on success. An error code otherwise. 10785</para> 10786</refsect1> 10787</refentry> 10788 10789<refentry id="API-ieee80211-unregister-hw"> 10790<refentryinfo> 10791 <title>LINUX</title> 10792 <productname>Kernel Hackers Manual</productname> 10793 <date>July 2017</date> 10794</refentryinfo> 10795<refmeta> 10796 <refentrytitle><phrase>ieee80211_unregister_hw</phrase></refentrytitle> 10797 <manvolnum>9</manvolnum> 10798 <refmiscinfo class="version">4.1.27</refmiscinfo> 10799</refmeta> 10800<refnamediv> 10801 <refname>ieee80211_unregister_hw</refname> 10802 <refpurpose> 10803 Unregister a hardware device 10804 </refpurpose> 10805</refnamediv> 10806<refsynopsisdiv> 10807 <title>Synopsis</title> 10808 <funcsynopsis><funcprototype> 10809 <funcdef>void <function>ieee80211_unregister_hw </function></funcdef> 10810 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 10811 </funcprototype></funcsynopsis> 10812</refsynopsisdiv> 10813<refsect1> 10814 <title>Arguments</title> 10815 <variablelist> 10816 <varlistentry> 10817 <term><parameter>hw</parameter></term> 10818 <listitem> 10819 <para> 10820 the hardware to unregister 10821 </para> 10822 </listitem> 10823 </varlistentry> 10824 </variablelist> 10825</refsect1> 10826<refsect1> 10827<title>Description</title> 10828<para> 10829 </para><para> 10830 10831 This function instructs mac80211 to free allocated resources 10832 and unregister netdevices from the networking subsystem. 10833</para> 10834</refsect1> 10835</refentry> 10836 10837<refentry id="API-ieee80211-free-hw"> 10838<refentryinfo> 10839 <title>LINUX</title> 10840 <productname>Kernel Hackers Manual</productname> 10841 <date>July 2017</date> 10842</refentryinfo> 10843<refmeta> 10844 <refentrytitle><phrase>ieee80211_free_hw</phrase></refentrytitle> 10845 <manvolnum>9</manvolnum> 10846 <refmiscinfo class="version">4.1.27</refmiscinfo> 10847</refmeta> 10848<refnamediv> 10849 <refname>ieee80211_free_hw</refname> 10850 <refpurpose> 10851 free hardware descriptor 10852 </refpurpose> 10853</refnamediv> 10854<refsynopsisdiv> 10855 <title>Synopsis</title> 10856 <funcsynopsis><funcprototype> 10857 <funcdef>void <function>ieee80211_free_hw </function></funcdef> 10858 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 10859 </funcprototype></funcsynopsis> 10860</refsynopsisdiv> 10861<refsect1> 10862 <title>Arguments</title> 10863 <variablelist> 10864 <varlistentry> 10865 <term><parameter>hw</parameter></term> 10866 <listitem> 10867 <para> 10868 the hardware to free 10869 </para> 10870 </listitem> 10871 </varlistentry> 10872 </variablelist> 10873</refsect1> 10874<refsect1> 10875<title>Description</title> 10876<para> 10877 </para><para> 10878 10879 This function frees everything that was allocated, including the 10880 private data for the driver. You must call <function>ieee80211_unregister_hw</function> 10881 before calling this function. 10882</para> 10883</refsect1> 10884</refentry> 10885 10886 </chapter> 10887 10888 <chapter id="phy-handling"> 10889 <title>PHY configuration</title> 10890 <para>TBD</para> 10891 <para> 10892 This chapter should describe PHY handling including 10893 start/stop callbacks and the various structures used. 10894 </para> 10895<refentry id="API-struct-ieee80211-conf"> 10896<refentryinfo> 10897 <title>LINUX</title> 10898 <productname>Kernel Hackers Manual</productname> 10899 <date>July 2017</date> 10900</refentryinfo> 10901<refmeta> 10902 <refentrytitle><phrase>struct ieee80211_conf</phrase></refentrytitle> 10903 <manvolnum>9</manvolnum> 10904 <refmiscinfo class="version">4.1.27</refmiscinfo> 10905</refmeta> 10906<refnamediv> 10907 <refname>struct ieee80211_conf</refname> 10908 <refpurpose> 10909 configuration of the device 10910 </refpurpose> 10911</refnamediv> 10912<refsynopsisdiv> 10913 <title>Synopsis</title> 10914 <programlisting> 10915struct ieee80211_conf { 10916 u32 flags; 10917 int power_level; 10918 int dynamic_ps_timeout; 10919 int max_sleep_period; 10920 u16 listen_interval; 10921 u8 ps_dtim_period; 10922 u8 long_frame_max_tx_count; 10923 u8 short_frame_max_tx_count; 10924 struct cfg80211_chan_def chandef; 10925 bool radar_enabled; 10926 enum ieee80211_smps_mode smps_mode; 10927}; </programlisting> 10928</refsynopsisdiv> 10929 <refsect1> 10930 <title>Members</title> 10931 <variablelist> 10932 <varlistentry> <term>flags</term> 10933 <listitem><para> 10934configuration flags defined above 10935 </para></listitem> 10936 </varlistentry> 10937 <varlistentry> <term>power_level</term> 10938 <listitem><para> 10939requested transmit power (in dBm), backward compatibility 10940value only that is set to the minimum of all interfaces 10941 </para></listitem> 10942 </varlistentry> 10943 <varlistentry> <term>dynamic_ps_timeout</term> 10944 <listitem><para> 10945The dynamic powersave timeout (in ms), see the 10946powersave documentation below. This variable is valid only when 10947the CONF_PS flag is set. 10948 </para></listitem> 10949 </varlistentry> 10950 <varlistentry> <term>max_sleep_period</term> 10951 <listitem><para> 10952the maximum number of beacon intervals to sleep for 10953before checking the beacon for a TIM bit (managed mode only); this 10954value will be only achievable between DTIM frames, the hardware 10955needs to check for the multicast traffic bit in DTIM beacons. 10956This variable is valid only when the CONF_PS flag is set. 10957 </para></listitem> 10958 </varlistentry> 10959 <varlistentry> <term>listen_interval</term> 10960 <listitem><para> 10961listen interval in units of beacon interval 10962 </para></listitem> 10963 </varlistentry> 10964 <varlistentry> <term>ps_dtim_period</term> 10965 <listitem><para> 10966The DTIM period of the AP we're connected to, for use 10967in power saving. Power saving will not be enabled until a beacon 10968has been received and the DTIM period is known. 10969 </para></listitem> 10970 </varlistentry> 10971 <varlistentry> <term>long_frame_max_tx_count</term> 10972 <listitem><para> 10973Maximum number of transmissions for a <quote>long</quote> frame 10974(a frame not RTS protected), called <quote>dot11LongRetryLimit</quote> in 802.11, 10975but actually means the number of transmissions not the number of retries 10976 </para></listitem> 10977 </varlistentry> 10978 <varlistentry> <term>short_frame_max_tx_count</term> 10979 <listitem><para> 10980Maximum number of transmissions for a <quote>short</quote> 10981frame, called <quote>dot11ShortRetryLimit</quote> in 802.11, but actually means the 10982number of transmissions not the number of retries 10983 </para></listitem> 10984 </varlistentry> 10985 <varlistentry> <term>chandef</term> 10986 <listitem><para> 10987the channel definition to tune to 10988 </para></listitem> 10989 </varlistentry> 10990 <varlistentry> <term>radar_enabled</term> 10991 <listitem><para> 10992whether radar detection is enabled 10993 </para></listitem> 10994 </varlistentry> 10995 <varlistentry> <term>smps_mode</term> 10996 <listitem><para> 10997spatial multiplexing powersave mode; note that 10998<constant>IEEE80211_SMPS_STATIC</constant> is used when the device is not 10999configured for an HT channel. 11000Note that this is only valid if channel contexts are not used, 11001otherwise each channel context has the number of chains listed. 11002 </para></listitem> 11003 </varlistentry> 11004 </variablelist> 11005 </refsect1> 11006<refsect1> 11007<title>Description</title> 11008<para> 11009 </para><para> 11010 11011 This struct indicates how the driver shall configure the hardware. 11012</para> 11013</refsect1> 11014</refentry> 11015 11016<refentry id="API-enum-ieee80211-conf-flags"> 11017<refentryinfo> 11018 <title>LINUX</title> 11019 <productname>Kernel Hackers Manual</productname> 11020 <date>July 2017</date> 11021</refentryinfo> 11022<refmeta> 11023 <refentrytitle><phrase>enum ieee80211_conf_flags</phrase></refentrytitle> 11024 <manvolnum>9</manvolnum> 11025 <refmiscinfo class="version">4.1.27</refmiscinfo> 11026</refmeta> 11027<refnamediv> 11028 <refname>enum ieee80211_conf_flags</refname> 11029 <refpurpose> 11030 configuration flags 11031 </refpurpose> 11032</refnamediv> 11033<refsynopsisdiv> 11034 <title>Synopsis</title> 11035 <programlisting> 11036enum ieee80211_conf_flags { 11037 IEEE80211_CONF_MONITOR, 11038 IEEE80211_CONF_PS, 11039 IEEE80211_CONF_IDLE, 11040 IEEE80211_CONF_OFFCHANNEL 11041}; </programlisting> 11042</refsynopsisdiv> 11043<refsect1> 11044 <title>Constants</title> 11045 <variablelist> 11046 <varlistentry> <term>IEEE80211_CONF_MONITOR</term> 11047 <listitem><para> 11048there's a monitor interface present -- use this 11049to determine for example whether to calculate timestamps for packets 11050or not, do not use instead of filter flags! 11051 </para></listitem> 11052 </varlistentry> 11053 <varlistentry> <term>IEEE80211_CONF_PS</term> 11054 <listitem><para> 11055Enable 802.11 power save mode (managed mode only). 11056This is the power save mode defined by IEEE 802.11-2007 section 11.2, 11057meaning that the hardware still wakes up for beacons, is able to 11058transmit frames and receive the possible acknowledgment frames. 11059Not to be confused with hardware specific wakeup/sleep states, 11060driver is responsible for that. See the section <quote>Powersave support</quote> 11061for more. 11062 </para></listitem> 11063 </varlistentry> 11064 <varlistentry> <term>IEEE80211_CONF_IDLE</term> 11065 <listitem><para> 11066The device is running, but idle; if the flag is set 11067the driver should be prepared to handle configuration requests but 11068may turn the device off as much as possible. Typically, this flag will 11069be set when an interface is set UP but not associated or scanning, but 11070it can also be unset in that case when monitor interfaces are active. 11071 </para></listitem> 11072 </varlistentry> 11073 <varlistentry> <term>IEEE80211_CONF_OFFCHANNEL</term> 11074 <listitem><para> 11075The device is currently not on its main 11076operating channel. 11077 </para></listitem> 11078 </varlistentry> 11079 </variablelist> 11080</refsect1> 11081<refsect1> 11082<title>Description</title> 11083<para> 11084 </para><para> 11085 11086 Flags to define PHY configuration options 11087</para> 11088</refsect1> 11089</refentry> 11090 11091 </chapter> 11092 11093 <chapter id="iface-handling"> 11094 <title>Virtual interfaces</title> 11095 <para>TBD</para> 11096 <para> 11097 This chapter should describe virtual interface basics 11098 that are relevant to the driver (VLANs, MGMT etc are not.) 11099 It should explain the use of the add_iface/remove_iface 11100 callbacks as well as the interface configuration callbacks. 11101 </para> 11102 <para>Things related to AP mode should be discussed there.</para> 11103 <para> 11104 Things related to supporting multiple interfaces should be 11105 in the appropriate chapter, a BIG FAT note should be here about 11106 this though and the recommendation to allow only a single 11107 interface in STA mode at first! 11108 </para> 11109<refentry id="API-struct-ieee80211-vif"> 11110<refentryinfo> 11111 <title>LINUX</title> 11112 <productname>Kernel Hackers Manual</productname> 11113 <date>July 2017</date> 11114</refentryinfo> 11115<refmeta> 11116 <refentrytitle><phrase>struct ieee80211_vif</phrase></refentrytitle> 11117 <manvolnum>9</manvolnum> 11118 <refmiscinfo class="version">4.1.27</refmiscinfo> 11119</refmeta> 11120<refnamediv> 11121 <refname>struct ieee80211_vif</refname> 11122 <refpurpose> 11123 per-interface data 11124 </refpurpose> 11125</refnamediv> 11126<refsynopsisdiv> 11127 <title>Synopsis</title> 11128 <programlisting> 11129struct ieee80211_vif { 11130 enum nl80211_iftype type; 11131 struct ieee80211_bss_conf bss_conf; 11132 u8 addr[ETH_ALEN]; 11133 bool p2p; 11134 bool csa_active; 11135 u8 cab_queue; 11136 u8 hw_queue[IEEE80211_NUM_ACS]; 11137 struct ieee80211_txq * txq; 11138 struct ieee80211_chanctx_conf __rcu * chanctx_conf; 11139 u32 driver_flags; 11140#ifdef CONFIG_MAC80211_DEBUGFS 11141 struct dentry * debugfs_dir; 11142#endif 11143 u8 drv_priv[0]; 11144}; </programlisting> 11145</refsynopsisdiv> 11146 <refsect1> 11147 <title>Members</title> 11148 <variablelist> 11149 <varlistentry> <term>type</term> 11150 <listitem><para> 11151type of this virtual interface 11152 </para></listitem> 11153 </varlistentry> 11154 <varlistentry> <term>bss_conf</term> 11155 <listitem><para> 11156BSS configuration for this interface, either our own 11157or the BSS we're associated to 11158 </para></listitem> 11159 </varlistentry> 11160 <varlistentry> <term>addr[ETH_ALEN]</term> 11161 <listitem><para> 11162address of this interface 11163 </para></listitem> 11164 </varlistentry> 11165 <varlistentry> <term>p2p</term> 11166 <listitem><para> 11167indicates whether this AP or STA interface is a p2p 11168interface, i.e. a GO or p2p-sta respectively 11169 </para></listitem> 11170 </varlistentry> 11171 <varlistentry> <term>csa_active</term> 11172 <listitem><para> 11173marks whether a channel switch is going on. Internally it is 11174write-protected by sdata_lock and local->mtx so holding either is fine 11175for read access. 11176 </para></listitem> 11177 </varlistentry> 11178 <varlistentry> <term>cab_queue</term> 11179 <listitem><para> 11180content-after-beacon (DTIM beacon really) queue, AP mode only 11181 </para></listitem> 11182 </varlistentry> 11183 <varlistentry> <term>hw_queue[IEEE80211_NUM_ACS]</term> 11184 <listitem><para> 11185hardware queue for each AC 11186 </para></listitem> 11187 </varlistentry> 11188 <varlistentry> <term>txq</term> 11189 <listitem><para> 11190the multicast data TX queue (if driver uses the TXQ abstraction) 11191 </para></listitem> 11192 </varlistentry> 11193 <varlistentry> <term>chanctx_conf</term> 11194 <listitem><para> 11195The channel context this interface is assigned to, or <constant>NULL</constant> 11196when it is not assigned. This pointer is RCU-protected due to the TX 11197path needing to access it; even though the netdev carrier will always 11198be off when it is <constant>NULL</constant> there can still be races and packets could be 11199processed after it switches back to <constant>NULL</constant>. 11200 </para></listitem> 11201 </varlistentry> 11202 <varlistentry> <term>driver_flags</term> 11203 <listitem><para> 11204flags/capabilities the driver has for this interface, 11205these need to be set (or cleared) when the interface is added 11206or, if supported by the driver, the interface type is changed 11207at runtime, mac80211 will never touch this field 11208 </para></listitem> 11209 </varlistentry> 11210 <varlistentry> <term>debugfs_dir</term> 11211 <listitem><para> 11212debugfs dentry, can be used by drivers to create own per 11213interface debug files. Note that it will be NULL for the virtual 11214monitor interface (if that is requested.) 11215 </para></listitem> 11216 </varlistentry> 11217 <varlistentry> <term>drv_priv[0]</term> 11218 <listitem><para> 11219data area for driver use, will always be aligned to 11220sizeof(void *). 11221 </para></listitem> 11222 </varlistentry> 11223 </variablelist> 11224 </refsect1> 11225<refsect1> 11226<title>Description</title> 11227<para> 11228 </para><para> 11229 11230 Data in this structure is continually present for driver 11231 use during the life of a virtual interface. 11232</para> 11233</refsect1> 11234</refentry> 11235 11236 </chapter> 11237 11238 <chapter id="rx-tx"> 11239 <title>Receive and transmit processing</title> 11240 <sect1> 11241 <title>what should be here</title> 11242 <para>TBD</para> 11243 <para> 11244 This should describe the receive and transmit 11245 paths in mac80211/the drivers as well as 11246 transmit status handling. 11247 </para> 11248 </sect1> 11249 <sect1> 11250 <title>Frame format</title> 11251<para> 11252 </para><para> 11253 As a general rule, when frames are passed between mac80211 and the driver, 11254 they start with the IEEE 802.11 header and include the same octets that are 11255 sent over the air except for the FCS which should be calculated by the 11256 hardware. 11257 </para><para> 11258 There are, however, various exceptions to this rule for advanced features: 11259 </para><para> 11260 The first exception is for hardware encryption and decryption offload 11261 where the IV/ICV may or may not be generated in hardware. 11262 </para><para> 11263 Secondly, when the hardware handles fragmentation, the frame handed to 11264 the driver from mac80211 is the MSDU, not the MPDU. 11265</para> 11266 11267 </sect1> 11268 <sect1> 11269 <title>Packet alignment</title> 11270<para> 11271 </para><para> 11272 Drivers always need to pass packets that are aligned to two-byte boundaries 11273 to the stack. 11274 </para><para> 11275 Additionally, should, if possible, align the payload data in a way that 11276 guarantees that the contained IP header is aligned to a four-byte 11277 boundary. In the case of regular frames, this simply means aligning the 11278 payload to a four-byte boundary (because either the IP header is directly 11279 contained, or IV/RFC1042 headers that have a length divisible by four are 11280 in front of it). If the payload data is not properly aligned and the 11281 architecture doesn't support efficient unaligned operations, mac80211 11282 will align the data. 11283 </para><para> 11284 With A-MSDU frames, however, the payload data address must yield two modulo 11285 four because there are 14-byte 802.3 headers within the A-MSDU frames that 11286 push the IP header further back to a multiple of four again. Thankfully, the 11287 specs were sane enough this time around to require padding each A-MSDU 11288 subframe to a length that is a multiple of four. 11289 </para><para> 11290 Padding like Atheros hardware adds which is between the 802.11 header and 11291 the payload is not supported, the driver is required to move the 802.11 11292 header to be directly in front of the payload in that case. 11293</para> 11294 11295 </sect1> 11296 <sect1> 11297 <title>Calling into mac80211 from interrupts</title> 11298<para> 11299 </para><para> 11300 Only <function>ieee80211_tx_status_irqsafe</function> and <function>ieee80211_rx_irqsafe</function> can be 11301 called in hardware interrupt context. The low-level driver must not call any 11302 other functions in hardware interrupt context. If there is a need for such 11303 call, the low-level driver should first ACK the interrupt and perform the 11304 IEEE 802.11 code call after this, e.g. from a scheduled workqueue or even 11305 tasklet function. 11306 </para><para> 11307 NOTE: If the driver opts to use the <function>_irqsafe</function> functions, it may not also 11308 use the non-IRQ-safe functions! 11309</para> 11310 11311 </sect1> 11312 <sect1> 11313 <title>functions/definitions</title> 11314<refentry id="API-struct-ieee80211-rx-status"> 11315<refentryinfo> 11316 <title>LINUX</title> 11317 <productname>Kernel Hackers Manual</productname> 11318 <date>July 2017</date> 11319</refentryinfo> 11320<refmeta> 11321 <refentrytitle><phrase>struct ieee80211_rx_status</phrase></refentrytitle> 11322 <manvolnum>9</manvolnum> 11323 <refmiscinfo class="version">4.1.27</refmiscinfo> 11324</refmeta> 11325<refnamediv> 11326 <refname>struct ieee80211_rx_status</refname> 11327 <refpurpose> 11328 receive status 11329 </refpurpose> 11330</refnamediv> 11331<refsynopsisdiv> 11332 <title>Synopsis</title> 11333 <programlisting> 11334struct ieee80211_rx_status { 11335 u64 mactime; 11336 u32 device_timestamp; 11337 u32 ampdu_reference; 11338 u32 flag; 11339 u16 freq; 11340 u8 vht_flag; 11341 u8 rate_idx; 11342 u8 vht_nss; 11343 u8 rx_flags; 11344 u8 band; 11345 u8 antenna; 11346 s8 signal; 11347 u8 chains; 11348 s8 chain_signal[IEEE80211_MAX_CHAINS]; 11349 u8 ampdu_delimiter_crc; 11350}; </programlisting> 11351</refsynopsisdiv> 11352 <refsect1> 11353 <title>Members</title> 11354 <variablelist> 11355 <varlistentry> <term>mactime</term> 11356 <listitem><para> 11357value in microseconds of the 64-bit Time Synchronization Function 11358(TSF) timer when the first data symbol (MPDU) arrived at the hardware. 11359 </para></listitem> 11360 </varlistentry> 11361 <varlistentry> <term>device_timestamp</term> 11362 <listitem><para> 11363arbitrary timestamp for the device, mac80211 doesn't use 11364it but can store it and pass it back to the driver for synchronisation 11365 </para></listitem> 11366 </varlistentry> 11367 <varlistentry> <term>ampdu_reference</term> 11368 <listitem><para> 11369A-MPDU reference number, must be a different value for 11370each A-MPDU but the same for each subframe within one A-MPDU 11371 </para></listitem> 11372 </varlistentry> 11373 <varlistentry> <term>flag</term> 11374 <listitem><para> 11375<constant>RX_FLAG_</constant>* 11376 </para></listitem> 11377 </varlistentry> 11378 <varlistentry> <term>freq</term> 11379 <listitem><para> 11380frequency the radio was tuned to when receiving this frame, in MHz 11381 </para></listitem> 11382 </varlistentry> 11383 <varlistentry> <term>vht_flag</term> 11384 <listitem><para> 11385<constant>RX_VHT_FLAG_</constant>* 11386 </para></listitem> 11387 </varlistentry> 11388 <varlistentry> <term>rate_idx</term> 11389 <listitem><para> 11390index of data rate into band's supported rates or MCS index if 11391HT or VHT is used (<constant>RX_FLAG_HT</constant>/<constant>RX_FLAG_VHT</constant>) 11392 </para></listitem> 11393 </varlistentry> 11394 <varlistentry> <term>vht_nss</term> 11395 <listitem><para> 11396number of streams (VHT only) 11397 </para></listitem> 11398 </varlistentry> 11399 <varlistentry> <term>rx_flags</term> 11400 <listitem><para> 11401internal RX flags for mac80211 11402 </para></listitem> 11403 </varlistentry> 11404 <varlistentry> <term>band</term> 11405 <listitem><para> 11406the active band when this frame was received 11407 </para></listitem> 11408 </varlistentry> 11409 <varlistentry> <term>antenna</term> 11410 <listitem><para> 11411antenna used 11412 </para></listitem> 11413 </varlistentry> 11414 <varlistentry> <term>signal</term> 11415 <listitem><para> 11416signal strength when receiving this frame, either in dBm, in dB or 11417unspecified depending on the hardware capabilities flags 11418<parameter>IEEE80211_HW_SIGNAL_</parameter>* 11419 </para></listitem> 11420 </varlistentry> 11421 <varlistentry> <term>chains</term> 11422 <listitem><para> 11423bitmask of receive chains for which separate signal strength 11424values were filled. 11425 </para></listitem> 11426 </varlistentry> 11427 <varlistentry> <term>chain_signal[IEEE80211_MAX_CHAINS]</term> 11428 <listitem><para> 11429per-chain signal strength, in dBm (unlike <parameter>signal</parameter>, doesn't 11430support dB or unspecified units) 11431 </para></listitem> 11432 </varlistentry> 11433 <varlistentry> <term>ampdu_delimiter_crc</term> 11434 <listitem><para> 11435A-MPDU delimiter CRC 11436 </para></listitem> 11437 </varlistentry> 11438 </variablelist> 11439 </refsect1> 11440<refsect1> 11441<title>Description</title> 11442<para> 11443 </para><para> 11444 11445 The low-level driver should provide this information (the subset 11446 supported by hardware) to the 802.11 code with each received 11447 frame, in the skb's control buffer (cb). 11448</para> 11449</refsect1> 11450</refentry> 11451 11452<refentry id="API-enum-mac80211-rx-flags"> 11453<refentryinfo> 11454 <title>LINUX</title> 11455 <productname>Kernel Hackers Manual</productname> 11456 <date>July 2017</date> 11457</refentryinfo> 11458<refmeta> 11459 <refentrytitle><phrase>enum mac80211_rx_flags</phrase></refentrytitle> 11460 <manvolnum>9</manvolnum> 11461 <refmiscinfo class="version">4.1.27</refmiscinfo> 11462</refmeta> 11463<refnamediv> 11464 <refname>enum mac80211_rx_flags</refname> 11465 <refpurpose> 11466 receive flags 11467 </refpurpose> 11468</refnamediv> 11469<refsynopsisdiv> 11470 <title>Synopsis</title> 11471 <programlisting> 11472enum mac80211_rx_flags { 11473 RX_FLAG_MMIC_ERROR, 11474 RX_FLAG_DECRYPTED, 11475 RX_FLAG_MMIC_STRIPPED, 11476 RX_FLAG_IV_STRIPPED, 11477 RX_FLAG_FAILED_FCS_CRC, 11478 RX_FLAG_FAILED_PLCP_CRC, 11479 RX_FLAG_MACTIME_START, 11480 RX_FLAG_SHORTPRE, 11481 RX_FLAG_HT, 11482 RX_FLAG_40MHZ, 11483 RX_FLAG_SHORT_GI, 11484 RX_FLAG_NO_SIGNAL_VAL, 11485 RX_FLAG_HT_GF, 11486 RX_FLAG_AMPDU_DETAILS, 11487 RX_FLAG_AMPDU_REPORT_ZEROLEN, 11488 RX_FLAG_AMPDU_IS_ZEROLEN, 11489 RX_FLAG_AMPDU_LAST_KNOWN, 11490 RX_FLAG_AMPDU_IS_LAST, 11491 RX_FLAG_AMPDU_DELIM_CRC_ERROR, 11492 RX_FLAG_AMPDU_DELIM_CRC_KNOWN, 11493 RX_FLAG_MACTIME_END, 11494 RX_FLAG_VHT, 11495 RX_FLAG_LDPC, 11496 RX_FLAG_STBC_MASK, 11497 RX_FLAG_10MHZ, 11498 RX_FLAG_5MHZ, 11499 RX_FLAG_AMSDU_MORE, 11500 RX_FLAG_RADIOTAP_VENDOR_DATA 11501}; </programlisting> 11502</refsynopsisdiv> 11503<refsect1> 11504 <title>Constants</title> 11505 <variablelist> 11506 <varlistentry> <term>RX_FLAG_MMIC_ERROR</term> 11507 <listitem><para> 11508Michael MIC error was reported on this frame. 11509Use together with <constant>RX_FLAG_MMIC_STRIPPED</constant>. 11510 </para></listitem> 11511 </varlistentry> 11512 <varlistentry> <term>RX_FLAG_DECRYPTED</term> 11513 <listitem><para> 11514This frame was decrypted in hardware. 11515 </para></listitem> 11516 </varlistentry> 11517 <varlistentry> <term>RX_FLAG_MMIC_STRIPPED</term> 11518 <listitem><para> 11519the Michael MIC is stripped off this frame, 11520verification has been done by the hardware. 11521 </para></listitem> 11522 </varlistentry> 11523 <varlistentry> <term>RX_FLAG_IV_STRIPPED</term> 11524 <listitem><para> 11525The IV/ICV are stripped from this frame. 11526If this flag is set, the stack cannot do any replay detection 11527hence the driver or hardware will have to do that. 11528 </para></listitem> 11529 </varlistentry> 11530 <varlistentry> <term>RX_FLAG_FAILED_FCS_CRC</term> 11531 <listitem><para> 11532Set this flag if the FCS check failed on 11533the frame. 11534 </para></listitem> 11535 </varlistentry> 11536 <varlistentry> <term>RX_FLAG_FAILED_PLCP_CRC</term> 11537 <listitem><para> 11538Set this flag if the PCLP check failed on 11539the frame. 11540 </para></listitem> 11541 </varlistentry> 11542 <varlistentry> <term>RX_FLAG_MACTIME_START</term> 11543 <listitem><para> 11544The timestamp passed in the RX status (<parameter>mactime</parameter> 11545field) is valid and contains the time the first symbol of the MPDU 11546was received. This is useful in monitor mode and for proper IBSS 11547merging. 11548 </para></listitem> 11549 </varlistentry> 11550 <varlistentry> <term>RX_FLAG_SHORTPRE</term> 11551 <listitem><para> 11552Short preamble was used for this frame 11553 </para></listitem> 11554 </varlistentry> 11555 <varlistentry> <term>RX_FLAG_HT</term> 11556 <listitem><para> 11557HT MCS was used and rate_idx is MCS index 11558 </para></listitem> 11559 </varlistentry> 11560 <varlistentry> <term>RX_FLAG_40MHZ</term> 11561 <listitem><para> 11562HT40 (40 MHz) was used 11563 </para></listitem> 11564 </varlistentry> 11565 <varlistentry> <term>RX_FLAG_SHORT_GI</term> 11566 <listitem><para> 11567Short guard interval was used 11568 </para></listitem> 11569 </varlistentry> 11570 <varlistentry> <term>RX_FLAG_NO_SIGNAL_VAL</term> 11571 <listitem><para> 11572The signal strength value is not present. 11573Valid only for data frames (mainly A-MPDU) 11574 </para></listitem> 11575 </varlistentry> 11576 <varlistentry> <term>RX_FLAG_HT_GF</term> 11577 <listitem><para> 11578This frame was received in a HT-greenfield transmission, if 11579the driver fills this value it should add <constant>IEEE80211_RADIOTAP_MCS_HAVE_FMT</constant> 11580to hw.radiotap_mcs_details to advertise that fact 11581 </para></listitem> 11582 </varlistentry> 11583 <varlistentry> <term>RX_FLAG_AMPDU_DETAILS</term> 11584 <listitem><para> 11585A-MPDU details are known, in particular the reference 11586number (<parameter>ampdu_reference</parameter>) must be populated and be a distinct number for 11587each A-MPDU 11588 </para></listitem> 11589 </varlistentry> 11590 <varlistentry> <term>RX_FLAG_AMPDU_REPORT_ZEROLEN</term> 11591 <listitem><para> 11592driver reports 0-length subframes 11593 </para></listitem> 11594 </varlistentry> 11595 <varlistentry> <term>RX_FLAG_AMPDU_IS_ZEROLEN</term> 11596 <listitem><para> 11597This is a zero-length subframe, for 11598monitoring purposes only 11599 </para></listitem> 11600 </varlistentry> 11601 <varlistentry> <term>RX_FLAG_AMPDU_LAST_KNOWN</term> 11602 <listitem><para> 11603last subframe is known, should be set on all 11604subframes of a single A-MPDU 11605 </para></listitem> 11606 </varlistentry> 11607 <varlistentry> <term>RX_FLAG_AMPDU_IS_LAST</term> 11608 <listitem><para> 11609this subframe is the last subframe of the A-MPDU 11610 </para></listitem> 11611 </varlistentry> 11612 <varlistentry> <term>RX_FLAG_AMPDU_DELIM_CRC_ERROR</term> 11613 <listitem><para> 11614A delimiter CRC error has been detected 11615on this subframe 11616 </para></listitem> 11617 </varlistentry> 11618 <varlistentry> <term>RX_FLAG_AMPDU_DELIM_CRC_KNOWN</term> 11619 <listitem><para> 11620The delimiter CRC field is known (the CRC 11621is stored in the <parameter>ampdu_delimiter_crc</parameter> field) 11622 </para></listitem> 11623 </varlistentry> 11624 <varlistentry> <term>RX_FLAG_MACTIME_END</term> 11625 <listitem><para> 11626The timestamp passed in the RX status (<parameter>mactime</parameter> 11627field) is valid and contains the time the last symbol of the MPDU 11628(including FCS) was received. 11629 </para></listitem> 11630 </varlistentry> 11631 <varlistentry> <term>RX_FLAG_VHT</term> 11632 <listitem><para> 11633VHT MCS was used and rate_index is MCS index 11634 </para></listitem> 11635 </varlistentry> 11636 <varlistentry> <term>RX_FLAG_LDPC</term> 11637 <listitem><para> 11638LDPC was used 11639 </para></listitem> 11640 </varlistentry> 11641 <varlistentry> <term>RX_FLAG_STBC_MASK</term> 11642 <listitem><para> 11643STBC 2 bit bitmask. 1 - Nss=1, 2 - Nss=2, 3 - Nss=3 11644 </para></listitem> 11645 </varlistentry> 11646 <varlistentry> <term>RX_FLAG_10MHZ</term> 11647 <listitem><para> 1164810 MHz (half channel) was used 11649 </para></listitem> 11650 </varlistentry> 11651 <varlistentry> <term>RX_FLAG_5MHZ</term> 11652 <listitem><para> 116535 MHz (quarter channel) was used 11654 </para></listitem> 11655 </varlistentry> 11656 <varlistentry> <term>RX_FLAG_AMSDU_MORE</term> 11657 <listitem><para> 11658Some drivers may prefer to report separate A-MSDU 11659subframes instead of a one huge frame for performance reasons. 11660All, but the last MSDU from an A-MSDU should have this flag set. E.g. 11661if an A-MSDU has 3 frames, the first 2 must have the flag set, while 11662the 3rd (last) one must not have this flag set. The flag is used to 11663deal with retransmission/duplication recovery properly since A-MSDU 11664subframes share the same sequence number. Reported subframes can be 11665either regular MSDU or singly A-MSDUs. Subframes must not be 11666interleaved with other frames. 11667 </para></listitem> 11668 </varlistentry> 11669 <varlistentry> <term>RX_FLAG_RADIOTAP_VENDOR_DATA</term> 11670 <listitem><para> 11671This frame contains vendor-specific 11672radiotap data in the skb->data (before the frame) as described by 11673the <structname>struct ieee80211_vendor_radiotap</structname>. 11674 </para></listitem> 11675 </varlistentry> 11676 </variablelist> 11677</refsect1> 11678<refsect1> 11679<title>Description</title> 11680<para> 11681 </para><para> 11682 11683 These flags are used with the <parameter>flag</parameter> member of <structname>struct ieee80211_rx_status</structname>. 11684</para> 11685</refsect1> 11686</refentry> 11687 11688<refentry id="API-enum-mac80211-tx-info-flags"> 11689<refentryinfo> 11690 <title>LINUX</title> 11691 <productname>Kernel Hackers Manual</productname> 11692 <date>July 2017</date> 11693</refentryinfo> 11694<refmeta> 11695 <refentrytitle><phrase>enum mac80211_tx_info_flags</phrase></refentrytitle> 11696 <manvolnum>9</manvolnum> 11697 <refmiscinfo class="version">4.1.27</refmiscinfo> 11698</refmeta> 11699<refnamediv> 11700 <refname>enum mac80211_tx_info_flags</refname> 11701 <refpurpose> 11702 flags to describe transmission information/status 11703 </refpurpose> 11704</refnamediv> 11705<refsynopsisdiv> 11706 <title>Synopsis</title> 11707 <programlisting> 11708enum mac80211_tx_info_flags { 11709 IEEE80211_TX_CTL_REQ_TX_STATUS, 11710 IEEE80211_TX_CTL_ASSIGN_SEQ, 11711 IEEE80211_TX_CTL_NO_ACK, 11712 IEEE80211_TX_CTL_CLEAR_PS_FILT, 11713 IEEE80211_TX_CTL_FIRST_FRAGMENT, 11714 IEEE80211_TX_CTL_SEND_AFTER_DTIM, 11715 IEEE80211_TX_CTL_AMPDU, 11716 IEEE80211_TX_CTL_INJECTED, 11717 IEEE80211_TX_STAT_TX_FILTERED, 11718 IEEE80211_TX_STAT_ACK, 11719 IEEE80211_TX_STAT_AMPDU, 11720 IEEE80211_TX_STAT_AMPDU_NO_BACK, 11721 IEEE80211_TX_CTL_RATE_CTRL_PROBE, 11722 IEEE80211_TX_INTFL_OFFCHAN_TX_OK, 11723 IEEE80211_TX_INTFL_NEED_TXPROCESSING, 11724 IEEE80211_TX_INTFL_RETRIED, 11725 IEEE80211_TX_INTFL_DONT_ENCRYPT, 11726 IEEE80211_TX_CTL_NO_PS_BUFFER, 11727 IEEE80211_TX_CTL_MORE_FRAMES, 11728 IEEE80211_TX_INTFL_RETRANSMISSION, 11729 IEEE80211_TX_INTFL_MLME_CONN_TX, 11730 IEEE80211_TX_INTFL_NL80211_FRAME_TX, 11731 IEEE80211_TX_CTL_LDPC, 11732 IEEE80211_TX_CTL_STBC, 11733 IEEE80211_TX_CTL_TX_OFFCHAN, 11734 IEEE80211_TX_INTFL_TKIP_MIC_FAILURE, 11735 IEEE80211_TX_CTL_NO_CCK_RATE, 11736 IEEE80211_TX_STATUS_EOSP, 11737 IEEE80211_TX_CTL_USE_MINRATE, 11738 IEEE80211_TX_CTL_DONTFRAG, 11739 IEEE80211_TX_STAT_NOACK_TRANSMITTED 11740}; </programlisting> 11741</refsynopsisdiv> 11742<refsect1> 11743 <title>Constants</title> 11744 <variablelist> 11745 <varlistentry> <term>IEEE80211_TX_CTL_REQ_TX_STATUS</term> 11746 <listitem><para> 11747require TX status callback for this frame. 11748 </para></listitem> 11749 </varlistentry> 11750 <varlistentry> <term>IEEE80211_TX_CTL_ASSIGN_SEQ</term> 11751 <listitem><para> 11752The driver has to assign a sequence 11753number to this frame, taking care of not overwriting the fragment 11754number and increasing the sequence number only when the 11755IEEE80211_TX_CTL_FIRST_FRAGMENT flag is set. mac80211 will properly 11756assign sequence numbers to QoS-data frames but cannot do so correctly 11757for non-QoS-data and management frames because beacons need them from 11758that counter as well and mac80211 cannot guarantee proper sequencing. 11759If this flag is set, the driver should instruct the hardware to 11760assign a sequence number to the frame or assign one itself. Cf. IEEE 11761802.11-2007 7.1.3.4.1 paragraph 3. This flag will always be set for 11762beacons and always be clear for frames without a sequence number field. 11763 </para></listitem> 11764 </varlistentry> 11765 <varlistentry> <term>IEEE80211_TX_CTL_NO_ACK</term> 11766 <listitem><para> 11767tell the low level not to wait for an ack 11768 </para></listitem> 11769 </varlistentry> 11770 <varlistentry> <term>IEEE80211_TX_CTL_CLEAR_PS_FILT</term> 11771 <listitem><para> 11772clear powersave filter for destination 11773station 11774 </para></listitem> 11775 </varlistentry> 11776 <varlistentry> <term>IEEE80211_TX_CTL_FIRST_FRAGMENT</term> 11777 <listitem><para> 11778this is a first fragment of the frame 11779 </para></listitem> 11780 </varlistentry> 11781 <varlistentry> <term>IEEE80211_TX_CTL_SEND_AFTER_DTIM</term> 11782 <listitem><para> 11783send this frame after DTIM beacon 11784 </para></listitem> 11785 </varlistentry> 11786 <varlistentry> <term>IEEE80211_TX_CTL_AMPDU</term> 11787 <listitem><para> 11788this frame should be sent as part of an A-MPDU 11789 </para></listitem> 11790 </varlistentry> 11791 <varlistentry> <term>IEEE80211_TX_CTL_INJECTED</term> 11792 <listitem><para> 11793Frame was injected, internal to mac80211. 11794 </para></listitem> 11795 </varlistentry> 11796 <varlistentry> <term>IEEE80211_TX_STAT_TX_FILTERED</term> 11797 <listitem><para> 11798The frame was not transmitted 11799because the destination STA was in powersave mode. Note that to 11800avoid race conditions, the filter must be set by the hardware or 11801firmware upon receiving a frame that indicates that the station 11802went to sleep (must be done on device to filter frames already on 11803the queue) and may only be unset after mac80211 gives the OK for 11804that by setting the IEEE80211_TX_CTL_CLEAR_PS_FILT (see above), 11805since only then is it guaranteed that no more frames are in the 11806hardware queue. 11807 </para></listitem> 11808 </varlistentry> 11809 <varlistentry> <term>IEEE80211_TX_STAT_ACK</term> 11810 <listitem><para> 11811Frame was acknowledged 11812 </para></listitem> 11813 </varlistentry> 11814 <varlistentry> <term>IEEE80211_TX_STAT_AMPDU</term> 11815 <listitem><para> 11816The frame was aggregated, so status 11817is for the whole aggregation. 11818 </para></listitem> 11819 </varlistentry> 11820 <varlistentry> <term>IEEE80211_TX_STAT_AMPDU_NO_BACK</term> 11821 <listitem><para> 11822no block ack was returned, 11823so consider using block ack request (BAR). 11824 </para></listitem> 11825 </varlistentry> 11826 <varlistentry> <term>IEEE80211_TX_CTL_RATE_CTRL_PROBE</term> 11827 <listitem><para> 11828internal to mac80211, can be 11829set by rate control algorithms to indicate probe rate, will 11830be cleared for fragmented frames (except on the last fragment) 11831 </para></listitem> 11832 </varlistentry> 11833 <varlistentry> <term>IEEE80211_TX_INTFL_OFFCHAN_TX_OK</term> 11834 <listitem><para> 11835Internal to mac80211. Used to indicate 11836that a frame can be transmitted while the queues are stopped for 11837off-channel operation. 11838 </para></listitem> 11839 </varlistentry> 11840 <varlistentry> <term>IEEE80211_TX_INTFL_NEED_TXPROCESSING</term> 11841 <listitem><para> 11842completely internal to mac80211, 11843used to indicate that a pending frame requires TX processing before 11844it can be sent out. 11845 </para></listitem> 11846 </varlistentry> 11847 <varlistentry> <term>IEEE80211_TX_INTFL_RETRIED</term> 11848 <listitem><para> 11849completely internal to mac80211, 11850used to indicate that a frame was already retried due to PS 11851 </para></listitem> 11852 </varlistentry> 11853 <varlistentry> <term>IEEE80211_TX_INTFL_DONT_ENCRYPT</term> 11854 <listitem><para> 11855completely internal to mac80211, 11856used to indicate frame should not be encrypted 11857 </para></listitem> 11858 </varlistentry> 11859 <varlistentry> <term>IEEE80211_TX_CTL_NO_PS_BUFFER</term> 11860 <listitem><para> 11861This frame is a response to a poll 11862frame (PS-Poll or uAPSD) or a non-bufferable MMPDU and must 11863be sent although the station is in powersave mode. 11864 </para></listitem> 11865 </varlistentry> 11866 <varlistentry> <term>IEEE80211_TX_CTL_MORE_FRAMES</term> 11867 <listitem><para> 11868More frames will be passed to the 11869transmit function after the current frame, this can be used 11870by drivers to kick the DMA queue only if unset or when the 11871queue gets full. 11872 </para></listitem> 11873 </varlistentry> 11874 <varlistentry> <term>IEEE80211_TX_INTFL_RETRANSMISSION</term> 11875 <listitem><para> 11876This frame is being retransmitted 11877after TX status because the destination was asleep, it must not 11878be modified again (no seqno assignment, crypto, etc.) 11879 </para></listitem> 11880 </varlistentry> 11881 <varlistentry> <term>IEEE80211_TX_INTFL_MLME_CONN_TX</term> 11882 <listitem><para> 11883This frame was transmitted by the MLME 11884code for connection establishment, this indicates that its status 11885should kick the MLME state machine. 11886 </para></listitem> 11887 </varlistentry> 11888 <varlistentry> <term>IEEE80211_TX_INTFL_NL80211_FRAME_TX</term> 11889 <listitem><para> 11890Frame was requested through nl80211 11891MLME command (internal to mac80211 to figure out whether to send TX 11892status to user space) 11893 </para></listitem> 11894 </varlistentry> 11895 <varlistentry> <term>IEEE80211_TX_CTL_LDPC</term> 11896 <listitem><para> 11897tells the driver to use LDPC for this frame 11898 </para></listitem> 11899 </varlistentry> 11900 <varlistentry> <term>IEEE80211_TX_CTL_STBC</term> 11901 <listitem><para> 11902Enables Space-Time Block Coding (STBC) for this 11903frame and selects the maximum number of streams that it can use. 11904 </para></listitem> 11905 </varlistentry> 11906 <varlistentry> <term>IEEE80211_TX_CTL_TX_OFFCHAN</term> 11907 <listitem><para> 11908Marks this packet to be transmitted on 11909the off-channel channel when a remain-on-channel offload is done 11910in hardware -- normal packets still flow and are expected to be 11911handled properly by the device. 11912 </para></listitem> 11913 </varlistentry> 11914 <varlistentry> <term>IEEE80211_TX_INTFL_TKIP_MIC_FAILURE</term> 11915 <listitem><para> 11916Marks this packet to be used for TKIP 11917testing. It will be sent out with incorrect Michael MIC key to allow 11918TKIP countermeasures to be tested. 11919 </para></listitem> 11920 </varlistentry> 11921 <varlistentry> <term>IEEE80211_TX_CTL_NO_CCK_RATE</term> 11922 <listitem><para> 11923This frame will be sent at non CCK rate. 11924This flag is actually used for management frame especially for P2P 11925frames not being sent at CCK rate in 2GHz band. 11926 </para></listitem> 11927 </varlistentry> 11928 <varlistentry> <term>IEEE80211_TX_STATUS_EOSP</term> 11929 <listitem><para> 11930This packet marks the end of service period, 11931when its status is reported the service period ends. For frames in 11932an SP that mac80211 transmits, it is already set; for driver frames 11933the driver may set this flag. It is also used to do the same for 11934PS-Poll responses. 11935 </para></listitem> 11936 </varlistentry> 11937 <varlistentry> <term>IEEE80211_TX_CTL_USE_MINRATE</term> 11938 <listitem><para> 11939This frame will be sent at lowest rate. 11940This flag is used to send nullfunc frame at minimum rate when 11941the nullfunc is used for connection monitoring purpose. 11942 </para></listitem> 11943 </varlistentry> 11944 <varlistentry> <term>IEEE80211_TX_CTL_DONTFRAG</term> 11945 <listitem><para> 11946Don't fragment this packet even if it 11947would be fragmented by size (this is optional, only used for 11948monitor injection). 11949 </para></listitem> 11950 </varlistentry> 11951 <varlistentry> <term>IEEE80211_TX_STAT_NOACK_TRANSMITTED</term> 11952 <listitem><para> 11953A frame that was marked with 11954IEEE80211_TX_CTL_NO_ACK has been successfully transmitted without 11955any errors (like issues specific to the driver/HW). 11956This flag must not be set for frames that don't request no-ack 11957behaviour with IEEE80211_TX_CTL_NO_ACK. 11958 </para></listitem> 11959 </varlistentry> 11960 </variablelist> 11961</refsect1> 11962<refsect1> 11963<title>Description</title> 11964<para> 11965 </para><para> 11966 11967 These flags are used with the <parameter>flags</parameter> member of <structname>ieee80211_tx_info</structname>. 11968</para> 11969</refsect1> 11970<refsect1> 11971<title>Note</title> 11972<para> 11973 If you have to add new flags to the enumeration, then don't 11974 forget to update <constant>IEEE80211_TX_TEMPORARY_FLAGS</constant> when necessary. 11975</para> 11976</refsect1> 11977</refentry> 11978 11979<refentry id="API-enum-mac80211-tx-control-flags"> 11980<refentryinfo> 11981 <title>LINUX</title> 11982 <productname>Kernel Hackers Manual</productname> 11983 <date>July 2017</date> 11984</refentryinfo> 11985<refmeta> 11986 <refentrytitle><phrase>enum mac80211_tx_control_flags</phrase></refentrytitle> 11987 <manvolnum>9</manvolnum> 11988 <refmiscinfo class="version">4.1.27</refmiscinfo> 11989</refmeta> 11990<refnamediv> 11991 <refname>enum mac80211_tx_control_flags</refname> 11992 <refpurpose> 11993 flags to describe transmit control 11994 </refpurpose> 11995</refnamediv> 11996<refsynopsisdiv> 11997 <title>Synopsis</title> 11998 <programlisting> 11999enum mac80211_tx_control_flags { 12000 IEEE80211_TX_CTRL_PORT_CTRL_PROTO, 12001 IEEE80211_TX_CTRL_PS_RESPONSE 12002}; </programlisting> 12003</refsynopsisdiv> 12004<refsect1> 12005 <title>Constants</title> 12006 <variablelist> 12007 <varlistentry> <term>IEEE80211_TX_CTRL_PORT_CTRL_PROTO</term> 12008 <listitem><para> 12009this frame is a port control 12010protocol frame (e.g. EAP) 12011 </para></listitem> 12012 </varlistentry> 12013 <varlistentry> <term>IEEE80211_TX_CTRL_PS_RESPONSE</term> 12014 <listitem><para> 12015This frame is a response to a poll 12016frame (PS-Poll or uAPSD). 12017 </para></listitem> 12018 </varlistentry> 12019 </variablelist> 12020</refsect1> 12021<refsect1> 12022<title>Description</title> 12023<para> 12024 These flags are used in tx_info->control.flags. 12025</para> 12026</refsect1> 12027</refentry> 12028 12029<refentry id="API-enum-mac80211-rate-control-flags"> 12030<refentryinfo> 12031 <title>LINUX</title> 12032 <productname>Kernel Hackers Manual</productname> 12033 <date>July 2017</date> 12034</refentryinfo> 12035<refmeta> 12036 <refentrytitle><phrase>enum mac80211_rate_control_flags</phrase></refentrytitle> 12037 <manvolnum>9</manvolnum> 12038 <refmiscinfo class="version">4.1.27</refmiscinfo> 12039</refmeta> 12040<refnamediv> 12041 <refname>enum mac80211_rate_control_flags</refname> 12042 <refpurpose> 12043 per-rate flags set by the Rate Control algorithm. 12044 </refpurpose> 12045</refnamediv> 12046<refsynopsisdiv> 12047 <title>Synopsis</title> 12048 <programlisting> 12049enum mac80211_rate_control_flags { 12050 IEEE80211_TX_RC_USE_RTS_CTS, 12051 IEEE80211_TX_RC_USE_CTS_PROTECT, 12052 IEEE80211_TX_RC_USE_SHORT_PREAMBLE, 12053 IEEE80211_TX_RC_MCS, 12054 IEEE80211_TX_RC_GREEN_FIELD, 12055 IEEE80211_TX_RC_40_MHZ_WIDTH, 12056 IEEE80211_TX_RC_DUP_DATA, 12057 IEEE80211_TX_RC_SHORT_GI, 12058 IEEE80211_TX_RC_VHT_MCS, 12059 IEEE80211_TX_RC_80_MHZ_WIDTH, 12060 IEEE80211_TX_RC_160_MHZ_WIDTH 12061}; </programlisting> 12062</refsynopsisdiv> 12063<refsect1> 12064 <title>Constants</title> 12065 <variablelist> 12066 <varlistentry> <term>IEEE80211_TX_RC_USE_RTS_CTS</term> 12067 <listitem><para> 12068Use RTS/CTS exchange for this rate. 12069 </para></listitem> 12070 </varlistentry> 12071 <varlistentry> <term>IEEE80211_TX_RC_USE_CTS_PROTECT</term> 12072 <listitem><para> 12073CTS-to-self protection is required. 12074This is set if the current BSS requires ERP protection. 12075 </para></listitem> 12076 </varlistentry> 12077 <varlistentry> <term>IEEE80211_TX_RC_USE_SHORT_PREAMBLE</term> 12078 <listitem><para> 12079Use short preamble. 12080 </para></listitem> 12081 </varlistentry> 12082 <varlistentry> <term>IEEE80211_TX_RC_MCS</term> 12083 <listitem><para> 12084HT rate. 12085 </para></listitem> 12086 </varlistentry> 12087 <varlistentry> <term>IEEE80211_TX_RC_GREEN_FIELD</term> 12088 <listitem><para> 12089Indicates whether this rate should be used in 12090Greenfield mode. 12091 </para></listitem> 12092 </varlistentry> 12093 <varlistentry> <term>IEEE80211_TX_RC_40_MHZ_WIDTH</term> 12094 <listitem><para> 12095Indicates if the Channel Width should be 40 MHz. 12096 </para></listitem> 12097 </varlistentry> 12098 <varlistentry> <term>IEEE80211_TX_RC_DUP_DATA</term> 12099 <listitem><para> 12100The frame should be transmitted on both of the 12101adjacent 20 MHz channels, if the current channel type is 12102NL80211_CHAN_HT40MINUS or NL80211_CHAN_HT40PLUS. 12103 </para></listitem> 12104 </varlistentry> 12105 <varlistentry> <term>IEEE80211_TX_RC_SHORT_GI</term> 12106 <listitem><para> 12107Short Guard interval should be used for this rate. 12108 </para></listitem> 12109 </varlistentry> 12110 <varlistentry> <term>IEEE80211_TX_RC_VHT_MCS</term> 12111 <listitem><para> 12112VHT MCS rate, in this case the idx field is split 12113into a higher 4 bits (Nss) and lower 4 bits (MCS number) 12114 </para></listitem> 12115 </varlistentry> 12116 <varlistentry> <term>IEEE80211_TX_RC_80_MHZ_WIDTH</term> 12117 <listitem><para> 12118Indicates 80 MHz transmission 12119 </para></listitem> 12120 </varlistentry> 12121 <varlistentry> <term>IEEE80211_TX_RC_160_MHZ_WIDTH</term> 12122 <listitem><para> 12123Indicates 160 MHz transmission 12124(80+80 isn't supported yet) 12125 </para></listitem> 12126 </varlistentry> 12127 </variablelist> 12128</refsect1> 12129<refsect1> 12130<title>Description</title> 12131<para> 12132 </para><para> 12133 12134 These flags are set by the Rate control algorithm for each rate during tx, 12135 in the <parameter>flags</parameter> member of struct ieee80211_tx_rate. 12136</para> 12137</refsect1> 12138</refentry> 12139 12140<refentry id="API-struct-ieee80211-tx-rate"> 12141<refentryinfo> 12142 <title>LINUX</title> 12143 <productname>Kernel Hackers Manual</productname> 12144 <date>July 2017</date> 12145</refentryinfo> 12146<refmeta> 12147 <refentrytitle><phrase>struct ieee80211_tx_rate</phrase></refentrytitle> 12148 <manvolnum>9</manvolnum> 12149 <refmiscinfo class="version">4.1.27</refmiscinfo> 12150</refmeta> 12151<refnamediv> 12152 <refname>struct ieee80211_tx_rate</refname> 12153 <refpurpose> 12154 rate selection/status 12155 </refpurpose> 12156</refnamediv> 12157<refsynopsisdiv> 12158 <title>Synopsis</title> 12159 <programlisting> 12160struct ieee80211_tx_rate { 12161 s8 idx; 12162 u16 count:5; 12163 u16 flags:11; 12164}; </programlisting> 12165</refsynopsisdiv> 12166 <refsect1> 12167 <title>Members</title> 12168 <variablelist> 12169 <varlistentry> <term>idx</term> 12170 <listitem><para> 12171rate index to attempt to send with 12172 </para></listitem> 12173 </varlistentry> 12174 <varlistentry> <term>count</term> 12175 <listitem><para> 12176number of tries in this rate before going to the next rate 12177 </para></listitem> 12178 </varlistentry> 12179 <varlistentry> <term>flags</term> 12180 <listitem><para> 12181rate control flags (<structname>enum</structname> mac80211_rate_control_flags) 12182 </para></listitem> 12183 </varlistentry> 12184 </variablelist> 12185 </refsect1> 12186<refsect1> 12187<title>Description</title> 12188<para> 12189 A value of -1 for <parameter>idx</parameter> indicates an invalid rate and, if used 12190 in an array of retry rates, that no more rates should be tried. 12191 </para><para> 12192 12193 When used for transmit status reporting, the driver should 12194 always report the rate along with the flags it used. 12195 </para><para> 12196 12197 <structname>struct ieee80211_tx_info</structname> contains an array of these structs 12198 in the control information, and it will be filled by the rate 12199 control algorithm according to what should be sent. For example, 12200 if this array contains, in the format { <idx>, <count> } the 12201 information 12202 { 3, 2 }, { 2, 2 }, { 1, 4 }, { -1, 0 }, { -1, 0 } 12203 then this means that the frame should be transmitted 12204 up to twice at rate 3, up to twice at rate 2, and up to four 12205 times at rate 1 if it doesn't get acknowledged. Say it gets 12206 acknowledged by the peer after the fifth attempt, the status 12207 information should then contain 12208 { 3, 2 }, { 2, 2 }, { 1, 1 }, { -1, 0 } ... 12209 since it was transmitted twice at rate 3, twice at rate 2 12210 and once at rate 1 after which we received an acknowledgement. 12211</para> 12212</refsect1> 12213</refentry> 12214 12215<refentry id="API-struct-ieee80211-tx-info"> 12216<refentryinfo> 12217 <title>LINUX</title> 12218 <productname>Kernel Hackers Manual</productname> 12219 <date>July 2017</date> 12220</refentryinfo> 12221<refmeta> 12222 <refentrytitle><phrase>struct ieee80211_tx_info</phrase></refentrytitle> 12223 <manvolnum>9</manvolnum> 12224 <refmiscinfo class="version">4.1.27</refmiscinfo> 12225</refmeta> 12226<refnamediv> 12227 <refname>struct ieee80211_tx_info</refname> 12228 <refpurpose> 12229 skb transmit information 12230 </refpurpose> 12231</refnamediv> 12232<refsynopsisdiv> 12233 <title>Synopsis</title> 12234 <programlisting> 12235struct ieee80211_tx_info { 12236 u32 flags; 12237 u8 band; 12238 u8 hw_queue; 12239 u16 ack_frame_id; 12240 union {unnamed_union}; 12241}; </programlisting> 12242</refsynopsisdiv> 12243 <refsect1> 12244 <title>Members</title> 12245 <variablelist> 12246 <varlistentry> <term>flags</term> 12247 <listitem><para> 12248transmit info flags, defined above 12249 </para></listitem> 12250 </varlistentry> 12251 <varlistentry> <term>band</term> 12252 <listitem><para> 12253the band to transmit on (use for checking for races) 12254 </para></listitem> 12255 </varlistentry> 12256 <varlistentry> <term>hw_queue</term> 12257 <listitem><para> 12258HW queue to put the frame on, <function>skb_get_queue_mapping</function> gives the AC 12259 </para></listitem> 12260 </varlistentry> 12261 <varlistentry> <term>ack_frame_id</term> 12262 <listitem><para> 12263internal frame ID for TX status, used internally 12264 </para></listitem> 12265 </varlistentry> 12266 <varlistentry> <term>{unnamed_union}</term> 12267 <listitem><para> 12268anonymous 12269 </para></listitem> 12270 </varlistentry> 12271 </variablelist> 12272 </refsect1> 12273<refsect1> 12274<title>Description</title> 12275<para> 12276 </para><para> 12277 12278 This structure is placed in skb->cb for three uses: 12279 (1) mac80211 TX control - mac80211 tells the driver what to do 12280 (2) driver internal use (if applicable) 12281 (3) TX status information - driver tells mac80211 what happened 12282</para> 12283</refsect1> 12284</refentry> 12285 12286<refentry id="API-ieee80211-tx-info-clear-status"> 12287<refentryinfo> 12288 <title>LINUX</title> 12289 <productname>Kernel Hackers Manual</productname> 12290 <date>July 2017</date> 12291</refentryinfo> 12292<refmeta> 12293 <refentrytitle><phrase>ieee80211_tx_info_clear_status</phrase></refentrytitle> 12294 <manvolnum>9</manvolnum> 12295 <refmiscinfo class="version">4.1.27</refmiscinfo> 12296</refmeta> 12297<refnamediv> 12298 <refname>ieee80211_tx_info_clear_status</refname> 12299 <refpurpose> 12300 clear TX status 12301 </refpurpose> 12302</refnamediv> 12303<refsynopsisdiv> 12304 <title>Synopsis</title> 12305 <funcsynopsis><funcprototype> 12306 <funcdef>void <function>ieee80211_tx_info_clear_status </function></funcdef> 12307 <paramdef>struct ieee80211_tx_info * <parameter>info</parameter></paramdef> 12308 </funcprototype></funcsynopsis> 12309</refsynopsisdiv> 12310<refsect1> 12311 <title>Arguments</title> 12312 <variablelist> 12313 <varlistentry> 12314 <term><parameter>info</parameter></term> 12315 <listitem> 12316 <para> 12317 The <structname>struct ieee80211_tx_info</structname> to be cleared. 12318 </para> 12319 </listitem> 12320 </varlistentry> 12321 </variablelist> 12322</refsect1> 12323<refsect1> 12324<title>Description</title> 12325<para> 12326 When the driver passes an skb back to mac80211, it must report 12327 a number of things in TX status. This function clears everything 12328 in the TX status but the rate control information (it does clear 12329 the count since you need to fill that in anyway). 12330</para> 12331</refsect1> 12332<refsect1> 12333<title>NOTE</title> 12334<para> 12335 You can only use this function if you do NOT use 12336 info->driver_data! Use info->rate_driver_data 12337 instead if you need only the less space that allows. 12338</para> 12339</refsect1> 12340</refentry> 12341 12342<refentry id="API-ieee80211-rx"> 12343<refentryinfo> 12344 <title>LINUX</title> 12345 <productname>Kernel Hackers Manual</productname> 12346 <date>July 2017</date> 12347</refentryinfo> 12348<refmeta> 12349 <refentrytitle><phrase>ieee80211_rx</phrase></refentrytitle> 12350 <manvolnum>9</manvolnum> 12351 <refmiscinfo class="version">4.1.27</refmiscinfo> 12352</refmeta> 12353<refnamediv> 12354 <refname>ieee80211_rx</refname> 12355 <refpurpose> 12356 receive frame 12357 </refpurpose> 12358</refnamediv> 12359<refsynopsisdiv> 12360 <title>Synopsis</title> 12361 <funcsynopsis><funcprototype> 12362 <funcdef>void <function>ieee80211_rx </function></funcdef> 12363 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 12364 <paramdef>struct sk_buff * <parameter>skb</parameter></paramdef> 12365 </funcprototype></funcsynopsis> 12366</refsynopsisdiv> 12367<refsect1> 12368 <title>Arguments</title> 12369 <variablelist> 12370 <varlistentry> 12371 <term><parameter>hw</parameter></term> 12372 <listitem> 12373 <para> 12374 the hardware this frame came in on 12375 </para> 12376 </listitem> 12377 </varlistentry> 12378 <varlistentry> 12379 <term><parameter>skb</parameter></term> 12380 <listitem> 12381 <para> 12382 the buffer to receive, owned by mac80211 after this call 12383 </para> 12384 </listitem> 12385 </varlistentry> 12386 </variablelist> 12387</refsect1> 12388<refsect1> 12389<title>Description</title> 12390<para> 12391 </para><para> 12392 12393 Use this function to hand received frames to mac80211. The receive 12394 buffer in <parameter>skb</parameter> must start with an IEEE 802.11 header. In case of a 12395 paged <parameter>skb</parameter> is used, the driver is recommended to put the ieee80211 12396 header of the frame on the linear part of the <parameter>skb</parameter> to avoid memory 12397 allocation and/or memcpy by the stack. 12398 </para><para> 12399 12400 This function may not be called in IRQ context. Calls to this function 12401 for a single hardware must be synchronized against each other. Calls to 12402 this function, <function>ieee80211_rx_ni</function> and <function>ieee80211_rx_irqsafe</function> may not be 12403 mixed for a single hardware. Must not run concurrently with 12404 <function>ieee80211_tx_status</function> or <function>ieee80211_tx_status_ni</function>. 12405 </para><para> 12406 12407 In process context use instead <function>ieee80211_rx_ni</function>. 12408</para> 12409</refsect1> 12410</refentry> 12411 12412<refentry id="API-ieee80211-rx-ni"> 12413<refentryinfo> 12414 <title>LINUX</title> 12415 <productname>Kernel Hackers Manual</productname> 12416 <date>July 2017</date> 12417</refentryinfo> 12418<refmeta> 12419 <refentrytitle><phrase>ieee80211_rx_ni</phrase></refentrytitle> 12420 <manvolnum>9</manvolnum> 12421 <refmiscinfo class="version">4.1.27</refmiscinfo> 12422</refmeta> 12423<refnamediv> 12424 <refname>ieee80211_rx_ni</refname> 12425 <refpurpose> 12426 receive frame (in process context) 12427 </refpurpose> 12428</refnamediv> 12429<refsynopsisdiv> 12430 <title>Synopsis</title> 12431 <funcsynopsis><funcprototype> 12432 <funcdef>void <function>ieee80211_rx_ni </function></funcdef> 12433 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 12434 <paramdef>struct sk_buff * <parameter>skb</parameter></paramdef> 12435 </funcprototype></funcsynopsis> 12436</refsynopsisdiv> 12437<refsect1> 12438 <title>Arguments</title> 12439 <variablelist> 12440 <varlistentry> 12441 <term><parameter>hw</parameter></term> 12442 <listitem> 12443 <para> 12444 the hardware this frame came in on 12445 </para> 12446 </listitem> 12447 </varlistentry> 12448 <varlistentry> 12449 <term><parameter>skb</parameter></term> 12450 <listitem> 12451 <para> 12452 the buffer to receive, owned by mac80211 after this call 12453 </para> 12454 </listitem> 12455 </varlistentry> 12456 </variablelist> 12457</refsect1> 12458<refsect1> 12459<title>Description</title> 12460<para> 12461 </para><para> 12462 12463 Like <function>ieee80211_rx</function> but can be called in process context 12464 (internally disables bottom halves). 12465 </para><para> 12466 12467 Calls to this function, <function>ieee80211_rx</function> and <function>ieee80211_rx_irqsafe</function> may 12468 not be mixed for a single hardware. Must not run concurrently with 12469 <function>ieee80211_tx_status</function> or <function>ieee80211_tx_status_ni</function>. 12470</para> 12471</refsect1> 12472</refentry> 12473 12474<refentry id="API-ieee80211-rx-irqsafe"> 12475<refentryinfo> 12476 <title>LINUX</title> 12477 <productname>Kernel Hackers Manual</productname> 12478 <date>July 2017</date> 12479</refentryinfo> 12480<refmeta> 12481 <refentrytitle><phrase>ieee80211_rx_irqsafe</phrase></refentrytitle> 12482 <manvolnum>9</manvolnum> 12483 <refmiscinfo class="version">4.1.27</refmiscinfo> 12484</refmeta> 12485<refnamediv> 12486 <refname>ieee80211_rx_irqsafe</refname> 12487 <refpurpose> 12488 receive frame 12489 </refpurpose> 12490</refnamediv> 12491<refsynopsisdiv> 12492 <title>Synopsis</title> 12493 <funcsynopsis><funcprototype> 12494 <funcdef>void <function>ieee80211_rx_irqsafe </function></funcdef> 12495 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 12496 <paramdef>struct sk_buff * <parameter>skb</parameter></paramdef> 12497 </funcprototype></funcsynopsis> 12498</refsynopsisdiv> 12499<refsect1> 12500 <title>Arguments</title> 12501 <variablelist> 12502 <varlistentry> 12503 <term><parameter>hw</parameter></term> 12504 <listitem> 12505 <para> 12506 the hardware this frame came in on 12507 </para> 12508 </listitem> 12509 </varlistentry> 12510 <varlistentry> 12511 <term><parameter>skb</parameter></term> 12512 <listitem> 12513 <para> 12514 the buffer to receive, owned by mac80211 after this call 12515 </para> 12516 </listitem> 12517 </varlistentry> 12518 </variablelist> 12519</refsect1> 12520<refsect1> 12521<title>Description</title> 12522<para> 12523 </para><para> 12524 12525 Like <function>ieee80211_rx</function> but can be called in IRQ context 12526 (internally defers to a tasklet.) 12527 </para><para> 12528 12529 Calls to this function, <function>ieee80211_rx</function> or <function>ieee80211_rx_ni</function> may not 12530 be mixed for a single hardware.Must not run concurrently with 12531 <function>ieee80211_tx_status</function> or <function>ieee80211_tx_status_ni</function>. 12532</para> 12533</refsect1> 12534</refentry> 12535 12536<refentry id="API-ieee80211-tx-status"> 12537<refentryinfo> 12538 <title>LINUX</title> 12539 <productname>Kernel Hackers Manual</productname> 12540 <date>July 2017</date> 12541</refentryinfo> 12542<refmeta> 12543 <refentrytitle><phrase>ieee80211_tx_status</phrase></refentrytitle> 12544 <manvolnum>9</manvolnum> 12545 <refmiscinfo class="version">4.1.27</refmiscinfo> 12546</refmeta> 12547<refnamediv> 12548 <refname>ieee80211_tx_status</refname> 12549 <refpurpose> 12550 transmit status callback 12551 </refpurpose> 12552</refnamediv> 12553<refsynopsisdiv> 12554 <title>Synopsis</title> 12555 <funcsynopsis><funcprototype> 12556 <funcdef>void <function>ieee80211_tx_status </function></funcdef> 12557 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 12558 <paramdef>struct sk_buff * <parameter>skb</parameter></paramdef> 12559 </funcprototype></funcsynopsis> 12560</refsynopsisdiv> 12561<refsect1> 12562 <title>Arguments</title> 12563 <variablelist> 12564 <varlistentry> 12565 <term><parameter>hw</parameter></term> 12566 <listitem> 12567 <para> 12568 the hardware the frame was transmitted by 12569 </para> 12570 </listitem> 12571 </varlistentry> 12572 <varlistentry> 12573 <term><parameter>skb</parameter></term> 12574 <listitem> 12575 <para> 12576 the frame that was transmitted, owned by mac80211 after this call 12577 </para> 12578 </listitem> 12579 </varlistentry> 12580 </variablelist> 12581</refsect1> 12582<refsect1> 12583<title>Description</title> 12584<para> 12585 </para><para> 12586 12587 Call this function for all transmitted frames after they have been 12588 transmitted. It is permissible to not call this function for 12589 multicast frames but this can affect statistics. 12590 </para><para> 12591 12592 This function may not be called in IRQ context. Calls to this function 12593 for a single hardware must be synchronized against each other. Calls 12594 to this function, <function>ieee80211_tx_status_ni</function> and <function>ieee80211_tx_status_irqsafe</function> 12595 may not be mixed for a single hardware. Must not run concurrently with 12596 <function>ieee80211_rx</function> or <function>ieee80211_rx_ni</function>. 12597</para> 12598</refsect1> 12599</refentry> 12600 12601<refentry id="API-ieee80211-tx-status-ni"> 12602<refentryinfo> 12603 <title>LINUX</title> 12604 <productname>Kernel Hackers Manual</productname> 12605 <date>July 2017</date> 12606</refentryinfo> 12607<refmeta> 12608 <refentrytitle><phrase>ieee80211_tx_status_ni</phrase></refentrytitle> 12609 <manvolnum>9</manvolnum> 12610 <refmiscinfo class="version">4.1.27</refmiscinfo> 12611</refmeta> 12612<refnamediv> 12613 <refname>ieee80211_tx_status_ni</refname> 12614 <refpurpose> 12615 transmit status callback (in process context) 12616 </refpurpose> 12617</refnamediv> 12618<refsynopsisdiv> 12619 <title>Synopsis</title> 12620 <funcsynopsis><funcprototype> 12621 <funcdef>void <function>ieee80211_tx_status_ni </function></funcdef> 12622 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 12623 <paramdef>struct sk_buff * <parameter>skb</parameter></paramdef> 12624 </funcprototype></funcsynopsis> 12625</refsynopsisdiv> 12626<refsect1> 12627 <title>Arguments</title> 12628 <variablelist> 12629 <varlistentry> 12630 <term><parameter>hw</parameter></term> 12631 <listitem> 12632 <para> 12633 the hardware the frame was transmitted by 12634 </para> 12635 </listitem> 12636 </varlistentry> 12637 <varlistentry> 12638 <term><parameter>skb</parameter></term> 12639 <listitem> 12640 <para> 12641 the frame that was transmitted, owned by mac80211 after this call 12642 </para> 12643 </listitem> 12644 </varlistentry> 12645 </variablelist> 12646</refsect1> 12647<refsect1> 12648<title>Description</title> 12649<para> 12650 </para><para> 12651 12652 Like <function>ieee80211_tx_status</function> but can be called in process context. 12653 </para><para> 12654 12655 Calls to this function, <function>ieee80211_tx_status</function> and 12656 <function>ieee80211_tx_status_irqsafe</function> may not be mixed 12657 for a single hardware. 12658</para> 12659</refsect1> 12660</refentry> 12661 12662<refentry id="API-ieee80211-tx-status-irqsafe"> 12663<refentryinfo> 12664 <title>LINUX</title> 12665 <productname>Kernel Hackers Manual</productname> 12666 <date>July 2017</date> 12667</refentryinfo> 12668<refmeta> 12669 <refentrytitle><phrase>ieee80211_tx_status_irqsafe</phrase></refentrytitle> 12670 <manvolnum>9</manvolnum> 12671 <refmiscinfo class="version">4.1.27</refmiscinfo> 12672</refmeta> 12673<refnamediv> 12674 <refname>ieee80211_tx_status_irqsafe</refname> 12675 <refpurpose> 12676 IRQ-safe transmit status callback 12677 </refpurpose> 12678</refnamediv> 12679<refsynopsisdiv> 12680 <title>Synopsis</title> 12681 <funcsynopsis><funcprototype> 12682 <funcdef>void <function>ieee80211_tx_status_irqsafe </function></funcdef> 12683 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 12684 <paramdef>struct sk_buff * <parameter>skb</parameter></paramdef> 12685 </funcprototype></funcsynopsis> 12686</refsynopsisdiv> 12687<refsect1> 12688 <title>Arguments</title> 12689 <variablelist> 12690 <varlistentry> 12691 <term><parameter>hw</parameter></term> 12692 <listitem> 12693 <para> 12694 the hardware the frame was transmitted by 12695 </para> 12696 </listitem> 12697 </varlistentry> 12698 <varlistentry> 12699 <term><parameter>skb</parameter></term> 12700 <listitem> 12701 <para> 12702 the frame that was transmitted, owned by mac80211 after this call 12703 </para> 12704 </listitem> 12705 </varlistentry> 12706 </variablelist> 12707</refsect1> 12708<refsect1> 12709<title>Description</title> 12710<para> 12711 </para><para> 12712 12713 Like <function>ieee80211_tx_status</function> but can be called in IRQ context 12714 (internally defers to a tasklet.) 12715 </para><para> 12716 12717 Calls to this function, <function>ieee80211_tx_status</function> and 12718 <function>ieee80211_tx_status_ni</function> may not be mixed for a single hardware. 12719</para> 12720</refsect1> 12721</refentry> 12722 12723<refentry id="API-ieee80211-rts-get"> 12724<refentryinfo> 12725 <title>LINUX</title> 12726 <productname>Kernel Hackers Manual</productname> 12727 <date>July 2017</date> 12728</refentryinfo> 12729<refmeta> 12730 <refentrytitle><phrase>ieee80211_rts_get</phrase></refentrytitle> 12731 <manvolnum>9</manvolnum> 12732 <refmiscinfo class="version">4.1.27</refmiscinfo> 12733</refmeta> 12734<refnamediv> 12735 <refname>ieee80211_rts_get</refname> 12736 <refpurpose> 12737 RTS frame generation function 12738 </refpurpose> 12739</refnamediv> 12740<refsynopsisdiv> 12741 <title>Synopsis</title> 12742 <funcsynopsis><funcprototype> 12743 <funcdef>void <function>ieee80211_rts_get </function></funcdef> 12744 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 12745 <paramdef>struct ieee80211_vif * <parameter>vif</parameter></paramdef> 12746 <paramdef>const void * <parameter>frame</parameter></paramdef> 12747 <paramdef>size_t <parameter>frame_len</parameter></paramdef> 12748 <paramdef>const struct ieee80211_tx_info * <parameter>frame_txctl</parameter></paramdef> 12749 <paramdef>struct ieee80211_rts * <parameter>rts</parameter></paramdef> 12750 </funcprototype></funcsynopsis> 12751</refsynopsisdiv> 12752<refsect1> 12753 <title>Arguments</title> 12754 <variablelist> 12755 <varlistentry> 12756 <term><parameter>hw</parameter></term> 12757 <listitem> 12758 <para> 12759 pointer obtained from <function>ieee80211_alloc_hw</function>. 12760 </para> 12761 </listitem> 12762 </varlistentry> 12763 <varlistentry> 12764 <term><parameter>vif</parameter></term> 12765 <listitem> 12766 <para> 12767 <structname>struct ieee80211_vif</structname> pointer from the add_interface callback. 12768 </para> 12769 </listitem> 12770 </varlistentry> 12771 <varlistentry> 12772 <term><parameter>frame</parameter></term> 12773 <listitem> 12774 <para> 12775 pointer to the frame that is going to be protected by the RTS. 12776 </para> 12777 </listitem> 12778 </varlistentry> 12779 <varlistentry> 12780 <term><parameter>frame_len</parameter></term> 12781 <listitem> 12782 <para> 12783 the frame length (in octets). 12784 </para> 12785 </listitem> 12786 </varlistentry> 12787 <varlistentry> 12788 <term><parameter>frame_txctl</parameter></term> 12789 <listitem> 12790 <para> 12791 <structname>struct ieee80211_tx_info</structname> of the frame. 12792 </para> 12793 </listitem> 12794 </varlistentry> 12795 <varlistentry> 12796 <term><parameter>rts</parameter></term> 12797 <listitem> 12798 <para> 12799 The buffer where to store the RTS frame. 12800 </para> 12801 </listitem> 12802 </varlistentry> 12803 </variablelist> 12804</refsect1> 12805<refsect1> 12806<title>Description</title> 12807<para> 12808 If the RTS frames are generated by the host system (i.e., not in 12809 hardware/firmware), the low-level driver uses this function to receive 12810 the next RTS frame from the 802.11 code. The low-level is responsible 12811 for calling this function before and RTS frame is needed. 12812</para> 12813</refsect1> 12814</refentry> 12815 12816<refentry id="API-ieee80211-rts-duration"> 12817<refentryinfo> 12818 <title>LINUX</title> 12819 <productname>Kernel Hackers Manual</productname> 12820 <date>July 2017</date> 12821</refentryinfo> 12822<refmeta> 12823 <refentrytitle><phrase>ieee80211_rts_duration</phrase></refentrytitle> 12824 <manvolnum>9</manvolnum> 12825 <refmiscinfo class="version">4.1.27</refmiscinfo> 12826</refmeta> 12827<refnamediv> 12828 <refname>ieee80211_rts_duration</refname> 12829 <refpurpose> 12830 Get the duration field for an RTS frame 12831 </refpurpose> 12832</refnamediv> 12833<refsynopsisdiv> 12834 <title>Synopsis</title> 12835 <funcsynopsis><funcprototype> 12836 <funcdef>__le16 <function>ieee80211_rts_duration </function></funcdef> 12837 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 12838 <paramdef>struct ieee80211_vif * <parameter>vif</parameter></paramdef> 12839 <paramdef>size_t <parameter>frame_len</parameter></paramdef> 12840 <paramdef>const struct ieee80211_tx_info * <parameter>frame_txctl</parameter></paramdef> 12841 </funcprototype></funcsynopsis> 12842</refsynopsisdiv> 12843<refsect1> 12844 <title>Arguments</title> 12845 <variablelist> 12846 <varlistentry> 12847 <term><parameter>hw</parameter></term> 12848 <listitem> 12849 <para> 12850 pointer obtained from <function>ieee80211_alloc_hw</function>. 12851 </para> 12852 </listitem> 12853 </varlistentry> 12854 <varlistentry> 12855 <term><parameter>vif</parameter></term> 12856 <listitem> 12857 <para> 12858 <structname>struct ieee80211_vif</structname> pointer from the add_interface callback. 12859 </para> 12860 </listitem> 12861 </varlistentry> 12862 <varlistentry> 12863 <term><parameter>frame_len</parameter></term> 12864 <listitem> 12865 <para> 12866 the length of the frame that is going to be protected by the RTS. 12867 </para> 12868 </listitem> 12869 </varlistentry> 12870 <varlistentry> 12871 <term><parameter>frame_txctl</parameter></term> 12872 <listitem> 12873 <para> 12874 <structname>struct ieee80211_tx_info</structname> of the frame. 12875 </para> 12876 </listitem> 12877 </varlistentry> 12878 </variablelist> 12879</refsect1> 12880<refsect1> 12881<title>Description</title> 12882<para> 12883 If the RTS is generated in firmware, but the host system must provide 12884 the duration field, the low-level driver uses this function to receive 12885 the duration field value in little-endian byteorder. 12886</para> 12887</refsect1> 12888<refsect1> 12889<title>Return</title> 12890<para> 12891 The duration. 12892</para> 12893</refsect1> 12894</refentry> 12895 12896<refentry id="API-ieee80211-ctstoself-get"> 12897<refentryinfo> 12898 <title>LINUX</title> 12899 <productname>Kernel Hackers Manual</productname> 12900 <date>July 2017</date> 12901</refentryinfo> 12902<refmeta> 12903 <refentrytitle><phrase>ieee80211_ctstoself_get</phrase></refentrytitle> 12904 <manvolnum>9</manvolnum> 12905 <refmiscinfo class="version">4.1.27</refmiscinfo> 12906</refmeta> 12907<refnamediv> 12908 <refname>ieee80211_ctstoself_get</refname> 12909 <refpurpose> 12910 CTS-to-self frame generation function 12911 </refpurpose> 12912</refnamediv> 12913<refsynopsisdiv> 12914 <title>Synopsis</title> 12915 <funcsynopsis><funcprototype> 12916 <funcdef>void <function>ieee80211_ctstoself_get </function></funcdef> 12917 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 12918 <paramdef>struct ieee80211_vif * <parameter>vif</parameter></paramdef> 12919 <paramdef>const void * <parameter>frame</parameter></paramdef> 12920 <paramdef>size_t <parameter>frame_len</parameter></paramdef> 12921 <paramdef>const struct ieee80211_tx_info * <parameter>frame_txctl</parameter></paramdef> 12922 <paramdef>struct ieee80211_cts * <parameter>cts</parameter></paramdef> 12923 </funcprototype></funcsynopsis> 12924</refsynopsisdiv> 12925<refsect1> 12926 <title>Arguments</title> 12927 <variablelist> 12928 <varlistentry> 12929 <term><parameter>hw</parameter></term> 12930 <listitem> 12931 <para> 12932 pointer obtained from <function>ieee80211_alloc_hw</function>. 12933 </para> 12934 </listitem> 12935 </varlistentry> 12936 <varlistentry> 12937 <term><parameter>vif</parameter></term> 12938 <listitem> 12939 <para> 12940 <structname>struct ieee80211_vif</structname> pointer from the add_interface callback. 12941 </para> 12942 </listitem> 12943 </varlistentry> 12944 <varlistentry> 12945 <term><parameter>frame</parameter></term> 12946 <listitem> 12947 <para> 12948 pointer to the frame that is going to be protected by the CTS-to-self. 12949 </para> 12950 </listitem> 12951 </varlistentry> 12952 <varlistentry> 12953 <term><parameter>frame_len</parameter></term> 12954 <listitem> 12955 <para> 12956 the frame length (in octets). 12957 </para> 12958 </listitem> 12959 </varlistentry> 12960 <varlistentry> 12961 <term><parameter>frame_txctl</parameter></term> 12962 <listitem> 12963 <para> 12964 <structname>struct ieee80211_tx_info</structname> of the frame. 12965 </para> 12966 </listitem> 12967 </varlistentry> 12968 <varlistentry> 12969 <term><parameter>cts</parameter></term> 12970 <listitem> 12971 <para> 12972 The buffer where to store the CTS-to-self frame. 12973 </para> 12974 </listitem> 12975 </varlistentry> 12976 </variablelist> 12977</refsect1> 12978<refsect1> 12979<title>Description</title> 12980<para> 12981 If the CTS-to-self frames are generated by the host system (i.e., not in 12982 hardware/firmware), the low-level driver uses this function to receive 12983 the next CTS-to-self frame from the 802.11 code. The low-level is responsible 12984 for calling this function before and CTS-to-self frame is needed. 12985</para> 12986</refsect1> 12987</refentry> 12988 12989<refentry id="API-ieee80211-ctstoself-duration"> 12990<refentryinfo> 12991 <title>LINUX</title> 12992 <productname>Kernel Hackers Manual</productname> 12993 <date>July 2017</date> 12994</refentryinfo> 12995<refmeta> 12996 <refentrytitle><phrase>ieee80211_ctstoself_duration</phrase></refentrytitle> 12997 <manvolnum>9</manvolnum> 12998 <refmiscinfo class="version">4.1.27</refmiscinfo> 12999</refmeta> 13000<refnamediv> 13001 <refname>ieee80211_ctstoself_duration</refname> 13002 <refpurpose> 13003 Get the duration field for a CTS-to-self frame 13004 </refpurpose> 13005</refnamediv> 13006<refsynopsisdiv> 13007 <title>Synopsis</title> 13008 <funcsynopsis><funcprototype> 13009 <funcdef>__le16 <function>ieee80211_ctstoself_duration </function></funcdef> 13010 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 13011 <paramdef>struct ieee80211_vif * <parameter>vif</parameter></paramdef> 13012 <paramdef>size_t <parameter>frame_len</parameter></paramdef> 13013 <paramdef>const struct ieee80211_tx_info * <parameter>frame_txctl</parameter></paramdef> 13014 </funcprototype></funcsynopsis> 13015</refsynopsisdiv> 13016<refsect1> 13017 <title>Arguments</title> 13018 <variablelist> 13019 <varlistentry> 13020 <term><parameter>hw</parameter></term> 13021 <listitem> 13022 <para> 13023 pointer obtained from <function>ieee80211_alloc_hw</function>. 13024 </para> 13025 </listitem> 13026 </varlistentry> 13027 <varlistentry> 13028 <term><parameter>vif</parameter></term> 13029 <listitem> 13030 <para> 13031 <structname>struct ieee80211_vif</structname> pointer from the add_interface callback. 13032 </para> 13033 </listitem> 13034 </varlistentry> 13035 <varlistentry> 13036 <term><parameter>frame_len</parameter></term> 13037 <listitem> 13038 <para> 13039 the length of the frame that is going to be protected by the CTS-to-self. 13040 </para> 13041 </listitem> 13042 </varlistentry> 13043 <varlistentry> 13044 <term><parameter>frame_txctl</parameter></term> 13045 <listitem> 13046 <para> 13047 <structname>struct ieee80211_tx_info</structname> of the frame. 13048 </para> 13049 </listitem> 13050 </varlistentry> 13051 </variablelist> 13052</refsect1> 13053<refsect1> 13054<title>Description</title> 13055<para> 13056 If the CTS-to-self is generated in firmware, but the host system must provide 13057 the duration field, the low-level driver uses this function to receive 13058 the duration field value in little-endian byteorder. 13059</para> 13060</refsect1> 13061<refsect1> 13062<title>Return</title> 13063<para> 13064 The duration. 13065</para> 13066</refsect1> 13067</refentry> 13068 13069<refentry id="API-ieee80211-generic-frame-duration"> 13070<refentryinfo> 13071 <title>LINUX</title> 13072 <productname>Kernel Hackers Manual</productname> 13073 <date>July 2017</date> 13074</refentryinfo> 13075<refmeta> 13076 <refentrytitle><phrase>ieee80211_generic_frame_duration</phrase></refentrytitle> 13077 <manvolnum>9</manvolnum> 13078 <refmiscinfo class="version">4.1.27</refmiscinfo> 13079</refmeta> 13080<refnamediv> 13081 <refname>ieee80211_generic_frame_duration</refname> 13082 <refpurpose> 13083 Calculate the duration field for a frame 13084 </refpurpose> 13085</refnamediv> 13086<refsynopsisdiv> 13087 <title>Synopsis</title> 13088 <funcsynopsis><funcprototype> 13089 <funcdef>__le16 <function>ieee80211_generic_frame_duration </function></funcdef> 13090 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 13091 <paramdef>struct ieee80211_vif * <parameter>vif</parameter></paramdef> 13092 <paramdef>enum ieee80211_band <parameter>band</parameter></paramdef> 13093 <paramdef>size_t <parameter>frame_len</parameter></paramdef> 13094 <paramdef>struct ieee80211_rate * <parameter>rate</parameter></paramdef> 13095 </funcprototype></funcsynopsis> 13096</refsynopsisdiv> 13097<refsect1> 13098 <title>Arguments</title> 13099 <variablelist> 13100 <varlistentry> 13101 <term><parameter>hw</parameter></term> 13102 <listitem> 13103 <para> 13104 pointer obtained from <function>ieee80211_alloc_hw</function>. 13105 </para> 13106 </listitem> 13107 </varlistentry> 13108 <varlistentry> 13109 <term><parameter>vif</parameter></term> 13110 <listitem> 13111 <para> 13112 <structname>struct ieee80211_vif</structname> pointer from the add_interface callback. 13113 </para> 13114 </listitem> 13115 </varlistentry> 13116 <varlistentry> 13117 <term><parameter>band</parameter></term> 13118 <listitem> 13119 <para> 13120 the band to calculate the frame duration on 13121 </para> 13122 </listitem> 13123 </varlistentry> 13124 <varlistentry> 13125 <term><parameter>frame_len</parameter></term> 13126 <listitem> 13127 <para> 13128 the length of the frame. 13129 </para> 13130 </listitem> 13131 </varlistentry> 13132 <varlistentry> 13133 <term><parameter>rate</parameter></term> 13134 <listitem> 13135 <para> 13136 the rate at which the frame is going to be transmitted. 13137 </para> 13138 </listitem> 13139 </varlistentry> 13140 </variablelist> 13141</refsect1> 13142<refsect1> 13143<title>Description</title> 13144<para> 13145 Calculate the duration field of some generic frame, given its 13146 length and transmission rate (in 100kbps). 13147</para> 13148</refsect1> 13149<refsect1> 13150<title>Return</title> 13151<para> 13152 The duration. 13153</para> 13154</refsect1> 13155</refentry> 13156 13157<refentry id="API-ieee80211-wake-queue"> 13158<refentryinfo> 13159 <title>LINUX</title> 13160 <productname>Kernel Hackers Manual</productname> 13161 <date>July 2017</date> 13162</refentryinfo> 13163<refmeta> 13164 <refentrytitle><phrase>ieee80211_wake_queue</phrase></refentrytitle> 13165 <manvolnum>9</manvolnum> 13166 <refmiscinfo class="version">4.1.27</refmiscinfo> 13167</refmeta> 13168<refnamediv> 13169 <refname>ieee80211_wake_queue</refname> 13170 <refpurpose> 13171 wake specific queue 13172 </refpurpose> 13173</refnamediv> 13174<refsynopsisdiv> 13175 <title>Synopsis</title> 13176 <funcsynopsis><funcprototype> 13177 <funcdef>void <function>ieee80211_wake_queue </function></funcdef> 13178 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 13179 <paramdef>int <parameter>queue</parameter></paramdef> 13180 </funcprototype></funcsynopsis> 13181</refsynopsisdiv> 13182<refsect1> 13183 <title>Arguments</title> 13184 <variablelist> 13185 <varlistentry> 13186 <term><parameter>hw</parameter></term> 13187 <listitem> 13188 <para> 13189 pointer as obtained from <function>ieee80211_alloc_hw</function>. 13190 </para> 13191 </listitem> 13192 </varlistentry> 13193 <varlistentry> 13194 <term><parameter>queue</parameter></term> 13195 <listitem> 13196 <para> 13197 queue number (counted from zero). 13198 </para> 13199 </listitem> 13200 </varlistentry> 13201 </variablelist> 13202</refsect1> 13203<refsect1> 13204<title>Description</title> 13205<para> 13206 Drivers should use this function instead of netif_wake_queue. 13207</para> 13208</refsect1> 13209</refentry> 13210 13211<refentry id="API-ieee80211-stop-queue"> 13212<refentryinfo> 13213 <title>LINUX</title> 13214 <productname>Kernel Hackers Manual</productname> 13215 <date>July 2017</date> 13216</refentryinfo> 13217<refmeta> 13218 <refentrytitle><phrase>ieee80211_stop_queue</phrase></refentrytitle> 13219 <manvolnum>9</manvolnum> 13220 <refmiscinfo class="version">4.1.27</refmiscinfo> 13221</refmeta> 13222<refnamediv> 13223 <refname>ieee80211_stop_queue</refname> 13224 <refpurpose> 13225 stop specific queue 13226 </refpurpose> 13227</refnamediv> 13228<refsynopsisdiv> 13229 <title>Synopsis</title> 13230 <funcsynopsis><funcprototype> 13231 <funcdef>void <function>ieee80211_stop_queue </function></funcdef> 13232 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 13233 <paramdef>int <parameter>queue</parameter></paramdef> 13234 </funcprototype></funcsynopsis> 13235</refsynopsisdiv> 13236<refsect1> 13237 <title>Arguments</title> 13238 <variablelist> 13239 <varlistentry> 13240 <term><parameter>hw</parameter></term> 13241 <listitem> 13242 <para> 13243 pointer as obtained from <function>ieee80211_alloc_hw</function>. 13244 </para> 13245 </listitem> 13246 </varlistentry> 13247 <varlistentry> 13248 <term><parameter>queue</parameter></term> 13249 <listitem> 13250 <para> 13251 queue number (counted from zero). 13252 </para> 13253 </listitem> 13254 </varlistentry> 13255 </variablelist> 13256</refsect1> 13257<refsect1> 13258<title>Description</title> 13259<para> 13260 Drivers should use this function instead of netif_stop_queue. 13261</para> 13262</refsect1> 13263</refentry> 13264 13265<refentry id="API-ieee80211-wake-queues"> 13266<refentryinfo> 13267 <title>LINUX</title> 13268 <productname>Kernel Hackers Manual</productname> 13269 <date>July 2017</date> 13270</refentryinfo> 13271<refmeta> 13272 <refentrytitle><phrase>ieee80211_wake_queues</phrase></refentrytitle> 13273 <manvolnum>9</manvolnum> 13274 <refmiscinfo class="version">4.1.27</refmiscinfo> 13275</refmeta> 13276<refnamediv> 13277 <refname>ieee80211_wake_queues</refname> 13278 <refpurpose> 13279 wake all queues 13280 </refpurpose> 13281</refnamediv> 13282<refsynopsisdiv> 13283 <title>Synopsis</title> 13284 <funcsynopsis><funcprototype> 13285 <funcdef>void <function>ieee80211_wake_queues </function></funcdef> 13286 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 13287 </funcprototype></funcsynopsis> 13288</refsynopsisdiv> 13289<refsect1> 13290 <title>Arguments</title> 13291 <variablelist> 13292 <varlistentry> 13293 <term><parameter>hw</parameter></term> 13294 <listitem> 13295 <para> 13296 pointer as obtained from <function>ieee80211_alloc_hw</function>. 13297 </para> 13298 </listitem> 13299 </varlistentry> 13300 </variablelist> 13301</refsect1> 13302<refsect1> 13303<title>Description</title> 13304<para> 13305 Drivers should use this function instead of netif_wake_queue. 13306</para> 13307</refsect1> 13308</refentry> 13309 13310<refentry id="API-ieee80211-stop-queues"> 13311<refentryinfo> 13312 <title>LINUX</title> 13313 <productname>Kernel Hackers Manual</productname> 13314 <date>July 2017</date> 13315</refentryinfo> 13316<refmeta> 13317 <refentrytitle><phrase>ieee80211_stop_queues</phrase></refentrytitle> 13318 <manvolnum>9</manvolnum> 13319 <refmiscinfo class="version">4.1.27</refmiscinfo> 13320</refmeta> 13321<refnamediv> 13322 <refname>ieee80211_stop_queues</refname> 13323 <refpurpose> 13324 stop all queues 13325 </refpurpose> 13326</refnamediv> 13327<refsynopsisdiv> 13328 <title>Synopsis</title> 13329 <funcsynopsis><funcprototype> 13330 <funcdef>void <function>ieee80211_stop_queues </function></funcdef> 13331 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 13332 </funcprototype></funcsynopsis> 13333</refsynopsisdiv> 13334<refsect1> 13335 <title>Arguments</title> 13336 <variablelist> 13337 <varlistentry> 13338 <term><parameter>hw</parameter></term> 13339 <listitem> 13340 <para> 13341 pointer as obtained from <function>ieee80211_alloc_hw</function>. 13342 </para> 13343 </listitem> 13344 </varlistentry> 13345 </variablelist> 13346</refsect1> 13347<refsect1> 13348<title>Description</title> 13349<para> 13350 Drivers should use this function instead of netif_stop_queue. 13351</para> 13352</refsect1> 13353</refentry> 13354 13355<refentry id="API-ieee80211-queue-stopped"> 13356<refentryinfo> 13357 <title>LINUX</title> 13358 <productname>Kernel Hackers Manual</productname> 13359 <date>July 2017</date> 13360</refentryinfo> 13361<refmeta> 13362 <refentrytitle><phrase>ieee80211_queue_stopped</phrase></refentrytitle> 13363 <manvolnum>9</manvolnum> 13364 <refmiscinfo class="version">4.1.27</refmiscinfo> 13365</refmeta> 13366<refnamediv> 13367 <refname>ieee80211_queue_stopped</refname> 13368 <refpurpose> 13369 test status of the queue 13370 </refpurpose> 13371</refnamediv> 13372<refsynopsisdiv> 13373 <title>Synopsis</title> 13374 <funcsynopsis><funcprototype> 13375 <funcdef>int <function>ieee80211_queue_stopped </function></funcdef> 13376 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 13377 <paramdef>int <parameter>queue</parameter></paramdef> 13378 </funcprototype></funcsynopsis> 13379</refsynopsisdiv> 13380<refsect1> 13381 <title>Arguments</title> 13382 <variablelist> 13383 <varlistentry> 13384 <term><parameter>hw</parameter></term> 13385 <listitem> 13386 <para> 13387 pointer as obtained from <function>ieee80211_alloc_hw</function>. 13388 </para> 13389 </listitem> 13390 </varlistentry> 13391 <varlistentry> 13392 <term><parameter>queue</parameter></term> 13393 <listitem> 13394 <para> 13395 queue number (counted from zero). 13396 </para> 13397 </listitem> 13398 </varlistentry> 13399 </variablelist> 13400</refsect1> 13401<refsect1> 13402<title>Description</title> 13403<para> 13404 Drivers should use this function instead of netif_stop_queue. 13405</para> 13406</refsect1> 13407<refsect1> 13408<title>Return</title> 13409<para> 13410 <constant>true</constant> if the queue is stopped. <constant>false</constant> otherwise. 13411</para> 13412</refsect1> 13413</refentry> 13414 13415 </sect1> 13416 </chapter> 13417 13418 <chapter id="filters"> 13419 <title>Frame filtering</title> 13420<para> 13421 </para><para> 13422 mac80211 requires to see many management frames for proper 13423 operation, and users may want to see many more frames when 13424 in monitor mode. However, for best CPU usage and power consumption, 13425 having as few frames as possible percolate through the stack is 13426 desirable. Hence, the hardware should filter as much as possible. 13427 </para><para> 13428 To achieve this, mac80211 uses filter flags (see below) to tell 13429 the driver's <function>configure_filter</function> function which frames should be 13430 passed to mac80211 and which should be filtered out. 13431 </para><para> 13432 Before <function>configure_filter</function> is invoked, the <function>prepare_multicast</function> 13433 callback is invoked with the parameters <parameter>mc_count</parameter> and <parameter>mc_list</parameter> 13434 for the combined multicast address list of all virtual interfaces. 13435 It's use is optional, and it returns a u64 that is passed to 13436 <function>configure_filter</function>. Additionally, <function>configure_filter</function> has the 13437 arguments <parameter>changed_flags</parameter> telling which flags were changed and 13438 <parameter>total_flags</parameter> with the new flag states. 13439 </para><para> 13440 If your device has no multicast address filters your driver will 13441 need to check both the <constant>FIF_ALLMULTI</constant> flag and the <parameter>mc_count</parameter> 13442 parameter to see whether multicast frames should be accepted 13443 or dropped. 13444 </para><para> 13445 All unsupported flags in <parameter>total_flags</parameter> must be cleared. 13446 Hardware does not support a flag if it is incapable of _passing_ 13447 the frame to the stack. Otherwise the driver must ignore 13448 the flag, but not clear it. 13449 You must _only_ clear the flag (announce no support for the 13450 flag to mac80211) if you are not able to pass the packet type 13451 to the stack (so the hardware always filters it). 13452 So for example, you should clear <parameter>FIF_CONTROL</parameter>, if your hardware 13453 always filters control frames. If your hardware always passes 13454 control frames to the kernel and is incapable of filtering them, 13455 you do _not_ clear the <parameter>FIF_CONTROL</parameter> flag. 13456 This rule applies to all other FIF flags as well. 13457</para> 13458 13459<refentry id="API-enum-ieee80211-filter-flags"> 13460<refentryinfo> 13461 <title>LINUX</title> 13462 <productname>Kernel Hackers Manual</productname> 13463 <date>July 2017</date> 13464</refentryinfo> 13465<refmeta> 13466 <refentrytitle><phrase>enum ieee80211_filter_flags</phrase></refentrytitle> 13467 <manvolnum>9</manvolnum> 13468 <refmiscinfo class="version">4.1.27</refmiscinfo> 13469</refmeta> 13470<refnamediv> 13471 <refname>enum ieee80211_filter_flags</refname> 13472 <refpurpose> 13473 hardware filter flags 13474 </refpurpose> 13475</refnamediv> 13476<refsynopsisdiv> 13477 <title>Synopsis</title> 13478 <programlisting> 13479enum ieee80211_filter_flags { 13480 FIF_PROMISC_IN_BSS, 13481 FIF_ALLMULTI, 13482 FIF_FCSFAIL, 13483 FIF_PLCPFAIL, 13484 FIF_BCN_PRBRESP_PROMISC, 13485 FIF_CONTROL, 13486 FIF_OTHER_BSS, 13487 FIF_PSPOLL, 13488 FIF_PROBE_REQ 13489}; </programlisting> 13490</refsynopsisdiv> 13491<refsect1> 13492 <title>Constants</title> 13493 <variablelist> 13494 <varlistentry> <term>FIF_PROMISC_IN_BSS</term> 13495 <listitem><para> 13496promiscuous mode within your BSS, 13497think of the BSS as your network segment and then this corresponds 13498to the regular ethernet device promiscuous mode. 13499 </para></listitem> 13500 </varlistentry> 13501 <varlistentry> <term>FIF_ALLMULTI</term> 13502 <listitem><para> 13503pass all multicast frames, this is used if requested 13504by the user or if the hardware is not capable of filtering by 13505multicast address. 13506 </para></listitem> 13507 </varlistentry> 13508 <varlistentry> <term>FIF_FCSFAIL</term> 13509 <listitem><para> 13510pass frames with failed FCS (but you need to set the 13511<constant>RX_FLAG_FAILED_FCS_CRC</constant> for them) 13512 </para></listitem> 13513 </varlistentry> 13514 <varlistentry> <term>FIF_PLCPFAIL</term> 13515 <listitem><para> 13516pass frames with failed PLCP CRC (but you need to set 13517the <constant>RX_FLAG_FAILED_PLCP_CRC</constant> for them 13518 </para></listitem> 13519 </varlistentry> 13520 <varlistentry> <term>FIF_BCN_PRBRESP_PROMISC</term> 13521 <listitem><para> 13522This flag is set during scanning to indicate 13523to the hardware that it should not filter beacons or probe responses 13524by BSSID. Filtering them can greatly reduce the amount of processing 13525mac80211 needs to do and the amount of CPU wakeups, so you should 13526honour this flag if possible. 13527 </para></listitem> 13528 </varlistentry> 13529 <varlistentry> <term>FIF_CONTROL</term> 13530 <listitem><para> 13531pass control frames (except for PS Poll), if PROMISC_IN_BSS 13532is not set then only those addressed to this station. 13533 </para></listitem> 13534 </varlistentry> 13535 <varlistentry> <term>FIF_OTHER_BSS</term> 13536 <listitem><para> 13537pass frames destined to other BSSes 13538 </para></listitem> 13539 </varlistentry> 13540 <varlistentry> <term>FIF_PSPOLL</term> 13541 <listitem><para> 13542pass PS Poll frames, if PROMISC_IN_BSS is not set then only 13543those addressed to this station. 13544 </para></listitem> 13545 </varlistentry> 13546 <varlistentry> <term>FIF_PROBE_REQ</term> 13547 <listitem><para> 13548pass probe request frames 13549 </para></listitem> 13550 </varlistentry> 13551 </variablelist> 13552</refsect1> 13553<refsect1> 13554<title>HW queue control</title> 13555<para> 13556 </para><para> 13557 13558 These flags determine what the filter in hardware should be 13559 programmed to let through and what should not be passed to the 13560 stack. It is always safe to pass more frames than requested, 13561 but this has negative impact on power consumption. 13562</para> 13563</refsect1> 13564</refentry> 13565 13566 </chapter> 13567 13568 <chapter id="workqueue"> 13569 <title>The mac80211 workqueue</title> 13570<para> 13571 </para><para> 13572 mac80211 provides its own workqueue for drivers and internal mac80211 use. 13573 The workqueue is a single threaded workqueue and can only be accessed by 13574 helpers for sanity checking. Drivers must ensure all work added onto the 13575 mac80211 workqueue should be cancelled on the driver <function>stop</function> callback. 13576 </para><para> 13577 mac80211 will flushed the workqueue upon interface removal and during 13578 suspend. 13579 </para><para> 13580 All work performed on the mac80211 workqueue must not acquire the RTNL lock. 13581 </para><para> 13582</para> 13583 13584<refentry id="API-ieee80211-queue-work"> 13585<refentryinfo> 13586 <title>LINUX</title> 13587 <productname>Kernel Hackers Manual</productname> 13588 <date>July 2017</date> 13589</refentryinfo> 13590<refmeta> 13591 <refentrytitle><phrase>ieee80211_queue_work</phrase></refentrytitle> 13592 <manvolnum>9</manvolnum> 13593 <refmiscinfo class="version">4.1.27</refmiscinfo> 13594</refmeta> 13595<refnamediv> 13596 <refname>ieee80211_queue_work</refname> 13597 <refpurpose> 13598 add work onto the mac80211 workqueue 13599 </refpurpose> 13600</refnamediv> 13601<refsynopsisdiv> 13602 <title>Synopsis</title> 13603 <funcsynopsis><funcprototype> 13604 <funcdef>void <function>ieee80211_queue_work </function></funcdef> 13605 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 13606 <paramdef>struct work_struct * <parameter>work</parameter></paramdef> 13607 </funcprototype></funcsynopsis> 13608</refsynopsisdiv> 13609<refsect1> 13610 <title>Arguments</title> 13611 <variablelist> 13612 <varlistentry> 13613 <term><parameter>hw</parameter></term> 13614 <listitem> 13615 <para> 13616 the hardware struct for the interface we are adding work for 13617 </para> 13618 </listitem> 13619 </varlistentry> 13620 <varlistentry> 13621 <term><parameter>work</parameter></term> 13622 <listitem> 13623 <para> 13624 the work we want to add onto the mac80211 workqueue 13625 </para> 13626 </listitem> 13627 </varlistentry> 13628 </variablelist> 13629</refsect1> 13630<refsect1> 13631<title>Description</title> 13632<para> 13633 </para><para> 13634 13635 Drivers and mac80211 use this to add work onto the mac80211 workqueue. 13636 This helper ensures drivers are not queueing work when they should not be. 13637</para> 13638</refsect1> 13639</refentry> 13640 13641<refentry id="API-ieee80211-queue-delayed-work"> 13642<refentryinfo> 13643 <title>LINUX</title> 13644 <productname>Kernel Hackers Manual</productname> 13645 <date>July 2017</date> 13646</refentryinfo> 13647<refmeta> 13648 <refentrytitle><phrase>ieee80211_queue_delayed_work</phrase></refentrytitle> 13649 <manvolnum>9</manvolnum> 13650 <refmiscinfo class="version">4.1.27</refmiscinfo> 13651</refmeta> 13652<refnamediv> 13653 <refname>ieee80211_queue_delayed_work</refname> 13654 <refpurpose> 13655 add work onto the mac80211 workqueue 13656 </refpurpose> 13657</refnamediv> 13658<refsynopsisdiv> 13659 <title>Synopsis</title> 13660 <funcsynopsis><funcprototype> 13661 <funcdef>void <function>ieee80211_queue_delayed_work </function></funcdef> 13662 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 13663 <paramdef>struct delayed_work * <parameter>dwork</parameter></paramdef> 13664 <paramdef>unsigned long <parameter>delay</parameter></paramdef> 13665 </funcprototype></funcsynopsis> 13666</refsynopsisdiv> 13667<refsect1> 13668 <title>Arguments</title> 13669 <variablelist> 13670 <varlistentry> 13671 <term><parameter>hw</parameter></term> 13672 <listitem> 13673 <para> 13674 the hardware struct for the interface we are adding work for 13675 </para> 13676 </listitem> 13677 </varlistentry> 13678 <varlistentry> 13679 <term><parameter>dwork</parameter></term> 13680 <listitem> 13681 <para> 13682 delayable work to queue onto the mac80211 workqueue 13683 </para> 13684 </listitem> 13685 </varlistentry> 13686 <varlistentry> 13687 <term><parameter>delay</parameter></term> 13688 <listitem> 13689 <para> 13690 number of jiffies to wait before queueing 13691 </para> 13692 </listitem> 13693 </varlistentry> 13694 </variablelist> 13695</refsect1> 13696<refsect1> 13697<title>Description</title> 13698<para> 13699 </para><para> 13700 13701 Drivers and mac80211 use this to queue delayed work onto the mac80211 13702 workqueue. 13703</para> 13704</refsect1> 13705</refentry> 13706 13707 </chapter> 13708 </part> 13709 13710 <part id="advanced"> 13711 <title>Advanced driver interface</title> 13712 <partintro> 13713 <para> 13714 Information contained within this part of the book is 13715 of interest only for advanced interaction of mac80211 13716 with drivers to exploit more hardware capabilities and 13717 improve performance. 13718 </para> 13719 </partintro> 13720 13721 <chapter id="led-support"> 13722 <title>LED support</title> 13723 <para> 13724 Mac80211 supports various ways of blinking LEDs. Wherever possible, 13725 device LEDs should be exposed as LED class devices and hooked up to 13726 the appropriate trigger, which will then be triggered appropriately 13727 by mac80211. 13728 </para> 13729<refentry id="API-ieee80211-get-tx-led-name"> 13730<refentryinfo> 13731 <title>LINUX</title> 13732 <productname>Kernel Hackers Manual</productname> 13733 <date>July 2017</date> 13734</refentryinfo> 13735<refmeta> 13736 <refentrytitle><phrase>ieee80211_get_tx_led_name</phrase></refentrytitle> 13737 <manvolnum>9</manvolnum> 13738 <refmiscinfo class="version">4.1.27</refmiscinfo> 13739</refmeta> 13740<refnamediv> 13741 <refname>ieee80211_get_tx_led_name</refname> 13742 <refpurpose> 13743 get name of TX LED 13744 </refpurpose> 13745</refnamediv> 13746<refsynopsisdiv> 13747 <title>Synopsis</title> 13748 <funcsynopsis><funcprototype> 13749 <funcdef>char * <function>ieee80211_get_tx_led_name </function></funcdef> 13750 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 13751 </funcprototype></funcsynopsis> 13752</refsynopsisdiv> 13753<refsect1> 13754 <title>Arguments</title> 13755 <variablelist> 13756 <varlistentry> 13757 <term><parameter>hw</parameter></term> 13758 <listitem> 13759 <para> 13760 the hardware to get the LED trigger name for 13761 </para> 13762 </listitem> 13763 </varlistentry> 13764 </variablelist> 13765</refsect1> 13766<refsect1> 13767<title>Description</title> 13768<para> 13769 </para><para> 13770 13771 mac80211 creates a transmit LED trigger for each wireless hardware 13772 that can be used to drive LEDs if your driver registers a LED device. 13773 This function returns the name (or <constant>NULL</constant> if not configured for LEDs) 13774 of the trigger so you can automatically link the LED device. 13775</para> 13776</refsect1> 13777<refsect1> 13778<title>Return</title> 13779<para> 13780 The name of the LED trigger. <constant>NULL</constant> if not configured for LEDs. 13781</para> 13782</refsect1> 13783</refentry> 13784 13785<refentry id="API-ieee80211-get-rx-led-name"> 13786<refentryinfo> 13787 <title>LINUX</title> 13788 <productname>Kernel Hackers Manual</productname> 13789 <date>July 2017</date> 13790</refentryinfo> 13791<refmeta> 13792 <refentrytitle><phrase>ieee80211_get_rx_led_name</phrase></refentrytitle> 13793 <manvolnum>9</manvolnum> 13794 <refmiscinfo class="version">4.1.27</refmiscinfo> 13795</refmeta> 13796<refnamediv> 13797 <refname>ieee80211_get_rx_led_name</refname> 13798 <refpurpose> 13799 get name of RX LED 13800 </refpurpose> 13801</refnamediv> 13802<refsynopsisdiv> 13803 <title>Synopsis</title> 13804 <funcsynopsis><funcprototype> 13805 <funcdef>char * <function>ieee80211_get_rx_led_name </function></funcdef> 13806 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 13807 </funcprototype></funcsynopsis> 13808</refsynopsisdiv> 13809<refsect1> 13810 <title>Arguments</title> 13811 <variablelist> 13812 <varlistentry> 13813 <term><parameter>hw</parameter></term> 13814 <listitem> 13815 <para> 13816 the hardware to get the LED trigger name for 13817 </para> 13818 </listitem> 13819 </varlistentry> 13820 </variablelist> 13821</refsect1> 13822<refsect1> 13823<title>Description</title> 13824<para> 13825 </para><para> 13826 13827 mac80211 creates a receive LED trigger for each wireless hardware 13828 that can be used to drive LEDs if your driver registers a LED device. 13829 This function returns the name (or <constant>NULL</constant> if not configured for LEDs) 13830 of the trigger so you can automatically link the LED device. 13831</para> 13832</refsect1> 13833<refsect1> 13834<title>Return</title> 13835<para> 13836 The name of the LED trigger. <constant>NULL</constant> if not configured for LEDs. 13837</para> 13838</refsect1> 13839</refentry> 13840 13841<refentry id="API-ieee80211-get-assoc-led-name"> 13842<refentryinfo> 13843 <title>LINUX</title> 13844 <productname>Kernel Hackers Manual</productname> 13845 <date>July 2017</date> 13846</refentryinfo> 13847<refmeta> 13848 <refentrytitle><phrase>ieee80211_get_assoc_led_name</phrase></refentrytitle> 13849 <manvolnum>9</manvolnum> 13850 <refmiscinfo class="version">4.1.27</refmiscinfo> 13851</refmeta> 13852<refnamediv> 13853 <refname>ieee80211_get_assoc_led_name</refname> 13854 <refpurpose> 13855 get name of association LED 13856 </refpurpose> 13857</refnamediv> 13858<refsynopsisdiv> 13859 <title>Synopsis</title> 13860 <funcsynopsis><funcprototype> 13861 <funcdef>char * <function>ieee80211_get_assoc_led_name </function></funcdef> 13862 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 13863 </funcprototype></funcsynopsis> 13864</refsynopsisdiv> 13865<refsect1> 13866 <title>Arguments</title> 13867 <variablelist> 13868 <varlistentry> 13869 <term><parameter>hw</parameter></term> 13870 <listitem> 13871 <para> 13872 the hardware to get the LED trigger name for 13873 </para> 13874 </listitem> 13875 </varlistentry> 13876 </variablelist> 13877</refsect1> 13878<refsect1> 13879<title>Description</title> 13880<para> 13881 </para><para> 13882 13883 mac80211 creates a association LED trigger for each wireless hardware 13884 that can be used to drive LEDs if your driver registers a LED device. 13885 This function returns the name (or <constant>NULL</constant> if not configured for LEDs) 13886 of the trigger so you can automatically link the LED device. 13887</para> 13888</refsect1> 13889<refsect1> 13890<title>Return</title> 13891<para> 13892 The name of the LED trigger. <constant>NULL</constant> if not configured for LEDs. 13893</para> 13894</refsect1> 13895</refentry> 13896 13897<refentry id="API-ieee80211-get-radio-led-name"> 13898<refentryinfo> 13899 <title>LINUX</title> 13900 <productname>Kernel Hackers Manual</productname> 13901 <date>July 2017</date> 13902</refentryinfo> 13903<refmeta> 13904 <refentrytitle><phrase>ieee80211_get_radio_led_name</phrase></refentrytitle> 13905 <manvolnum>9</manvolnum> 13906 <refmiscinfo class="version">4.1.27</refmiscinfo> 13907</refmeta> 13908<refnamediv> 13909 <refname>ieee80211_get_radio_led_name</refname> 13910 <refpurpose> 13911 get name of radio LED 13912 </refpurpose> 13913</refnamediv> 13914<refsynopsisdiv> 13915 <title>Synopsis</title> 13916 <funcsynopsis><funcprototype> 13917 <funcdef>char * <function>ieee80211_get_radio_led_name </function></funcdef> 13918 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 13919 </funcprototype></funcsynopsis> 13920</refsynopsisdiv> 13921<refsect1> 13922 <title>Arguments</title> 13923 <variablelist> 13924 <varlistentry> 13925 <term><parameter>hw</parameter></term> 13926 <listitem> 13927 <para> 13928 the hardware to get the LED trigger name for 13929 </para> 13930 </listitem> 13931 </varlistentry> 13932 </variablelist> 13933</refsect1> 13934<refsect1> 13935<title>Description</title> 13936<para> 13937 </para><para> 13938 13939 mac80211 creates a radio change LED trigger for each wireless hardware 13940 that can be used to drive LEDs if your driver registers a LED device. 13941 This function returns the name (or <constant>NULL</constant> if not configured for LEDs) 13942 of the trigger so you can automatically link the LED device. 13943</para> 13944</refsect1> 13945<refsect1> 13946<title>Return</title> 13947<para> 13948 The name of the LED trigger. <constant>NULL</constant> if not configured for LEDs. 13949</para> 13950</refsect1> 13951</refentry> 13952 13953<refentry id="API-struct-ieee80211-tpt-blink"> 13954<refentryinfo> 13955 <title>LINUX</title> 13956 <productname>Kernel Hackers Manual</productname> 13957 <date>July 2017</date> 13958</refentryinfo> 13959<refmeta> 13960 <refentrytitle><phrase>struct ieee80211_tpt_blink</phrase></refentrytitle> 13961 <manvolnum>9</manvolnum> 13962 <refmiscinfo class="version">4.1.27</refmiscinfo> 13963</refmeta> 13964<refnamediv> 13965 <refname>struct ieee80211_tpt_blink</refname> 13966 <refpurpose> 13967 throughput blink description 13968 </refpurpose> 13969</refnamediv> 13970<refsynopsisdiv> 13971 <title>Synopsis</title> 13972 <programlisting> 13973struct ieee80211_tpt_blink { 13974 int throughput; 13975 int blink_time; 13976}; </programlisting> 13977</refsynopsisdiv> 13978 <refsect1> 13979 <title>Members</title> 13980 <variablelist> 13981 <varlistentry> <term>throughput</term> 13982 <listitem><para> 13983throughput in Kbit/sec 13984 </para></listitem> 13985 </varlistentry> 13986 <varlistentry> <term>blink_time</term> 13987 <listitem><para> 13988blink time in milliseconds 13989(full cycle, ie. one off + one on period) 13990 </para></listitem> 13991 </varlistentry> 13992 </variablelist> 13993 </refsect1> 13994</refentry> 13995 13996<refentry id="API-enum-ieee80211-tpt-led-trigger-flags"> 13997<refentryinfo> 13998 <title>LINUX</title> 13999 <productname>Kernel Hackers Manual</productname> 14000 <date>July 2017</date> 14001</refentryinfo> 14002<refmeta> 14003 <refentrytitle><phrase>enum ieee80211_tpt_led_trigger_flags</phrase></refentrytitle> 14004 <manvolnum>9</manvolnum> 14005 <refmiscinfo class="version">4.1.27</refmiscinfo> 14006</refmeta> 14007<refnamediv> 14008 <refname>enum ieee80211_tpt_led_trigger_flags</refname> 14009 <refpurpose> 14010 throughput trigger flags 14011 </refpurpose> 14012</refnamediv> 14013<refsynopsisdiv> 14014 <title>Synopsis</title> 14015 <programlisting> 14016enum ieee80211_tpt_led_trigger_flags { 14017 IEEE80211_TPT_LEDTRIG_FL_RADIO, 14018 IEEE80211_TPT_LEDTRIG_FL_WORK, 14019 IEEE80211_TPT_LEDTRIG_FL_CONNECTED 14020}; </programlisting> 14021</refsynopsisdiv> 14022<refsect1> 14023 <title>Constants</title> 14024 <variablelist> 14025 <varlistentry> <term>IEEE80211_TPT_LEDTRIG_FL_RADIO</term> 14026 <listitem><para> 14027enable blinking with radio 14028 </para></listitem> 14029 </varlistentry> 14030 <varlistentry> <term>IEEE80211_TPT_LEDTRIG_FL_WORK</term> 14031 <listitem><para> 14032enable blinking when working 14033 </para></listitem> 14034 </varlistentry> 14035 <varlistentry> <term>IEEE80211_TPT_LEDTRIG_FL_CONNECTED</term> 14036 <listitem><para> 14037enable blinking when at least one 14038interface is connected in some way, including being an AP 14039 </para></listitem> 14040 </varlistentry> 14041 </variablelist> 14042</refsect1> 14043</refentry> 14044 14045<refentry id="API-ieee80211-create-tpt-led-trigger"> 14046<refentryinfo> 14047 <title>LINUX</title> 14048 <productname>Kernel Hackers Manual</productname> 14049 <date>July 2017</date> 14050</refentryinfo> 14051<refmeta> 14052 <refentrytitle><phrase>ieee80211_create_tpt_led_trigger</phrase></refentrytitle> 14053 <manvolnum>9</manvolnum> 14054 <refmiscinfo class="version">4.1.27</refmiscinfo> 14055</refmeta> 14056<refnamediv> 14057 <refname>ieee80211_create_tpt_led_trigger</refname> 14058 <refpurpose> 14059 create throughput LED trigger 14060 </refpurpose> 14061</refnamediv> 14062<refsynopsisdiv> 14063 <title>Synopsis</title> 14064 <funcsynopsis><funcprototype> 14065 <funcdef>char * <function>ieee80211_create_tpt_led_trigger </function></funcdef> 14066 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 14067 <paramdef>unsigned int <parameter>flags</parameter></paramdef> 14068 <paramdef>const struct ieee80211_tpt_blink * <parameter>blink_table</parameter></paramdef> 14069 <paramdef>unsigned int <parameter>blink_table_len</parameter></paramdef> 14070 </funcprototype></funcsynopsis> 14071</refsynopsisdiv> 14072<refsect1> 14073 <title>Arguments</title> 14074 <variablelist> 14075 <varlistentry> 14076 <term><parameter>hw</parameter></term> 14077 <listitem> 14078 <para> 14079 the hardware to create the trigger for 14080 </para> 14081 </listitem> 14082 </varlistentry> 14083 <varlistentry> 14084 <term><parameter>flags</parameter></term> 14085 <listitem> 14086 <para> 14087 trigger flags, see <structname>enum</structname> ieee80211_tpt_led_trigger_flags 14088 </para> 14089 </listitem> 14090 </varlistentry> 14091 <varlistentry> 14092 <term><parameter>blink_table</parameter></term> 14093 <listitem> 14094 <para> 14095 the blink table -- needs to be ordered by throughput 14096 </para> 14097 </listitem> 14098 </varlistentry> 14099 <varlistentry> 14100 <term><parameter>blink_table_len</parameter></term> 14101 <listitem> 14102 <para> 14103 size of the blink table 14104 </para> 14105 </listitem> 14106 </varlistentry> 14107 </variablelist> 14108</refsect1> 14109<refsect1> 14110<title>Return</title> 14111<para> 14112 <constant>NULL</constant> (in case of error, or if no LED triggers are 14113 configured) or the name of the new trigger. 14114</para> 14115</refsect1> 14116<refsect1> 14117<title>Note</title> 14118<para> 14119 This function must be called before <function>ieee80211_register_hw</function>. 14120</para> 14121</refsect1> 14122</refentry> 14123 14124 </chapter> 14125 14126 <chapter id="hardware-crypto-offload"> 14127 <title>Hardware crypto acceleration</title> 14128<para> 14129 </para><para> 14130 mac80211 is capable of taking advantage of many hardware 14131 acceleration designs for encryption and decryption operations. 14132 </para><para> 14133 The <function>set_key</function> callback in the <structname>struct ieee80211_ops</structname> for a given 14134 device is called to enable hardware acceleration of encryption and 14135 decryption. The callback takes a <parameter>sta</parameter> parameter that will be NULL 14136 for default keys or keys used for transmission only, or point to 14137 the station information for the peer for individual keys. 14138 Multiple transmission keys with the same key index may be used when 14139 VLANs are configured for an access point. 14140 </para><para> 14141 When transmitting, the TX control data will use the <parameter>hw_key_idx</parameter> 14142 selected by the driver by modifying the <structname>struct ieee80211_key_conf</structname> 14143 pointed to by the <parameter>key</parameter> parameter to the <function>set_key</function> function. 14144 </para><para> 14145 The <function>set_key</function> call for the <constant>SET_KEY</constant> command should return 0 if 14146 the key is now in use, -<constant>EOPNOTSUPP</constant> or -<constant>ENOSPC</constant> if it couldn't be 14147 added; if you return 0 then hw_key_idx must be assigned to the 14148 hardware key index, you are free to use the full u8 range. 14149 </para><para> 14150 Note that in the case that the <parameter>IEEE80211_HW_SW_CRYPTO_CONTROL</parameter> flag is 14151 set, mac80211 will not automatically fall back to software crypto if 14152 enabling hardware crypto failed. The <function>set_key</function> call may also return the 14153 value 1 to permit this specific key/algorithm to be done in software. 14154 </para><para> 14155 When the cmd is <constant>DISABLE_KEY</constant> then it must succeed. 14156 </para><para> 14157 Note that it is permissible to not decrypt a frame even if a key 14158 for it has been uploaded to hardware, the stack will not make any 14159 decision based on whether a key has been uploaded or not but rather 14160 based on the receive flags. 14161 </para><para> 14162 The <structname>struct ieee80211_key_conf</structname> structure pointed to by the <parameter>key</parameter> 14163 parameter is guaranteed to be valid until another call to <function>set_key</function> 14164 removes it, but it can only be used as a cookie to differentiate 14165 keys. 14166 </para><para> 14167 In TKIP some HW need to be provided a phase 1 key, for RX decryption 14168 acceleration (i.e. iwlwifi). Those drivers should provide update_tkip_key 14169 handler. 14170 The <function>update_tkip_key</function> call updates the driver with the new phase 1 key. 14171 This happens every time the iv16 wraps around (every 65536 packets). The 14172 <function>set_key</function> call will happen only once for each key (unless the AP did 14173 rekeying), it will not include a valid phase 1 key. The valid phase 1 key is 14174 provided by update_tkip_key only. The trigger that makes mac80211 call this 14175 handler is software decryption with wrap around of iv16. 14176 </para><para> 14177 The <function>set_default_unicast_key</function> call updates the default WEP key index 14178 configured to the hardware for WEP encryption type. This is required 14179 for devices that support offload of data packets (e.g. ARP responses). 14180</para> 14181 14182 <!-- intentionally multiple !F lines to get proper order --> 14183<refentry id="API-enum-set-key-cmd"> 14184<refentryinfo> 14185 <title>LINUX</title> 14186 <productname>Kernel Hackers Manual</productname> 14187 <date>July 2017</date> 14188</refentryinfo> 14189<refmeta> 14190 <refentrytitle><phrase>enum set_key_cmd</phrase></refentrytitle> 14191 <manvolnum>9</manvolnum> 14192 <refmiscinfo class="version">4.1.27</refmiscinfo> 14193</refmeta> 14194<refnamediv> 14195 <refname>enum set_key_cmd</refname> 14196 <refpurpose> 14197 key command 14198 </refpurpose> 14199</refnamediv> 14200<refsynopsisdiv> 14201 <title>Synopsis</title> 14202 <programlisting> 14203enum set_key_cmd { 14204 SET_KEY, 14205 DISABLE_KEY 14206}; </programlisting> 14207</refsynopsisdiv> 14208<refsect1> 14209 <title>Constants</title> 14210 <variablelist> 14211 <varlistentry> <term>SET_KEY</term> 14212 <listitem><para> 14213a key is set 14214 </para></listitem> 14215 </varlistentry> 14216 <varlistentry> <term>DISABLE_KEY</term> 14217 <listitem><para> 14218a key must be disabled 14219 </para></listitem> 14220 </varlistentry> 14221 </variablelist> 14222</refsect1> 14223<refsect1> 14224<title>Description</title> 14225<para> 14226 </para><para> 14227 14228 Used with the <function>set_key</function> callback in <structname>struct ieee80211_ops</structname>, this 14229 indicates whether a key is being removed or added. 14230</para> 14231</refsect1> 14232</refentry> 14233 14234<refentry id="API-struct-ieee80211-key-conf"> 14235<refentryinfo> 14236 <title>LINUX</title> 14237 <productname>Kernel Hackers Manual</productname> 14238 <date>July 2017</date> 14239</refentryinfo> 14240<refmeta> 14241 <refentrytitle><phrase>struct ieee80211_key_conf</phrase></refentrytitle> 14242 <manvolnum>9</manvolnum> 14243 <refmiscinfo class="version">4.1.27</refmiscinfo> 14244</refmeta> 14245<refnamediv> 14246 <refname>struct ieee80211_key_conf</refname> 14247 <refpurpose> 14248 key information 14249 </refpurpose> 14250</refnamediv> 14251<refsynopsisdiv> 14252 <title>Synopsis</title> 14253 <programlisting> 14254struct ieee80211_key_conf { 14255 u32 cipher; 14256 u8 icv_len; 14257 u8 iv_len; 14258 u8 hw_key_idx; 14259 u8 flags; 14260 s8 keyidx; 14261 u8 keylen; 14262 u8 key[0]; 14263}; </programlisting> 14264</refsynopsisdiv> 14265 <refsect1> 14266 <title>Members</title> 14267 <variablelist> 14268 <varlistentry> <term>cipher</term> 14269 <listitem><para> 14270The key's cipher suite selector. 14271 </para></listitem> 14272 </varlistentry> 14273 <varlistentry> <term>icv_len</term> 14274 <listitem><para> 14275The ICV length for this key type 14276 </para></listitem> 14277 </varlistentry> 14278 <varlistentry> <term>iv_len</term> 14279 <listitem><para> 14280The IV length for this key type 14281 </para></listitem> 14282 </varlistentry> 14283 <varlistentry> <term>hw_key_idx</term> 14284 <listitem><para> 14285To be set by the driver, this is the key index the driver 14286wants to be given when a frame is transmitted and needs to be 14287encrypted in hardware. 14288 </para></listitem> 14289 </varlistentry> 14290 <varlistentry> <term>flags</term> 14291 <listitem><para> 14292key flags, see <structname>enum</structname> ieee80211_key_flags. 14293 </para></listitem> 14294 </varlistentry> 14295 <varlistentry> <term>keyidx</term> 14296 <listitem><para> 14297the key index (0-3) 14298 </para></listitem> 14299 </varlistentry> 14300 <varlistentry> <term>keylen</term> 14301 <listitem><para> 14302key material length 14303 </para></listitem> 14304 </varlistentry> 14305 <varlistentry> <term>key[0]</term> 14306 <listitem><para> 14307key material. For ALG_TKIP the key is encoded as a 256-bit (32 byte) 14308 </para></listitem> 14309 </varlistentry> 14310 </variablelist> 14311 </refsect1> 14312<refsect1> 14313<title>Description</title> 14314<para> 14315 </para><para> 14316 14317 This key information is given by mac80211 to the driver by 14318 the <function>set_key</function> callback in <structname>struct ieee80211_ops</structname>. 14319</para> 14320</refsect1> 14321<refsect1> 14322<title>data block</title> 14323<para> 14324 - Temporal Encryption Key (128 bits) 14325 - Temporal Authenticator Tx MIC Key (64 bits) 14326 - Temporal Authenticator Rx MIC Key (64 bits) 14327</para> 14328</refsect1> 14329</refentry> 14330 14331<refentry id="API-enum-ieee80211-key-flags"> 14332<refentryinfo> 14333 <title>LINUX</title> 14334 <productname>Kernel Hackers Manual</productname> 14335 <date>July 2017</date> 14336</refentryinfo> 14337<refmeta> 14338 <refentrytitle><phrase>enum ieee80211_key_flags</phrase></refentrytitle> 14339 <manvolnum>9</manvolnum> 14340 <refmiscinfo class="version">4.1.27</refmiscinfo> 14341</refmeta> 14342<refnamediv> 14343 <refname>enum ieee80211_key_flags</refname> 14344 <refpurpose> 14345 key flags 14346 </refpurpose> 14347</refnamediv> 14348<refsynopsisdiv> 14349 <title>Synopsis</title> 14350 <programlisting> 14351enum ieee80211_key_flags { 14352 IEEE80211_KEY_FLAG_GENERATE_IV_MGMT, 14353 IEEE80211_KEY_FLAG_GENERATE_IV, 14354 IEEE80211_KEY_FLAG_GENERATE_MMIC, 14355 IEEE80211_KEY_FLAG_PAIRWISE, 14356 IEEE80211_KEY_FLAG_SW_MGMT_TX, 14357 IEEE80211_KEY_FLAG_PUT_IV_SPACE, 14358 IEEE80211_KEY_FLAG_RX_MGMT, 14359 IEEE80211_KEY_FLAG_RESERVE_TAILROOM 14360}; </programlisting> 14361</refsynopsisdiv> 14362<refsect1> 14363 <title>Constants</title> 14364 <variablelist> 14365 <varlistentry> <term>IEEE80211_KEY_FLAG_GENERATE_IV_MGMT</term> 14366 <listitem><para> 14367This flag should be set by the 14368driver for a CCMP/GCMP key to indicate that is requires IV generation 14369only for managment frames (MFP). 14370 </para></listitem> 14371 </varlistentry> 14372 <varlistentry> <term>IEEE80211_KEY_FLAG_GENERATE_IV</term> 14373 <listitem><para> 14374This flag should be set by the 14375driver to indicate that it requires IV generation for this 14376particular key. Setting this flag does not necessarily mean that SKBs 14377will have sufficient tailroom for ICV or MIC. 14378 </para></listitem> 14379 </varlistentry> 14380 <varlistentry> <term>IEEE80211_KEY_FLAG_GENERATE_MMIC</term> 14381 <listitem><para> 14382This flag should be set by 14383the driver for a TKIP key if it requires Michael MIC 14384generation in software. 14385 </para></listitem> 14386 </varlistentry> 14387 <varlistentry> <term>IEEE80211_KEY_FLAG_PAIRWISE</term> 14388 <listitem><para> 14389Set by mac80211, this flag indicates 14390that the key is pairwise rather then a shared key. 14391 </para></listitem> 14392 </varlistentry> 14393 <varlistentry> <term>IEEE80211_KEY_FLAG_SW_MGMT_TX</term> 14394 <listitem><para> 14395This flag should be set by the driver for a 14396CCMP/GCMP key if it requires CCMP/GCMP encryption of management frames 14397(MFP) to be done in software. 14398 </para></listitem> 14399 </varlistentry> 14400 <varlistentry> <term>IEEE80211_KEY_FLAG_PUT_IV_SPACE</term> 14401 <listitem><para> 14402This flag should be set by the driver 14403if space should be prepared for the IV, but the IV 14404itself should not be generated. Do not set together with 14405<parameter>IEEE80211_KEY_FLAG_GENERATE_IV</parameter> on the same key. Setting this flag does 14406not necessarily mean that SKBs will have sufficient tailroom for ICV or 14407MIC. 14408 </para></listitem> 14409 </varlistentry> 14410 <varlistentry> <term>IEEE80211_KEY_FLAG_RX_MGMT</term> 14411 <listitem><para> 14412This key will be used to decrypt received 14413management frames. The flag can help drivers that have a hardware 14414crypto implementation that doesn't deal with management frames 14415properly by allowing them to not upload the keys to hardware and 14416fall back to software crypto. Note that this flag deals only with 14417RX, if your crypto engine can't deal with TX you can also set the 14418<constant>IEEE80211_KEY_FLAG_SW_MGMT_TX</constant> flag to encrypt such frames in SW. 14419 </para></listitem> 14420 </varlistentry> 14421 <varlistentry> <term>IEEE80211_KEY_FLAG_RESERVE_TAILROOM</term> 14422 <listitem><para> 14423This flag should be set by the 14424driver for a key to indicate that sufficient tailroom must always 14425be reserved for ICV or MIC, even when HW encryption is enabled. 14426 </para></listitem> 14427 </varlistentry> 14428 </variablelist> 14429</refsect1> 14430<refsect1> 14431<title>Description</title> 14432<para> 14433 </para><para> 14434 14435 These flags are used for communication about keys between the driver 14436 and mac80211, with the <parameter>flags</parameter> parameter of <structname>struct ieee80211_key_conf</structname>. 14437</para> 14438</refsect1> 14439</refentry> 14440 14441<refentry id="API-ieee80211-get-tkip-p1k"> 14442<refentryinfo> 14443 <title>LINUX</title> 14444 <productname>Kernel Hackers Manual</productname> 14445 <date>July 2017</date> 14446</refentryinfo> 14447<refmeta> 14448 <refentrytitle><phrase>ieee80211_get_tkip_p1k</phrase></refentrytitle> 14449 <manvolnum>9</manvolnum> 14450 <refmiscinfo class="version">4.1.27</refmiscinfo> 14451</refmeta> 14452<refnamediv> 14453 <refname>ieee80211_get_tkip_p1k</refname> 14454 <refpurpose> 14455 get a TKIP phase 1 key 14456 </refpurpose> 14457</refnamediv> 14458<refsynopsisdiv> 14459 <title>Synopsis</title> 14460 <funcsynopsis><funcprototype> 14461 <funcdef>void <function>ieee80211_get_tkip_p1k </function></funcdef> 14462 <paramdef>struct ieee80211_key_conf * <parameter>keyconf</parameter></paramdef> 14463 <paramdef>struct sk_buff * <parameter>skb</parameter></paramdef> 14464 <paramdef>u16 * <parameter>p1k</parameter></paramdef> 14465 </funcprototype></funcsynopsis> 14466</refsynopsisdiv> 14467<refsect1> 14468 <title>Arguments</title> 14469 <variablelist> 14470 <varlistentry> 14471 <term><parameter>keyconf</parameter></term> 14472 <listitem> 14473 <para> 14474 the parameter passed with the set key 14475 </para> 14476 </listitem> 14477 </varlistentry> 14478 <varlistentry> 14479 <term><parameter>skb</parameter></term> 14480 <listitem> 14481 <para> 14482 the packet to take the IV32 value from that will be encrypted 14483 with this P1K 14484 </para> 14485 </listitem> 14486 </varlistentry> 14487 <varlistentry> 14488 <term><parameter>p1k</parameter></term> 14489 <listitem> 14490 <para> 14491 a buffer to which the key will be written, as 5 u16 values 14492 </para> 14493 </listitem> 14494 </varlistentry> 14495 </variablelist> 14496</refsect1> 14497<refsect1> 14498<title>Description</title> 14499<para> 14500 </para><para> 14501 14502 This function returns the TKIP phase 1 key for the IV32 taken 14503 from the given packet. 14504</para> 14505</refsect1> 14506</refentry> 14507 14508<refentry id="API-ieee80211-get-tkip-p1k-iv"> 14509<refentryinfo> 14510 <title>LINUX</title> 14511 <productname>Kernel Hackers Manual</productname> 14512 <date>July 2017</date> 14513</refentryinfo> 14514<refmeta> 14515 <refentrytitle><phrase>ieee80211_get_tkip_p1k_iv</phrase></refentrytitle> 14516 <manvolnum>9</manvolnum> 14517 <refmiscinfo class="version">4.1.27</refmiscinfo> 14518</refmeta> 14519<refnamediv> 14520 <refname>ieee80211_get_tkip_p1k_iv</refname> 14521 <refpurpose> 14522 get a TKIP phase 1 key for IV32 14523 </refpurpose> 14524</refnamediv> 14525<refsynopsisdiv> 14526 <title>Synopsis</title> 14527 <funcsynopsis><funcprototype> 14528 <funcdef>void <function>ieee80211_get_tkip_p1k_iv </function></funcdef> 14529 <paramdef>struct ieee80211_key_conf * <parameter>keyconf</parameter></paramdef> 14530 <paramdef>u32 <parameter>iv32</parameter></paramdef> 14531 <paramdef>u16 * <parameter>p1k</parameter></paramdef> 14532 </funcprototype></funcsynopsis> 14533</refsynopsisdiv> 14534<refsect1> 14535 <title>Arguments</title> 14536 <variablelist> 14537 <varlistentry> 14538 <term><parameter>keyconf</parameter></term> 14539 <listitem> 14540 <para> 14541 the parameter passed with the set key 14542 </para> 14543 </listitem> 14544 </varlistentry> 14545 <varlistentry> 14546 <term><parameter>iv32</parameter></term> 14547 <listitem> 14548 <para> 14549 IV32 to get the P1K for 14550 </para> 14551 </listitem> 14552 </varlistentry> 14553 <varlistentry> 14554 <term><parameter>p1k</parameter></term> 14555 <listitem> 14556 <para> 14557 a buffer to which the key will be written, as 5 u16 values 14558 </para> 14559 </listitem> 14560 </varlistentry> 14561 </variablelist> 14562</refsect1> 14563<refsect1> 14564<title>Description</title> 14565<para> 14566 </para><para> 14567 14568 This function returns the TKIP phase 1 key for the given IV32. 14569</para> 14570</refsect1> 14571</refentry> 14572 14573<refentry id="API-ieee80211-get-tkip-p2k"> 14574<refentryinfo> 14575 <title>LINUX</title> 14576 <productname>Kernel Hackers Manual</productname> 14577 <date>July 2017</date> 14578</refentryinfo> 14579<refmeta> 14580 <refentrytitle><phrase>ieee80211_get_tkip_p2k</phrase></refentrytitle> 14581 <manvolnum>9</manvolnum> 14582 <refmiscinfo class="version">4.1.27</refmiscinfo> 14583</refmeta> 14584<refnamediv> 14585 <refname>ieee80211_get_tkip_p2k</refname> 14586 <refpurpose> 14587 get a TKIP phase 2 key 14588 </refpurpose> 14589</refnamediv> 14590<refsynopsisdiv> 14591 <title>Synopsis</title> 14592 <funcsynopsis><funcprototype> 14593 <funcdef>void <function>ieee80211_get_tkip_p2k </function></funcdef> 14594 <paramdef>struct ieee80211_key_conf * <parameter>keyconf</parameter></paramdef> 14595 <paramdef>struct sk_buff * <parameter>skb</parameter></paramdef> 14596 <paramdef>u8 * <parameter>p2k</parameter></paramdef> 14597 </funcprototype></funcsynopsis> 14598</refsynopsisdiv> 14599<refsect1> 14600 <title>Arguments</title> 14601 <variablelist> 14602 <varlistentry> 14603 <term><parameter>keyconf</parameter></term> 14604 <listitem> 14605 <para> 14606 the parameter passed with the set key 14607 </para> 14608 </listitem> 14609 </varlistentry> 14610 <varlistentry> 14611 <term><parameter>skb</parameter></term> 14612 <listitem> 14613 <para> 14614 the packet to take the IV32/IV16 values from that will be 14615 encrypted with this key 14616 </para> 14617 </listitem> 14618 </varlistentry> 14619 <varlistentry> 14620 <term><parameter>p2k</parameter></term> 14621 <listitem> 14622 <para> 14623 a buffer to which the key will be written, 16 bytes 14624 </para> 14625 </listitem> 14626 </varlistentry> 14627 </variablelist> 14628</refsect1> 14629<refsect1> 14630<title>Description</title> 14631<para> 14632 </para><para> 14633 14634 This function computes the TKIP RC4 key for the IV values 14635 in the packet. 14636</para> 14637</refsect1> 14638</refentry> 14639 14640 </chapter> 14641 14642 <chapter id="powersave"> 14643 <title>Powersave support</title> 14644<para> 14645 </para><para> 14646 mac80211 has support for various powersave implementations. 14647 </para><para> 14648 First, it can support hardware that handles all powersaving by itself, 14649 such hardware should simply set the <constant>IEEE80211_HW_SUPPORTS_PS</constant> hardware 14650 flag. In that case, it will be told about the desired powersave mode 14651 with the <constant>IEEE80211_CONF_PS</constant> flag depending on the association status. 14652 The hardware must take care of sending nullfunc frames when necessary, 14653 i.e. when entering and leaving powersave mode. The hardware is required 14654 to look at the AID in beacons and signal to the AP that it woke up when 14655 it finds traffic directed to it. 14656 </para><para> 14657 <constant>IEEE80211_CONF_PS</constant> flag enabled means that the powersave mode defined in 14658 IEEE 802.11-2007 section 11.2 is enabled. This is not to be confused 14659 with hardware wakeup and sleep states. Driver is responsible for waking 14660 up the hardware before issuing commands to the hardware and putting it 14661 back to sleep at appropriate times. 14662 </para><para> 14663 When PS is enabled, hardware needs to wakeup for beacons and receive the 14664 buffered multicast/broadcast frames after the beacon. Also it must be 14665 possible to send frames and receive the acknowledment frame. 14666 </para><para> 14667 Other hardware designs cannot send nullfunc frames by themselves and also 14668 need software support for parsing the TIM bitmap. This is also supported 14669 by mac80211 by combining the <constant>IEEE80211_HW_SUPPORTS_PS</constant> and 14670 <constant>IEEE80211_HW_PS_NULLFUNC_STACK</constant> flags. The hardware is of course still 14671 required to pass up beacons. The hardware is still required to handle 14672 waking up for multicast traffic; if it cannot the driver must handle that 14673 as best as it can, mac80211 is too slow to do that. 14674 </para><para> 14675 Dynamic powersave is an extension to normal powersave in which the 14676 hardware stays awake for a user-specified period of time after sending a 14677 frame so that reply frames need not be buffered and therefore delayed to 14678 the next wakeup. It's compromise of getting good enough latency when 14679 there's data traffic and still saving significantly power in idle 14680 periods. 14681 </para><para> 14682 Dynamic powersave is simply supported by mac80211 enabling and disabling 14683 PS based on traffic. Driver needs to only set <constant>IEEE80211_HW_SUPPORTS_PS</constant> 14684 flag and mac80211 will handle everything automatically. Additionally, 14685 hardware having support for the dynamic PS feature may set the 14686 <constant>IEEE80211_HW_SUPPORTS_DYNAMIC_PS</constant> flag to indicate that it can support 14687 dynamic PS mode itself. The driver needs to look at the 14688 <parameter>dynamic_ps_timeout</parameter> hardware configuration value and use it that value 14689 whenever <constant>IEEE80211_CONF_PS</constant> is set. In this case mac80211 will disable 14690 dynamic PS feature in stack and will just keep <constant>IEEE80211_CONF_PS</constant> 14691 enabled whenever user has enabled powersave. 14692 </para><para> 14693 Driver informs U-APSD client support by enabling 14694 <constant>IEEE80211_VIF_SUPPORTS_UAPSD</constant> flag. The mode is configured through the 14695 uapsd parameter in <function>conf_tx</function> operation. Hardware needs to send the QoS 14696 Nullfunc frames and stay awake until the service period has ended. To 14697 utilize U-APSD, dynamic powersave is disabled for voip AC and all frames 14698 from that AC are transmitted with powersave enabled. 14699 </para><para> 14700 Note: U-APSD client mode is not yet supported with 14701 <constant>IEEE80211_HW_PS_NULLFUNC_STACK</constant>. 14702</para> 14703 14704 </chapter> 14705 14706 <chapter id="beacon-filter"> 14707 <title>Beacon filter support</title> 14708<para> 14709 </para><para> 14710 Some hardware have beacon filter support to reduce host cpu wakeups 14711 which will reduce system power consumption. It usually works so that 14712 the firmware creates a checksum of the beacon but omits all constantly 14713 changing elements (TSF, TIM etc). Whenever the checksum changes the 14714 beacon is forwarded to the host, otherwise it will be just dropped. That 14715 way the host will only receive beacons where some relevant information 14716 (for example ERP protection or WMM settings) have changed. 14717 </para><para> 14718 Beacon filter support is advertised with the <constant>IEEE80211_VIF_BEACON_FILTER</constant> 14719 interface capability. The driver needs to enable beacon filter support 14720 whenever power save is enabled, that is <constant>IEEE80211_CONF_PS</constant> is set. When 14721 power save is enabled, the stack will not check for beacon loss and the 14722 driver needs to notify about loss of beacons with <function>ieee80211_beacon_loss</function>. 14723 </para><para> 14724 The time (or number of beacons missed) until the firmware notifies the 14725 driver of a beacon loss event (which in turn causes the driver to call 14726 <function>ieee80211_beacon_loss</function>) should be configurable and will be controlled 14727 by mac80211 and the roaming algorithm in the future. 14728 </para><para> 14729 Since there may be constantly changing information elements that nothing 14730 in the software stack cares about, we will, in the future, have mac80211 14731 tell the driver which information elements are interesting in the sense 14732 that we want to see changes in them. This will include 14733 - a list of information element IDs 14734 - a list of OUIs for the vendor information element 14735 </para><para> 14736 Ideally, the hardware would filter out any beacons without changes in the 14737 requested elements, but if it cannot support that it may, at the expense 14738 of some efficiency, filter out only a subset. For example, if the device 14739 doesn't support checking for OUIs it should pass up all changes in all 14740 vendor information elements. 14741 </para><para> 14742 Note that change, for the sake of simplification, also includes information 14743 elements appearing or disappearing from the beacon. 14744 </para><para> 14745 Some hardware supports an <quote>ignore list</quote> instead, just make sure nothing 14746 that was requested is on the ignore list, and include commonly changing 14747 information element IDs in the ignore list, for example 11 (BSS load) and 14748 the various vendor-assigned IEs with unknown contents (128, 129, 133-136, 14749 149, 150, 155, 156, 173, 176, 178, 179, 219); for forward compatibility 14750 it could also include some currently unused IDs. 14751 </para><para> 14752 </para><para> 14753 In addition to these capabilities, hardware should support notifying the 14754 host of changes in the beacon RSSI. This is relevant to implement roaming 14755 when no traffic is flowing (when traffic is flowing we see the RSSI of 14756 the received data packets). This can consist in notifying the host when 14757 the RSSI changes significantly or when it drops below or rises above 14758 configurable thresholds. In the future these thresholds will also be 14759 configured by mac80211 (which gets them from userspace) to implement 14760 them as the roaming algorithm requires. 14761 </para><para> 14762 If the hardware cannot implement this, the driver should ask it to 14763 periodically pass beacon frames to the host so that software can do the 14764 signal strength threshold checking. 14765</para> 14766 14767<refentry id="API-ieee80211-beacon-loss"> 14768<refentryinfo> 14769 <title>LINUX</title> 14770 <productname>Kernel Hackers Manual</productname> 14771 <date>July 2017</date> 14772</refentryinfo> 14773<refmeta> 14774 <refentrytitle><phrase>ieee80211_beacon_loss</phrase></refentrytitle> 14775 <manvolnum>9</manvolnum> 14776 <refmiscinfo class="version">4.1.27</refmiscinfo> 14777</refmeta> 14778<refnamediv> 14779 <refname>ieee80211_beacon_loss</refname> 14780 <refpurpose> 14781 inform hardware does not receive beacons 14782 </refpurpose> 14783</refnamediv> 14784<refsynopsisdiv> 14785 <title>Synopsis</title> 14786 <funcsynopsis><funcprototype> 14787 <funcdef>void <function>ieee80211_beacon_loss </function></funcdef> 14788 <paramdef>struct ieee80211_vif * <parameter>vif</parameter></paramdef> 14789 </funcprototype></funcsynopsis> 14790</refsynopsisdiv> 14791<refsect1> 14792 <title>Arguments</title> 14793 <variablelist> 14794 <varlistentry> 14795 <term><parameter>vif</parameter></term> 14796 <listitem> 14797 <para> 14798 <structname>struct ieee80211_vif</structname> pointer from the add_interface callback. 14799 </para> 14800 </listitem> 14801 </varlistentry> 14802 </variablelist> 14803</refsect1> 14804<refsect1> 14805<title>Description</title> 14806<para> 14807 When beacon filtering is enabled with <constant>IEEE80211_VIF_BEACON_FILTER</constant> and 14808 <constant>IEEE80211_CONF_PS</constant> is set, the driver needs to inform whenever the 14809 hardware is not receiving beacons with this function. 14810</para> 14811</refsect1> 14812</refentry> 14813 14814 </chapter> 14815 14816 <chapter id="qos"> 14817 <title>Multiple queues and QoS support</title> 14818 <para>TBD</para> 14819<refentry id="API-struct-ieee80211-tx-queue-params"> 14820<refentryinfo> 14821 <title>LINUX</title> 14822 <productname>Kernel Hackers Manual</productname> 14823 <date>July 2017</date> 14824</refentryinfo> 14825<refmeta> 14826 <refentrytitle><phrase>struct ieee80211_tx_queue_params</phrase></refentrytitle> 14827 <manvolnum>9</manvolnum> 14828 <refmiscinfo class="version">4.1.27</refmiscinfo> 14829</refmeta> 14830<refnamediv> 14831 <refname>struct ieee80211_tx_queue_params</refname> 14832 <refpurpose> 14833 transmit queue configuration 14834 </refpurpose> 14835</refnamediv> 14836<refsynopsisdiv> 14837 <title>Synopsis</title> 14838 <programlisting> 14839struct ieee80211_tx_queue_params { 14840 u16 txop; 14841 u16 cw_min; 14842 u16 cw_max; 14843 u8 aifs; 14844 bool acm; 14845 bool uapsd; 14846}; </programlisting> 14847</refsynopsisdiv> 14848 <refsect1> 14849 <title>Members</title> 14850 <variablelist> 14851 <varlistentry> <term>txop</term> 14852 <listitem><para> 14853maximum burst time in units of 32 usecs, 0 meaning disabled 14854 </para></listitem> 14855 </varlistentry> 14856 <varlistentry> <term>cw_min</term> 14857 <listitem><para> 14858minimum contention window [a value of the form 148592^n-1 in the range 1..32767] 14860 </para></listitem> 14861 </varlistentry> 14862 <varlistentry> <term>cw_max</term> 14863 <listitem><para> 14864maximum contention window [like <parameter>cw_min</parameter>] 14865 </para></listitem> 14866 </varlistentry> 14867 <varlistentry> <term>aifs</term> 14868 <listitem><para> 14869arbitration interframe space [0..255] 14870 </para></listitem> 14871 </varlistentry> 14872 <varlistentry> <term>acm</term> 14873 <listitem><para> 14874is mandatory admission control required for the access category 14875 </para></listitem> 14876 </varlistentry> 14877 <varlistentry> <term>uapsd</term> 14878 <listitem><para> 14879is U-APSD mode enabled for the queue 14880 </para></listitem> 14881 </varlistentry> 14882 </variablelist> 14883 </refsect1> 14884<refsect1> 14885<title>Description</title> 14886<para> 14887 </para><para> 14888 14889 The information provided in this structure is required for QoS 14890 transmit queue configuration. Cf. IEEE 802.11 7.3.2.29. 14891</para> 14892</refsect1> 14893</refentry> 14894 14895 </chapter> 14896 14897 <chapter id="AP"> 14898 <title>Access point mode support</title> 14899 <para>TBD</para> 14900 <para>Some parts of the if_conf should be discussed here instead</para> 14901 <para> 14902 Insert notes about VLAN interfaces with hw crypto here or 14903 in the hw crypto chapter. 14904 </para> 14905 <section id="ps-client"> 14906 <title>support for powersaving clients</title> 14907<para> 14908 </para><para> 14909 In order to implement AP and P2P GO modes, mac80211 has support for 14910 client powersaving, both <quote>legacy</quote> PS (PS-Poll/null data) and uAPSD. 14911 There currently is no support for sAPSD. 14912 </para><para> 14913 There is one assumption that mac80211 makes, namely that a client 14914 will not poll with PS-Poll and trigger with uAPSD at the same time. 14915 Both are supported, and both can be used by the same client, but 14916 they can't be used concurrently by the same client. This simplifies 14917 the driver code. 14918 </para><para> 14919 The first thing to keep in mind is that there is a flag for complete 14920 driver implementation: <constant>IEEE80211_HW_AP_LINK_PS</constant>. If this flag is set, 14921 mac80211 expects the driver to handle most of the state machine for 14922 powersaving clients and will ignore the PM bit in incoming frames. 14923 Drivers then use <function>ieee80211_sta_ps_transition</function> to inform mac80211 of 14924 stations' powersave transitions. In this mode, mac80211 also doesn't 14925 handle PS-Poll/uAPSD. 14926 </para><para> 14927 In the mode without <constant>IEEE80211_HW_AP_LINK_PS</constant>, mac80211 will check the 14928 PM bit in incoming frames for client powersave transitions. When a 14929 station goes to sleep, we will stop transmitting to it. There is, 14930 however, a race condition: a station might go to sleep while there is 14931 data buffered on hardware queues. If the device has support for this 14932 it will reject frames, and the driver should give the frames back to 14933 mac80211 with the <constant>IEEE80211_TX_STAT_TX_FILTERED</constant> flag set which will 14934 cause mac80211 to retry the frame when the station wakes up. The 14935 driver is also notified of powersave transitions by calling its 14936 <parameter>sta_notify</parameter> callback. 14937 </para><para> 14938 When the station is asleep, it has three choices: it can wake up, 14939 it can PS-Poll, or it can possibly start a uAPSD service period. 14940 Waking up is implemented by simply transmitting all buffered (and 14941 filtered) frames to the station. This is the easiest case. When 14942 the station sends a PS-Poll or a uAPSD trigger frame, mac80211 14943 will inform the driver of this with the <parameter>allow_buffered_frames</parameter> 14944 callback; this callback is optional. mac80211 will then transmit 14945 the frames as usual and set the <constant>IEEE80211_TX_CTL_NO_PS_BUFFER</constant> 14946 on each frame. The last frame in the service period (or the only 14947 response to a PS-Poll) also has <constant>IEEE80211_TX_STATUS_EOSP</constant> set to 14948 indicate that it ends the service period; as this frame must have 14949 TX status report it also sets <constant>IEEE80211_TX_CTL_REQ_TX_STATUS</constant>. 14950 When TX status is reported for this frame, the service period is 14951 marked has having ended and a new one can be started by the peer. 14952 </para><para> 14953 Additionally, non-bufferable MMPDUs can also be transmitted by 14954 mac80211 with the <constant>IEEE80211_TX_CTL_NO_PS_BUFFER</constant> set in them. 14955 </para><para> 14956 Another race condition can happen on some devices like iwlwifi 14957 when there are frames queued for the station and it wakes up 14958 or polls; the frames that are already queued could end up being 14959 transmitted first instead, causing reordering and/or wrong 14960 processing of the EOSP. The cause is that allowing frames to be 14961 transmitted to a certain station is out-of-band communication to 14962 the device. To allow this problem to be solved, the driver can 14963 call <function>ieee80211_sta_block_awake</function> if frames are buffered when it 14964 is notified that the station went to sleep. When all these frames 14965 have been filtered (see above), it must call the function again 14966 to indicate that the station is no longer blocked. 14967 </para><para> 14968 If the driver buffers frames in the driver for aggregation in any 14969 way, it must use the <function>ieee80211_sta_set_buffered</function> call when it is 14970 notified of the station going to sleep to inform mac80211 of any 14971 TIDs that have frames buffered. Note that when a station wakes up 14972 this information is reset (hence the requirement to call it when 14973 informed of the station going to sleep). Then, when a service 14974 period starts for any reason, <parameter>release_buffered_frames</parameter> is called 14975 with the number of frames to be released and which TIDs they are 14976 to come from. In this case, the driver is responsible for setting 14977 the EOSP (for uAPSD) and MORE_DATA bits in the released frames, 14978 to help the <parameter>more_data</parameter> parameter is passed to tell the driver if 14979 there is more data on other TIDs -- the TIDs to release frames 14980 from are ignored since mac80211 doesn't know how many frames the 14981 buffers for those TIDs contain. 14982 </para><para> 14983 If the driver also implement GO mode, where absence periods may 14984 shorten service periods (or abort PS-Poll responses), it must 14985 filter those response frames except in the case of frames that 14986 are buffered in the driver -- those must remain buffered to avoid 14987 reordering. Because it is possible that no frames are released 14988 in this case, the driver must call <function>ieee80211_sta_eosp</function> 14989 to indicate to mac80211 that the service period ended anyway. 14990 </para><para> 14991 Finally, if frames from multiple TIDs are released from mac80211 14992 but the driver might reorder them, it must clear & set the flags 14993 appropriately (only the last frame may have <constant>IEEE80211_TX_STATUS_EOSP</constant>) 14994 and also take care of the EOSP and MORE_DATA bits in the frame. 14995 The driver may also use <function>ieee80211_sta_eosp</function> in this case. 14996 </para><para> 14997 Note that if the driver ever buffers frames other than QoS-data 14998 frames, it must take care to never send a non-QoS-data frame as 14999 the last frame in a service period, adding a QoS-nulldata frame 15000 after a non-QoS-data frame if needed. 15001</para> 15002 15003<refentry id="API-ieee80211-get-buffered-bc"> 15004<refentryinfo> 15005 <title>LINUX</title> 15006 <productname>Kernel Hackers Manual</productname> 15007 <date>July 2017</date> 15008</refentryinfo> 15009<refmeta> 15010 <refentrytitle><phrase>ieee80211_get_buffered_bc</phrase></refentrytitle> 15011 <manvolnum>9</manvolnum> 15012 <refmiscinfo class="version">4.1.27</refmiscinfo> 15013</refmeta> 15014<refnamediv> 15015 <refname>ieee80211_get_buffered_bc</refname> 15016 <refpurpose> 15017 accessing buffered broadcast and multicast frames 15018 </refpurpose> 15019</refnamediv> 15020<refsynopsisdiv> 15021 <title>Synopsis</title> 15022 <funcsynopsis><funcprototype> 15023 <funcdef>struct sk_buff * <function>ieee80211_get_buffered_bc </function></funcdef> 15024 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 15025 <paramdef>struct ieee80211_vif * <parameter>vif</parameter></paramdef> 15026 </funcprototype></funcsynopsis> 15027</refsynopsisdiv> 15028<refsect1> 15029 <title>Arguments</title> 15030 <variablelist> 15031 <varlistentry> 15032 <term><parameter>hw</parameter></term> 15033 <listitem> 15034 <para> 15035 pointer as obtained from <function>ieee80211_alloc_hw</function>. 15036 </para> 15037 </listitem> 15038 </varlistentry> 15039 <varlistentry> 15040 <term><parameter>vif</parameter></term> 15041 <listitem> 15042 <para> 15043 <structname>struct ieee80211_vif</structname> pointer from the add_interface callback. 15044 </para> 15045 </listitem> 15046 </varlistentry> 15047 </variablelist> 15048</refsect1> 15049<refsect1> 15050<title>Description</title> 15051<para> 15052 Function for accessing buffered broadcast and multicast frames. If 15053 hardware/firmware does not implement buffering of broadcast/multicast 15054 frames when power saving is used, 802.11 code buffers them in the host 15055 memory. The low-level driver uses this function to fetch next buffered 15056 frame. In most cases, this is used when generating beacon frame. 15057</para> 15058</refsect1> 15059<refsect1> 15060<title>Return</title> 15061<para> 15062 A pointer to the next buffered skb or NULL if no more buffered 15063 frames are available. 15064</para> 15065</refsect1> 15066<refsect1> 15067<title>Note</title> 15068<para> 15069 buffered frames are returned only after DTIM beacon frame was 15070 generated with <function>ieee80211_beacon_get</function> and the low-level driver must thus 15071 call <function>ieee80211_beacon_get</function> first. <function>ieee80211_get_buffered_bc</function> returns 15072 NULL if the previous generated beacon was not DTIM, so the low-level driver 15073 does not need to check for DTIM beacons separately and should be able to 15074 use common code for all beacons. 15075</para> 15076</refsect1> 15077</refentry> 15078 15079<refentry id="API-ieee80211-beacon-get"> 15080<refentryinfo> 15081 <title>LINUX</title> 15082 <productname>Kernel Hackers Manual</productname> 15083 <date>July 2017</date> 15084</refentryinfo> 15085<refmeta> 15086 <refentrytitle><phrase>ieee80211_beacon_get</phrase></refentrytitle> 15087 <manvolnum>9</manvolnum> 15088 <refmiscinfo class="version">4.1.27</refmiscinfo> 15089</refmeta> 15090<refnamediv> 15091 <refname>ieee80211_beacon_get</refname> 15092 <refpurpose> 15093 beacon generation function 15094 </refpurpose> 15095</refnamediv> 15096<refsynopsisdiv> 15097 <title>Synopsis</title> 15098 <funcsynopsis><funcprototype> 15099 <funcdef>struct sk_buff * <function>ieee80211_beacon_get </function></funcdef> 15100 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 15101 <paramdef>struct ieee80211_vif * <parameter>vif</parameter></paramdef> 15102 </funcprototype></funcsynopsis> 15103</refsynopsisdiv> 15104<refsect1> 15105 <title>Arguments</title> 15106 <variablelist> 15107 <varlistentry> 15108 <term><parameter>hw</parameter></term> 15109 <listitem> 15110 <para> 15111 pointer obtained from <function>ieee80211_alloc_hw</function>. 15112 </para> 15113 </listitem> 15114 </varlistentry> 15115 <varlistentry> 15116 <term><parameter>vif</parameter></term> 15117 <listitem> 15118 <para> 15119 <structname>struct ieee80211_vif</structname> pointer from the add_interface callback. 15120 </para> 15121 </listitem> 15122 </varlistentry> 15123 </variablelist> 15124</refsect1> 15125<refsect1> 15126<title>Description</title> 15127<para> 15128 See <function>ieee80211_beacon_get_tim</function>. 15129</para> 15130</refsect1> 15131<refsect1> 15132<title>Return</title> 15133<para> 15134 See <function>ieee80211_beacon_get_tim</function>. 15135</para> 15136</refsect1> 15137</refentry> 15138 15139<refentry id="API-ieee80211-sta-eosp"> 15140<refentryinfo> 15141 <title>LINUX</title> 15142 <productname>Kernel Hackers Manual</productname> 15143 <date>July 2017</date> 15144</refentryinfo> 15145<refmeta> 15146 <refentrytitle><phrase>ieee80211_sta_eosp</phrase></refentrytitle> 15147 <manvolnum>9</manvolnum> 15148 <refmiscinfo class="version">4.1.27</refmiscinfo> 15149</refmeta> 15150<refnamediv> 15151 <refname>ieee80211_sta_eosp</refname> 15152 <refpurpose> 15153 notify mac80211 about end of SP 15154 </refpurpose> 15155</refnamediv> 15156<refsynopsisdiv> 15157 <title>Synopsis</title> 15158 <funcsynopsis><funcprototype> 15159 <funcdef>void <function>ieee80211_sta_eosp </function></funcdef> 15160 <paramdef>struct ieee80211_sta * <parameter>pubsta</parameter></paramdef> 15161 </funcprototype></funcsynopsis> 15162</refsynopsisdiv> 15163<refsect1> 15164 <title>Arguments</title> 15165 <variablelist> 15166 <varlistentry> 15167 <term><parameter>pubsta</parameter></term> 15168 <listitem> 15169 <para> 15170 the station 15171 </para> 15172 </listitem> 15173 </varlistentry> 15174 </variablelist> 15175</refsect1> 15176<refsect1> 15177<title>Description</title> 15178<para> 15179 When a device transmits frames in a way that it can't tell 15180 mac80211 in the TX status about the EOSP, it must clear the 15181 <constant>IEEE80211_TX_STATUS_EOSP</constant> bit and call this function instead. 15182 This applies for PS-Poll as well as uAPSD. 15183 </para><para> 15184 15185 Note that just like with <function>_tx_status</function> and <function>_rx</function> drivers must 15186 not mix calls to irqsafe/non-irqsafe versions, this function 15187 must not be mixed with those either. Use the all irqsafe, or 15188 all non-irqsafe, don't mix! 15189</para> 15190</refsect1> 15191<refsect1> 15192<title>NB</title> 15193<para> 15194 the _irqsafe version of this function doesn't exist, no 15195 driver needs it right now. Don't call this function if 15196 you'd need the _irqsafe version, look at the git history 15197 and restore the _irqsafe version! 15198</para> 15199</refsect1> 15200</refentry> 15201 15202<refentry id="API-enum-ieee80211-frame-release-type"> 15203<refentryinfo> 15204 <title>LINUX</title> 15205 <productname>Kernel Hackers Manual</productname> 15206 <date>July 2017</date> 15207</refentryinfo> 15208<refmeta> 15209 <refentrytitle><phrase>enum ieee80211_frame_release_type</phrase></refentrytitle> 15210 <manvolnum>9</manvolnum> 15211 <refmiscinfo class="version">4.1.27</refmiscinfo> 15212</refmeta> 15213<refnamediv> 15214 <refname>enum ieee80211_frame_release_type</refname> 15215 <refpurpose> 15216 frame release reason 15217 </refpurpose> 15218</refnamediv> 15219<refsynopsisdiv> 15220 <title>Synopsis</title> 15221 <programlisting> 15222enum ieee80211_frame_release_type { 15223 IEEE80211_FRAME_RELEASE_PSPOLL, 15224 IEEE80211_FRAME_RELEASE_UAPSD 15225}; </programlisting> 15226</refsynopsisdiv> 15227<refsect1> 15228 <title>Constants</title> 15229 <variablelist> 15230 <varlistentry> <term>IEEE80211_FRAME_RELEASE_PSPOLL</term> 15231 <listitem><para> 15232frame released for PS-Poll 15233 </para></listitem> 15234 </varlistentry> 15235 <varlistentry> <term>IEEE80211_FRAME_RELEASE_UAPSD</term> 15236 <listitem><para> 15237frame(s) released due to 15238frame received on trigger-enabled AC 15239 </para></listitem> 15240 </varlistentry> 15241 </variablelist> 15242</refsect1> 15243</refentry> 15244 15245<refentry id="API-ieee80211-sta-ps-transition"> 15246<refentryinfo> 15247 <title>LINUX</title> 15248 <productname>Kernel Hackers Manual</productname> 15249 <date>July 2017</date> 15250</refentryinfo> 15251<refmeta> 15252 <refentrytitle><phrase>ieee80211_sta_ps_transition</phrase></refentrytitle> 15253 <manvolnum>9</manvolnum> 15254 <refmiscinfo class="version">4.1.27</refmiscinfo> 15255</refmeta> 15256<refnamediv> 15257 <refname>ieee80211_sta_ps_transition</refname> 15258 <refpurpose> 15259 PS transition for connected sta 15260 </refpurpose> 15261</refnamediv> 15262<refsynopsisdiv> 15263 <title>Synopsis</title> 15264 <funcsynopsis><funcprototype> 15265 <funcdef>int <function>ieee80211_sta_ps_transition </function></funcdef> 15266 <paramdef>struct ieee80211_sta * <parameter>sta</parameter></paramdef> 15267 <paramdef>bool <parameter>start</parameter></paramdef> 15268 </funcprototype></funcsynopsis> 15269</refsynopsisdiv> 15270<refsect1> 15271 <title>Arguments</title> 15272 <variablelist> 15273 <varlistentry> 15274 <term><parameter>sta</parameter></term> 15275 <listitem> 15276 <para> 15277 currently connected sta 15278 </para> 15279 </listitem> 15280 </varlistentry> 15281 <varlistentry> 15282 <term><parameter>start</parameter></term> 15283 <listitem> 15284 <para> 15285 start or stop PS 15286 </para> 15287 </listitem> 15288 </varlistentry> 15289 </variablelist> 15290</refsect1> 15291<refsect1> 15292<title>Description</title> 15293<para> 15294 </para><para> 15295 15296 When operating in AP mode with the <constant>IEEE80211_HW_AP_LINK_PS</constant> 15297 flag set, use this function to inform mac80211 about a connected station 15298 entering/leaving PS mode. 15299 </para><para> 15300 15301 This function may not be called in IRQ context or with softirqs enabled. 15302 </para><para> 15303 15304 Calls to this function for a single hardware must be synchronized against 15305 each other. 15306</para> 15307</refsect1> 15308<refsect1> 15309<title>Return</title> 15310<para> 15311 0 on success. -EINVAL when the requested PS mode is already set. 15312</para> 15313</refsect1> 15314</refentry> 15315 15316<refentry id="API-ieee80211-sta-ps-transition-ni"> 15317<refentryinfo> 15318 <title>LINUX</title> 15319 <productname>Kernel Hackers Manual</productname> 15320 <date>July 2017</date> 15321</refentryinfo> 15322<refmeta> 15323 <refentrytitle><phrase>ieee80211_sta_ps_transition_ni</phrase></refentrytitle> 15324 <manvolnum>9</manvolnum> 15325 <refmiscinfo class="version">4.1.27</refmiscinfo> 15326</refmeta> 15327<refnamediv> 15328 <refname>ieee80211_sta_ps_transition_ni</refname> 15329 <refpurpose> 15330 PS transition for connected sta (in process context) 15331 </refpurpose> 15332</refnamediv> 15333<refsynopsisdiv> 15334 <title>Synopsis</title> 15335 <funcsynopsis><funcprototype> 15336 <funcdef>int <function>ieee80211_sta_ps_transition_ni </function></funcdef> 15337 <paramdef>struct ieee80211_sta * <parameter>sta</parameter></paramdef> 15338 <paramdef>bool <parameter>start</parameter></paramdef> 15339 </funcprototype></funcsynopsis> 15340</refsynopsisdiv> 15341<refsect1> 15342 <title>Arguments</title> 15343 <variablelist> 15344 <varlistentry> 15345 <term><parameter>sta</parameter></term> 15346 <listitem> 15347 <para> 15348 currently connected sta 15349 </para> 15350 </listitem> 15351 </varlistentry> 15352 <varlistentry> 15353 <term><parameter>start</parameter></term> 15354 <listitem> 15355 <para> 15356 start or stop PS 15357 </para> 15358 </listitem> 15359 </varlistentry> 15360 </variablelist> 15361</refsect1> 15362<refsect1> 15363<title>Description</title> 15364<para> 15365 </para><para> 15366 15367 Like <function>ieee80211_sta_ps_transition</function> but can be called in process context 15368 (internally disables bottom halves). Concurrent call restriction still 15369 applies. 15370</para> 15371</refsect1> 15372<refsect1> 15373<title>Return</title> 15374<para> 15375 Like <function>ieee80211_sta_ps_transition</function>. 15376</para> 15377</refsect1> 15378</refentry> 15379 15380<refentry id="API-ieee80211-sta-set-buffered"> 15381<refentryinfo> 15382 <title>LINUX</title> 15383 <productname>Kernel Hackers Manual</productname> 15384 <date>July 2017</date> 15385</refentryinfo> 15386<refmeta> 15387 <refentrytitle><phrase>ieee80211_sta_set_buffered</phrase></refentrytitle> 15388 <manvolnum>9</manvolnum> 15389 <refmiscinfo class="version">4.1.27</refmiscinfo> 15390</refmeta> 15391<refnamediv> 15392 <refname>ieee80211_sta_set_buffered</refname> 15393 <refpurpose> 15394 inform mac80211 about driver-buffered frames 15395 </refpurpose> 15396</refnamediv> 15397<refsynopsisdiv> 15398 <title>Synopsis</title> 15399 <funcsynopsis><funcprototype> 15400 <funcdef>void <function>ieee80211_sta_set_buffered </function></funcdef> 15401 <paramdef>struct ieee80211_sta * <parameter>sta</parameter></paramdef> 15402 <paramdef>u8 <parameter>tid</parameter></paramdef> 15403 <paramdef>bool <parameter>buffered</parameter></paramdef> 15404 </funcprototype></funcsynopsis> 15405</refsynopsisdiv> 15406<refsect1> 15407 <title>Arguments</title> 15408 <variablelist> 15409 <varlistentry> 15410 <term><parameter>sta</parameter></term> 15411 <listitem> 15412 <para> 15413 <structname>struct ieee80211_sta</structname> pointer for the sleeping station 15414 </para> 15415 </listitem> 15416 </varlistentry> 15417 <varlistentry> 15418 <term><parameter>tid</parameter></term> 15419 <listitem> 15420 <para> 15421 the TID that has buffered frames 15422 </para> 15423 </listitem> 15424 </varlistentry> 15425 <varlistentry> 15426 <term><parameter>buffered</parameter></term> 15427 <listitem> 15428 <para> 15429 indicates whether or not frames are buffered for this TID 15430 </para> 15431 </listitem> 15432 </varlistentry> 15433 </variablelist> 15434</refsect1> 15435<refsect1> 15436<title>Description</title> 15437<para> 15438 If a driver buffers frames for a powersave station instead of passing 15439 them back to mac80211 for retransmission, the station may still need 15440 to be told that there are buffered frames via the TIM bit. 15441 </para><para> 15442 15443 This function informs mac80211 whether or not there are frames that are 15444 buffered in the driver for a given TID; mac80211 can then use this data 15445 to set the TIM bit (NOTE: This may call back into the driver's set_tim 15446 call! Beware of the locking!) 15447 </para><para> 15448 15449 If all frames are released to the station (due to PS-poll or uAPSD) 15450 then the driver needs to inform mac80211 that there no longer are 15451 frames buffered. However, when the station wakes up mac80211 assumes 15452 that all buffered frames will be transmitted and clears this data, 15453 drivers need to make sure they inform mac80211 about all buffered 15454 frames on the sleep transition (<function>sta_notify</function> with <constant>STA_NOTIFY_SLEEP</constant>). 15455 </para><para> 15456 15457 Note that technically mac80211 only needs to know this per AC, not per 15458 TID, but since driver buffering will inevitably happen per TID (since 15459 it is related to aggregation) it is easier to make mac80211 map the 15460 TID to the AC as required instead of keeping track in all drivers that 15461 use this API. 15462</para> 15463</refsect1> 15464</refentry> 15465 15466<refentry id="API-ieee80211-sta-block-awake"> 15467<refentryinfo> 15468 <title>LINUX</title> 15469 <productname>Kernel Hackers Manual</productname> 15470 <date>July 2017</date> 15471</refentryinfo> 15472<refmeta> 15473 <refentrytitle><phrase>ieee80211_sta_block_awake</phrase></refentrytitle> 15474 <manvolnum>9</manvolnum> 15475 <refmiscinfo class="version">4.1.27</refmiscinfo> 15476</refmeta> 15477<refnamediv> 15478 <refname>ieee80211_sta_block_awake</refname> 15479 <refpurpose> 15480 block station from waking up 15481 </refpurpose> 15482</refnamediv> 15483<refsynopsisdiv> 15484 <title>Synopsis</title> 15485 <funcsynopsis><funcprototype> 15486 <funcdef>void <function>ieee80211_sta_block_awake </function></funcdef> 15487 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 15488 <paramdef>struct ieee80211_sta * <parameter>pubsta</parameter></paramdef> 15489 <paramdef>bool <parameter>block</parameter></paramdef> 15490 </funcprototype></funcsynopsis> 15491</refsynopsisdiv> 15492<refsect1> 15493 <title>Arguments</title> 15494 <variablelist> 15495 <varlistentry> 15496 <term><parameter>hw</parameter></term> 15497 <listitem> 15498 <para> 15499 the hardware 15500 </para> 15501 </listitem> 15502 </varlistentry> 15503 <varlistentry> 15504 <term><parameter>pubsta</parameter></term> 15505 <listitem> 15506 <para> 15507 the station 15508 </para> 15509 </listitem> 15510 </varlistentry> 15511 <varlistentry> 15512 <term><parameter>block</parameter></term> 15513 <listitem> 15514 <para> 15515 whether to block or unblock 15516 </para> 15517 </listitem> 15518 </varlistentry> 15519 </variablelist> 15520</refsect1> 15521<refsect1> 15522<title>Description</title> 15523<para> 15524 Some devices require that all frames that are on the queues 15525 for a specific station that went to sleep are flushed before 15526 a poll response or frames after the station woke up can be 15527 delivered to that it. Note that such frames must be rejected 15528 by the driver as filtered, with the appropriate status flag. 15529 </para><para> 15530 15531 This function allows implementing this mode in a race-free 15532 manner. 15533 </para><para> 15534 15535 To do this, a driver must keep track of the number of frames 15536 still enqueued for a specific station. If this number is not 15537 zero when the station goes to sleep, the driver must call 15538 this function to force mac80211 to consider the station to 15539 be asleep regardless of the station's actual state. Once the 15540 number of outstanding frames reaches zero, the driver must 15541 call this function again to unblock the station. That will 15542 cause mac80211 to be able to send ps-poll responses, and if 15543 the station queried in the meantime then frames will also 15544 be sent out as a result of this. Additionally, the driver 15545 will be notified that the station woke up some time after 15546 it is unblocked, regardless of whether the station actually 15547 woke up while blocked or not. 15548</para> 15549</refsect1> 15550</refentry> 15551 15552 </section> 15553 </chapter> 15554 15555 <chapter id="multi-iface"> 15556 <title>Supporting multiple virtual interfaces</title> 15557 <para>TBD</para> 15558 <para> 15559 Note: WDS with identical MAC address should almost always be OK 15560 </para> 15561 <para> 15562 Insert notes about having multiple virtual interfaces with 15563 different MAC addresses here, note which configurations are 15564 supported by mac80211, add notes about supporting hw crypto 15565 with it. 15566 </para> 15567<refentry id="API-ieee80211-iterate-active-interfaces"> 15568<refentryinfo> 15569 <title>LINUX</title> 15570 <productname>Kernel Hackers Manual</productname> 15571 <date>July 2017</date> 15572</refentryinfo> 15573<refmeta> 15574 <refentrytitle><phrase>ieee80211_iterate_active_interfaces</phrase></refentrytitle> 15575 <manvolnum>9</manvolnum> 15576 <refmiscinfo class="version">4.1.27</refmiscinfo> 15577</refmeta> 15578<refnamediv> 15579 <refname>ieee80211_iterate_active_interfaces</refname> 15580 <refpurpose> 15581 iterate active interfaces 15582 </refpurpose> 15583</refnamediv> 15584<refsynopsisdiv> 15585 <title>Synopsis</title> 15586 <funcsynopsis><funcprototype> 15587 <funcdef>void <function>ieee80211_iterate_active_interfaces </function></funcdef> 15588 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 15589 <paramdef>u32 <parameter>iter_flags</parameter></paramdef> 15590 <paramdef>void (*<parameter>iterator</parameter>) 15591 <funcparams>void *data, u8 *mac, struct ieee80211_vif *vif</funcparams></paramdef> 15592 <paramdef>void * <parameter>data</parameter></paramdef> 15593 </funcprototype></funcsynopsis> 15594</refsynopsisdiv> 15595<refsect1> 15596 <title>Arguments</title> 15597 <variablelist> 15598 <varlistentry> 15599 <term><parameter>hw</parameter></term> 15600 <listitem> 15601 <para> 15602 the hardware struct of which the interfaces should be iterated over 15603 </para> 15604 </listitem> 15605 </varlistentry> 15606 <varlistentry> 15607 <term><parameter>iter_flags</parameter></term> 15608 <listitem> 15609 <para> 15610 iteration flags, see <structname>enum</structname> ieee80211_interface_iteration_flags 15611 </para> 15612 </listitem> 15613 </varlistentry> 15614 <varlistentry> 15615 <term><parameter>iterator</parameter></term> 15616 <listitem> 15617 <para> 15618 the iterator function to call 15619 </para> 15620 </listitem> 15621 </varlistentry> 15622 <varlistentry> 15623 <term><parameter>data</parameter></term> 15624 <listitem> 15625 <para> 15626 first argument of the iterator function 15627 </para> 15628 </listitem> 15629 </varlistentry> 15630 </variablelist> 15631</refsect1> 15632<refsect1> 15633<title>Description</title> 15634<para> 15635 </para><para> 15636 15637 This function iterates over the interfaces associated with a given 15638 hardware that are currently active and calls the callback for them. 15639 This function allows the iterator function to sleep, when the iterator 15640 function is atomic <parameter>ieee80211_iterate_active_interfaces_atomic</parameter> can 15641 be used. 15642 Does not iterate over a new interface during <function>add_interface</function>. 15643</para> 15644</refsect1> 15645</refentry> 15646 15647<refentry id="API-ieee80211-iterate-active-interfaces-atomic"> 15648<refentryinfo> 15649 <title>LINUX</title> 15650 <productname>Kernel Hackers Manual</productname> 15651 <date>July 2017</date> 15652</refentryinfo> 15653<refmeta> 15654 <refentrytitle><phrase>ieee80211_iterate_active_interfaces_atomic</phrase></refentrytitle> 15655 <manvolnum>9</manvolnum> 15656 <refmiscinfo class="version">4.1.27</refmiscinfo> 15657</refmeta> 15658<refnamediv> 15659 <refname>ieee80211_iterate_active_interfaces_atomic</refname> 15660 <refpurpose> 15661 iterate active interfaces 15662 </refpurpose> 15663</refnamediv> 15664<refsynopsisdiv> 15665 <title>Synopsis</title> 15666 <funcsynopsis><funcprototype> 15667 <funcdef>void <function>ieee80211_iterate_active_interfaces_atomic </function></funcdef> 15668 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 15669 <paramdef>u32 <parameter>iter_flags</parameter></paramdef> 15670 <paramdef>void (*<parameter>iterator</parameter>) 15671 <funcparams>void *data, u8 *mac, struct ieee80211_vif *vif</funcparams></paramdef> 15672 <paramdef>void * <parameter>data</parameter></paramdef> 15673 </funcprototype></funcsynopsis> 15674</refsynopsisdiv> 15675<refsect1> 15676 <title>Arguments</title> 15677 <variablelist> 15678 <varlistentry> 15679 <term><parameter>hw</parameter></term> 15680 <listitem> 15681 <para> 15682 the hardware struct of which the interfaces should be iterated over 15683 </para> 15684 </listitem> 15685 </varlistentry> 15686 <varlistentry> 15687 <term><parameter>iter_flags</parameter></term> 15688 <listitem> 15689 <para> 15690 iteration flags, see <structname>enum</structname> ieee80211_interface_iteration_flags 15691 </para> 15692 </listitem> 15693 </varlistentry> 15694 <varlistentry> 15695 <term><parameter>iterator</parameter></term> 15696 <listitem> 15697 <para> 15698 the iterator function to call, cannot sleep 15699 </para> 15700 </listitem> 15701 </varlistentry> 15702 <varlistentry> 15703 <term><parameter>data</parameter></term> 15704 <listitem> 15705 <para> 15706 first argument of the iterator function 15707 </para> 15708 </listitem> 15709 </varlistentry> 15710 </variablelist> 15711</refsect1> 15712<refsect1> 15713<title>Description</title> 15714<para> 15715 </para><para> 15716 15717 This function iterates over the interfaces associated with a given 15718 hardware that are currently active and calls the callback for them. 15719 This function requires the iterator callback function to be atomic, 15720 if that is not desired, use <parameter>ieee80211_iterate_active_interfaces</parameter> instead. 15721 Does not iterate over a new interface during <function>add_interface</function>. 15722</para> 15723</refsect1> 15724</refentry> 15725 15726 </chapter> 15727 15728 <chapter id="station-handling"> 15729 <title>Station handling</title> 15730 <para>TODO</para> 15731<refentry id="API-struct-ieee80211-sta"> 15732<refentryinfo> 15733 <title>LINUX</title> 15734 <productname>Kernel Hackers Manual</productname> 15735 <date>July 2017</date> 15736</refentryinfo> 15737<refmeta> 15738 <refentrytitle><phrase>struct ieee80211_sta</phrase></refentrytitle> 15739 <manvolnum>9</manvolnum> 15740 <refmiscinfo class="version">4.1.27</refmiscinfo> 15741</refmeta> 15742<refnamediv> 15743 <refname>struct ieee80211_sta</refname> 15744 <refpurpose> 15745 station table entry 15746 </refpurpose> 15747</refnamediv> 15748<refsynopsisdiv> 15749 <title>Synopsis</title> 15750 <programlisting> 15751struct ieee80211_sta { 15752 u32 supp_rates[IEEE80211_NUM_BANDS]; 15753 u8 addr[ETH_ALEN]; 15754 u16 aid; 15755 struct ieee80211_sta_ht_cap ht_cap; 15756 struct ieee80211_sta_vht_cap vht_cap; 15757 bool wme; 15758 u8 uapsd_queues; 15759 u8 max_sp; 15760 u8 rx_nss; 15761 enum ieee80211_sta_rx_bandwidth bandwidth; 15762 enum ieee80211_smps_mode smps_mode; 15763 struct ieee80211_sta_rates __rcu * rates; 15764 bool tdls; 15765 bool tdls_initiator; 15766 bool mfp; 15767 struct ieee80211_txq * txq[IEEE80211_NUM_TIDS]; 15768 u8 drv_priv[0]; 15769}; </programlisting> 15770</refsynopsisdiv> 15771 <refsect1> 15772 <title>Members</title> 15773 <variablelist> 15774 <varlistentry> <term>supp_rates[IEEE80211_NUM_BANDS]</term> 15775 <listitem><para> 15776Bitmap of supported rates (per band) 15777 </para></listitem> 15778 </varlistentry> 15779 <varlistentry> <term>addr[ETH_ALEN]</term> 15780 <listitem><para> 15781MAC address 15782 </para></listitem> 15783 </varlistentry> 15784 <varlistentry> <term>aid</term> 15785 <listitem><para> 15786AID we assigned to the station if we're an AP 15787 </para></listitem> 15788 </varlistentry> 15789 <varlistentry> <term>ht_cap</term> 15790 <listitem><para> 15791HT capabilities of this STA; restricted to our own capabilities 15792 </para></listitem> 15793 </varlistentry> 15794 <varlistentry> <term>vht_cap</term> 15795 <listitem><para> 15796VHT capabilities of this STA; restricted to our own capabilities 15797 </para></listitem> 15798 </varlistentry> 15799 <varlistentry> <term>wme</term> 15800 <listitem><para> 15801indicates whether the STA supports QoS/WME (if local devices does, 15802otherwise always false) 15803 </para></listitem> 15804 </varlistentry> 15805 <varlistentry> <term>uapsd_queues</term> 15806 <listitem><para> 15807bitmap of queues configured for uapsd. Only valid 15808if wme is supported. 15809 </para></listitem> 15810 </varlistentry> 15811 <varlistentry> <term>max_sp</term> 15812 <listitem><para> 15813max Service Period. Only valid if wme is supported. 15814 </para></listitem> 15815 </varlistentry> 15816 <varlistentry> <term>rx_nss</term> 15817 <listitem><para> 15818in HT/VHT, the maximum number of spatial streams the 15819station can receive at the moment, changed by operating mode 15820notifications and capabilities. The value is only valid after 15821the station moves to associated state. 15822 </para></listitem> 15823 </varlistentry> 15824 <varlistentry> <term>bandwidth</term> 15825 <listitem><para> 15826current bandwidth the station can receive with 15827 </para></listitem> 15828 </varlistentry> 15829 <varlistentry> <term>smps_mode</term> 15830 <listitem><para> 15831current SMPS mode (off, static or dynamic) 15832 </para></listitem> 15833 </varlistentry> 15834 <varlistentry> <term>rates</term> 15835 <listitem><para> 15836rate control selection table 15837 </para></listitem> 15838 </varlistentry> 15839 <varlistentry> <term>tdls</term> 15840 <listitem><para> 15841indicates whether the STA is a TDLS peer 15842 </para></listitem> 15843 </varlistentry> 15844 <varlistentry> <term>tdls_initiator</term> 15845 <listitem><para> 15846indicates the STA is an initiator of the TDLS link. Only 15847valid if the STA is a TDLS peer in the first place. 15848 </para></listitem> 15849 </varlistentry> 15850 <varlistentry> <term>mfp</term> 15851 <listitem><para> 15852indicates whether the STA uses management frame protection or not. 15853 </para></listitem> 15854 </varlistentry> 15855 <varlistentry> <term>txq[IEEE80211_NUM_TIDS]</term> 15856 <listitem><para> 15857per-TID data TX queues (if driver uses the TXQ abstraction) 15858 </para></listitem> 15859 </varlistentry> 15860 <varlistentry> <term>drv_priv[0]</term> 15861 <listitem><para> 15862data area for driver use, will always be aligned to 15863sizeof(void *), size is determined in hw information. 15864 </para></listitem> 15865 </varlistentry> 15866 </variablelist> 15867 </refsect1> 15868<refsect1> 15869<title>Description</title> 15870<para> 15871 </para><para> 15872 15873 A station table entry represents a station we are possibly 15874 communicating with. Since stations are RCU-managed in 15875 mac80211, any ieee80211_sta pointer you get access to must 15876 either be protected by <function>rcu_read_lock</function> explicitly or implicitly, 15877 or you must take good care to not use such a pointer after a 15878 call to your sta_remove callback that removed it. 15879</para> 15880</refsect1> 15881</refentry> 15882 15883<refentry id="API-enum-sta-notify-cmd"> 15884<refentryinfo> 15885 <title>LINUX</title> 15886 <productname>Kernel Hackers Manual</productname> 15887 <date>July 2017</date> 15888</refentryinfo> 15889<refmeta> 15890 <refentrytitle><phrase>enum sta_notify_cmd</phrase></refentrytitle> 15891 <manvolnum>9</manvolnum> 15892 <refmiscinfo class="version">4.1.27</refmiscinfo> 15893</refmeta> 15894<refnamediv> 15895 <refname>enum sta_notify_cmd</refname> 15896 <refpurpose> 15897 sta notify command 15898 </refpurpose> 15899</refnamediv> 15900<refsynopsisdiv> 15901 <title>Synopsis</title> 15902 <programlisting> 15903enum sta_notify_cmd { 15904 STA_NOTIFY_SLEEP, 15905 STA_NOTIFY_AWAKE 15906}; </programlisting> 15907</refsynopsisdiv> 15908<refsect1> 15909 <title>Constants</title> 15910 <variablelist> 15911 <varlistentry> <term>STA_NOTIFY_SLEEP</term> 15912 <listitem><para> 15913a station is now sleeping 15914 </para></listitem> 15915 </varlistentry> 15916 <varlistentry> <term>STA_NOTIFY_AWAKE</term> 15917 <listitem><para> 15918a sleeping station woke up 15919 </para></listitem> 15920 </varlistentry> 15921 </variablelist> 15922</refsect1> 15923<refsect1> 15924<title>Description</title> 15925<para> 15926 </para><para> 15927 15928 Used with the <function>sta_notify</function> callback in <structname>struct ieee80211_ops</structname>, this 15929 indicates if an associated station made a power state transition. 15930</para> 15931</refsect1> 15932</refentry> 15933 15934<refentry id="API-ieee80211-find-sta"> 15935<refentryinfo> 15936 <title>LINUX</title> 15937 <productname>Kernel Hackers Manual</productname> 15938 <date>July 2017</date> 15939</refentryinfo> 15940<refmeta> 15941 <refentrytitle><phrase>ieee80211_find_sta</phrase></refentrytitle> 15942 <manvolnum>9</manvolnum> 15943 <refmiscinfo class="version">4.1.27</refmiscinfo> 15944</refmeta> 15945<refnamediv> 15946 <refname>ieee80211_find_sta</refname> 15947 <refpurpose> 15948 find a station 15949 </refpurpose> 15950</refnamediv> 15951<refsynopsisdiv> 15952 <title>Synopsis</title> 15953 <funcsynopsis><funcprototype> 15954 <funcdef>struct ieee80211_sta * <function>ieee80211_find_sta </function></funcdef> 15955 <paramdef>struct ieee80211_vif * <parameter>vif</parameter></paramdef> 15956 <paramdef>const u8 * <parameter>addr</parameter></paramdef> 15957 </funcprototype></funcsynopsis> 15958</refsynopsisdiv> 15959<refsect1> 15960 <title>Arguments</title> 15961 <variablelist> 15962 <varlistentry> 15963 <term><parameter>vif</parameter></term> 15964 <listitem> 15965 <para> 15966 virtual interface to look for station on 15967 </para> 15968 </listitem> 15969 </varlistentry> 15970 <varlistentry> 15971 <term><parameter>addr</parameter></term> 15972 <listitem> 15973 <para> 15974 station's address 15975 </para> 15976 </listitem> 15977 </varlistentry> 15978 </variablelist> 15979</refsect1> 15980<refsect1> 15981<title>Return</title> 15982<para> 15983 The station, if found. <constant>NULL</constant> otherwise. 15984</para> 15985</refsect1> 15986<refsect1> 15987<title>Note</title> 15988<para> 15989 This function must be called under RCU lock and the 15990 resulting pointer is only valid under RCU lock as well. 15991</para> 15992</refsect1> 15993</refentry> 15994 15995<refentry id="API-ieee80211-find-sta-by-ifaddr"> 15996<refentryinfo> 15997 <title>LINUX</title> 15998 <productname>Kernel Hackers Manual</productname> 15999 <date>July 2017</date> 16000</refentryinfo> 16001<refmeta> 16002 <refentrytitle><phrase>ieee80211_find_sta_by_ifaddr</phrase></refentrytitle> 16003 <manvolnum>9</manvolnum> 16004 <refmiscinfo class="version">4.1.27</refmiscinfo> 16005</refmeta> 16006<refnamediv> 16007 <refname>ieee80211_find_sta_by_ifaddr</refname> 16008 <refpurpose> 16009 find a station on hardware 16010 </refpurpose> 16011</refnamediv> 16012<refsynopsisdiv> 16013 <title>Synopsis</title> 16014 <funcsynopsis><funcprototype> 16015 <funcdef>struct ieee80211_sta * <function>ieee80211_find_sta_by_ifaddr </function></funcdef> 16016 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 16017 <paramdef>const u8 * <parameter>addr</parameter></paramdef> 16018 <paramdef>const u8 * <parameter>localaddr</parameter></paramdef> 16019 </funcprototype></funcsynopsis> 16020</refsynopsisdiv> 16021<refsect1> 16022 <title>Arguments</title> 16023 <variablelist> 16024 <varlistentry> 16025 <term><parameter>hw</parameter></term> 16026 <listitem> 16027 <para> 16028 pointer as obtained from <function>ieee80211_alloc_hw</function> 16029 </para> 16030 </listitem> 16031 </varlistentry> 16032 <varlistentry> 16033 <term><parameter>addr</parameter></term> 16034 <listitem> 16035 <para> 16036 remote station's address 16037 </para> 16038 </listitem> 16039 </varlistentry> 16040 <varlistentry> 16041 <term><parameter>localaddr</parameter></term> 16042 <listitem> 16043 <para> 16044 local address (vif->sdata->vif.addr). Use NULL for 'any'. 16045 </para> 16046 </listitem> 16047 </varlistentry> 16048 </variablelist> 16049</refsect1> 16050<refsect1> 16051<title>Return</title> 16052<para> 16053 The station, if found. <constant>NULL</constant> otherwise. 16054</para> 16055</refsect1> 16056<refsect1> 16057<title>Note</title> 16058<para> 16059 This function must be called under RCU lock and the 16060 resulting pointer is only valid under RCU lock as well. 16061</para> 16062</refsect1> 16063<refsect1> 16064<title>NOTE</title> 16065<para> 16066 You may pass NULL for localaddr, but then you will just get 16067 the first STA that matches the remote address 'addr'. 16068 We can have multiple STA associated with multiple 16069 logical stations (e.g. consider a station connecting to another 16070 BSSID on the same AP hardware without disconnecting first). 16071 In this case, the result of this method with localaddr NULL 16072 is not reliable. 16073 </para><para> 16074 16075 DO NOT USE THIS FUNCTION with localaddr NULL if at all possible. 16076</para> 16077</refsect1> 16078</refentry> 16079 16080 </chapter> 16081 16082 <chapter id="hardware-scan-offload"> 16083 <title>Hardware scan offload</title> 16084 <para>TBD</para> 16085<refentry id="API-ieee80211-scan-completed"> 16086<refentryinfo> 16087 <title>LINUX</title> 16088 <productname>Kernel Hackers Manual</productname> 16089 <date>July 2017</date> 16090</refentryinfo> 16091<refmeta> 16092 <refentrytitle><phrase>ieee80211_scan_completed</phrase></refentrytitle> 16093 <manvolnum>9</manvolnum> 16094 <refmiscinfo class="version">4.1.27</refmiscinfo> 16095</refmeta> 16096<refnamediv> 16097 <refname>ieee80211_scan_completed</refname> 16098 <refpurpose> 16099 completed hardware scan 16100 </refpurpose> 16101</refnamediv> 16102<refsynopsisdiv> 16103 <title>Synopsis</title> 16104 <funcsynopsis><funcprototype> 16105 <funcdef>void <function>ieee80211_scan_completed </function></funcdef> 16106 <paramdef>struct ieee80211_hw * <parameter>hw</parameter></paramdef> 16107 <paramdef>bool <parameter>aborted</parameter></paramdef> 16108 </funcprototype></funcsynopsis> 16109</refsynopsisdiv> 16110<refsect1> 16111 <title>Arguments</title> 16112 <variablelist> 16113 <varlistentry> 16114 <term><parameter>hw</parameter></term> 16115 <listitem> 16116 <para> 16117 the hardware that finished the scan 16118 </para> 16119 </listitem> 16120 </varlistentry> 16121 <varlistentry> 16122 <term><parameter>aborted</parameter></term> 16123 <listitem> 16124 <para> 16125 set to true if scan was aborted 16126 </para> 16127 </listitem> 16128 </varlistentry> 16129 </variablelist> 16130</refsect1> 16131<refsect1> 16132<title>Description</title> 16133<para> 16134 </para><para> 16135 16136 When hardware scan offload is used (i.e. the <function>hw_scan</function> callback is 16137 assigned) this function needs to be called by the driver to notify 16138 mac80211 that the scan finished. This function can be called from 16139 any context, including hardirq context. 16140</para> 16141</refsect1> 16142</refentry> 16143 16144 </chapter> 16145 16146 <chapter id="aggregation"> 16147 <title>Aggregation</title> 16148 <sect1> 16149 <title>TX A-MPDU aggregation</title> 16150<para> 16151 </para><para> 16152 Aggregation on the TX side requires setting the hardware flag 16153 <constant>IEEE80211_HW_AMPDU_AGGREGATION</constant>. The driver will then be handed 16154 packets with a flag indicating A-MPDU aggregation. The driver 16155 or device is responsible for actually aggregating the frames, 16156 as well as deciding how many and which to aggregate. 16157 </para><para> 16158 When TX aggregation is started by some subsystem (usually the rate 16159 control algorithm would be appropriate) by calling the 16160 <function>ieee80211_start_tx_ba_session</function> function, the driver will be 16161 notified via its <parameter>ampdu_action</parameter> function, with the 16162 <constant>IEEE80211_AMPDU_TX_START</constant> action. 16163 </para><para> 16164 In response to that, the driver is later required to call the 16165 <function>ieee80211_start_tx_ba_cb_irqsafe</function> function, which will really 16166 start the aggregation session after the peer has also responded. 16167 If the peer responds negatively, the session will be stopped 16168 again right away. Note that it is possible for the aggregation 16169 session to be stopped before the driver has indicated that it 16170 is done setting it up, in which case it must not indicate the 16171 setup completion. 16172 </para><para> 16173 Also note that, since we also need to wait for a response from 16174 the peer, the driver is notified of the completion of the 16175 handshake by the <constant>IEEE80211_AMPDU_TX_OPERATIONAL</constant> action to the 16176 <parameter>ampdu_action</parameter> callback. 16177 </para><para> 16178 Similarly, when the aggregation session is stopped by the peer 16179 or something calling <function>ieee80211_stop_tx_ba_session</function>, the driver's 16180 <parameter>ampdu_action</parameter> function will be called with the action 16181 <constant>IEEE80211_AMPDU_TX_STOP</constant>. In this case, the call must not fail, 16182 and the driver must later call <function>ieee80211_stop_tx_ba_cb_irqsafe</function>. 16183 Note that the sta can get destroyed before the BA tear down is 16184 complete. 16185</para> 16186 16187 </sect1> 16188 <sect1> 16189 <title>RX A-MPDU aggregation</title> 16190<para> 16191 </para><para> 16192 Aggregation on the RX side requires only implementing the 16193 <parameter>ampdu_action</parameter> callback that is invoked to start/stop any 16194 block-ack sessions for RX aggregation. 16195 </para><para> 16196 When RX aggregation is started by the peer, the driver is 16197 notified via <parameter>ampdu_action</parameter> function, with the 16198 <constant>IEEE80211_AMPDU_RX_START</constant> action, and may reject the request 16199 in which case a negative response is sent to the peer, if it 16200 accepts it a positive response is sent. 16201 </para><para> 16202 While the session is active, the device/driver are required 16203 to de-aggregate frames and pass them up one by one to mac80211, 16204 which will handle the reorder buffer. 16205 </para><para> 16206 When the aggregation session is stopped again by the peer or 16207 ourselves, the driver's <parameter>ampdu_action</parameter> function will be called 16208 with the action <constant>IEEE80211_AMPDU_RX_STOP</constant>. In this case, the 16209 call must not fail. 16210</para> 16211 16212<refentry id="API-enum-ieee80211-ampdu-mlme-action"> 16213<refentryinfo> 16214 <title>LINUX</title> 16215 <productname>Kernel Hackers Manual</productname> 16216 <date>July 2017</date> 16217</refentryinfo> 16218<refmeta> 16219 <refentrytitle><phrase>enum ieee80211_ampdu_mlme_action</phrase></refentrytitle> 16220 <manvolnum>9</manvolnum> 16221 <refmiscinfo class="version">4.1.27</refmiscinfo> 16222</refmeta> 16223<refnamediv> 16224 <refname>enum ieee80211_ampdu_mlme_action</refname> 16225 <refpurpose> 16226 A-MPDU actions 16227 </refpurpose> 16228</refnamediv> 16229<refsynopsisdiv> 16230 <title>Synopsis</title> 16231 <programlisting> 16232enum ieee80211_ampdu_mlme_action { 16233 IEEE80211_AMPDU_RX_START, 16234 IEEE80211_AMPDU_RX_STOP, 16235 IEEE80211_AMPDU_TX_START, 16236 IEEE80211_AMPDU_TX_STOP_CONT, 16237 IEEE80211_AMPDU_TX_STOP_FLUSH, 16238 IEEE80211_AMPDU_TX_STOP_FLUSH_CONT, 16239 IEEE80211_AMPDU_TX_OPERATIONAL 16240}; </programlisting> 16241</refsynopsisdiv> 16242<refsect1> 16243 <title>Constants</title> 16244 <variablelist> 16245 <varlistentry> <term>IEEE80211_AMPDU_RX_START</term> 16246 <listitem><para> 16247start RX aggregation 16248 </para></listitem> 16249 </varlistentry> 16250 <varlistentry> <term>IEEE80211_AMPDU_RX_STOP</term> 16251 <listitem><para> 16252stop RX aggregation 16253 </para></listitem> 16254 </varlistentry> 16255 <varlistentry> <term>IEEE80211_AMPDU_TX_START</term> 16256 <listitem><para> 16257start TX aggregation 16258 </para></listitem> 16259 </varlistentry> 16260 <varlistentry> <term>IEEE80211_AMPDU_TX_STOP_CONT</term> 16261 <listitem><para> 16262stop TX aggregation but continue transmitting 16263queued packets, now unaggregated. After all packets are transmitted the 16264driver has to call <function>ieee80211_stop_tx_ba_cb_irqsafe</function>. 16265 </para></listitem> 16266 </varlistentry> 16267 <varlistentry> <term>IEEE80211_AMPDU_TX_STOP_FLUSH</term> 16268 <listitem><para> 16269stop TX aggregation and flush all packets, 16270called when the station is removed. There's no need or reason to call 16271<function>ieee80211_stop_tx_ba_cb_irqsafe</function> in this case as mac80211 assumes the 16272session is gone and removes the station. 16273 </para></listitem> 16274 </varlistentry> 16275 <varlistentry> <term>IEEE80211_AMPDU_TX_STOP_FLUSH_CONT</term> 16276 <listitem><para> 16277called when TX aggregation is stopped 16278but the driver hasn't called <function>ieee80211_stop_tx_ba_cb_irqsafe</function> yet and 16279now the connection is dropped and the station will be removed. Drivers 16280should clean up and drop remaining packets when this is called. 16281 </para></listitem> 16282 </varlistentry> 16283 <varlistentry> <term>IEEE80211_AMPDU_TX_OPERATIONAL</term> 16284 <listitem><para> 16285TX aggregation has become operational 16286 </para></listitem> 16287 </varlistentry> 16288 </variablelist> 16289</refsect1> 16290<refsect1> 16291<title>Description</title> 16292<para> 16293 </para><para> 16294 16295 These flags are used with the <function>ampdu_action</function> callback in 16296 <structname>struct ieee80211_ops</structname> to indicate which action is needed. 16297 </para><para> 16298 16299 Note that drivers MUST be able to deal with a TX aggregation 16300 session being stopped even before they OK'ed starting it by 16301 calling ieee80211_start_tx_ba_cb_irqsafe, because the peer 16302 might receive the addBA frame and send a delBA right away! 16303</para> 16304</refsect1> 16305</refentry> 16306 16307 </sect1> 16308 </chapter> 16309 16310 <chapter id="smps"> 16311 <title>Spatial Multiplexing Powersave (SMPS)</title> 16312<para> 16313 </para><para> 16314 SMPS (Spatial multiplexing power save) is a mechanism to conserve 16315 power in an 802.11n implementation. For details on the mechanism 16316 and rationale, please refer to 802.11 (as amended by 802.11n-2009) 16317 <quote>11.2.3 SM power save</quote>. 16318 </para><para> 16319 The mac80211 implementation is capable of sending action frames 16320 to update the AP about the station's SMPS mode, and will instruct 16321 the driver to enter the specific mode. It will also announce the 16322 requested SMPS mode during the association handshake. Hardware 16323 support for this feature is required, and can be indicated by 16324 hardware flags. 16325 </para><para> 16326 The default mode will be <quote>automatic</quote>, which nl80211/cfg80211 16327 defines to be dynamic SMPS in (regular) powersave, and SMPS 16328 turned off otherwise. 16329 </para><para> 16330 To support this feature, the driver must set the appropriate 16331 hardware support flags, and handle the SMPS flag to the <function>config</function> 16332 operation. It will then with this mechanism be instructed to 16333 enter the requested SMPS mode while associated to an HT AP. 16334</para> 16335 16336<refentry id="API-ieee80211-request-smps"> 16337<refentryinfo> 16338 <title>LINUX</title> 16339 <productname>Kernel Hackers Manual</productname> 16340 <date>July 2017</date> 16341</refentryinfo> 16342<refmeta> 16343 <refentrytitle><phrase>ieee80211_request_smps</phrase></refentrytitle> 16344 <manvolnum>9</manvolnum> 16345 <refmiscinfo class="version">4.1.27</refmiscinfo> 16346</refmeta> 16347<refnamediv> 16348 <refname>ieee80211_request_smps</refname> 16349 <refpurpose> 16350 request SM PS transition 16351 </refpurpose> 16352</refnamediv> 16353<refsynopsisdiv> 16354 <title>Synopsis</title> 16355 <funcsynopsis><funcprototype> 16356 <funcdef>void <function>ieee80211_request_smps </function></funcdef> 16357 <paramdef>struct ieee80211_vif * <parameter>vif</parameter></paramdef> 16358 <paramdef>enum ieee80211_smps_mode <parameter>smps_mode</parameter></paramdef> 16359 </funcprototype></funcsynopsis> 16360</refsynopsisdiv> 16361<refsect1> 16362 <title>Arguments</title> 16363 <variablelist> 16364 <varlistentry> 16365 <term><parameter>vif</parameter></term> 16366 <listitem> 16367 <para> 16368 <structname>struct ieee80211_vif</structname> pointer from the add_interface callback. 16369 </para> 16370 </listitem> 16371 </varlistentry> 16372 <varlistentry> 16373 <term><parameter>smps_mode</parameter></term> 16374 <listitem> 16375 <para> 16376 new SM PS mode 16377 </para> 16378 </listitem> 16379 </varlistentry> 16380 </variablelist> 16381</refsect1> 16382<refsect1> 16383<title>Description</title> 16384<para> 16385 This allows the driver to request an SM PS transition in managed 16386 mode. This is useful when the driver has more information than 16387 the stack about possible interference, for example by bluetooth. 16388</para> 16389</refsect1> 16390</refentry> 16391 16392<refentry id="API-enum-ieee80211-smps-mode"> 16393<refentryinfo> 16394 <title>LINUX</title> 16395 <productname>Kernel Hackers Manual</productname> 16396 <date>July 2017</date> 16397</refentryinfo> 16398<refmeta> 16399 <refentrytitle><phrase>enum ieee80211_smps_mode</phrase></refentrytitle> 16400 <manvolnum>9</manvolnum> 16401 <refmiscinfo class="version">4.1.27</refmiscinfo> 16402</refmeta> 16403<refnamediv> 16404 <refname>enum ieee80211_smps_mode</refname> 16405 <refpurpose> 16406 spatial multiplexing power save mode 16407 </refpurpose> 16408</refnamediv> 16409<refsynopsisdiv> 16410 <title>Synopsis</title> 16411 <programlisting> 16412enum ieee80211_smps_mode { 16413 IEEE80211_SMPS_AUTOMATIC, 16414 IEEE80211_SMPS_OFF, 16415 IEEE80211_SMPS_STATIC, 16416 IEEE80211_SMPS_DYNAMIC, 16417 IEEE80211_SMPS_NUM_MODES 16418}; </programlisting> 16419</refsynopsisdiv> 16420<refsect1> 16421 <title>Constants</title> 16422 <variablelist> 16423 <varlistentry> <term>IEEE80211_SMPS_AUTOMATIC</term> 16424 <listitem><para> 16425automatic 16426 </para></listitem> 16427 </varlistentry> 16428 <varlistentry> <term>IEEE80211_SMPS_OFF</term> 16429 <listitem><para> 16430off 16431 </para></listitem> 16432 </varlistentry> 16433 <varlistentry> <term>IEEE80211_SMPS_STATIC</term> 16434 <listitem><para> 16435static 16436 </para></listitem> 16437 </varlistentry> 16438 <varlistentry> <term>IEEE80211_SMPS_DYNAMIC</term> 16439 <listitem><para> 16440dynamic 16441 </para></listitem> 16442 </varlistentry> 16443 <varlistentry> <term>IEEE80211_SMPS_NUM_MODES</term> 16444 <listitem><para> 16445internal, don't use 16446 </para></listitem> 16447 </varlistentry> 16448 </variablelist> 16449</refsect1> 16450</refentry> 16451 16452 </chapter> 16453 </part> 16454 16455 <part id="rate-control"> 16456 <title>Rate control interface</title> 16457 <partintro> 16458 <para>TBD</para> 16459 <para> 16460 This part of the book describes the rate control algorithm 16461 interface and how it relates to mac80211 and drivers. 16462 </para> 16463 </partintro> 16464 <chapter id="ratecontrol-api"> 16465 <title>Rate Control API</title> 16466 <para>TBD</para> 16467<refentry id="API-ieee80211-start-tx-ba-session"> 16468<refentryinfo> 16469 <title>LINUX</title> 16470 <productname>Kernel Hackers Manual</productname> 16471 <date>July 2017</date> 16472</refentryinfo> 16473<refmeta> 16474 <refentrytitle><phrase>ieee80211_start_tx_ba_session</phrase></refentrytitle> 16475 <manvolnum>9</manvolnum> 16476 <refmiscinfo class="version">4.1.27</refmiscinfo> 16477</refmeta> 16478<refnamediv> 16479 <refname>ieee80211_start_tx_ba_session</refname> 16480 <refpurpose> 16481 Start a tx Block Ack session. 16482 </refpurpose> 16483</refnamediv> 16484<refsynopsisdiv> 16485 <title>Synopsis</title> 16486 <funcsynopsis><funcprototype> 16487 <funcdef>int <function>ieee80211_start_tx_ba_session </function></funcdef> 16488 <paramdef>struct ieee80211_sta * <parameter>sta</parameter></paramdef> 16489 <paramdef>u16 <parameter>tid</parameter></paramdef> 16490 <paramdef>u16 <parameter>timeout</parameter></paramdef> 16491 </funcprototype></funcsynopsis> 16492</refsynopsisdiv> 16493<refsect1> 16494 <title>Arguments</title> 16495 <variablelist> 16496 <varlistentry> 16497 <term><parameter>sta</parameter></term> 16498 <listitem> 16499 <para> 16500 the station for which to start a BA session 16501 </para> 16502 </listitem> 16503 </varlistentry> 16504 <varlistentry> 16505 <term><parameter>tid</parameter></term> 16506 <listitem> 16507 <para> 16508 the TID to BA on. 16509 </para> 16510 </listitem> 16511 </varlistentry> 16512 <varlistentry> 16513 <term><parameter>timeout</parameter></term> 16514 <listitem> 16515 <para> 16516 session timeout value (in TUs) 16517 </para> 16518 </listitem> 16519 </varlistentry> 16520 </variablelist> 16521</refsect1> 16522<refsect1> 16523<title>Return</title> 16524<para> 16525 success if addBA request was sent, failure otherwise 16526 </para><para> 16527 16528 Although mac80211/low level driver/user space application can estimate 16529 the need to start aggregation on a certain RA/TID, the session level 16530 will be managed by the mac80211. 16531</para> 16532</refsect1> 16533</refentry> 16534 16535<refentry id="API-ieee80211-start-tx-ba-cb-irqsafe"> 16536<refentryinfo> 16537 <title>LINUX</title> 16538 <productname>Kernel Hackers Manual</productname> 16539 <date>July 2017</date> 16540</refentryinfo> 16541<refmeta> 16542 <refentrytitle><phrase>ieee80211_start_tx_ba_cb_irqsafe</phrase></refentrytitle> 16543 <manvolnum>9</manvolnum> 16544 <refmiscinfo class="version">4.1.27</refmiscinfo> 16545</refmeta> 16546<refnamediv> 16547 <refname>ieee80211_start_tx_ba_cb_irqsafe</refname> 16548 <refpurpose> 16549 low level driver ready to aggregate. 16550 </refpurpose> 16551</refnamediv> 16552<refsynopsisdiv> 16553 <title>Synopsis</title> 16554 <funcsynopsis><funcprototype> 16555 <funcdef>void <function>ieee80211_start_tx_ba_cb_irqsafe </function></funcdef> 16556 <paramdef>struct ieee80211_vif * <parameter>vif</parameter></paramdef> 16557 <paramdef>const u8 * <parameter>ra</parameter></paramdef> 16558 <paramdef>u16 <parameter>tid</parameter></paramdef> 16559 </funcprototype></funcsynopsis> 16560</refsynopsisdiv> 16561<refsect1> 16562 <title>Arguments</title> 16563 <variablelist> 16564 <varlistentry> 16565 <term><parameter>vif</parameter></term> 16566 <listitem> 16567 <para> 16568 <structname>struct ieee80211_vif</structname> pointer from the add_interface callback 16569 </para> 16570 </listitem> 16571 </varlistentry> 16572 <varlistentry> 16573 <term><parameter>ra</parameter></term> 16574 <listitem> 16575 <para> 16576 receiver address of the BA session recipient. 16577 </para> 16578 </listitem> 16579 </varlistentry> 16580 <varlistentry> 16581 <term><parameter>tid</parameter></term> 16582 <listitem> 16583 <para> 16584 the TID to BA on. 16585 </para> 16586 </listitem> 16587 </varlistentry> 16588 </variablelist> 16589</refsect1> 16590<refsect1> 16591<title>Description</title> 16592<para> 16593 This function must be called by low level driver once it has 16594 finished with preparations for the BA session. It can be called 16595 from any context. 16596</para> 16597</refsect1> 16598</refentry> 16599 16600<refentry id="API-ieee80211-stop-tx-ba-session"> 16601<refentryinfo> 16602 <title>LINUX</title> 16603 <productname>Kernel Hackers Manual</productname> 16604 <date>July 2017</date> 16605</refentryinfo> 16606<refmeta> 16607 <refentrytitle><phrase>ieee80211_stop_tx_ba_session</phrase></refentrytitle> 16608 <manvolnum>9</manvolnum> 16609 <refmiscinfo class="version">4.1.27</refmiscinfo> 16610</refmeta> 16611<refnamediv> 16612 <refname>ieee80211_stop_tx_ba_session</refname> 16613 <refpurpose> 16614 Stop a Block Ack session. 16615 </refpurpose> 16616</refnamediv> 16617<refsynopsisdiv> 16618 <title>Synopsis</title> 16619 <funcsynopsis><funcprototype> 16620 <funcdef>int <function>ieee80211_stop_tx_ba_session </function></funcdef> 16621 <paramdef>struct ieee80211_sta * <parameter>sta</parameter></paramdef> 16622 <paramdef>u16 <parameter>tid</parameter></paramdef> 16623 </funcprototype></funcsynopsis> 16624</refsynopsisdiv> 16625<refsect1> 16626 <title>Arguments</title> 16627 <variablelist> 16628 <varlistentry> 16629 <term><parameter>sta</parameter></term> 16630 <listitem> 16631 <para> 16632 the station whose BA session to stop 16633 </para> 16634 </listitem> 16635 </varlistentry> 16636 <varlistentry> 16637 <term><parameter>tid</parameter></term> 16638 <listitem> 16639 <para> 16640 the TID to stop BA. 16641 </para> 16642 </listitem> 16643 </varlistentry> 16644 </variablelist> 16645</refsect1> 16646<refsect1> 16647<title>Return</title> 16648<para> 16649 negative error if the TID is invalid, or no aggregation active 16650 </para><para> 16651 16652 Although mac80211/low level driver/user space application can estimate 16653 the need to stop aggregation on a certain RA/TID, the session level 16654 will be managed by the mac80211. 16655</para> 16656</refsect1> 16657</refentry> 16658 16659<refentry id="API-ieee80211-stop-tx-ba-cb-irqsafe"> 16660<refentryinfo> 16661 <title>LINUX</title> 16662 <productname>Kernel Hackers Manual</productname> 16663 <date>July 2017</date> 16664</refentryinfo> 16665<refmeta> 16666 <refentrytitle><phrase>ieee80211_stop_tx_ba_cb_irqsafe</phrase></refentrytitle> 16667 <manvolnum>9</manvolnum> 16668 <refmiscinfo class="version">4.1.27</refmiscinfo> 16669</refmeta> 16670<refnamediv> 16671 <refname>ieee80211_stop_tx_ba_cb_irqsafe</refname> 16672 <refpurpose> 16673 low level driver ready to stop aggregate. 16674 </refpurpose> 16675</refnamediv> 16676<refsynopsisdiv> 16677 <title>Synopsis</title> 16678 <funcsynopsis><funcprototype> 16679 <funcdef>void <function>ieee80211_stop_tx_ba_cb_irqsafe </function></funcdef> 16680 <paramdef>struct ieee80211_vif * <parameter>vif</parameter></paramdef> 16681 <paramdef>const u8 * <parameter>ra</parameter></paramdef> 16682 <paramdef>u16 <parameter>tid</parameter></paramdef> 16683 </funcprototype></funcsynopsis> 16684</refsynopsisdiv> 16685<refsect1> 16686 <title>Arguments</title> 16687 <variablelist> 16688 <varlistentry> 16689 <term><parameter>vif</parameter></term> 16690 <listitem> 16691 <para> 16692 <structname>struct ieee80211_vif</structname> pointer from the add_interface callback 16693 </para> 16694 </listitem> 16695 </varlistentry> 16696 <varlistentry> 16697 <term><parameter>ra</parameter></term> 16698 <listitem> 16699 <para> 16700 receiver address of the BA session recipient. 16701 </para> 16702 </listitem> 16703 </varlistentry> 16704 <varlistentry> 16705 <term><parameter>tid</parameter></term> 16706 <listitem> 16707 <para> 16708 the desired TID to BA on. 16709 </para> 16710 </listitem> 16711 </varlistentry> 16712 </variablelist> 16713</refsect1> 16714<refsect1> 16715<title>Description</title> 16716<para> 16717 This function must be called by low level driver once it has 16718 finished with preparations for the BA session tear down. It 16719 can be called from any context. 16720</para> 16721</refsect1> 16722</refentry> 16723 16724<refentry id="API-enum-ieee80211-rate-control-changed"> 16725<refentryinfo> 16726 <title>LINUX</title> 16727 <productname>Kernel Hackers Manual</productname> 16728 <date>July 2017</date> 16729</refentryinfo> 16730<refmeta> 16731 <refentrytitle><phrase>enum ieee80211_rate_control_changed</phrase></refentrytitle> 16732 <manvolnum>9</manvolnum> 16733 <refmiscinfo class="version">4.1.27</refmiscinfo> 16734</refmeta> 16735<refnamediv> 16736 <refname>enum ieee80211_rate_control_changed</refname> 16737 <refpurpose> 16738 flags to indicate what changed 16739 </refpurpose> 16740</refnamediv> 16741<refsynopsisdiv> 16742 <title>Synopsis</title> 16743 <programlisting> 16744enum ieee80211_rate_control_changed { 16745 IEEE80211_RC_BW_CHANGED, 16746 IEEE80211_RC_SMPS_CHANGED, 16747 IEEE80211_RC_SUPP_RATES_CHANGED, 16748 IEEE80211_RC_NSS_CHANGED 16749}; </programlisting> 16750</refsynopsisdiv> 16751<refsect1> 16752 <title>Constants</title> 16753 <variablelist> 16754 <varlistentry> <term>IEEE80211_RC_BW_CHANGED</term> 16755 <listitem><para> 16756The bandwidth that can be used to transmit 16757to this station changed. The actual bandwidth is in the station 16758information -- for HT20/40 the IEEE80211_HT_CAP_SUP_WIDTH_20_40 16759flag changes, for HT and VHT the bandwidth field changes. 16760 </para></listitem> 16761 </varlistentry> 16762 <varlistentry> <term>IEEE80211_RC_SMPS_CHANGED</term> 16763 <listitem><para> 16764The SMPS state of the station changed. 16765 </para></listitem> 16766 </varlistentry> 16767 <varlistentry> <term>IEEE80211_RC_SUPP_RATES_CHANGED</term> 16768 <listitem><para> 16769The supported rate set of this peer 16770changed (in IBSS mode) due to discovering more information about 16771the peer. 16772 </para></listitem> 16773 </varlistentry> 16774 <varlistentry> <term>IEEE80211_RC_NSS_CHANGED</term> 16775 <listitem><para> 16776N_SS (number of spatial streams) was changed 16777by the peer 16778 </para></listitem> 16779 </varlistentry> 16780 </variablelist> 16781</refsect1> 16782</refentry> 16783 16784<refentry id="API-struct-ieee80211-tx-rate-control"> 16785<refentryinfo> 16786 <title>LINUX</title> 16787 <productname>Kernel Hackers Manual</productname> 16788 <date>July 2017</date> 16789</refentryinfo> 16790<refmeta> 16791 <refentrytitle><phrase>struct ieee80211_tx_rate_control</phrase></refentrytitle> 16792 <manvolnum>9</manvolnum> 16793 <refmiscinfo class="version">4.1.27</refmiscinfo> 16794</refmeta> 16795<refnamediv> 16796 <refname>struct ieee80211_tx_rate_control</refname> 16797 <refpurpose> 16798 rate control information for/from RC algo 16799 </refpurpose> 16800</refnamediv> 16801<refsynopsisdiv> 16802 <title>Synopsis</title> 16803 <programlisting> 16804struct ieee80211_tx_rate_control { 16805 struct ieee80211_hw * hw; 16806 struct ieee80211_supported_band * sband; 16807 struct ieee80211_bss_conf * bss_conf; 16808 struct sk_buff * skb; 16809 struct ieee80211_tx_rate reported_rate; 16810 bool rts; 16811 bool short_preamble; 16812 u8 max_rate_idx; 16813 u32 rate_idx_mask; 16814 u8 * rate_idx_mcs_mask; 16815 bool bss; 16816}; </programlisting> 16817</refsynopsisdiv> 16818 <refsect1> 16819 <title>Members</title> 16820 <variablelist> 16821 <varlistentry> <term>hw</term> 16822 <listitem><para> 16823The hardware the algorithm is invoked for. 16824 </para></listitem> 16825 </varlistentry> 16826 <varlistentry> <term>sband</term> 16827 <listitem><para> 16828The band this frame is being transmitted on. 16829 </para></listitem> 16830 </varlistentry> 16831 <varlistentry> <term>bss_conf</term> 16832 <listitem><para> 16833the current BSS configuration 16834 </para></listitem> 16835 </varlistentry> 16836 <varlistentry> <term>skb</term> 16837 <listitem><para> 16838the skb that will be transmitted, the control information in it needs 16839to be filled in 16840 </para></listitem> 16841 </varlistentry> 16842 <varlistentry> <term>reported_rate</term> 16843 <listitem><para> 16844The rate control algorithm can fill this in to indicate 16845which rate should be reported to userspace as the current rate and 16846used for rate calculations in the mesh network. 16847 </para></listitem> 16848 </varlistentry> 16849 <varlistentry> <term>rts</term> 16850 <listitem><para> 16851whether RTS will be used for this frame because it is longer than the 16852RTS threshold 16853 </para></listitem> 16854 </varlistentry> 16855 <varlistentry> <term>short_preamble</term> 16856 <listitem><para> 16857whether mac80211 will request short-preamble transmission 16858if the selected rate supports it 16859 </para></listitem> 16860 </varlistentry> 16861 <varlistentry> <term>max_rate_idx</term> 16862 <listitem><para> 16863user-requested maximum (legacy) rate 16864(deprecated; this will be removed once drivers get updated to use 16865rate_idx_mask) 16866 </para></listitem> 16867 </varlistentry> 16868 <varlistentry> <term>rate_idx_mask</term> 16869 <listitem><para> 16870user-requested (legacy) rate mask 16871 </para></listitem> 16872 </varlistentry> 16873 <varlistentry> <term>rate_idx_mcs_mask</term> 16874 <listitem><para> 16875user-requested MCS rate mask (NULL if not in use) 16876 </para></listitem> 16877 </varlistentry> 16878 <varlistentry> <term>bss</term> 16879 <listitem><para> 16880whether this frame is sent out in AP or IBSS mode 16881 </para></listitem> 16882 </varlistentry> 16883 </variablelist> 16884 </refsect1> 16885</refentry> 16886 16887<refentry id="API-rate-control-send-low"> 16888<refentryinfo> 16889 <title>LINUX</title> 16890 <productname>Kernel Hackers Manual</productname> 16891 <date>July 2017</date> 16892</refentryinfo> 16893<refmeta> 16894 <refentrytitle><phrase>rate_control_send_low</phrase></refentrytitle> 16895 <manvolnum>9</manvolnum> 16896 <refmiscinfo class="version">4.1.27</refmiscinfo> 16897</refmeta> 16898<refnamediv> 16899 <refname>rate_control_send_low</refname> 16900 <refpurpose> 16901 helper for drivers for management/no-ack frames 16902 </refpurpose> 16903</refnamediv> 16904<refsynopsisdiv> 16905 <title>Synopsis</title> 16906 <funcsynopsis><funcprototype> 16907 <funcdef>bool <function>rate_control_send_low </function></funcdef> 16908 <paramdef>struct ieee80211_sta * <parameter>sta</parameter></paramdef> 16909 <paramdef>void * <parameter>priv_sta</parameter></paramdef> 16910 <paramdef>struct ieee80211_tx_rate_control * <parameter>txrc</parameter></paramdef> 16911 </funcprototype></funcsynopsis> 16912</refsynopsisdiv> 16913<refsect1> 16914 <title>Arguments</title> 16915 <variablelist> 16916 <varlistentry> 16917 <term><parameter>sta</parameter></term> 16918 <listitem> 16919 <para> 16920 <structname>struct ieee80211_sta</structname> pointer to the target destination. Note 16921 that this may be null. 16922 </para> 16923 </listitem> 16924 </varlistentry> 16925 <varlistentry> 16926 <term><parameter>priv_sta</parameter></term> 16927 <listitem> 16928 <para> 16929 private rate control structure. This may be null. 16930 </para> 16931 </listitem> 16932 </varlistentry> 16933 <varlistentry> 16934 <term><parameter>txrc</parameter></term> 16935 <listitem> 16936 <para> 16937 rate control information we sholud populate for mac80211. 16938 </para> 16939 </listitem> 16940 </varlistentry> 16941 </variablelist> 16942</refsect1> 16943<refsect1> 16944<title>Description</title> 16945<para> 16946 </para><para> 16947 16948 Rate control algorithms that agree to use the lowest rate to 16949 send management frames and NO_ACK data with the respective hw 16950 retries should use this in the beginning of their mac80211 get_rate 16951 callback. If true is returned the rate control can simply return. 16952 If false is returned we guarantee that sta and sta and priv_sta is 16953 not null. 16954 </para><para> 16955 16956 Rate control algorithms wishing to do more intelligent selection of 16957 rate for multicast/broadcast frames may choose to not use this. 16958</para> 16959</refsect1> 16960</refentry> 16961 16962 </chapter> 16963 </part> 16964 16965 <part id="internal"> 16966 <title>Internals</title> 16967 <partintro> 16968 <para>TBD</para> 16969 <para> 16970 This part of the book describes mac80211 internals. 16971 </para> 16972 </partintro> 16973 16974 <chapter id="key-handling"> 16975 <title>Key handling</title> 16976 <sect1> 16977 <title>Key handling basics</title> 16978<para> 16979 </para><para> 16980 Key handling in mac80211 is done based on per-interface (sub_if_data) 16981 keys and per-station keys. Since each station belongs to an interface, 16982 each station key also belongs to that interface. 16983 </para><para> 16984 Hardware acceleration is done on a best-effort basis for algorithms 16985 that are implemented in software, for each key the hardware is asked 16986 to enable that key for offloading but if it cannot do that the key is 16987 simply kept for software encryption (unless it is for an algorithm 16988 that isn't implemented in software). 16989 There is currently no way of knowing whether a key is handled in SW 16990 or HW except by looking into debugfs. 16991 </para><para> 16992 All key management is internally protected by a mutex. Within all 16993 other parts of mac80211, key references are, just as STA structure 16994 references, protected by RCU. Note, however, that some things are 16995 unprotected, namely the key->sta dereferences within the hardware 16996 acceleration functions. This means that <function>sta_info_destroy</function> must 16997 remove the key which waits for an RCU grace period. 16998</para> 16999 17000 </sect1> 17001 <sect1> 17002 <title>MORE TBD</title> 17003 <para>TBD</para> 17004 </sect1> 17005 </chapter> 17006 17007 <chapter id="rx-processing"> 17008 <title>Receive processing</title> 17009 <para>TBD</para> 17010 </chapter> 17011 17012 <chapter id="tx-processing"> 17013 <title>Transmit processing</title> 17014 <para>TBD</para> 17015 </chapter> 17016 17017 <chapter id="sta-info"> 17018 <title>Station info handling</title> 17019 <sect1> 17020 <title>Programming information</title> 17021<refentry id="API-struct-sta-info"> 17022<refentryinfo> 17023 <title>LINUX</title> 17024 <productname>Kernel Hackers Manual</productname> 17025 <date>July 2017</date> 17026</refentryinfo> 17027<refmeta> 17028 <refentrytitle><phrase>struct sta_info</phrase></refentrytitle> 17029 <manvolnum>9</manvolnum> 17030 <refmiscinfo class="version">4.1.27</refmiscinfo> 17031</refmeta> 17032<refnamediv> 17033 <refname>struct sta_info</refname> 17034 <refpurpose> 17035 STA information 17036 </refpurpose> 17037</refnamediv> 17038<refsynopsisdiv> 17039 <title>Synopsis</title> 17040 <programlisting> 17041struct sta_info { 17042 struct list_head list; 17043 struct list_head free_list; 17044 struct rcu_head rcu_head; 17045 struct rhash_head hash_node; 17046 struct ieee80211_local * local; 17047 struct ieee80211_sub_if_data * sdata; 17048 struct ieee80211_key __rcu * gtk[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS]; 17049 struct ieee80211_key __rcu * ptk[NUM_DEFAULT_KEYS]; 17050 u8 gtk_idx; 17051 u8 ptk_idx; 17052 struct rate_control_ref * rate_ctrl; 17053 void * rate_ctrl_priv; 17054 spinlock_t lock; 17055 struct work_struct drv_deliver_wk; 17056 u16 listen_interval; 17057 bool dead; 17058 bool uploaded; 17059 enum ieee80211_sta_state sta_state; 17060 unsigned long _flags; 17061 spinlock_t ps_lock; 17062 struct sk_buff_head ps_tx_buf[IEEE80211_NUM_ACS]; 17063 struct sk_buff_head tx_filtered[IEEE80211_NUM_ACS]; 17064 unsigned long driver_buffered_tids; 17065 unsigned long txq_buffered_tids; 17066 unsigned long rx_packets; 17067 u64 rx_bytes; 17068 unsigned long last_rx; 17069 long last_connected; 17070 unsigned long num_duplicates; 17071 unsigned long rx_fragments; 17072 unsigned long rx_dropped; 17073 int last_signal; 17074 struct ewma avg_signal; 17075 int last_ack_signal; 17076 u8 chains; 17077 s8 chain_signal_last[IEEE80211_MAX_CHAINS]; 17078 struct ewma chain_signal_avg[IEEE80211_MAX_CHAINS]; 17079 __le16 last_seq_ctrl[IEEE80211_NUM_TIDS + 1]; 17080 unsigned long tx_filtered_count; 17081 unsigned long tx_retry_failed; 17082 unsigned long tx_retry_count; 17083 unsigned int fail_avg; 17084 u32 tx_fragments; 17085 u64 tx_packets[IEEE80211_NUM_ACS]; 17086 u64 tx_bytes[IEEE80211_NUM_ACS]; 17087 struct ieee80211_tx_rate last_tx_rate; 17088 int last_rx_rate_idx; 17089 u32 last_rx_rate_flag; 17090 u32 last_rx_rate_vht_flag; 17091 u8 last_rx_rate_vht_nss; 17092 u16 tid_seq[IEEE80211_QOS_CTL_TID_MASK + 1]; 17093 u64 tx_msdu[IEEE80211_NUM_TIDS + 1]; 17094 u64 tx_msdu_retries[IEEE80211_NUM_TIDS + 1]; 17095 u64 tx_msdu_failed[IEEE80211_NUM_TIDS + 1]; 17096 u64 rx_msdu[IEEE80211_NUM_TIDS + 1]; 17097 struct sta_ampdu_mlme ampdu_mlme; 17098 u8 timer_to_tid[IEEE80211_NUM_TIDS]; 17099#ifdef CONFIG_MAC80211_MESH 17100 u16 llid; 17101 u16 plid; 17102 u16 reason; 17103 u8 plink_retries; 17104 enum nl80211_plink_state plink_state; 17105 u32 plink_timeout; 17106 struct timer_list plink_timer; 17107 s64 t_offset; 17108 s64 t_offset_setpoint; 17109 enum nl80211_mesh_power_mode local_pm; 17110 enum nl80211_mesh_power_mode peer_pm; 17111 enum nl80211_mesh_power_mode nonpeer_pm; 17112#endif 17113#ifdef CONFIG_MAC80211_DEBUGFS 17114 struct sta_info_debugfsdentries debugfs; 17115#endif 17116 enum ieee80211_sta_rx_bandwidth cur_max_bandwidth; 17117 unsigned int lost_packets; 17118 unsigned int beacon_loss_count; 17119 enum ieee80211_smps_mode known_smps_mode; 17120 const struct ieee80211_cipher_scheme * cipher_scheme; 17121 unsigned long last_tdls_pkt_time; 17122 u8 reserved_tid; 17123 struct ieee80211_sta sta; 17124}; </programlisting> 17125</refsynopsisdiv> 17126 <refsect1> 17127 <title>Members</title> 17128 <variablelist> 17129 <varlistentry> <term>list</term> 17130 <listitem><para> 17131global linked list entry 17132 </para></listitem> 17133 </varlistentry> 17134 <varlistentry> <term>free_list</term> 17135 <listitem><para> 17136list entry for keeping track of stations to free 17137 </para></listitem> 17138 </varlistentry> 17139 <varlistentry> <term>rcu_head</term> 17140 <listitem><para> 17141RCU head used for freeing this station struct 17142 </para></listitem> 17143 </varlistentry> 17144 <varlistentry> <term>hash_node</term> 17145 <listitem><para> 17146hash node for rhashtable 17147 </para></listitem> 17148 </varlistentry> 17149 <varlistentry> <term>local</term> 17150 <listitem><para> 17151pointer to the global information 17152 </para></listitem> 17153 </varlistentry> 17154 <varlistentry> <term>sdata</term> 17155 <listitem><para> 17156virtual interface this station belongs to 17157 </para></listitem> 17158 </varlistentry> 17159 <varlistentry> <term>gtk[NUM_DEFAULT_KEYS + NUM_DEFAULT_MGMT_KEYS]</term> 17160 <listitem><para> 17161group keys negotiated with this station, if any 17162 </para></listitem> 17163 </varlistentry> 17164 <varlistentry> <term>ptk[NUM_DEFAULT_KEYS]</term> 17165 <listitem><para> 17166peer keys negotiated with this station, if any 17167 </para></listitem> 17168 </varlistentry> 17169 <varlistentry> <term>gtk_idx</term> 17170 <listitem><para> 17171last installed group key index 17172 </para></listitem> 17173 </varlistentry> 17174 <varlistentry> <term>ptk_idx</term> 17175 <listitem><para> 17176last installed peer key index 17177 </para></listitem> 17178 </varlistentry> 17179 <varlistentry> <term>rate_ctrl</term> 17180 <listitem><para> 17181rate control algorithm reference 17182 </para></listitem> 17183 </varlistentry> 17184 <varlistentry> <term>rate_ctrl_priv</term> 17185 <listitem><para> 17186rate control private per-STA pointer 17187 </para></listitem> 17188 </varlistentry> 17189 <varlistentry> <term>lock</term> 17190 <listitem><para> 17191used for locking all fields that require locking, see comments 17192in the header file. 17193 </para></listitem> 17194 </varlistentry> 17195 <varlistentry> <term>drv_deliver_wk</term> 17196 <listitem><para> 17197used for delivering frames after driver PS unblocking 17198 </para></listitem> 17199 </varlistentry> 17200 <varlistentry> <term>listen_interval</term> 17201 <listitem><para> 17202listen interval of this station, when we're acting as AP 17203 </para></listitem> 17204 </varlistentry> 17205 <varlistentry> <term>dead</term> 17206 <listitem><para> 17207set to true when sta is unlinked 17208 </para></listitem> 17209 </varlistentry> 17210 <varlistentry> <term>uploaded</term> 17211 <listitem><para> 17212set to true when sta is uploaded to the driver 17213 </para></listitem> 17214 </varlistentry> 17215 <varlistentry> <term>sta_state</term> 17216 <listitem><para> 17217duplicates information about station state (for debug) 17218 </para></listitem> 17219 </varlistentry> 17220 <varlistentry> <term>_flags</term> 17221 <listitem><para> 17222STA flags, see <structname>enum</structname> ieee80211_sta_info_flags, do not use directly 17223 </para></listitem> 17224 </varlistentry> 17225 <varlistentry> <term>ps_lock</term> 17226 <listitem><para> 17227used for powersave (when mac80211 is the AP) related locking 17228 </para></listitem> 17229 </varlistentry> 17230 <varlistentry> <term>ps_tx_buf[IEEE80211_NUM_ACS]</term> 17231 <listitem><para> 17232buffers (per AC) of frames to transmit to this station 17233when it leaves power saving state or polls 17234 </para></listitem> 17235 </varlistentry> 17236 <varlistentry> <term>tx_filtered[IEEE80211_NUM_ACS]</term> 17237 <listitem><para> 17238buffers (per AC) of frames we already tried to 17239transmit but were filtered by hardware due to STA having 17240entered power saving state, these are also delivered to 17241the station when it leaves powersave or polls for frames 17242 </para></listitem> 17243 </varlistentry> 17244 <varlistentry> <term>driver_buffered_tids</term> 17245 <listitem><para> 17246bitmap of TIDs the driver has data buffered on 17247 </para></listitem> 17248 </varlistentry> 17249 <varlistentry> <term>txq_buffered_tids</term> 17250 <listitem><para> 17251bitmap of TIDs that mac80211 has txq data buffered on 17252 </para></listitem> 17253 </varlistentry> 17254 <varlistentry> <term>rx_packets</term> 17255 <listitem><para> 17256Number of MSDUs received from this STA 17257 </para></listitem> 17258 </varlistentry> 17259 <varlistentry> <term>rx_bytes</term> 17260 <listitem><para> 17261Number of bytes received from this STA 17262 </para></listitem> 17263 </varlistentry> 17264 <varlistentry> <term>last_rx</term> 17265 <listitem><para> 17266time (in jiffies) when last frame was received from this STA 17267 </para></listitem> 17268 </varlistentry> 17269 <varlistentry> <term>last_connected</term> 17270 <listitem><para> 17271time (in seconds) when a station got connected 17272 </para></listitem> 17273 </varlistentry> 17274 <varlistentry> <term>num_duplicates</term> 17275 <listitem><para> 17276number of duplicate frames received from this STA 17277 </para></listitem> 17278 </varlistentry> 17279 <varlistentry> <term>rx_fragments</term> 17280 <listitem><para> 17281number of received MPDUs 17282 </para></listitem> 17283 </varlistentry> 17284 <varlistentry> <term>rx_dropped</term> 17285 <listitem><para> 17286number of dropped MPDUs from this STA 17287 </para></listitem> 17288 </varlistentry> 17289 <varlistentry> <term>last_signal</term> 17290 <listitem><para> 17291signal of last received frame from this STA 17292 </para></listitem> 17293 </varlistentry> 17294 <varlistentry> <term>avg_signal</term> 17295 <listitem><para> 17296moving average of signal of received frames from this STA 17297 </para></listitem> 17298 </varlistentry> 17299 <varlistentry> <term>last_ack_signal</term> 17300 <listitem><para> 17301signal of last received Ack frame from this STA 17302 </para></listitem> 17303 </varlistentry> 17304 <varlistentry> <term>chains</term> 17305 <listitem><para> 17306chains ever used for RX from this station 17307 </para></listitem> 17308 </varlistentry> 17309 <varlistentry> <term>chain_signal_last[IEEE80211_MAX_CHAINS]</term> 17310 <listitem><para> 17311last signal (per chain) 17312 </para></listitem> 17313 </varlistentry> 17314 <varlistentry> <term>chain_signal_avg[IEEE80211_MAX_CHAINS]</term> 17315 <listitem><para> 17316signal average (per chain) 17317 </para></listitem> 17318 </varlistentry> 17319 <varlistentry> <term>last_seq_ctrl[IEEE80211_NUM_TIDS + 1]</term> 17320 <listitem><para> 17321last received seq/frag number from this STA (per RX queue) 17322 </para></listitem> 17323 </varlistentry> 17324 <varlistentry> <term>tx_filtered_count</term> 17325 <listitem><para> 17326number of frames the hardware filtered for this STA 17327 </para></listitem> 17328 </varlistentry> 17329 <varlistentry> <term>tx_retry_failed</term> 17330 <listitem><para> 17331number of frames that failed retry 17332 </para></listitem> 17333 </varlistentry> 17334 <varlistentry> <term>tx_retry_count</term> 17335 <listitem><para> 17336total number of retries for frames to this STA 17337 </para></listitem> 17338 </varlistentry> 17339 <varlistentry> <term>fail_avg</term> 17340 <listitem><para> 17341moving percentage of failed MSDUs 17342 </para></listitem> 17343 </varlistentry> 17344 <varlistentry> <term>tx_fragments</term> 17345 <listitem><para> 17346number of transmitted MPDUs 17347 </para></listitem> 17348 </varlistentry> 17349 <varlistentry> <term>tx_packets[IEEE80211_NUM_ACS]</term> 17350 <listitem><para> 17351number of RX/TX MSDUs 17352 </para></listitem> 17353 </varlistentry> 17354 <varlistentry> <term>tx_bytes[IEEE80211_NUM_ACS]</term> 17355 <listitem><para> 17356number of bytes transmitted to this STA 17357 </para></listitem> 17358 </varlistentry> 17359 <varlistentry> <term>last_tx_rate</term> 17360 <listitem><para> 17361rate used for last transmit, to report to userspace as 17362<quote>the</quote> transmit rate 17363 </para></listitem> 17364 </varlistentry> 17365 <varlistentry> <term>last_rx_rate_idx</term> 17366 <listitem><para> 17367rx status rate index of the last data packet 17368 </para></listitem> 17369 </varlistentry> 17370 <varlistentry> <term>last_rx_rate_flag</term> 17371 <listitem><para> 17372rx status flag of the last data packet 17373 </para></listitem> 17374 </varlistentry> 17375 <varlistentry> <term>last_rx_rate_vht_flag</term> 17376 <listitem><para> 17377rx status vht flag of the last data packet 17378 </para></listitem> 17379 </varlistentry> 17380 <varlistentry> <term>last_rx_rate_vht_nss</term> 17381 <listitem><para> 17382rx status nss of last data packet 17383 </para></listitem> 17384 </varlistentry> 17385 <varlistentry> <term>tid_seq[IEEE80211_QOS_CTL_TID_MASK + 1]</term> 17386 <listitem><para> 17387per-TID sequence numbers for sending to this STA 17388 </para></listitem> 17389 </varlistentry> 17390 <varlistentry> <term>tx_msdu[IEEE80211_NUM_TIDS + 1]</term> 17391 <listitem><para> 17392MSDUs transmitted to this station, using IEEE80211_NUM_TID 17393entry for non-QoS frames 17394 </para></listitem> 17395 </varlistentry> 17396 <varlistentry> <term>tx_msdu_retries[IEEE80211_NUM_TIDS + 1]</term> 17397 <listitem><para> 17398MSDU retries for transmissions to to this station, 17399using IEEE80211_NUM_TID entry for non-QoS frames 17400 </para></listitem> 17401 </varlistentry> 17402 <varlistentry> <term>tx_msdu_failed[IEEE80211_NUM_TIDS + 1]</term> 17403 <listitem><para> 17404MSDU failures for transmissions to to this station, 17405using IEEE80211_NUM_TID entry for non-QoS frames 17406 </para></listitem> 17407 </varlistentry> 17408 <varlistentry> <term>rx_msdu[IEEE80211_NUM_TIDS + 1]</term> 17409 <listitem><para> 17410MSDUs received from this station, using IEEE80211_NUM_TID 17411entry for non-QoS frames 17412 </para></listitem> 17413 </varlistentry> 17414 <varlistentry> <term>ampdu_mlme</term> 17415 <listitem><para> 17416A-MPDU state machine state 17417 </para></listitem> 17418 </varlistentry> 17419 <varlistentry> <term>timer_to_tid[IEEE80211_NUM_TIDS]</term> 17420 <listitem><para> 17421identity mapping to ID timers 17422 </para></listitem> 17423 </varlistentry> 17424 <varlistentry> <term>llid</term> 17425 <listitem><para> 17426Local link ID 17427 </para></listitem> 17428 </varlistentry> 17429 <varlistentry> <term>plid</term> 17430 <listitem><para> 17431Peer link ID 17432 </para></listitem> 17433 </varlistentry> 17434 <varlistentry> <term>reason</term> 17435 <listitem><para> 17436Cancel reason on PLINK_HOLDING state 17437 </para></listitem> 17438 </varlistentry> 17439 <varlistentry> <term>plink_retries</term> 17440 <listitem><para> 17441Retries in establishment 17442 </para></listitem> 17443 </varlistentry> 17444 <varlistentry> <term>plink_state</term> 17445 <listitem><para> 17446peer link state 17447 </para></listitem> 17448 </varlistentry> 17449 <varlistentry> <term>plink_timeout</term> 17450 <listitem><para> 17451timeout of peer link 17452 </para></listitem> 17453 </varlistentry> 17454 <varlistentry> <term>plink_timer</term> 17455 <listitem><para> 17456peer link watch timer 17457 </para></listitem> 17458 </varlistentry> 17459 <varlistentry> <term>t_offset</term> 17460 <listitem><para> 17461timing offset relative to this host 17462 </para></listitem> 17463 </varlistentry> 17464 <varlistentry> <term>t_offset_setpoint</term> 17465 <listitem><para> 17466reference timing offset of this sta to be used when 17467calculating clockdrift 17468 </para></listitem> 17469 </varlistentry> 17470 <varlistentry> <term>local_pm</term> 17471 <listitem><para> 17472local link-specific power save mode 17473 </para></listitem> 17474 </varlistentry> 17475 <varlistentry> <term>peer_pm</term> 17476 <listitem><para> 17477peer-specific power save mode towards local STA 17478 </para></listitem> 17479 </varlistentry> 17480 <varlistentry> <term>nonpeer_pm</term> 17481 <listitem><para> 17482STA power save mode towards non-peer neighbors 17483 </para></listitem> 17484 </varlistentry> 17485 <varlistentry> <term>debugfs</term> 17486 <listitem><para> 17487debug filesystem info 17488 </para></listitem> 17489 </varlistentry> 17490 <varlistentry> <term>cur_max_bandwidth</term> 17491 <listitem><para> 17492maximum bandwidth to use for TX to the station, 17493taken from HT/VHT capabilities or VHT operating mode notification 17494 </para></listitem> 17495 </varlistentry> 17496 <varlistentry> <term>lost_packets</term> 17497 <listitem><para> 17498number of consecutive lost packets 17499 </para></listitem> 17500 </varlistentry> 17501 <varlistentry> <term>beacon_loss_count</term> 17502 <listitem><para> 17503number of times beacon loss has triggered 17504 </para></listitem> 17505 </varlistentry> 17506 <varlistentry> <term>known_smps_mode</term> 17507 <listitem><para> 17508the smps_mode the client thinks we are in. Relevant for 17509AP only. 17510 </para></listitem> 17511 </varlistentry> 17512 <varlistentry> <term>cipher_scheme</term> 17513 <listitem><para> 17514optional cipher scheme for this station 17515 </para></listitem> 17516 </varlistentry> 17517 <varlistentry> <term>last_tdls_pkt_time</term> 17518 <listitem><para> 17519holds the time in jiffies of last TDLS pkt ACKed 17520 </para></listitem> 17521 </varlistentry> 17522 <varlistentry> <term>reserved_tid</term> 17523 <listitem><para> 17524reserved TID (if any, otherwise IEEE80211_TID_UNRESERVED) 17525 </para></listitem> 17526 </varlistentry> 17527 <varlistentry> <term>sta</term> 17528 <listitem><para> 17529station information we share with the driver 17530 </para></listitem> 17531 </varlistentry> 17532 </variablelist> 17533 </refsect1> 17534<refsect1> 17535<title>Description</title> 17536<para> 17537 </para><para> 17538 17539 This structure collects information about a station that 17540 mac80211 is communicating with. 17541</para> 17542</refsect1> 17543</refentry> 17544 17545<refentry id="API-enum-ieee80211-sta-info-flags"> 17546<refentryinfo> 17547 <title>LINUX</title> 17548 <productname>Kernel Hackers Manual</productname> 17549 <date>July 2017</date> 17550</refentryinfo> 17551<refmeta> 17552 <refentrytitle><phrase>enum ieee80211_sta_info_flags</phrase></refentrytitle> 17553 <manvolnum>9</manvolnum> 17554 <refmiscinfo class="version">4.1.27</refmiscinfo> 17555</refmeta> 17556<refnamediv> 17557 <refname>enum ieee80211_sta_info_flags</refname> 17558 <refpurpose> 17559 Stations flags 17560 </refpurpose> 17561</refnamediv> 17562<refsynopsisdiv> 17563 <title>Synopsis</title> 17564 <programlisting> 17565enum ieee80211_sta_info_flags { 17566 WLAN_STA_AUTH, 17567 WLAN_STA_ASSOC, 17568 WLAN_STA_PS_STA, 17569 WLAN_STA_AUTHORIZED, 17570 WLAN_STA_SHORT_PREAMBLE, 17571 WLAN_STA_WDS, 17572 WLAN_STA_CLEAR_PS_FILT, 17573 WLAN_STA_MFP, 17574 WLAN_STA_BLOCK_BA, 17575 WLAN_STA_PS_DRIVER, 17576 WLAN_STA_PSPOLL, 17577 WLAN_STA_TDLS_PEER, 17578 WLAN_STA_TDLS_PEER_AUTH, 17579 WLAN_STA_TDLS_INITIATOR, 17580 WLAN_STA_TDLS_CHAN_SWITCH, 17581 WLAN_STA_TDLS_OFF_CHANNEL, 17582 WLAN_STA_UAPSD, 17583 WLAN_STA_SP, 17584 WLAN_STA_4ADDR_EVENT, 17585 WLAN_STA_INSERTED, 17586 WLAN_STA_RATE_CONTROL, 17587 WLAN_STA_TOFFSET_KNOWN, 17588 WLAN_STA_MPSP_OWNER, 17589 WLAN_STA_MPSP_RECIPIENT, 17590 WLAN_STA_PS_DELIVER 17591}; </programlisting> 17592</refsynopsisdiv> 17593<refsect1> 17594 <title>Constants</title> 17595 <variablelist> 17596 <varlistentry> <term>WLAN_STA_AUTH</term> 17597 <listitem><para> 17598Station is authenticated. 17599 </para></listitem> 17600 </varlistentry> 17601 <varlistentry> <term>WLAN_STA_ASSOC</term> 17602 <listitem><para> 17603Station is associated. 17604 </para></listitem> 17605 </varlistentry> 17606 <varlistentry> <term>WLAN_STA_PS_STA</term> 17607 <listitem><para> 17608Station is in power-save mode 17609 </para></listitem> 17610 </varlistentry> 17611 <varlistentry> <term>WLAN_STA_AUTHORIZED</term> 17612 <listitem><para> 17613Station is authorized to send/receive traffic. 17614This bit is always checked so needs to be enabled for all stations 17615when virtual port control is not in use. 17616 </para></listitem> 17617 </varlistentry> 17618 <varlistentry> <term>WLAN_STA_SHORT_PREAMBLE</term> 17619 <listitem><para> 17620Station is capable of receiving short-preamble 17621frames. 17622 </para></listitem> 17623 </varlistentry> 17624 <varlistentry> <term>WLAN_STA_WDS</term> 17625 <listitem><para> 17626Station is one of our WDS peers. 17627 </para></listitem> 17628 </varlistentry> 17629 <varlistentry> <term>WLAN_STA_CLEAR_PS_FILT</term> 17630 <listitem><para> 17631Clear PS filter in hardware (using the 17632IEEE80211_TX_CTL_CLEAR_PS_FILT control flag) when the next 17633frame to this station is transmitted. 17634 </para></listitem> 17635 </varlistentry> 17636 <varlistentry> <term>WLAN_STA_MFP</term> 17637 <listitem><para> 17638Management frame protection is used with this STA. 17639 </para></listitem> 17640 </varlistentry> 17641 <varlistentry> <term>WLAN_STA_BLOCK_BA</term> 17642 <listitem><para> 17643Used to deny ADDBA requests (both TX and RX) 17644during suspend/resume and station removal. 17645 </para></listitem> 17646 </varlistentry> 17647 <varlistentry> <term>WLAN_STA_PS_DRIVER</term> 17648 <listitem><para> 17649driver requires keeping this station in 17650power-save mode logically to flush frames that might still 17651be in the queues 17652 </para></listitem> 17653 </varlistentry> 17654 <varlistentry> <term>WLAN_STA_PSPOLL</term> 17655 <listitem><para> 17656Station sent PS-poll while driver was keeping 17657station in power-save mode, reply when the driver unblocks. 17658 </para></listitem> 17659 </varlistentry> 17660 <varlistentry> <term>WLAN_STA_TDLS_PEER</term> 17661 <listitem><para> 17662Station is a TDLS peer. 17663 </para></listitem> 17664 </varlistentry> 17665 <varlistentry> <term>WLAN_STA_TDLS_PEER_AUTH</term> 17666 <listitem><para> 17667This TDLS peer is authorized to send direct 17668packets. This means the link is enabled. 17669 </para></listitem> 17670 </varlistentry> 17671 <varlistentry> <term>WLAN_STA_TDLS_INITIATOR</term> 17672 <listitem><para> 17673We are the initiator of the TDLS link with this 17674station. 17675 </para></listitem> 17676 </varlistentry> 17677 <varlistentry> <term>WLAN_STA_TDLS_CHAN_SWITCH</term> 17678 <listitem><para> 17679This TDLS peer supports TDLS channel-switching 17680 </para></listitem> 17681 </varlistentry> 17682 <varlistentry> <term>WLAN_STA_TDLS_OFF_CHANNEL</term> 17683 <listitem><para> 17684The local STA is currently off-channel with this 17685TDLS peer 17686 </para></listitem> 17687 </varlistentry> 17688 <varlistentry> <term>WLAN_STA_UAPSD</term> 17689 <listitem><para> 17690Station requested unscheduled SP while driver was 17691keeping station in power-save mode, reply when the driver 17692unblocks the station. 17693 </para></listitem> 17694 </varlistentry> 17695 <varlistentry> <term>WLAN_STA_SP</term> 17696 <listitem><para> 17697Station is in a service period, so don't try to 17698reply to other uAPSD trigger frames or PS-Poll. 17699 </para></listitem> 17700 </varlistentry> 17701 <varlistentry> <term>WLAN_STA_4ADDR_EVENT</term> 17702 <listitem><para> 177034-addr event was already sent for this frame. 17704 </para></listitem> 17705 </varlistentry> 17706 <varlistentry> <term>WLAN_STA_INSERTED</term> 17707 <listitem><para> 17708This station is inserted into the hash table. 17709 </para></listitem> 17710 </varlistentry> 17711 <varlistentry> <term>WLAN_STA_RATE_CONTROL</term> 17712 <listitem><para> 17713rate control was initialized for this station. 17714 </para></listitem> 17715 </varlistentry> 17716 <varlistentry> <term>WLAN_STA_TOFFSET_KNOWN</term> 17717 <listitem><para> 17718toffset calculated for this station is valid. 17719 </para></listitem> 17720 </varlistentry> 17721 <varlistentry> <term>WLAN_STA_MPSP_OWNER</term> 17722 <listitem><para> 17723local STA is owner of a mesh Peer Service Period. 17724 </para></listitem> 17725 </varlistentry> 17726 <varlistentry> <term>WLAN_STA_MPSP_RECIPIENT</term> 17727 <listitem><para> 17728local STA is recipient of a MPSP. 17729 </para></listitem> 17730 </varlistentry> 17731 <varlistentry> <term>WLAN_STA_PS_DELIVER</term> 17732 <listitem><para> 17733station woke up, but we're still blocking TX 17734until pending frames are delivered 17735 </para></listitem> 17736 </varlistentry> 17737 </variablelist> 17738</refsect1> 17739<refsect1> 17740<title>Description</title> 17741<para> 17742 </para><para> 17743 17744 These flags are used with <structname>struct sta_info</structname>'s <parameter>flags</parameter> member, but 17745 only indirectly with <function>set_sta_flag</function> and friends. 17746</para> 17747</refsect1> 17748</refentry> 17749 17750 </sect1> 17751 <sect1> 17752 <title>STA information lifetime rules</title> 17753<para> 17754 </para><para> 17755 STA info structures (<structname>struct sta_info</structname>) are managed in a hash table 17756 for faster lookup and a list for iteration. They are managed using 17757 RCU, i.e. access to the list and hash table is protected by RCU. 17758 </para><para> 17759 Upon allocating a STA info structure with <function>sta_info_alloc</function>, the caller 17760 owns that structure. It must then insert it into the hash table using 17761 either <function>sta_info_insert</function> or <function>sta_info_insert_rcu</function>; only in the latter 17762 case (which acquires an rcu read section but must not be called from 17763 within one) will the pointer still be valid after the call. Note that 17764 the caller may not do much with the STA info before inserting it, in 17765 particular, it may not start any mesh peer link management or add 17766 encryption keys. 17767 </para><para> 17768 When the insertion fails (<function>sta_info_insert</function>) returns non-zero), the 17769 structure will have been freed by <function>sta_info_insert</function>! 17770 </para><para> 17771 Station entries are added by mac80211 when you establish a link with a 17772 peer. This means different things for the different type of interfaces 17773 we support. For a regular station this mean we add the AP sta when we 17774 receive an association response from the AP. For IBSS this occurs when 17775 get to know about a peer on the same IBSS. For WDS we add the sta for 17776 the peer immediately upon device open. When using AP mode we add stations 17777 for each respective station upon request from userspace through nl80211. 17778 </para><para> 17779 In order to remove a STA info structure, various sta_info_destroy_*() 17780 calls are available. 17781 </para><para> 17782 There is no concept of ownership on a STA entry, each structure is 17783 owned by the global hash table/list until it is removed. All users of 17784 the structure need to be RCU protected so that the structure won't be 17785 freed before they are done using it. 17786</para> 17787 17788 </sect1> 17789 </chapter> 17790 17791 <chapter id="aggregation-internals"> 17792 <title>Aggregation</title> 17793<refentry id="API-struct-sta-ampdu-mlme"> 17794<refentryinfo> 17795 <title>LINUX</title> 17796 <productname>Kernel Hackers Manual</productname> 17797 <date>July 2017</date> 17798</refentryinfo> 17799<refmeta> 17800 <refentrytitle><phrase>struct sta_ampdu_mlme</phrase></refentrytitle> 17801 <manvolnum>9</manvolnum> 17802 <refmiscinfo class="version">4.1.27</refmiscinfo> 17803</refmeta> 17804<refnamediv> 17805 <refname>struct sta_ampdu_mlme</refname> 17806 <refpurpose> 17807 STA aggregation information. 17808 </refpurpose> 17809</refnamediv> 17810<refsynopsisdiv> 17811 <title>Synopsis</title> 17812 <programlisting> 17813struct sta_ampdu_mlme { 17814 struct mutex mtx; 17815 struct tid_ampdu_rx __rcu * tid_rx[IEEE80211_NUM_TIDS]; 17816 unsigned long tid_rx_timer_expired[BITS_TO_LONGS(IEEE80211_NUM_TIDS)]; 17817 unsigned long tid_rx_stop_requested[BITS_TO_LONGS(IEEE80211_NUM_TIDS)]; 17818 struct work_struct work; 17819 struct tid_ampdu_tx __rcu * tid_tx[IEEE80211_NUM_TIDS]; 17820 struct tid_ampdu_tx * tid_start_tx[IEEE80211_NUM_TIDS]; 17821 unsigned long last_addba_req_time[IEEE80211_NUM_TIDS]; 17822 u8 addba_req_num[IEEE80211_NUM_TIDS]; 17823 u8 dialog_token_allocator; 17824}; </programlisting> 17825</refsynopsisdiv> 17826 <refsect1> 17827 <title>Members</title> 17828 <variablelist> 17829 <varlistentry> <term>mtx</term> 17830 <listitem><para> 17831mutex to protect all TX data (except non-NULL assignments 17832to tid_tx[idx], which are protected by the sta spinlock) 17833tid_start_tx is also protected by sta->lock. 17834 </para></listitem> 17835 </varlistentry> 17836 <varlistentry> <term>tid_rx[IEEE80211_NUM_TIDS]</term> 17837 <listitem><para> 17838aggregation info for Rx per TID -- RCU protected 17839 </para></listitem> 17840 </varlistentry> 17841 <varlistentry> <term>tid_rx_timer_expired[BITS_TO_LONGS(IEEE80211_NUM_TIDS)]</term> 17842 <listitem><para> 17843bitmap indicating on which TIDs the 17844RX timer expired until the work for it runs 17845 </para></listitem> 17846 </varlistentry> 17847 <varlistentry> <term>tid_rx_stop_requested[BITS_TO_LONGS(IEEE80211_NUM_TIDS)]</term> 17848 <listitem><para> 17849bitmap indicating which BA sessions per TID the 17850driver requested to close until the work for it runs 17851 </para></listitem> 17852 </varlistentry> 17853 <varlistentry> <term>work</term> 17854 <listitem><para> 17855work struct for starting/stopping aggregation 17856 </para></listitem> 17857 </varlistentry> 17858 <varlistentry> <term>tid_tx[IEEE80211_NUM_TIDS]</term> 17859 <listitem><para> 17860aggregation info for Tx per TID 17861 </para></listitem> 17862 </varlistentry> 17863 <varlistentry> <term>tid_start_tx[IEEE80211_NUM_TIDS]</term> 17864 <listitem><para> 17865sessions where start was requested 17866 </para></listitem> 17867 </varlistentry> 17868 <varlistentry> <term>last_addba_req_time[IEEE80211_NUM_TIDS]</term> 17869 <listitem><para> 17870timestamp of the last addBA request. 17871 </para></listitem> 17872 </varlistentry> 17873 <varlistentry> <term>addba_req_num[IEEE80211_NUM_TIDS]</term> 17874 <listitem><para> 17875number of times addBA request has been sent. 17876 </para></listitem> 17877 </varlistentry> 17878 <varlistentry> <term>dialog_token_allocator</term> 17879 <listitem><para> 17880dialog token enumerator for each new session; 17881 </para></listitem> 17882 </varlistentry> 17883 </variablelist> 17884 </refsect1> 17885</refentry> 17886 17887<refentry id="API-struct-tid-ampdu-tx"> 17888<refentryinfo> 17889 <title>LINUX</title> 17890 <productname>Kernel Hackers Manual</productname> 17891 <date>July 2017</date> 17892</refentryinfo> 17893<refmeta> 17894 <refentrytitle><phrase>struct tid_ampdu_tx</phrase></refentrytitle> 17895 <manvolnum>9</manvolnum> 17896 <refmiscinfo class="version">4.1.27</refmiscinfo> 17897</refmeta> 17898<refnamediv> 17899 <refname>struct tid_ampdu_tx</refname> 17900 <refpurpose> 17901 TID aggregation information (Tx). 17902 </refpurpose> 17903</refnamediv> 17904<refsynopsisdiv> 17905 <title>Synopsis</title> 17906 <programlisting> 17907struct tid_ampdu_tx { 17908 struct rcu_head rcu_head; 17909 struct timer_list session_timer; 17910 struct timer_list addba_resp_timer; 17911 struct sk_buff_head pending; 17912 unsigned long state; 17913 unsigned long last_tx; 17914 u16 timeout; 17915 u8 dialog_token; 17916 u8 stop_initiator; 17917 bool tx_stop; 17918 u8 buf_size; 17919 u16 failed_bar_ssn; 17920 bool bar_pending; 17921}; </programlisting> 17922</refsynopsisdiv> 17923 <refsect1> 17924 <title>Members</title> 17925 <variablelist> 17926 <varlistentry> <term>rcu_head</term> 17927 <listitem><para> 17928rcu head for freeing structure 17929 </para></listitem> 17930 </varlistentry> 17931 <varlistentry> <term>session_timer</term> 17932 <listitem><para> 17933check if we keep Tx-ing on the TID (by timeout value) 17934 </para></listitem> 17935 </varlistentry> 17936 <varlistentry> <term>addba_resp_timer</term> 17937 <listitem><para> 17938timer for peer's response to addba request 17939 </para></listitem> 17940 </varlistentry> 17941 <varlistentry> <term>pending</term> 17942 <listitem><para> 17943pending frames queue -- use sta's spinlock to protect 17944 </para></listitem> 17945 </varlistentry> 17946 <varlistentry> <term>state</term> 17947 <listitem><para> 17948session state (see above) 17949 </para></listitem> 17950 </varlistentry> 17951 <varlistentry> <term>last_tx</term> 17952 <listitem><para> 17953jiffies of last tx activity 17954 </para></listitem> 17955 </varlistentry> 17956 <varlistentry> <term>timeout</term> 17957 <listitem><para> 17958session timeout value to be filled in ADDBA requests 17959 </para></listitem> 17960 </varlistentry> 17961 <varlistentry> <term>dialog_token</term> 17962 <listitem><para> 17963dialog token for aggregation session 17964 </para></listitem> 17965 </varlistentry> 17966 <varlistentry> <term>stop_initiator</term> 17967 <listitem><para> 17968initiator of a session stop 17969 </para></listitem> 17970 </varlistentry> 17971 <varlistentry> <term>tx_stop</term> 17972 <listitem><para> 17973TX DelBA frame when stopping 17974 </para></listitem> 17975 </varlistentry> 17976 <varlistentry> <term>buf_size</term> 17977 <listitem><para> 17978reorder buffer size at receiver 17979 </para></listitem> 17980 </varlistentry> 17981 <varlistentry> <term>failed_bar_ssn</term> 17982 <listitem><para> 17983ssn of the last failed BAR tx attempt 17984 </para></listitem> 17985 </varlistentry> 17986 <varlistentry> <term>bar_pending</term> 17987 <listitem><para> 17988BAR needs to be re-sent 17989 </para></listitem> 17990 </varlistentry> 17991 </variablelist> 17992 </refsect1> 17993<refsect1> 17994<title>Description</title> 17995<para> 17996 This structure's lifetime is managed by RCU, assignments to 17997 the array holding it must hold the aggregation mutex. 17998 </para><para> 17999 18000 The TX path can access it under RCU lock-free if, and 18001 only if, the state has the flag <constant>HT_AGG_STATE_OPERATIONAL</constant> 18002 set. Otherwise, the TX path must also acquire the spinlock 18003 and re-check the state, see comments in the tx code 18004 touching it. 18005</para> 18006</refsect1> 18007</refentry> 18008 18009<refentry id="API-struct-tid-ampdu-rx"> 18010<refentryinfo> 18011 <title>LINUX</title> 18012 <productname>Kernel Hackers Manual</productname> 18013 <date>July 2017</date> 18014</refentryinfo> 18015<refmeta> 18016 <refentrytitle><phrase>struct tid_ampdu_rx</phrase></refentrytitle> 18017 <manvolnum>9</manvolnum> 18018 <refmiscinfo class="version">4.1.27</refmiscinfo> 18019</refmeta> 18020<refnamediv> 18021 <refname>struct tid_ampdu_rx</refname> 18022 <refpurpose> 18023 TID aggregation information (Rx). 18024 </refpurpose> 18025</refnamediv> 18026<refsynopsisdiv> 18027 <title>Synopsis</title> 18028 <programlisting> 18029struct tid_ampdu_rx { 18030 struct rcu_head rcu_head; 18031 spinlock_t reorder_lock; 18032 struct sk_buff_head * reorder_buf; 18033 unsigned long * reorder_time; 18034 struct timer_list session_timer; 18035 struct timer_list reorder_timer; 18036 unsigned long last_rx; 18037 u16 head_seq_num; 18038 u16 stored_mpdu_num; 18039 u16 ssn; 18040 u16 buf_size; 18041 u16 timeout; 18042 u8 dialog_token; 18043 bool auto_seq; 18044 bool removed; 18045}; </programlisting> 18046</refsynopsisdiv> 18047 <refsect1> 18048 <title>Members</title> 18049 <variablelist> 18050 <varlistentry> <term>rcu_head</term> 18051 <listitem><para> 18052RCU head used for freeing this struct 18053 </para></listitem> 18054 </varlistentry> 18055 <varlistentry> <term>reorder_lock</term> 18056 <listitem><para> 18057serializes access to reorder buffer, see below. 18058 </para></listitem> 18059 </varlistentry> 18060 <varlistentry> <term>reorder_buf</term> 18061 <listitem><para> 18062buffer to reorder incoming aggregated MPDUs. An MPDU may be an 18063A-MSDU with individually reported subframes. 18064 </para></listitem> 18065 </varlistentry> 18066 <varlistentry> <term>reorder_time</term> 18067 <listitem><para> 18068jiffies when skb was added 18069 </para></listitem> 18070 </varlistentry> 18071 <varlistentry> <term>session_timer</term> 18072 <listitem><para> 18073check if peer keeps Tx-ing on the TID (by timeout value) 18074 </para></listitem> 18075 </varlistentry> 18076 <varlistentry> <term>reorder_timer</term> 18077 <listitem><para> 18078releases expired frames from the reorder buffer. 18079 </para></listitem> 18080 </varlistentry> 18081 <varlistentry> <term>last_rx</term> 18082 <listitem><para> 18083jiffies of last rx activity 18084 </para></listitem> 18085 </varlistentry> 18086 <varlistentry> <term>head_seq_num</term> 18087 <listitem><para> 18088head sequence number in reordering buffer. 18089 </para></listitem> 18090 </varlistentry> 18091 <varlistentry> <term>stored_mpdu_num</term> 18092 <listitem><para> 18093number of MPDUs in reordering buffer 18094 </para></listitem> 18095 </varlistentry> 18096 <varlistentry> <term>ssn</term> 18097 <listitem><para> 18098Starting Sequence Number expected to be aggregated. 18099 </para></listitem> 18100 </varlistentry> 18101 <varlistentry> <term>buf_size</term> 18102 <listitem><para> 18103buffer size for incoming A-MPDUs 18104 </para></listitem> 18105 </varlistentry> 18106 <varlistentry> <term>timeout</term> 18107 <listitem><para> 18108reset timer value (in TUs). 18109 </para></listitem> 18110 </varlistentry> 18111 <varlistentry> <term>dialog_token</term> 18112 <listitem><para> 18113dialog token for aggregation session 18114 </para></listitem> 18115 </varlistentry> 18116 <varlistentry> <term>auto_seq</term> 18117 <listitem><para> 18118used for offloaded BA sessions to automatically pick head_seq_and 18119and ssn. 18120 </para></listitem> 18121 </varlistentry> 18122 <varlistentry> <term>removed</term> 18123 <listitem><para> 18124this session is removed (but might have been found due to RCU) 18125 </para></listitem> 18126 </varlistentry> 18127 </variablelist> 18128 </refsect1> 18129<refsect1> 18130<title>Description</title> 18131<para> 18132 This structure's lifetime is managed by RCU, assignments to 18133 the array holding it must hold the aggregation mutex. 18134 </para><para> 18135 18136 The <parameter>reorder_lock</parameter> is used to protect the members of this 18137 struct, except for <parameter>timeout</parameter>, <parameter>buf_size</parameter> and <parameter>dialog_token</parameter>, 18138 which are constant across the lifetime of the struct (the 18139 dialog token being used only for debugging). 18140</para> 18141</refsect1> 18142</refentry> 18143 18144 </chapter> 18145 18146 <chapter id="synchronisation"> 18147 <title>Synchronisation</title> 18148 <para>TBD</para> 18149 <para>Locking, lots of RCU</para> 18150 </chapter> 18151 </part> 18152 </book> 18153</set> 18154