Table of Contents

A Linux Kernel Radio Frequency Broker

marcel@holtmann.org timg@tpi.com mcgrof@gmail.com inaky.perez-gonzalez@intel.com

Ubuntu Developer Summit, Sevilla (Spain) May 2007


Objective

A frequency broker to coordinate the usage of frequency bands amongst all the radios in a Linux system. As well, to provide regulatory information that drivers can use to be fully compliant depending on geography.

Code

We have an scratch out of the data structures and modules at http://bughost.org/repos.hg/frbr.hg, accessible with Mercurial.

It currently has no implementation of the regulatory controller and only registers bands that the drivers provide. Waiting to have some more time to work on it :)

Random notes about usage models

User space sets a regulatory spectral mask (based on geo location, for example).

Device driver registers frequency band capabilities (ie: bands where they can tx/rx, at which max power, type of technology, flags, etc).

By some management action, the device is going to be asked to use a frequency in a band. Device queries the broker to see if that frequency band is used or can be shared with other devices or not. The decission can come of as:

If there is no band to use:

Operations

We want to allow devices to share channels. If devices are the same technology sharing is on by default, else is not. We need a force parameter/priority override. A prioritization can be:

Callbacks

When a device wants to activate a band he calls _get(), which checks for regulatory and then conflicts.

For each conflict, _get() calls back the owners and says “Can you share?” or “You have to release” [note: still not clear if this should be two different cbs]. The owner releases if ordered to or agrees or disagrees to share.

If share disagreement, _get() caller doesn't get the band and the broker notifies user space for a conflict.

Types of callbacks:

Sysfs tree

Sample, castle in the air

sys/subsys/freqbroker
  regulatory/
    addband
    removeband
    band1
    badn2
  active/
    typename-symlink1 to band1   # or separate directories for each type
    typename-symlink2 to band5
  dev1/
    device -> link to the owner
    band1/         # names/of the channels
      device -> link to the devX owner
      active
      center
      width
      maxpower
      flags
      etc...
    band2/
    band3/

Broker life cycle and startup

One initialization the broker should be empty until filled up by user space. During deployment, there will be gaps until user space support is widely deployed. In the meantime, we have to behave somehow.

Options:

Data types

band

Specifies a contiguous range of Mhz.

    band center freq               (integer MHz)
    band width                     (integer MHz)
    maximum power emission         (integer / 1000 dBm)
    bandtype                       (see below)
    name                           (driver name + device instance)
    priority
    flags
      spread spectrum              Bluetooth -- bt uses a frequency
                                   range and hops around and will obey
                                   freq blockout. Spectrum is used as
                                   widely as possible (starts big and
                                   shrinks it).
                                   soft/advisory
                                   See note
    refcount/usecount

Band type

Type of the technology that is using that band specification.

    802.11{b,a,n,c,g}, 802.16, GPS, GSM, BT, uwb ...
    default priority

Notes

NOTE: when suspending, tell broker channel is not active any more

NOTE: bt uses a full range on ISM, hops around but cannot block out

NOTE: passive to active scanning concern – consider active scan