1. 07 Jun, 2009 8 commits
  2. 04 Jun, 2009 15 commits
  3. 03 Jun, 2009 17 commits
    • Johannes Berg's avatar
      cfg80211: fix Kconfig for users of cfg80211 · 0aa8204b
      Johannes Berg authored
       * iwm doesn't depend on cfg80211 or wireless extensions
       * rndis wlan selects cfg80211 - needs to depend
       * mac80211 selects cfg80211 - needs to depend
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Acked-by: default avatarRandy Dunlap <randy.dunlap@oracle.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      0aa8204b
    • Johannes Berg's avatar
      rfkill: document /dev/rfkill · f71fea23
      Johannes Berg authored
      Add some blurb about /dev/rfkill to the documentation and
      fix the "transmiter" spelling error.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      f71fea23
    • Johannes Berg's avatar
      rfkill: always init poll delayed work · 2ec2c68c
      Johannes Berg authored
      The rfkill core didn't initialise the poll delayed work
      because it assumed that polling was always done by specifying
      the poll function. cfg80211, however, would like to start
      polling only later, which is a valid use case and easy to
      support, so change rfkill to always initialise the poll
      delayed work and thus allow starting polling by calling the
      rfkill_resume_polling() function after registration.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      2ec2c68c
    • Bob Copeland's avatar
      ath5k: disable beacon interrupt when interface is down · 72828b1b
      Bob Copeland authored
      When we remove the active interface, there's no need to continue
      sending beacons; doing so would cause a null pointer deref in
      ieee80211_beacon_get().  Disable the interrupt in remove_interface
      and add a WARN_ON(!vif) in case there are other instances lurking.
      Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      72828b1b
    • Luis R. Rodriguez's avatar
    • Luis R. Rodriguez's avatar
    • Luis R. Rodriguez's avatar
      cfg80211: make ieee80211_get_mesh_hdrlen() static · 60fd2b67
      Luis R. Rodriguez authored
      Fixes spares warning:
      net/wireless/util.c:261:5: warning:
      symbol 'ieee80211_get_mesh_hdrlen' was not declared. Should it be static?
      Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      60fd2b67
    • Luis R. Rodriguez's avatar
      ath: make regulatory parsing more verbose on debug · e03e5ffd
      Luis R. Rodriguez authored
      This should help when reviewing issues regarding regulatory
      domain on ath5k/ath9k/ar9170.
      Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      e03e5ffd
    • Vasanthakumar Thiagarajan's avatar
      ath9k: Fix write callback of 'debug' which configures debug mask · 581f725c
      Vasanthakumar Thiagarajan authored
      Handle error condition on copy_from_user() properly and
      make sure a NUL terminated char[] is sent to strict_strtoul()
      for proper conversion.
      Signed-off-by: default avatarVasanthakumar Thiagarajan <vasanth@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      581f725c
    • Johannes Berg's avatar
      iwm: port to new cfg80211 rfkill · 76963bb6
      Johannes Berg authored
      Which means removing all rfkill code since it only does
      soft-kill which cfg80211 will now handle in exactly the
      same way the driver did.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      76963bb6
    • Johannes Berg's avatar
      cfg80211: add rfkill support · 1f87f7d3
      Johannes Berg authored
      To be easier on drivers and users, have cfg80211 register an
      rfkill structure that drivers can access. When soft-killed,
      simply take down all interfaces; when hard-killed the driver
      needs to notify us and we will take down the interfaces
      after the fact. While rfkilled, interfaces cannot be set UP.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      1f87f7d3
    • Johannes Berg's avatar
      rfkill: add function to query state · 6081162e
      Johannes Berg authored
      Sometimes it is necessary to know how the state is,
      and it is easier to query rfkill than keep track of
      it somewhere else, so add a function for that. This
      could later be expanded to return hard/soft block,
      but so far that isn't necessary.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      6081162e
    • Johannes Berg's avatar
      cfg80211: move txpower wext from mac80211 · 7643a2c3
      Johannes Berg authored
      This patch introduces new cfg80211 API to set the TX power
      via cfg80211, puts the wext code into cfg80211 and updates
      mac80211 to use all that. The -ENETDOWN bits are a hack but
      will go away soon.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      7643a2c3
    • Johannes Berg's avatar
      rfkill: create useful userspace interface · c64fb016
      Johannes Berg authored
      The new code added by this patch will make rfkill create
      a misc character device /dev/rfkill that userspace can use
      to control rfkill soft blocks and get status of devices as
      well as events when the status changes.
      
      Using it is very simple -- when you open it you can read
      a number of times to get the initial state, and every
      further read blocks (you can poll) on getting the next
      event from the kernel. The same structure you read is
      also used when writing to it to change the soft block of
      a given device, all devices of a given type, or all
      devices.
      
      This also makes CONFIG_RFKILL_INPUT selectable again in
      order to be able to test without it present since its
      functionality can now be replaced by userspace entirely
      and distros and users may not want the input part of
      rfkill interfering with their userspace code. We will
      also write a userspace daemon to handle all that and
      consequently add the input code to the feature removal
      schedule.
      
      In order to have rfkilld support both kernels with and
      without CONFIG_RFKILL_INPUT (or new kernels after its
      eventual removal) we also add an ioctl (that only exists
      if rfkill-input is present) to disable rfkill-input.
      It is not very efficient, but at least gives the correct
      behaviour in all cases.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      c64fb016
    • Johannes Berg's avatar
      rfkill: rewrite · 19d337df
      Johannes Berg authored
      This patch completely rewrites the rfkill core to address
      the following deficiencies:
      
       * all rfkill drivers need to implement polling where necessary
         rather than having one central implementation
      
       * updating the rfkill state cannot be done from arbitrary
         contexts, forcing drivers to use schedule_work and requiring
         lots of code
      
       * rfkill drivers need to keep track of soft/hard blocked
         internally -- the core should do this
      
       * the rfkill API has many unexpected quirks, for example being
         asymmetric wrt. alloc/free and register/unregister
      
       * rfkill can call back into a driver from within a function the
         driver called -- this is prone to deadlocks and generally
         should be avoided
      
       * rfkill-input pointlessly is a separate module
      
       * drivers need to #ifdef rfkill functions (unless they want to
         depend on or select RFKILL) -- rfkill should provide inlines
         that do nothing if it isn't compiled in
      
       * the rfkill structure is not opaque -- drivers need to initialise
         it correctly (lots of sanity checking code required) -- instead
         force drivers to pass the right variables to rfkill_alloc()
      
       * the documentation is hard to read because it always assumes the
         reader is completely clueless and contains way TOO MANY CAPS
      
       * the rfkill code needlessly uses a lot of locks and atomic
         operations in locked sections
      
       * fix LED trigger to actually change the LED when the radio state
         changes -- this wasn't done before
      Tested-by: default avatarAlan Jenkins <alan-jenkins@tuffmail.co.uk>
      Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> [thinkpad]
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      19d337df
    • Bob Copeland's avatar
      nl80211: use GFP_ATOMIC for michael mic failure message · 0f6399c4
      Bob Copeland authored
      nl80211_michael_mic_failure can be called in atomic context but
      does a GFP_KERNEL allocation.  Fixes the error below:
      
      [  126.793225] BUG: sleeping function called from invalid context at mm/slab.c:3055
      [  126.793234] in_atomic(): 1, irqs_disabled(): 0, pid: 0, name: swapper
      [  126.793241] 2 locks held by swapper/0:
      [  126.793246]  #0:  (&sc->rxbuflock){+.-.+.}, at: [<f94e1b46>] ath5k_tasklet_rx+0x34/0x55e [ath5k]
      [  126.793294]  #1:  (rcu_read_lock){.+.+.+}, at: [<f92872f3>] __ieee80211_rx+0x7e/0x563 [mac80211]
      [  126.793342] Pid: 0, comm: swapper Not tainted 2.6.30-rc7-wl #124
      [  126.793347] Call Trace:
      [  126.793361]  [<c014499d>] ? __debug_show_held_locks+0x1e/0x20
      [  126.793380]  [<c011e9a3>] __might_sleep+0x100/0x107
      [  126.793386]  [<c018ea99>] kmem_cache_alloc+0x35/0x170
      [  126.793393]  [<c02e8bb1>] ? __alloc_skb+0x2e/0x117
      [  126.793397]  [<c014517d>] ? mark_held_locks+0x43/0x5b
      [  126.793402]  [<c02e8bb1>] __alloc_skb+0x2e/0x117
      [  126.793419]  [<f851a836>] nl80211_michael_mic_failure+0x2a/0x1fa [cfg80211]
      [  126.793425]  [<c01453b8>] ? trace_hardirqs_on_caller+0xf6/0x130
      [  126.793430]  [<c01453fd>] ? trace_hardirqs_on+0xb/0xd
      [  126.793444]  [<f851b2b8>] cfg80211_michael_mic_failure+0x30/0x38 [cfg80211]
      [  126.793463]  [<f928bf69>] mac80211_ev_michael_mic_failure+0xfd/0x108 [mac80211]
      [  126.793480]  [<f9279fbd>] ieee80211_rx_h_michael_mic_verify+0xd4/0x117 [mac80211]
      [  126.793499]  [<f9285ef3>] ieee80211_invoke_rx_handlers+0xdde/0x1963 [mac80211]
      [  126.793505]  [<c0107152>] ? sched_clock+0x3f/0x64
      [  126.793511]  [<c0107152>] ? sched_clock+0x3f/0x64
      [  126.793516]  [<c01445d7>] ? trace_hardirqs_off+0xb/0xd
      [  126.793521]  [<c0107152>] ? sched_clock+0x3f/0x64
      [  126.793526]  [<c0146454>] ? __lock_acquire+0x62c/0x1271
      [  126.793545]  [<f9286fbb>] __ieee80211_rx_handle_packet+0x543/0x564 [mac80211]
      [  126.793564]  [<f9287757>] __ieee80211_rx+0x4e2/0x563 [mac80211]
      [  126.793577]  [<f94e1ff6>] ath5k_tasklet_rx+0x4e4/0x55e [ath5k]
      [  126.793583]  [<c0102b54>] ? restore_nocheck_notrace+0x0/0xe
      [  126.793589]  [<c0129aa2>] tasklet_action+0x92/0xe5
      [  126.793594]  [<c0129f22>] __do_softirq+0xb1/0x182
      [  126.793599]  [<c012a023>] do_softirq+0x30/0x48
      [  126.793603]  [<c012a19b>] irq_exit+0x3d/0x74
      [  126.793609]  [<c0358016>] do_IRQ+0x76/0x8c
      [  126.793613]  [<c010312e>] common_interrupt+0x2e/0x34
      [  126.793618]  [<c014007b>] ? timer_list_show+0x277/0x939
      [  126.793630]  [<f88eb321>] ? acpi_idle_enter_bm+0x266/0x291 [processor]
      [  126.793636]  [<c02d00f6>] cpuidle_idle_call+0x6a/0x9c
      [  126.793640]  [<c0101cc8>] cpu_idle+0x53/0x87
      [  126.793645]  [<c0344510>] rest_init+0x6c/0x6e
      [  126.793651]  [<c04dd74d>] start_kernel+0x286/0x28b
      [  126.793656]  [<c04dd037>] __init_begin+0x37/0x3c
      Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      0f6399c4
    • Bing Zhao's avatar
      libertas: improve function init/shutdown handling for SD8688 · 6bc61f4d
      Bing Zhao authored
      This patch is to incorporate Dan Williams' comments for commit:
      "libertas: implement function init/shutdown commands for SD8688"
      
      1. remove fn_init_required and fn_shutdown_required variables from
      lbs_private structure. If required, __lbs_cmd() will be called
      directly to send function init/shutdown command for SD8688 in
      if_sdio_probe() or if_sdio_remove() callback.
      
      2. add global variable "user_rmmod" to distinguish between the module
      removal case and the card removal case. This flag will be checked in
      if_sdio_remove() against SD8688 card to determine whether or not the
      function shutdown command needs to be sent.
      
      3. remove "card" from if_sdio_model structure as it cannot store
      card pointers for multiple cards. Besides, it's no longer needed
      to store the "card" pointer with changes #1 & #2 above.
      Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
      Acked-by: default avatarDan Williams <dcbw@redhat.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      6bc61f4d