1. 11 Feb, 2013 3 commits
    • Jonas Gorski's avatar
      mwl8k: fix band for supported channels · d786f67e
      Jonas Gorski authored
      The band field for the supported channels were left unpopulated, making
      them default to 0 == IEEE80211_BAND_2GHZ, even for the 5GHz channels.
      
      This resulted in null pointer accesses if anything tries to access
      wiphy->bands[channel->band] of a 5GHz channel on 5GHz only cards, since
      wiphy->bands[2GHZ] is NULL for them (e.g. cfg80211_chandef_usable does).
      
      Example kernel OOPS:
      
      [  665.669993] Unable to handle kernel NULL pointer dereference at virtual address 00000016
      [  665.678194] pgd = c6d58000
      [  665.680941] [00000016] *pgd=06f8a831, *pte=00000000, *ppte=00000000
      [  665.687303] Internal error: Oops: 17 [#1]
      (...)
      [  666.116373] Backtrace:
      [  666.118866] [<bf0368dc>] (cfg80211_chandef_usable+0x0/0x1bc [cfg80211]) from [<bf025e64>] (nl80211_leave_mesh+0x244/0x264 [cfg80211])
      [  666.130919]  r7:c6d12100 r6:0000143c r5:c0611c48 r4:c0611b98
      [  666.136668] [<bf025d84>] (nl80211_leave_mesh+0x164/0x264 [cfg80211]) from [<bf02634c>] (nl80211_remain_on_channel+0x2a0/0x358 [cfg80211])
      [  666.149074]  r7:c6d12000 r6:c6d12000 r5:c6f4f368 r4:00000003
      [  666.154814] [<bf0262ec>] (nl80211_remain_on_channel+0x240/0x358 [cfg80211]) from [<bf02ddb0>] (nl80211_set_wiphy+0x264/0x560 [cfg80211])
      [  666.167150] [<bf02db4c>] (nl80211_set_wiphy+0x0/0x560 [cfg80211]) from [<c01f94e0>] (genl_rcv_msg+0x1b8/0x1f8)
      [  666.177205] [<c01f9328>] (genl_rcv_msg+0x0/0x1f8) from [<c01f89a0>] (netlink_rcv_skb+0x58/0xb4)
      [  666.185949] [<c01f8948>] (netlink_rcv_skb+0x0/0xb4) from [<c01f931c>] (genl_rcv+0x20/0x2c)
      [  666.194251]  r6:c6f70780 r5:0000002c r4:c6f70780 r3:00000001
      [  666.199973] [<c01f92fc>] (genl_rcv+0x0/0x2c) from [<c01f8418>] (netlink_unicast+0x154/0x1f4)
      [  666.208449]  r4:c785ea00 r3:c01f92fc
      [  666.212057] [<c01f82c4>] (netlink_unicast+0x0/0x1f4) from [<c01f8790>] (netlink_sendmsg+0x230/0x2b0)
      [  666.221240] [<c01f8560>] (netlink_sendmsg+0x0/0x2b0) from [<c01cccf8>] (sock_sendmsg+0x90/0xa4)
      [  666.229986] [<c01ccc68>] (sock_sendmsg+0x0/0xa4) from [<c01cdcb0>] (__sys_sendmsg+0x290/0x298)
      [  666.238637]  r9:00000000 r8:c0611ec8 r6:0000002c r5:c0610000 r4:c0611f64
      [  666.245411] [<c01cda20>] (__sys_sendmsg+0x0/0x298) from [<c01cf52c>] (sys_sendmsg+0x44/0x6c)
      [  666.253897] [<c01cf4e8>] (sys_sendmsg+0x0/0x6c) from [<c00090a0>] (ret_fast_syscall+0x0/0x2c)
      [  666.262460]  r6:00000000 r5:beeff96c r4:00000005
      Signed-off-by: default avatarJonas Gorski <jogo@openwrt.org>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      d786f67e
    • John W. Linville's avatar
    • Johannes Berg's avatar
      mac80211: fix channel selection bug · 3d9646d0
      Johannes Berg authored
      When trying to connect to an AP that advertises HT but not
      VHT, the mac80211 code erroneously uses the configuration
      from the AP as is instead of checking it against regulatory
      and local capabilities. This can lead to using an invalid
      or even inexistent channel (like 11/HT40+).
      
      Additionally, the return flags from downgrading must be
      ORed together, to collect them from all of the downgrades.
      Also clarify the message.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      3d9646d0
  2. 07 Feb, 2013 1 commit
  3. 06 Feb, 2013 1 commit
  4. 04 Feb, 2013 5 commits
  5. 31 Jan, 2013 2 commits
  6. 30 Jan, 2013 1 commit
    • Bing Zhao's avatar
      mwifiex: fix incomplete scan in case of IE parsing error · 8a7d7cbf
      Bing Zhao authored
      A scan request is split into multiple scan commands queued in
      scan_pending_q. Each scan command will be sent to firmware and
      its response is handlded one after another.
      
      If any error is detected while parsing IE in command response
      buffer the remaining data will be ignored and error is returned.
      
      We should check if there is any more scan commands pending in
      the queue before returning error. This ensures that we will call
      cfg80211_scan_done if this is the last scan command, or send
      next scan command in scan_pending_q to firmware.
      
      Cc: "3.6+" <stable@vger.kernel.org>
      Signed-off-by: default avatarBing Zhao <bzhao@marvell.com>
      Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
      Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
      8a7d7cbf
  7. 28 Jan, 2013 5 commits
  8. 24 Jan, 2013 2 commits
  9. 22 Jan, 2013 8 commits
  10. 16 Jan, 2013 6 commits
    • Bob Copeland's avatar
      mac80211: add encrypt headroom to PERR frames · 8680451f
      Bob Copeland authored
      Mesh PERR action frames are robust and thus may be encrypted, so add
      proper head/tailroom to allow this.  Fixes this warning when operating
      a Mesh STA on ath5k:
      
      WARNING: at net/mac80211/wpa.c:427 ccmp_encrypt_skb.isra.5+0x7b/0x1a0 [mac80211]()
      Call Trace:
       [<c011c5e7>] warn_slowpath_common+0x63/0x78
       [<c011c60b>] warn_slowpath_null+0xf/0x13
       [<e090621d>] ccmp_encrypt_skb.isra.5+0x7b/0x1a0 [mac80211]
       [<e090685c>] ieee80211_crypto_ccmp_encrypt+0x1f/0x37 [mac80211]
       [<e0917113>] invoke_tx_handlers+0xcad/0x10bd [mac80211]
       [<e0917665>] ieee80211_tx+0x87/0xb3 [mac80211]
       [<e0918932>] ieee80211_tx_pending+0xcc/0x170 [mac80211]
       [<c0121c43>] tasklet_action+0x3e/0x65
      Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      8680451f
    • Bob Copeland's avatar
      mac80211: set NEED_TXPROCESSING for PERR frames · 9cbbffe2
      Bob Copeland authored
      A user reported warnings in ath5k due to transmitting frames with no
      rates set up.  The frames were Mesh PERR frames, and some debugging
      showed an empty control block with just the vif pointer:
      
      >  [  562.522682] XXX txinfo: 00000000: 00 00 00 00 00 00 00 00 00 00 00
      >  00 00 00 00 00  ................
      >  [  562.522688] XXX txinfo: 00000010: 00 00 00 00 00 00 00 00 54 b8 f2
      >  db 00 00 00 00  ........T.......
      >  [  562.522693] XXX txinfo: 00000020: 00 00 00 00 00 00 00 00 00 00 00
      >  00 00 00 00 00  ................
      
      Set the IEEE80211_TX_INTFL_NEED_TXPROCESSING flag to ensure that
      rate control gets run before the frame is sent.
      Signed-off-by: default avatarBob Copeland <me@bobcopeland.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      9cbbffe2
    • Felix Fietkau's avatar
      mac80211: fix monitor mode injection · b4a7ff75
      Felix Fietkau authored
      Channel contexts are not always used with monitor interfaces. If no channel
      context is set, use the oper channel, otherwise tx fails.
      Signed-off-by: default avatarFelix Fietkau <nbd@openwrt.org>
      [check local->use_chanctx]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      b4a7ff75
    • Stanislaw Gruszka's avatar
      mac80211: synchronize scan off/on-channel and PS states · aacde9ee
      Stanislaw Gruszka authored
      Since:
      
      commit b23b025f
      Author: Ben Greear <greearb@candelatech.com>
      Date:   Fri Feb 4 11:54:17 2011 -0800
      
          mac80211: Optimize scans on current operating channel.
      
      we do not disable PS while going back to operational channel (on
      ieee80211_scan_state_suspend) and deffer that until scan finish.
      But since we are allowed to send frames, we can send a frame to AP
      without PM bit set, so disable PS on AP side. Then when we switch
      to off-channel (in ieee80211_scan_state_resume) we do not enable PS.
      Hence we are off-channel with PS disabled, frames are not buffered
      by AP.
      
      To fix remove offchannel_ps_disable argument and always enable PS when
      going off-channel and disable it when going on-channel, like it was
      before.
      
      Cc: stable@vger.kernel.org # 2.6.39+
      Signed-off-by: default avatarStanislaw Gruszka <sgruszka@redhat.com>
      Tested-by: default avatarSeth Forshee <seth.forshee@canonical.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      aacde9ee
    • Johannes Berg's avatar
      mac80211: fix FT roaming · 1626e0fa
      Johannes Berg authored
      During FT roaming, wpa_supplicant attempts to set the
      key before association. This used to be rejected, but
      as a side effect of my commit 66e67e41
      ("mac80211: redesign auth/assoc") the key was accepted
      causing hardware crypto to not be used for it as the
      station isn't added to the driver yet.
      
      It would be possible to accept the key and then add it
      to the driver when the station has been added. However,
      this may run into issues with drivers using the state-
      based station adding if they accept the key only after
      association like it used to be.
      
      For now, revert to the behaviour from before the auth
      and assoc change.
      
      Cc: stable@vger.kernel.org
      Reported-by: default avatarCédric Debarge <cedric.debarge@acksys.fr>
      Tested-by: default avatarCédric Debarge <cedric.debarge@acksys.fr>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      1626e0fa
    • Emmanuel Grumbach's avatar
      iwlwifi: audit single frames from AGG queue in RS · c3e5d718
      Emmanuel Grumbach authored
      The rate scaling won't treat the information in a frame
      with IEEE80211_TX_CTL_AMPDU set if IEEE80211_TX_STAT_AMPDU
      is cleared. But all the frames coming from an AGG tx queue
      have IEEE80211_TX_CTL_AMPDU set, and IEEE80211_TX_STAT_AMPDU
      is set only if the frame was sent in an AMPDU.
      This means that all the data in frames in AGG tx queues that
      aren't sent as an AMPDU is thrown away.
      This is even more harmful when in bad link conditions, the
      frames are sent in an AMPDU and then finally sent as single
      frame. So a lot of failures weren't reported and the rate
      scaling got stuck in high rates leading to very poor
      connectivity.
      
      Fix that by clearing IEEE80211_TX_CTL_AMPDU when the frame
      isn't part of an AMPDU.
      
      This bug was introduced by
      
      2eb81a40
      iwlwifi: don't clear CTL_AMPDU on frame status
      
      This fix basically reverts the aforementioned commit.
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      c3e5d718
  11. 14 Jan, 2013 2 commits
  12. 11 Jan, 2013 4 commits