Skip to content
  1. Jun 10, 2015
    • Johannes Berg's avatar
      mac80211: convert HW flags to unsigned long bitmap · 30686bf7
      Johannes Berg authored
      
      
      As we're running out of hardware capability flags pretty quickly,
      convert them to use the regular test_bit() style unsigned long
      bitmaps.
      
      This introduces a number of helper functions/macros to set and to
      test the bits, along with new debugfs code.
      
      The occurrences of an explicit __clear_bit() are intentional, the
      drivers were never supposed to change their supported bits on the
      fly. We should investigate changing this to be a per-frame flag.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      30686bf7
    • Johannes Berg's avatar
      Merge remote-tracking branch 'net-next/master' into mac80211-next · 206c59d1
      Johannes Berg authored
      
      
      Merge back net-next to get wireless driver changes (from Kalle)
      to be able to create the API change across all trees properly.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      206c59d1
    • Alexis Green's avatar
      mac80211: Fix a case of incorrect metric used when forwarding a PREQ · 5ec596c4
      Alexis Green authored
      
      
      This patch fixes a bug in hwmp_preq_frame_process where the wrong metric
      can be used when forwarding a PREQ. This happens because the code uses
      the same metric variable to record the value of the metric to the source
      of the PREQ and the value of the metric to the target of the PREQ.
      
      This comes into play when both reply and forward are set which happens
      when IEEE80211_PREQ_PROACTIVE_PREP_FLAG is set and when MP_F_DO | MP_F_RF
      is set. The original code had a special case to handle the first case
      but not the second.
      
      The patch uses distinct variables for the two metrics which makes the
      code flow much clearer and removes the need to restore the original
      value of metric when forwarding.
      
      Signed-off-by: default avatarAlexis Green <agreen@cococorp.com>
      CC: Jesse Jones <jjones@cococorp.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      5ec596c4
    • David S. Miller's avatar
      Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge · c3eee1fb
      David S. Miller authored
      
      
      Antonio Quartulli says:
      
      ====================
      Included changes:
      - use common Jenkins hash instead of private implementation
      - extend internal routing API
      - properly re-arrange header files inclusion
      - clarify precedence between '&' and '?'
      - remove unused ethhdr variable in batadv_gw_dhcp_recipient_get()
      - ensure per-VLAN structs are updated upon MAC change
      ====================
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      c3eee1fb
    • Alexis Green's avatar
      mac80211: Always check rates and capabilities in mesh mode · e060e7ad
      Alexis Green authored
      
      
      In mesh mode there is a race between establishing links and processing
      rates and capabilities in beacons. This is very noticeable with slow
      beacons (e.g. beacon intervals of 1s) and manifested for us as stations
      using minstrel when minstrel_ht should be used. Fixed by changing
      mesh_sta_info_init so that it always checks rates and such if it has not
      already done so.
      
      Signed-off-by: default avatarAlexis Green <agreen@cococorp.com>
      CC: Jesse Jones <jjones@cococorp.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      e060e7ad
    • Chun-Yeow Yeoh's avatar
      mac80211: fix the beacon csa counter for mesh and ibss · 8df734e8
      Chun-Yeow Yeoh authored
      The csa counter has moved from sdata to beacon/presp but
      it is not updated accordingly for mesh and ibss. Fix this.
      
      Fixes: af296bdb
      
       ("mac80211: move csa counters from sdata to beacon/presp")
      Signed-off-by: default avatarChun-Yeow Yeoh <yeohchunyeow@gmail.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      8df734e8
    • Alexis Green's avatar
      mac80211: Fix incorrectly named last_hop_metric variable in mesh_rx_path_sel_frame · afd2efb9
      Alexis Green authored
      
      
      The last hop metric should refer to link cost (this is how
      hwmp_route_info_get uses it for example). But in mesh_rx_path_sel_frame
      we are not dealing with link cost but with the total cost to the origin
      of a PREQ or PREP.
      
      Signed-off-by: default avatarAlexis Green <agreen@cococorp.com>
      CC: Jesse Jones <jjones@cococorp.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      afd2efb9
    • Sara Sharon's avatar
      mac80211: ignore invalid scan RSSI values · 74d803b6
      Sara Sharon authored
      
      
      Channels in 2.4GHz band overlap, this means that if we
      send a probe request on channel 1 and then move to channel
      2, we will hear the probe response on channel 2. In this
      case, the RSSI will be lower than if we had heard it on
      the channel on which it was sent (1 in this case).
      
      The scan result ignores those invalid values and the
      station last signal should not be updated as well.
      
      In case the scan determines the signal to be invalid turn on
      the flag so the station last signal will not be updated with
      the value and thus user space probing for NL80211_STA_INFO_SIGNAL
      and NL80211_STA_INFO_SIGNAL_AVG will not get this invalid RSSI
      value.
      
      Signed-off-by: default avatarSara Sharon <sara.sharon@intel.com>
      Signed-off-by: default avatarEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      74d803b6
    • Michal Kazior's avatar
      mac80211: release channel on auth failure · d01f858c
      Michal Kazior authored
      
      
      There were a few rare cases when upon
      authentication failure channel wasn't released.
      This could cause stale pointers to remain in
      chanctx assigned_vifs after interface removal and
      trigger general protection fault later.
      
      This could be triggered, e.g. on ath10k with the
      following steps:
      
       1. start an AP
       2. create 2 extra vifs on ath10k host
       3. connect vif1 to the AP
       4. connect vif2 to the AP
          (auth fails because ath10k firmware isn't able
           to maintain 2 peers with colliding AP mac
           addresses across vifs and consequently
           refuses sta_info_insert() in
           ieee80211_prep_connection())
       5. remove the 2 extra vifs
       6. goto step 2; at step 3 kernel was crashing:
      
       general protection fault: 0000 [#1] SMP DEBUG_PAGEALLOC
       Modules linked in: ath10k_pci ath10k_core ath
       ...
       Call Trace:
        [<ffffffff81a2dabb>] ieee80211_check_combinations+0x22b/0x290
        [<ffffffff819fb825>] ? ieee80211_check_concurrent_iface+0x125/0x220
        [<ffffffff8180f664>] ? netpoll_poll_disable+0x84/0x100
        [<ffffffff819fb833>] ieee80211_check_concurrent_iface+0x133/0x220
        [<ffffffff81a0029e>] ieee80211_open+0x3e/0x80
        [<ffffffff817f2d26>] __dev_open+0xb6/0x130
        [<ffffffff817f3051>] __dev_change_flags+0xa1/0x170
       ...
       RIP  [<ffffffff81a23140>] ieee80211_chanctx_radar_detect+0xa0/0x170
      
       (gdb) l * ieee80211_chanctx_radar_detect+0xa0
       0xffffffff81a23140 is in ieee80211_chanctx_radar_detect (/devel/src/linux/net/mac80211/util.c:3182).
       3177             */
       3178            WARN_ON(ctx->replace_state == IEEE80211_CHANCTX_REPLACES_OTHER &&
       3179                    !list_empty(&ctx->assigned_vifs));
       3180
       3181            list_for_each_entry(sdata, &ctx->assigned_vifs, assigned_chanctx_list)
       3182                    if (sdata->radar_required)
       3183                            radar_detect |= BIT(sdata->vif.bss_conf.chandef.width);
       3184
       3185            return radar_detect;
      
      Signed-off-by: default avatarMichal Kazior <michal.kazior@tieto.com>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      d01f858c
    • Jakub Kicinski's avatar
      mac80211: remove obsolete sentence from documentation · c2d3955b
      Jakub Kicinski authored
      FIF_PROMISC_IN_BSS was removed in commit df140465
      
      
      ("mac80211: remove support for IFF_PROMISC").
      
      Signed-off-by: default avatarJakub Kicinski <kubakici@wp.pl>
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      c2d3955b
    • Johannes Berg's avatar
      mac80211: handle aggregation session timeout on fast-xmit path · 472be00d
      Johannes Berg authored
      
      
      The conversion to the fast-xmit path lost proper aggregation session
      timeout handling - the last_tx wasn't set on that path and the timer
      would therefore incorrectly tear down the session periodically (with
      those drivers/rate control algorithms that have a timeout.)
      
      In case of iwlwifi, this was every 5 seconds and caused significant
      throughput degradation.
      
      Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
      472be00d
    • Michael Holzheu's avatar
      s390/bpf: implement bpf_tail_call() helper · 6651ee07
      Michael Holzheu authored
      bpf_tail_call() arguments:
      
       - ctx......: Context pointer
       - jmp_table: One of BPF_MAP_TYPE_PROG_ARRAY maps used as the jump table
       - index....: Index in the jump table
      
      In this implementation s390x JIT does stack unwinding and jumps into the
      callee program prologue. Caller and callee use the same stack.
      
      With this patch a tail call generates the following code on s390x:
      
       if (index >= array->map.max_entries)
               goto out
       000003ff8001c7e4: e31030100016   llgf    %r1,16(%r3)
       000003ff8001c7ea: ec41001fa065   clgrj   %r4,%r1,10,3ff8001c828
      
       if (tail_call_cnt++ > MAX_TAIL_CALL_CNT)
               goto out;
       000003ff8001c7f0: a7080001       lhi     %r0,1
       000003ff8001c7f4: eb10f25000fa   laal    %r1,%r0,592(%r15)
       000003ff8001c7fa: ec120017207f   clij    %r1,32,2,3ff8001c828
      
       prog = array->prog[index];
       if (prog == NULL)
               goto out;
       000003ff8001c800: eb140003000d   sllg    %r1,%r4,3
       000003ff8001c806: e31310800004   lg      %r1,128(%r3,%r1)
       000003ff8001c80...
      6651ee07
  2. Jun 09, 2015
    • David S. Miller's avatar
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 5879ae5f
      Linus Torvalds authored
      Pull networking fixes from David Miller:
      
       1) Fix stack allocation in s390 BPF JIT, from Michael Holzheu.
      
       2) Disable LRO on openvswitch paths, from Jiri Benc.
      
       3) UDP early demux doesn't handle multicast group membership properly,
          fix from Shawn Bohrer.
      
       4) Fix TX queue hang due to incorrect handling of mixed sized fragments
          and linearlization in i40e driver, from Anjali Singhai Jain.
      
       5) Cannot use disable_irq() in timer handler of AMD xgbe driver, from
          Thomas Lendacky.
      
       6) b2net driver improperly assumes pci_alloc_consistent() gives zero'd
          out memory, use dma_zalloc_coherent().  From Sriharsha Basavapatna.
      
       7) Fix use-after-free in MPLS and ipv6, from Robert Shearman.
      
       8) Missing neif_napi_del() calls in cleanup paths of b44 driver, from
          Hauke Mehrtens.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
        net: replace last open coded skb_orphan_frags with function call
        net: bcmgenet: power on MII block for all MII modes
        ipv6: Fix protocol resubmission
        ipv6: fix possible use after free of dev stats
        b44: call netif_napi_del()
        bridge: disable softirqs around br_fdb_update to avoid lockup
        Revert "bridge: use _bh spinlock variant for br_fdb_update to avoid lockup"
        mpls: fix possible use after free of device
        be2net: Replace dma/pci_alloc_coherent() calls with dma_zalloc_coherent()
        bridge: use _bh spinlock variant for br_fdb_update to avoid lockup
        amd-xgbe: Use disable_irq_nosync from within timer function
        rhashtable: add missing import <linux/export.h>
        i40e: Make sure to be in VEB mode if SRIOV is enabled at probe
        i40e: start up in VEPA mode by default
        i40e/i40evf: Fix mixed size frags and linearization
        ipv4/udp: Verify multicast group is ours in upd_v4_early_demux()
        openvswitch: disable LRO
        s390/bpf: fix bpf frame pointer setup
        s390/bpf: fix stack allocation
      5879ae5f
    • Linus Torvalds's avatar
      Merge tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost · 056537c6
      Linus Torvalds authored
      Pull last-minute virtio fix from Michael Tsirkin:
       "This fixes a minor issue affecting multiqueue virtio net when user
        keeps changing the number of active queues and CPUs are added and
        removed by hotplug"
      
      * tag 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost:
        virtio_pci: Clear stale cpumask when setting irq affinity
      056537c6
    • Dan Murphy's avatar
      net: phy: dp83867: Fix device tree entries · ac7ba51c
      Dan Murphy authored
      
      
      Fix the device tree entries to modify the '_' to '-'.
      Also changes the names of the internal delay properties
      from -int- to -internal- as the -int- appeared as a keyword.
      
      Signed-off-by: default avatarDan Murphy <dmurphy@ti.com>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      ac7ba51c
    • Nicholas Mc Guire's avatar
      atm: use msecs_to_jiffies for conversions · 684b4ac1
      Nicholas Mc Guire authored
      
      
      API compliance scanning with coccinelle flagged:
      ./drivers/atm/iphase.c:2621:4-20:
              WARNING: timeout (50) seems HZ dependent
      
      Numeric constants passed to schedule_timeout() make the effective
      timeout HZ dependent which does not seem intended.
      Fixed up by converting the constant to jiffies with msecs_to_jiffies()
      As this driver was introduced in the early 2.3 series it is most
      likely assuming HZ=100 so the constant 50 is converted to 500ms.
      
      Signed-off-by: default avatarNicholas Mc Guire <hofrat@osadl.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      684b4ac1
    • Linus Torvalds's avatar
      Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 40b985fb
      Linus Torvalds authored
      Pull ARM SoC fixes from Kevin Hilman:
       "About 10 days worth of small bug fixes, and the (hopefully) final
        round fixes for from arm-soc land for the -rc cycle.  Nothing special
        to note, but here's a brief summary of fixes by SoC type:
      
         - OMAP:
              small set of misc DT fixes; boot fix for THUMB2 kernel
      
         - mediatek:
              PMIC fixes; DT fix for model name
      
         - exynos:
              wakeup interupt fixes for 3250
      
         - mvebu:
              revert mbus patch which broke DMA masters
      
      * tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
        ARM: dts: am335x-boneblack: disable RTC-only sleep to avoid hardware damage
        ARM: dts: AM35xx: fix system control module clocks
        arm64: dts: mt8173-evb: fix model name
        ARM: exynos: Fix wake-up interrupts for Exynos3250
        ARM: dts: Fix n900 dts file to work around 4.1 touchscreen regression on n900
        ARM: dts: Fix dm816x to use right compatible flag for MUSB
        ARM: OMAP3: Fix booting with thumb2 kernel
        Revert "bus: mvebu-mbus: make sure SDRAM CS for DMA don't overlap the MBus bridge window"
        bus: mvebu-mbus: do not set WIN_CTRL_SYNCBARRIER on non io-coherent platforms.
        ARM: mvebu: armada-xp-linksys-mamba: Disable internal RTC
        soc: mediatek: Add compile dependency to pmic-wrapper
        soc: mediatek: PMIC wrap: Fix register state machine handling
        soc: mediatek: PMIC wrap: Fix clock rate handling
      40b985fb
    • Florian Fainelli's avatar
      net: phy: bcm7xxx: update workaround to fix 100BaseT corner cases · 6da8253b
      Florian Fainelli authored
      
      
      Update the AFE_TX_CONFIG value to solve marginal rise/fall issues
      observed when the link is operating in 100BaseT. This workaround applies
      to GPHY revisions D0, E0 and newer.
      
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6da8253b
    • Willem de Bruijn's avatar
      net: replace last open coded skb_orphan_frags with function call · bbbf2df0
      Willem de Bruijn authored
      Commit 70008aa5
      
       ("skbuff: convert to skb_orphan_frags") replaced
      open coded tests of SKBTX_DEV_ZEROCOPY and skb_copy_ubufs with calls
      to helper function skb_orphan_frags. Apply that to the last remaining
      open coded site.
      
      Signed-off-by: default avatarWillem de Bruijn <willemb@google.com>
      Acked-by: default avatarMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      bbbf2df0
    • Florian Fainelli's avatar
      net: bcmgenet: power on MII block for all MII modes · afe3f907
      Florian Fainelli authored
      The RGMII block is currently only powered on when using RGMII or
      RGMII_NO_ID, which is not correct when using the GENET interface in MII
      or Reverse MII modes. We always need to power on the RGMII interface for
      this block to properly work, regardless of the MII mode in which we
      operate.
      
      Fixes: aa09677c
      
       ("net: bcmgenet: add MDIO routines")
      Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      afe3f907
    • Josh Hunt's avatar
      ipv6: Fix protocol resubmission · 0243508e
      Josh Hunt authored
      
      
      UDP encapsulation is broken on IPv6. This is because the logic to resubmit
      the nexthdr is inverted, checking for a ret value > 0 instead of < 0. Also,
      the resubmit label is in the wrong position since we already get the
      nexthdr value when performing decapsulation. In addition the skb pull is no
      longer necessary either.
      
      This changes the return value check to look for < 0, using it for the
      nexthdr on the next iteration, and moves the resubmit label to the proper
      location.
      
      With these changes the v6 code now matches what we do in the v4 ip input
      code wrt resubmitting when decapsulating.
      
      Signed-off-by: default avatarJosh Hunt <johunt@akamai.com>
      Acked-by: default avatar"Tom Herbert" <tom@herbertland.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0243508e
    • Robert Shearman's avatar
      ipv6: fix possible use after free of dev stats · 27e41fcf
      Robert Shearman authored
      
      
      The memory pointed to by idev->stats.icmpv6msgdev,
      idev->stats.icmpv6dev and idev->stats.ipv6 can each be used in an RCU
      read context without taking a reference on idev. For example, through
      IP6_*_STATS_* calls in ip6_rcv. These memory blocks are freed without
      waiting for an RCU grace period to elapse. This could lead to the
      memory being written to after it has been freed.
      
      Fix this by using call_rcu to free the memory used for stats, as well
      as idev after an RCU grace period has elapsed.
      
      Signed-off-by: default avatarRobert Shearman <rshearma@brocade.com>
      Acked-by: default avatarHannes Frederic Sowa <hannes@stressinduktion.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      27e41fcf
    • Kevin Hilman's avatar
      Merge tag 'omap-for-v4.1/fixes-rc6' of... · 0a68c6bc
      Kevin Hilman authored
      Merge tag 'omap-for-v4.1/fixes-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      Merge omap fixes for v4.1, urgent fix to avoid potential hardware damage From Tony Lindgren:
      
      Omap fixes for the -rc cycle, including a fix for potential hardware
      breakage on BeagleBones:
      
      - BeagleBones don't support RTC-only mode, it can cause hardware
        damage if system-power-controller is specified without
        ti,pmic-shutdown-controller
      
      - Fix a recent regression to am3517 SoCs caused by the recent clock
        move that was not noticed until now despite automated boot
        testing
      
      - Fix a regression for n900 touchscreen triggered by recent
        recent input changes
      
      - Fix compatible property for dm816x USB to avoid errors with
        USB Ethernet
      
      - Fix oops for omap3 when built with CONFIG_THUMB2_KERNEL
      
      * tag 'omap-for-v4.1/fixes-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: dts: am335x-boneblack: disable RTC-only sleep to avoid hardware damage
        ARM: dts: AM35xx: fix system control module clocks
        ARM: dts: Fix n900 dts file to work around 4.1 touchscreen regression on n900
        ARM: dts: Fix dm816x to use right compatible flag for MUSB
        ARM: OMAP3: Fix booting with thumb2 kernel
      0a68c6bc
    • Linus Torvalds's avatar
      Merge git://git.infradead.org/intel-iommu · 181e5059
      Linus Torvalds authored
      Pull Intel IOMMU fix from David Woodhouse:
       "This fixes an oops when attempting to enable 1:1 passthrough mode for
        devices on which VT-d translation was disabled anyway.
      
        It's actually a long-standing bug but recent changes (commit
        18436afd: "iommu/vt-d: Allow RMRR on graphics devices too") have
        made it much easier to trigger with 'iommu=pt intel_iommu=igfx_off' on
        the command line"
      
      * git://git.infradead.org/intel-iommu:
        iommu/vt-d: Fix passthrough mode with translation-disabled devices
      181e5059
  3. Jun 08, 2015