tree: 7ffd2f1b8833b00651c083483c0f500d0664e22e [path history] [tgz]
  1. cfg/
  2. fw/
  3. mvm/
  4. pcie/
  5. platform/
  6. test/
  7. xvt/
  8. BUILD.bazel
  9. BUILD.gn
  10. iwl-agn-hw.h
  11. iwl-config.h
  12. iwl-constants.h
  13. iwl-context-info-gen3.h
  14. iwl-context-info.h
  15. iwl-csr.h
  16. iwl-dbg-cfg.c
  17. iwl-dbg-cfg.h
  18. iwl-dbg-tlv.c
  19. iwl-dbg-tlv.h
  20. iwl-debug.h
  21. iwl-dnt-cfg.c
  22. iwl-dnt-cfg.h
  23. iwl-dnt-dev-if.c
  24. iwl-dnt-dev-if.h
  25. iwl-dnt-dispatch.c
  26. iwl-dnt-dispatch.h
  27. iwl-drv.c
  28. iwl-drv.h
  29. iwl-eeprom-parse.c
  30. iwl-eeprom-parse.h
  31. iwl-eeprom-read.c
  32. iwl-eeprom-read.h
  33. iwl-fh.h
  34. iwl-io.c
  35. iwl-io.h
  36. iwl-modparams.h
  37. iwl-nvm-parse.c
  38. iwl-nvm-parse.h
  39. iwl-op-mode.h
  40. iwl-phy-db.c
  41. iwl-phy-db.h
  42. iwl-prph.h
  43. iwl-scd.h
  44. iwl-tm-gnl.c
  45. iwl-tm-gnl.h
  46. iwl-tm-infc.h
  47. iwl-trans.c
  48. iwl-trans.h
  49. iwl-vendor-cmd.h
  50. iwlwifi_driver-info.json
  51. LICENSE
  52. OWNERS
  53. README.fuchsia
  54. README.md
third_party/iwlwifi/README.md

Intel WiFi driver (iwlwifi)

What is This?

The modern Intel chipset integrates an on-chip WiFi feature in order to reduce the board size and power consumption. It can be accessed via the PCIe bus.

There are some hardware variants on the different chipsets. Also there are different firmware variants. The iwlwifi driver is the one driver to rule them all. However, currently we only focus on the MVM firmware on the 7265D module (the one on the Eve).

Note that on some Intel chipsets, the WiFi feature is co-existing with Bluetooth feature. But this driver will not handle the Bluetooth. Instead, the Bluetooth driver will handle it.

Terminology

  • firmware (ucode): a piece of software code running inside the hardware. This gives the hardware some flexibility to extend features or fix/workaround bugs. So far we can tell from the driver source code, the firmware variants include:

    • MVM: a softmac implemention. This is used by the 7265D device.
    • XVT: a firmware used on virtualization environment.
    • FMAC: a fullmac implemention.
    • DVM:
    • TEST: a special firmware to debug the firmware and hardware.
  • opmode: each opmode is mapped to a firmware. For example, the MVM firmware is an opmode. The opmode layer provides a unified interface for upper layer (MLME) to call so that the upper layer doesn't need to know what exact the firmware is.

  • MLME: a user of this softmac driver. It handles the all management packets, for example, the scan, associate, and authenticate protocols.

  • mvm/mac80211.c: provides softmac functions like: add interface, scan, start AP and tx packet.

The Driver Architecture

Below is the brief illustration of how we map the iwlwifi driver onto Fuchsia:

                 MLME
                  |
           --------------- wlanphy_impl_protocol_ops_t / wlan_softmac_protocol_ops_t
                  |
     ^            |
     |     +-------------+         +--------------+
     |     |  opmodes[]  | <------ | iwl_drv      |
     |     +-------------+         | calls opmode |
     |            |                | to interact  |
     |            |                | with mvm/.   |
     |            |                +--------------+
     |      +-----+-----+
     |      |     |     |    opmode provides iwl_op_mode_ops callbacks for
     |     xvt/  mvm/  FMAC  underlying layer to pass notifications from
     |      |     |     |    firmware.
iwl  |      +-----+-----+
wifi |            |
     |    ----------------- iwl_trans.h: the transportation layer provides
drv  |            |         the upper layer the unified interface to access
     |            |         the firmware/hardware.
     |            |
     |      +------------------+
     |      |                  |          ^
     |    PCIe            trans-sim.cc    | the
     |    trans                |          | simulated
     |      |             fake firmware   | environment
     |      |                  |          | for
     |      |              simulated      | testing
     |      |             environment     v
     v      |
            |
        --------- PCIe bus
            |
   real firmware/hardware

The Testing Architecture

In order to unittest the driver code, the first thing we do is fake the PCIe transportation layer so that the driver code can talk to the simulated transportation layer, the fake firmware and the simulated environment.

The simulated environment is a library that the WLAN driver team creates to simulate the real-world WiFi environment. For example, a fake AP so that our driver can associate with it. The fake firmware can co-operate with it to return proper result back to the driver. An example is a scan command, the fake firmware can query how many APs are around in the simulated environment and return the scan result back to the driver.

With mocking up the hardware, a test case now can test the driver behavior with meaningful environment setup.

Resources