1. 16 May, 2011 8 commits
    • Mohammed Shafi Shajakhan's avatar
      ath9k_hw: enable Antenna diversity for AR9485 · 21d2c63a
      Mohammed Shafi Shajakhan authored
      read antenna diversity and combining information from the EEPROM.
      Enable antenna diversity/combining feature only when both LNA
      diversity and fast diversity are supported
      
      Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com>
      Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
      Tested-by: default avatarMohammed Shafi Shajakhan <mshajakhan@atheros.com>
      Signed-off-by: default avatarMohammed Shafi Shajakhan <mshajakhan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      21d2c63a
    • Mohammed Shafi Shajakhan's avatar
      ath9k_hw: make antenna diversity modules chip specific · 69de3721
      Mohammed Shafi Shajakhan authored
      this is necessary to support Antenna diversity and combining in new chip
      sets such as AR9485, previously Antenna diversity support is available
      only in AR9285
      
      Cc: Gabriel Tseng <Gabriel.Tseng@Atheros.com>
      Cc: Senthilkumar Balasubramanian <Senthilkumar.Balasubramanian@Atheros.com>
      Signed-off-by: default avatarMohammed Shafi Shajakhan <mshajakhan@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      69de3721
    • Julia Lawall's avatar
      net/rfkill/core.c: Avoid leaving freed data in a list · bd2281b8
      Julia Lawall authored
      The list_for_each_entry loop can fail, in which case the list element is
      not removed from the list rfkill_fds.  Since this list is not accessed by
      the loop, the addition of &data->list into the list is just moved after the
      loop.
      
      The sematic match that finds this problem is as follows:
      (http://coccinelle.lip6.fr/)
      
      // <smpl>
      @@
      expression E,E1,E2;
      identifier l;
      @@
      
      *list_add(&E->l,E1);
      ... when != E1
          when != list_del(&E->l)
          when != list_del_init(&E->l)
          when != E = E2
      *kfree(E);// </smpl>
      Signed-off-by: default avatarJulia Lawall <julia@diku.dk>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      bd2281b8
    • Johannes Berg's avatar
      mac80211: sparse RCU annotations · 40b275b6
      Johannes Berg authored
      This adds sparse RCU annotations to most of
      mac80211, only the mesh code remains to be
      done.
      
      Due the the previous patches, the annotations
      are pretty simple. The only thing that this
      actually changes is removing the RCU usage of
      key->sta in debugfs since this pointer isn't
      actually an RCU-managed pointer (it only has
      a single assignment done before the key even
      goes live). As that is otherwise harmless, I
      decided to make it part of this patch.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      40b275b6
    • Johannes Berg's avatar
      mac80211: fix TX a-MPDU locking · ec034b20
      Johannes Berg authored
      During my quest to make mac80211 not have any RCU
      warnings from sparse, I came across the a-MPDU code
      again and it wasn't quite clear why it isn't racy.
      So instead of assigning the tid_tx array with just
      the spinlock held in ieee80211_start_tx_ba_session
      use a separate temporary array protected only by
      the spinlock and protect all assignments to the
      "live" array by both the spinlock and the mutex so
      that other code is easily verified to be correct.
      
      Due to pointer assignment atomicity I don't think
      this is a real issue, but I'm not sure, especially
      on Alpha the current code might be problematic.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      ec034b20
    • Johannes Berg's avatar
      cfg80211: advertise possible interface combinations · 7527a782
      Johannes Berg authored
      Add the ability to advertise interface combinations in nl80211.
      This allows the driver to indicate what the combinations are
      that it supports. "Combinations" of just a single interface are
      implicit, as previously. Note that cfg80211 will enforce that
      the restrictions are met, but not for all drivers yet (once all
      drivers are updated, we can remove the flag and enforce for all).
      
      When no combinations are actually supported, an empty list will
      be exported so that userspace can know if the kernel exported
      this info or not (although it isn't clear to me what tools using
      the info should do if the kernel didn't export it).
      
      Since some interface types are purely virtual/software and don't
      fit the restrictions, those are exposed in a new list of pure SW
      types, not subject to restrictions. This mainly exists to handle
      AP-VLAN and monitor interfaces in mac80211.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      7527a782
    • Stephen Boyd's avatar
      iwlwifi: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning · 805d7d23
      Stephen Boyd authored
      Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following
      warning:
      
      In file included from arch/x86/include/asm/uaccess.h:573,
                       from include/net/checksum.h:25,
                       from include/linux/skbuff.h:28,
                       from drivers/net/wireless/iwlwifi/iwl-agn-rs.c:28:
      In function 'copy_from_user',
          inlined from 'rs_sta_dbgfs_scale_table_write' at
          drivers/net/wireless/iwlwifi/iwl-agn-rs.c:3099:
      arch/x86/include/asm/uaccess_64.h:65:
      warning: call to 'copy_from_user_overflow' declared with
      attribute warning: copy_from_user() buffer size is not provably
      correct
      
      presumably due to buf_size being signed causing GCC to fail to
      see that buf_size can't become negative.
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: default avatarWey-Yi Guy <wey-yi.w.guy@intel.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      805d7d23
    • Stephen Boyd's avatar
      iwlegacy: Silence DEBUG_STRICT_USER_COPY_CHECKS=y warning · 8220ba3e
      Stephen Boyd authored
      Enabling DEBUG_STRICT_USER_COPY_CHECKS causes the following
      warning:
      
      In file included from arch/x86/include/asm/uaccess.h:573,
                       from include/net/checksum.h:25,
                       from include/linux/skbuff.h:28,
                       from drivers/net/wireless/iwlegacy/iwl-4965-rs.c:28:
      In function 'copy_from_user',
          inlined from 'iwl4965_rs_sta_dbgfs_scale_table_write' at
          drivers/net/wireless/iwlegacy/iwl-4965-rs.c:2616:
      arch/x86/include/asm/uaccess_64.h:65:
      warning: call to 'copy_from_user_overflow' declared with
      attribute warning: copy_from_user() buffer size is not provably
      correct
      
      presumably due to buf_size being signed causing GCC to fail to
      see that buf_size can't become negative.
      
      Cc: Johannes Berg <johannes.berg@intel.com>
      Signed-off-by: default avatarStephen Boyd <sboyd@codeaurora.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      8220ba3e
  2. 13 May, 2011 8 commits
  3. 12 May, 2011 24 commits