1. 07 Jan, 2015 1 commit
  2. 06 Jan, 2015 3 commits
  3. 05 Jan, 2015 2 commits
  4. 23 Dec, 2014 1 commit
  5. 22 Dec, 2014 1 commit
  6. 19 Dec, 2014 1 commit
  7. 18 Dec, 2014 3 commits
  8. 17 Dec, 2014 13 commits
  9. 15 Dec, 2014 2 commits
  10. 12 Dec, 2014 13 commits
    • Sujith Manoharan's avatar
      mac80211: Fix accounting of multicast frames · 5cf16616
      Sujith Manoharan authored
      Since multicast frames are marked as no-ack, using
      IEEE80211_TX_STAT_ACK to check if they have been
      successfully transmitted by the driver is incorrect
      since a driver can choose to ignore transmission status
      for no-ack frames. This results in incorrect accounting
      for such frames.
      
      To fix this issue, this patch introduces a new flag
      that can be used by drivers to indicate error-free
      transmission of no-ack frames.
      Signed-off-by: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
      [add a note about not setting the flag for non-no-ack frames]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      5cf16616
    • Sujith Manoharan's avatar
      mac80211: Move IEEE80211_TX_CTL_PS_RESPONSE · 6b127c71
      Sujith Manoharan authored
      Move IEEE80211_TX_CTL_PS_RESPONSE to info->control.flags since
      this is used only in the TX path (by ath9k). This frees up
      a bit which can be used for other purposes.
      Signed-off-by: default avatarSujith Manoharan <c_manoha@qca.qualcomm.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      6b127c71
    • Vadim Kochan's avatar
      wireless: Support of IFLA_INFO_KIND rtnl attribute · ba1debdf
      Vadim Kochan authored
      It allows to identify the wlan kind of device for the user application,
      e.g.:
      
          # ip -d link
      
          1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default
              link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 promiscuity 0
          2: enp0s25: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN mode DEFAULT group default qlen 1000
              link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff promiscuity 0
          3: wlp3s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
              link/ether XX:XX:XX:XX:XX:XX brd ff:ff:ff:ff:ff:ff promiscuity 0
              wlan
      Signed-off-by: default avatarVadim Kochan <vadim4j@gmail.com>
      Acked-by: default avatarMarcel Holtmann <marcel@holtmann.org>
      [make wireless_link_ops const]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      ba1debdf
    • Arik Nemtsov's avatar
      cfg80211: correctly check ad-hoc channels · 185076d6
      Arik Nemtsov authored
      Ad-hoc requires beaconing for regulatory purposes. Validate that the
      channel is valid for beaconing, and not only enabled.
      Signed-off-by: default avatarArik Nemtsov <arikx.nemtsov@intel.com>
      Reviewed-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      185076d6
    • Emmanuel Grumbach's avatar
      cfg80211: don't WARN about two consecutive Country IE hint · 70dcec5a
      Emmanuel Grumbach authored
      This can happen and there is no point in added more
      detection code lower in the stack. Catching these in one
      single point (cfg80211) is enough. Stop WARNING about this
      case.
      
      This fixes:
      https://bugzilla.kernel.org/show_bug.cgi?id=89001
      
      Cc: stable@vger.kernel.org
      Fixes: 2f1c6c57 ("cfg80211: process non country IE conflicting first")
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      70dcec5a
    • Emmanuel Grumbach's avatar
      mac80211: update the channel context after channel switch · 722ddb0d
      Emmanuel Grumbach authored
      When the channel switch has been made, a vif is now using
      the channel context which was reserved. When that happens,
      we need to update the channel context since its parameters
      may change.
      
      I hit a case in which I switched to a 40Mhz channel but the
      reserved channel context was still on 20Mhz. The rate control
      would try to send 40Mhz packets on a 20Mhz channel context and
      that made iwlwifi's firmware unhappy.
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      722ddb0d
    • Luciano Coelho's avatar
      nl80211: check matches array length before acessing it · f89f46cf
      Luciano Coelho authored
      If the userspace passes a malformed sched scan request (or a net
      detect wowlan configuration) by adding a NL80211_ATTR_SCHED_SCAN_MATCH
      attribute without any nested matchsets, a NULL pointer dereference
      will occur.  Fix this by checking that we do have matchsets in our
      array before trying to access it.
      
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000024
      IP: [<ffffffffa002fd69>] nl80211_parse_sched_scan.part.67+0x6e9/0x900 [cfg80211]
      PGD 865c067 PUD 865b067 PMD 0
      Oops: 0002 [#1] SMP
      Modules linked in: iwlmvm(O) iwlwifi(O) mac80211(O) cfg80211(O) compat(O) [last unloaded: compat]
      CPU: 2 PID: 2442 Comm: iw Tainted: G           O   3.17.2 #31
      Hardware name: Bochs Bochs, BIOS Bochs 01/01/2011
      task: ffff880013800790 ti: ffff880008d80000 task.ti: ffff880008d80000
      RIP: 0010:[<ffffffffa002fd69>]  [<ffffffffa002fd69>] nl80211_parse_sched_scan.part.67+0x6e9/0x900 [cfg80211]
      RSP: 0018:ffff880008d838d0  EFLAGS: 00010293
      RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000
      RDX: 000000000000143c RSI: 0000000000000000 RDI: ffff880008ee8dd0
      RBP: ffff880008d83948 R08: 0000000000000002 R09: 0000000000000019
      R10: ffff88001d1b3c40 R11: 0000000000000002 R12: ffff880019e85e00
      R13: 00000000fffffed4 R14: ffff880009757800 R15: 0000000000001388
      FS:  00007fa3b6d13700(0000) GS:ffff88003e200000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000024 CR3: 0000000008670000 CR4: 00000000000006e0
      Stack:
       ffff880009757800 ffff880000000001 0000000000000000 ffff880008ee84e0
       0000000000000000 ffff880009757800 00000000fffffed4 ffff880008d83948
       ffffffff814689c9 ffff880009757800 ffff880008ee8000 0000000000000000
      Call Trace:
       [<ffffffff814689c9>] ? nla_parse+0xb9/0x120
       [<ffffffffa00306de>] nl80211_set_wowlan+0x75e/0x960 [cfg80211]
       [<ffffffff810bf3d5>] ? mark_held_locks+0x75/0xa0
       [<ffffffff8161a77b>] genl_family_rcv_msg+0x18b/0x360
       [<ffffffff810bf66d>] ? trace_hardirqs_on+0xd/0x10
       [<ffffffff8161a9d4>] genl_rcv_msg+0x84/0xc0
       [<ffffffff8161a950>] ? genl_family_rcv_msg+0x360/0x360
       [<ffffffff81618e79>] netlink_rcv_skb+0xa9/0xd0
       [<ffffffff81619458>] genl_rcv+0x28/0x40
       [<ffffffff816184a5>] netlink_unicast+0x105/0x180
       [<ffffffff8161886f>] netlink_sendmsg+0x34f/0x7a0
       [<ffffffff8105a097>] ? kvm_clock_read+0x27/0x40
       [<ffffffff815c644d>] sock_sendmsg+0x8d/0xc0
       [<ffffffff811a75c9>] ? might_fault+0xb9/0xc0
       [<ffffffff811a756e>] ? might_fault+0x5e/0xc0
       [<ffffffff815d5d26>] ? verify_iovec+0x56/0xe0
       [<ffffffff815c73e0>] ___sys_sendmsg+0x3d0/0x3e0
       [<ffffffff810a7be8>] ? sched_clock_cpu+0x98/0xd0
       [<ffffffff810611b4>] ? __do_page_fault+0x254/0x580
       [<ffffffff810bb39f>] ? up_read+0x1f/0x40
       [<ffffffff810611b4>] ? __do_page_fault+0x254/0x580
       [<ffffffff812146ed>] ? __fget_light+0x13d/0x160
       [<ffffffff815c7b02>] __sys_sendmsg+0x42/0x80
       [<ffffffff815c7b52>] SyS_sendmsg+0x12/0x20
       [<ffffffff81751f69>] system_call_fastpath+0x16/0x1b
      
      Fixes: ea73cbce ("nl80211: fix scheduled scan RSSI matchset attribute confusion")
      Cc: stable@vger.kernel.org [3.15+]
      Signed-off-by: default avatarLuciano Coelho <luciano.coelho@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      f89f46cf
    • Johannes Berg's avatar
      cfg80211: use __force __rcu to suppress sparse warning · cec3f0ed
      Johannes Berg authored
      The code assigns a constant value (a pointer to a static variable)
      to an RCU pointer, which results in a sparse warning:
        reg.c:112:10: warning: cast adds address space to expression (<asn:4>)
      
      Suppress this warning by using __force.
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      cec3f0ed
    • Arik Nemtsov's avatar
      cfg80211: avoid mem leak on driver hint set · 34f05f54
      Arik Nemtsov authored
      In the already-set and intersect case of a driver-hint, the previous
      wiphy regdomain was not freed before being reset with a copy of the
      cfg80211 regdomain.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarArik Nemtsov <arikx.nemtsov@intel.com>
      Acked-by: default avatarLuis R. Rodriguez <mcgrof@suse.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      34f05f54
    • Jouni Malinen's avatar
      cfg80211: Fix 160 MHz channels with 80+80 and 160 MHz drivers · 08f6f147
      Jouni Malinen authored
      The VHT supported channel width field is a two bit integer, not a
      bitfield. cfg80211_chandef_usable() was interpreting it incorrectly and
      ended up rejecting 160 MHz channel width if the driver indicated support
      for both 160 and 80+80 MHz channels.
      
      Cc: stable@vger.kernel.org (3.16+)
      Fixes: 3d9d1d66 ("nl80211/cfg80211: support VHT channel configuration")
             (however, no real drivers had 160 MHz support it until 3.16)
      Signed-off-by: default avatarJouni Malinen <jouni@qca.qualcomm.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      08f6f147
    • Andreas Müller's avatar
      mac80211: fix multicast LED blinking and counter · d025933e
      Andreas Müller authored
      As multicast-frames can't be fragmented, "dot11MulticastReceivedFrameCount"
      stopped being incremented after the use-after-free fix. Furthermore, the
      RX-LED will be triggered by every multicast frame (which wouldn't happen
      before) which wouldn't allow the LED to rest at all.
      
      Fixes https://bugzilla.kernel.org/show_bug.cgi?id=89431 which also had the
      patch.
      
      Cc: stable@vger.kernel.org
      Fixes: b8fff407 ("mac80211: fix use-after-free in defragmentation")
      Signed-off-by: default avatarAndreas Müller <goo@stapelspeicher.org>
      [rewrite commit message]
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      d025933e
    • Jes Sorensen's avatar
      mac80211: avoid using uninitialized stack data · 7e6225a1
      Jes Sorensen authored
      Avoid a case where we would access uninitialized stack data if the AP
      advertises HT support without 40MHz channel support.
      
      Cc: stable@vger.kernel.org
      Fixes: f3000e1b ("mac80211: fix broken use of VHT/20Mhz with some APs")
      Signed-off-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      7e6225a1
    • Chun-Hao Lin's avatar
      r8169:update rtl8168g pcie ephy parameter · 5fbea337
      Chun-Hao Lin authored
      Add ephy parameter to rtl8168g.
      Also change the common function of rtl8168g from "rtl_hw_start_8168g_1" to
       "rtl_hw_start_8168g". And function "rtl_hw_start_8168g_1" is used for
      setting rtl8168g hardware parameters.
      
      Following is the explanation of what hardware parameter change for.
      rtl8168g may erroneous judge the PCIe signal quality and show the error bit
      on PCI configuration space when in PCIe low power mode.
      The following ephy parameters are for above issue.
      { 0x00, 0x0000,	0x0008 }
      { 0x0c, 0x37d0,	0x0820 }
      { 0x1e, 0x0000,	0x0001 }
      
      rtl8168g may return to PCIe L0 from PCIe L0s low power mode too slow.
      The following ephy parameter is for above issue.
      { 0x19, 0x8000,	0x0000 }
      Signed-off-by: default avatarChunhao Lin <hau@realtek.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      5fbea337