1. 10 Jul, 2009 16 commits
  2. 07 Jul, 2009 2 commits
  3. 19 Jun, 2009 3 commits
  4. 10 Jun, 2009 2 commits
    • Johannes Berg's avatar
      cfg80211: fix rfkill locking problem · 2f0accc1
      Johannes Berg authored
      rfkill currently requires a global lock within the
      rfkill_register() function, and holds that lock over
      calls to the set_block() methods. This means that we
      cannot hold a lock around rfkill_register() that we
      also require in set_block(), directly or indirectly.
      Fix cfg80211 to register rfkill outside the block
      locked by its global lock. Much of what cfg80211 does
      in the locked block doesn't need to be locked anyway.
      Reported-by: default avatarVasanthakumar Thiagarajan <vasanth@atheros.com>
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Luis R. Rodriguez's avatar
      cfg80211: fix for duplicate response for driver reg request · 558f6d32
      Luis R. Rodriguez authored
      As Pavel puts userspace can be stupid and should not
      cause kernel crashes. In this case Pavel was able to
      find a crash here but unable to reproduce. Either way
      lets deal with this.
      This should fix:
      ------------[ cut here ]------------
      kernel BUG at /home/proski/src/linux-2.6/net/wireless/reg.c:2132!
      Oops: Exception in kernel mode, sig: 5 [#1]
      Modules linked in: ath5k ath [last unloaded: scsi_wait_scan]
      NIP: c02f3eac LR: c02f3d08 CTR: 00000000
      REGS: ef107aa0 TRAP: 0700   Not tainted  (2.6.30-rc8-wl)
      MSR: 00029032 <EE,ME,CE,IR,DR>  CR: 88002442  XER: 20000000
      TASK = ef84acb0[834] 'crda' THREAD: ef106000
      GPR00: ef953840 ef107b50 ef84acb0 ef1380bc 00000006 c035a5c8 ef107b90 c035a5c8
      GPR08: 00080005 efb68980 c0445628 ef130004 28002422 10019ce0 10012d3c 00000001
      GPR16: 1070b2ac 00000005 48023558 1070b380 4802304c 00000000 ef107ddc c035a5c8
      GPR24: ef107b78 c0443350 ef8bcb00 00000005 ef138080 c04a6a70 c04a0000 ef8bcb00
      NIP [c02f3eac] set_regdom+0x4c4/0x4ec
      LR [c02f3d08] set_regdom+0x320/0x4ec
      Call Trace:
      [ef107b50] [c02f3d08] set_regdom+0x320/0x4ec (unreliable)
      [ef107b70] [c02f9d10] nl80211_set_reg+0x140/0x2d0
      [ef107bc0] [c02aa2b8] genl_rcv_msg+0x204/0x228
      [ef107c10] [c02a97cc] netlink_rcv_skb+0xe8/0x10c
      [ef107c30] [c02aa094] genl_rcv+0x3c/0x5c
      [ef107c40] [c02a9050] netlink_unicast+0x308/0x36c
      [ef107c80] [c02a92bc] netlink_sendmsg+0x208/0x2f0
      [ef107cd0] [c0282048] sock_sendmsg+0xac/0xe4
      [ef107db0] [c02822b4] sys_sendmsg+0x234/0x2d8
      [ef107f00] [c0283a88] sys_socketcall+0x108/0x258
      [ef107f40] [c0012790] ret_from_syscall+0x0/0x38
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  5. 03 Jun, 2009 9 commits
    • 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>
    • 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>
    • 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>
    • 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>
    • Luis R. Rodriguez's avatar
      cfg80211: fix for duplicate userspace replies · 729e9c76
      Luis R. Rodriguez authored
      This fixes an incorrect assumption (BUG_ON) made in
      cfg80211 when handling country IE regulatory requests.
      The assumption was that we won't try to call_crda()
      twice for the same event and therefore we will not
      recieve two replies through nl80211 for the regulatory
      request. As it turns out it is true we don't call_crda()
      twice for the same event, however, kobject_uevent_env()
      *might* send the udev event twice and/or userspace can
      simply process the udev event twice. We remove the BUG_ON()
      and simply ignore the duplicate request.
      For details refer to this thread:
      Cc: stable@kernel.org
      Reported-by: default avatarMaxim Levitsky <maximlevitsky@gmail.com>
      Signed-off-by: default avatarLuis R. Rodriguez <lrodriguez@atheros.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Johannes Berg's avatar
      cfg80211: disallow interfering with stations on non-AP (part 2) · 034d655e
      Johannes Berg authored
      On non-AP interfaces userspace has no business interfering with
      the station management, this can confuse mac80211 (and other
      drivers probably wouldn't support it anyway). Allow adding and
      removing stations only on AP interfaces.
      (Reconcile this w/ previous version of patch posted with same
      subject... -- JWL)
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Johannes Berg's avatar
      cfg80211: use key size constants · 8fc0fee0
      Johannes Berg authored
      Instead of hardcoding the key length for validation, use the
      constants Zhu Yi recently added and add one for AES_CMAC too.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Johannes Berg's avatar
      nl80211: bounce scan request back to userspace · 362a415d
      Johannes Berg authored
      When a scan finishes only the program that asked for it
      knows what kind of scan it was; let's tell everybody else
      about the scan parameters as well so they can evaluate
      the result of the scan better. Also helps with debugging.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    • Johannes Berg's avatar
      cfg80211: validate AID of stations being added · 51b50fbe
      Johannes Berg authored
      We have some validation code in mac80211 but said code will
      force an invalid AID to 0 which isn't a valid AID either;
      instead require a valid AID (1-2007) to be passed in from
      userspace in cfg80211 already. Also move the code before
      the race comment since it can only be executed during STA
      addition and thus is not racy.
      Signed-off-by: default avatarJohannes Berg <johannes@sipsolutions.net>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
  6. 27 May, 2009 1 commit
  7. 22 May, 2009 2 commits
  8. 21 May, 2009 1 commit
  9. 20 May, 2009 4 commits