22 May, 2008

1 commit

  • The useless channel use statistics are quite a lot of code, currently
    use integer divisions in the packet fast path, are rather inaccurate
    since they do not account for retries and finally nobody even cares.
    Hence, remove them completely.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

15 May, 2008

2 commits

  • trying to clean up the signal/noise code. the previous code in mac80211 had
    confusing names for the related variables, did not have much definition of
    what units of signal and noise were provided and used implicit mechanisms from
    the wireless extensions.

    this patch introduces hardware capability flags to let the hardware specify
    clearly if it can provide signal and noise level values and which units it can
    provide. this also anticipates possible new units like RCPI in the future.

    for signal:

    IEEE80211_HW_SIGNAL_UNSPEC - unspecified, unknown, hw specific
    IEEE80211_HW_SIGNAL_DB - dB difference to unspecified reference point
    IEEE80211_HW_SIGNAL_DBM - dBm, difference to 1mW

    for noise we currently only have dBm:

    IEEE80211_HW_NOISE_DBM - dBm, difference to 1mW

    if IEEE80211_HW_SIGNAL_UNSPEC or IEEE80211_HW_SIGNAL_DB is used the driver has
    to provide the maximum value (max_signal) it reports in order for applications
    to make sense of the signal values.

    i tried my best to find out for each driver what it can provide and update it
    but i'm not sure (?) for some of them and used the more conservative guess in
    doubt. this can be fixed easily after this patch has been merged by changing
    the hardware flags of the driver.

    DRIVER SIGNAL MAX NOISE QUAL
    -----------------------------------------------------------------
    adm8211 unspec(?) 100 n/a missing
    at76_usb unspec(?) (?) unused missing
    ath5k dBm dBm percent rssi
    b43legacy dBm dBm percent jssi(?)
    b43 dBm dBm percent jssi(?)
    iwl-3945 dBm dBm percent snr+more
    iwl-4965 dBm dBm percent snr+more
    p54 unspec 127 n/a missing
    rt2x00 dBm n/a percent rssi+tx/rx frame success
    rt2400 dBm n/a
    rt2500pci dBm n/a
    rt2500usb dBm n/a
    rt61pci dBm n/a
    rt73usb dBm n/a
    rtl8180 unspec(?) 65 n/a (?)
    rtl8187 unspec(?) 65 (?) noise(?)
    zd1211 dB(?) 100 n/a percent

    drivers/net/wireless/ath5k/base.c: Changes-licensed-under: 3-Clause-BSD

    Signed-off-by: Bruno Randolf
    Signed-off-by: John W. Linville

    Bruno Randolf
     
  • As discussed earlier, we can unify locking in struct sta_info
    and use just a single spinlock protecting all members of the
    structure that need protection. Many don't, but one of the
    especially bad ones is the 'flags' member that can currently
    be clobbered when RX and TX is being processed on different
    CPUs at the same time.

    Because having four spinlocks for different, mostly exclusive
    parts of a single structure is overkill, this patch also kills
    the ampdu and mesh plink spinlocks and uses just a single one
    for everything. Because none of the spinlocks are nested, this
    is safe.

    It remains to be seen whether or not we should make the sta
    flags use atomic bit operations instead, for now though this
    is a safe thing and using atomic operations instead will be
    very simple using the new static inline functions this patch
    introduces for accessing sta->flags.

    Since spin_lock_bh() is used with this lock, there shouldn't
    be any contention even if aggregation is enabled at around the
    same time as both requires frame transmission/reception which
    is in a bh context.

    Signed-off-by: Johannes Berg
    Cc: Tomas Winkler
    Cc: Ron Rindjunsky
    Cc: Luis Carlos Cobo
    Signed-off-by: John W. Linville

    Johannes Berg
     

08 May, 2008

1 commit

  • This
    * makes the queue number passed to drivers a u16
    (as it will be with skb_get_queue_mapping)
    * removes the useless queue number defines
    * splits hw->queues into hw->queues/ampdu_queues
    * removes the debugfs files for per-queue counters
    * removes some dead QoS code
    * removes the beacon queue configuration for IBSS
    so that the drivers now never get a queue number
    bigger than (hw->queues + hw->ampdu_queues - 1)
    for tx and only in the range 0..hw->queues-1 for
    conf_tx.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

09 Apr, 2008

1 commit

  • Unfortunately, debugfs can be made to access invalid memory by
    open()ing a file and then waiting until the corresponding debugfs
    file has been removed (and, probably, the underlying object.)

    That could be exploited by any user if the user is able to open
    debugfs files and can cause networking devices, STA entries or
    similar to disappear which is quite easy to do.

    Hence, all debugfs files should be root-only.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

28 Mar, 2008

2 commits


07 Mar, 2008

2 commits

  • This patch cleans up the sta_info struct and documents how
    each set of variables is locked. Notably, flags locking is
    completely missing. It also adds kernel-doc for some (but
    not all yet) members of the struct.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • This makes access to the STA hash table/list use RCU to protect
    against freeing of items. However, it's not a true RCU, the
    copy step is missing: whenever somebody changes a STA item it
    is simply updated. This is an existing race condition that is
    now somewhat understandable.

    This patch also fixes the race key freeing vs. STA destruction
    by making sure that sta_info_destroy() is always called under
    RTNL and frees the key.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

01 Mar, 2008

6 commits

  • These things aren't used and the only possible use is within
    rate control algorithms, however those can, if they need it,
    keep track of it in their private data. last_ack_ms isn't
    even updated so completely useless.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • When print_mac() was marked as __pure to avoid emitting a function
    call in pr_debug() scenarios, a warning in this code surfaced since
    it relies on the fact that the buffer is modified and doesn't use
    the return value. This patch makes it use the return value instead.

    Signed-off-by: Johannes Berg
    Reported-by: Harvey Harrison
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • The TIM flag that is kept in each station's info is completely
    useless, there's no code (aside from the debugfs display code)
    checking it, hence it can be removed. While doing that, I noticed
    that the TIM handling is broken when buffered frames expire, so
    fix that.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • This patch removes the 802.1X port acess control enable flag
    since it is not required. Instead, set the authorized flag for
    each station that we normally communicate with (WDS peers, IBSS
    peers and APs we're associated to) and require hostapd to set
    the authorized flag for all stations when port control is not
    enabled.

    Also, since I was working in that area, this documents station
    flags and removes the unused "permanent" one.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • This patch creates new cfg80211 wiphy API for channel and bitrate
    registration and converts mac80211 and drivers to the new API. The
    old mac80211 API is completely ripped out. All drivers (except ath5k)
    are updated to the new API, in many cases I expect that optimisations
    can be done.

    Along with the regulatory code I've also ripped out the
    IEEE80211_HW_DEFAULT_REG_DOMAIN_CONFIGURED flag, I believe it to be
    unnecessary if the hardware simply gives us whatever channels it wants
    to support and we then enable/disable them as required, which is pretty
    much required for travelling.

    Additionally, the patch adds proper "basic" rate handling for STA
    mode interface, AP mode interface will have to have new API added
    to allow userspace to set the basic rate set, currently it'll be
    empty... However, the basic rate handling will need to be moved to
    the BSS conf stuff.

    I do expect there to be bugs in this, especially wrt. transmit
    power handling where I'm basically clueless about how it should work.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • This patch adds A-MPDU status report per STA to the debugfs.
    The option to de/activate A-MPDU through debugfs is also present.

    Signed-off-by: Ron Rindjunsky
    Signed-off-by: John W. Linville

    Ron Rindjunsky
     

11 Oct, 2007

3 commits


07 Aug, 2007

1 commit


06 May, 2007

1 commit