1. 06 2月, 2008 5 次提交
    • A
      iwl3945-base.c: fix off-by-one errors · 221c80cf
      Adrian Bunk 提交于
      This patch fixes two off-by-one errors resulting in array overflows
      spotted by the Coverity checker.
      Signed-off-by: NAdrian Bunk <bunk@kernel.org>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      221c80cf
    • S
      b43legacy: fix DMA slot resource leakage · 8dd0100c
      Stefano Brivio 提交于
      This fixes four resource leakages.
      In any error path we must deallocate the DMA frame slots we
      previously allocated by request_slot().
      This is done by storing the ring pointers before doing any ring
      allocation and restoring the old pointers in case of an error.
      
      This patch by Michael Buesch has been ported to b43legacy.
      
      Cc: Michael Buesch <mb@bu3sch.de>
      Signed-off-by: NStefano Brivio <stefano.brivio@polimi.it>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      8dd0100c
    • S
      b43legacy: drop packets we are not able to encrypt · 9eca9a8e
      Stefano Brivio 提交于
      We must drop any packets we are not able to encrypt.
      We must not send them unencrypted or with an all-zero-key (which
      basically is the same as unencrypted, from a security point of view).
      
      This might only trigger shortly after resume before mac80211 reassociated
      and reconfigured the keys.
      
      It is safe to drop these packets, as the association they belong to
      is not guaranteed anymore anyway.
      This is a security fix in the sense that it prevents information leakage.
      
      This patch by Michael Buesch has been ported to b43legacy.
      
      Cc: Michael Buesch <mb@bu3sch.de>
      Signed-off-by: NStefano Brivio <stefano.brivio@polimi.it>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9eca9a8e
    • S
      b43legacy: fix suspend/resume · ada50731
      Stefano Brivio 提交于
      This patch makes suspend/resume work with the b43legacy driver.
      We must not overwrite the MAC addresses in the init function, as this
      would also overwrite the MAC on resume. With an all-zero MAC the device
      firmware is not able to ACK any received packets anymore.
      Fix this by moving the initializion stuff that must be done on init but
      not on resume to the start function.
      Also zero out filter_flags to make sure we don't have some flags
      from a previous instance for a tiny timeframe until mac80211 reconfigures
      them.
      
      This patch by Michael Buesch has been ported to b43legacy.
      
      Cc: Michael Buesch <mb@bu3sch.de>
      Signed-off-by: NStefano Brivio <stefano.brivio@polimi.it>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      ada50731
    • S
      b43legacy: fix PIO crash · 0cd67d48
      Stefano Brivio 提交于
      Fix the crash reported below, which seems to happen on bcm4306 rev. 2 devices
      only while using PIO:
      
      Oops: 0000 [#1] PREEMPT
      Modules linked in: b43(F) rfkill(F) led_class(F) input_polldev(F) arc4 b43legacy mac80211 cfg80211 i915 drm snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device ohci1394 ieee1394 ssb pcmcia snd_intel8x0m ehci_hcd uhci_hcd evdev
      
      Pid: 0, comm: swapper Tainted: GF	(2.6.24st3 #2)
      EIP: 0060:[<f90f667b>] EFLAGS: 00010002 CPU: 0
      EIP is at b43legacy_pio_handle_txstatus+0xbb/0x210 [b43legacy]
      EAX: 0000049b EBX: f11f8044 ECX: 00000001 EDX: 00000000
      ESI: f1ff8000 EDI: 00000000 EBP: f11f8040 ESP: c04f4ef4
       DS: 007b ES: 007b FS: 0000 GS: 0000 SS: 0068
      Process swapper (pid: 0, ti=c04f4000 task=c0488300 task.ti=c04b8000)
      Stack: f90f2788 c05009f0 c0500900 000010f7 f1053823 c04f4f24 dfb8e800 00000003
             f1368000 00000007 00000296 f90f1975 00001000 010c0800 01000000 00000007
             f90f6391 f11f8000 00000082 c04f4f4a 00000000 00004fd0 10f70000 8c061000
      Call Trace:
       [<f90f2788>] b43legacy_debugfs_log_txstat+0x48/0xb0 [b43legacy]
       [<f90f1975>] b43legacy_handle_hwtxstatus+0x75/0x80 [b43legacy]
       [<f90f6391>] b43legacy_pio_rx+0x201/0x280 [b43legacy]
       [<f90e4fa3>] b43legacy_interrupt_tasklet+0x2e3/0x870 [b43legacy]
       [<c0123567>] tasklet_action+0x27/0x60
       [<c01237b4>] __do_softirq+0x54/0xb0
       [<c010686b>] do_softirq+0x7b/0xe0
       [<c01457c0>] handle_level_irq+0x0/0x110
       [<c01457c0>] handle_level_irq+0x0/0x110
       [<c0123758>] irq_exit+0x38/0x40
       [<c0106953>] do_IRQ+0x83/0xd0
       [<c011812f>] __update_rq_clock+0x4f/0x180
       [<c0104b4f>] common_interrupt+0x23/0x28
       [<c011007b>] wakeup_code+0x7b/0xde
       [<c02b1039>] acpi_processor_idle+0x24a/0x3c9
       [<c01025c7>] cpu_idle+0x47/0x80
       [<c04b9ad5>] start_kernel+0x205/0x290
       [<c04b9360>] unknown_bootoption+0x0/0x1f0
       =======================
      Code: 0f 00 00 81 fb ff 00 00 00 0f 87 36 01 00 00 8d 04 db 85 ff 8d 6c c6 40 8d 5d 04 0f 85 ef 00 00 00 fe 4e 0e 0f b7 46 0c 8b 53 04 <8b> 4a 50 29 c8 83 e8 52 66 89 46 0c 8b 54 24 14 80 7a 0b 00 74
      EIP: [<f90f667b>] b43legacy_pio_handle_txstatus+0xbb/0x210 [b43legacy] SS:ESP 0068:c04f4ef4
      Kernel panic - not syncing: Fatal exception in interrupt
      Signed-off-by: NStefano Brivio <stefano.brivio@polimi.it>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      0cd67d48
  2. 03 2月, 2008 1 次提交
  3. 02 2月, 2008 5 次提交
  4. 01 2月, 2008 21 次提交
  5. 29 1月, 2008 8 次提交
    • B
      ath5k: always extend rx timestamp with tsf · c0e1899b
      Bruno Randolf 提交于
      always extend the rx timestamp with the local TSF, since this information is
      also needed for proper IBSS merging. this is done in the tasklet for now, maybe
      has to be moved to the interrupt handler like in madwifi.
      
      drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD
      Signed-off-by: NBruno Randolf <bruno@thinktube.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      c0e1899b
    • B
      ath5k: configure backoff for IBSS beacon queue · 6d91e1d8
      Bruno Randolf 提交于
      in "11.1.2.2 Beacon generation in an IBSS" the IEEE802.11 standard says, each
      STA should... "b) Calculate a random delay uniformly distributed in the range
      between zero and twice aCWmin × aSlotTime,".
      
      configure cwmin and cwmax of the beacon queue in IBSS mode according to this.
      unfortunately beacon backoff does not work reliably yet, so i suspect we have a
      problem somewhere else, since the same settings (and similar beacon timer
      configuration) work for madwifi.
      
      drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD
      Signed-off-by: NBruno Randolf <bruno@thinktube.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      6d91e1d8
    • B
      ath5k: use SWBA to detect IBSS HW merges · 036cd1ec
      Bruno Randolf 提交于
      use SWBA (software beacon alert) interrupts to keep track of the next beacon
      time und check if a HW merge (automatic TSF update) has happened on every
      received beacon with the same BSSID.
      
      this is necessary because the atheros hardware will silently update the local
      TSF in IBSS mode, but not its beacon timers. if the TSF is ahead of the beacon
      timers no beacons are sent until the timers wrap around (typically after about
      1 minute).
      
      this solution is not very nice, since we have to look into every beacon, but
      there is apparently no other way to detect HW merges.
      
      drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD
      drivers/net/wireless/ath5k/base.h:      Changes-licensed-under: 3-Clause-BSD
      Signed-off-by: NBruno Randolf <bruno@thinktube.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      036cd1ec
    • B
      ath5k: better beacon timer calculation · 9804b98d
      Bruno Randolf 提交于
      update ath5k_beacon_update_timers() for better beacon timer calculation in a
      variety of situations. most important is the possibility to call it with the
      timestamp of a received beacon, when we detected that a HW merge has happened
      and we need to reconfigure the beacon timers based on that.
      
      we call this from the mac80211 callback reset_tsf now instead of beacon_update,
      and there will be more use of it in the next patch.
      
      drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD
      Signed-off-by: NBruno Randolf <bruno@thinktube.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      9804b98d
    • B
      ath5k: beacon interval is in TU · e535c1ac
      Bruno Randolf 提交于
      the beacon interval is passed by mac80211 in TU already, so we can directly use
      it without conversion. also update the comments about TU (1 TU is defined by
      802.11 as 1024usec).
      
      drivers/net/wireless/ath5k/ath5k.h:     Changes-licensed-under: ISC
      drivers/net/wireless/ath5k/base.c:      Changes-licensed-under: 3-Clause-BSD
      drivers/net/wireless/ath5k/base.h:      Changes-licensed-under: 3-Clause-BSD
      Signed-off-by: NBruno Randolf <bruno@thinktube.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      e535c1ac
    • B
      ath5k: use 3 instead of 0x00000003 · 1008e0f7
      Bruno Randolf 提交于
      reviewed beacon timer initialization with register traces from madwifi: what we
      are doing is correct :). one minor fix: use 3 instead of 0x00000003 - it's more
      readable.
      
      drivers/net/wireless/ath5k/hw.c:        Changes-licensed-under: ISC
      Signed-off-by: NBruno Randolf <bruno@thinktube.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      1008e0f7
    • M
      b43: Fix MAC control and microcode init · 1f7d87b0
      Michael Buesch 提交于
      This zeros out all microcode related memory before loading
      the microcode.
      
      This also fixes initialization of the MAC control register.
      The _only_ place where we overwrite the contents of the MAC control
      register is at the beginning of b43_chip_init().
      All other places must do read() -> mask/set -> write() to not
      overwrite existing bits.
      
      This also adds a longer delay for waiting for the microcode
      to initialize itself. It seems that the current timeout is sufficient
      on all available devices, but there's no real reason why we shouldn't
      wait for up to one second. Slow embedded devices might exist.
      Better safe than sorry.
      Signed-off-by: NMichael Buesch <mb@bu3sch.de>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      1f7d87b0
    • J
      ath5k: reset key cache after resume · 247ae449
      John W. Linville 提交于
      Otherwise it may be impossible to connected to an open network after a
      resume.
      
      This is a modified version of an original patch by
      Alex Eskin <alexeskin@yahoo.com>:
      
      	https://bugzilla.redhat.com/show_bug.cgi?id=425950#c8Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      247ae449