23 Feb, 2011

1 commit


21 Feb, 2011

1 commit

  • From: Eric W. Biederman

    In the beginning with batching unreg_list was a list that was used only
    once in the lifetime of a network device (I think). Now we have calls
    using the unreg_list that can happen multiple times in the life of a
    network device like dev_deactivate and dev_close that are also using the
    unreg_list. In addition in unregister_netdevice_queue we also do a
    list_move because for devices like veth pairs it is possible that
    unregister_netdevice_queue will be called multiple times.

    So I think the change below to fix dev_deactivate which Eric D. missed
    will fix this problem. Now to go test that.

    Signed-off-by: David S. Miller

    Eric W. Biederman
     

19 Feb, 2011

1 commit

  • Low level driver could pass rx frames to us after disassociate, what
    can lead to run conn_mon_timer by ieee80211_sta_rx_notify(). That
    is obviously wrong, but nothing happens until we unload modules and
    resources are used after free. If kernel debugging is enabled following
    warning could be observed:

    WARNING: at lib/debugobjects.c:259 debug_print_object+0x65/0x70()
    Hardware name: HP xw8600 Workstation
    ODEBUG: free active (active state 0) object type: timer_list
    Modules linked in: iwlagn(-) iwlcore mac80211 cfg80211 aes_x86_64 aes_generic fuse cpufreq_ondemand acpi_cpufreq freq_table mperf xt_physdev ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 ext3 jbd dm_mirror dm_region_hash dm_log dm_mod uinput hp_wmi sparse_keymap sg wmi arc4 microcode serio_raw ecb tg3 shpchp rfkill ext4 mbcache jbd2 sr_mod cdrom sd_mod crc_t10dif firewire_ohci firewire_core crc_itu_t mptsas mptscsih mptbase scsi_transport_sas ahci libahci pata_acpi ata_generic ata_piix floppy nouveau ttm drm_kms_helper drm i2c_algo_bit i2c_core video [last unloaded: cfg80211]
    Pid: 13827, comm: rmmod Tainted: G W 2.6.38-rc4-wl+ #22
    Call Trace:
    [] ? warn_slowpath_common+0x7f/0xc0
    [] ? warn_slowpath_fmt+0x46/0x50
    [] ? debug_print_object+0x65/0x70
    [] ? debug_check_no_obj_freed+0x125/0x210
    [] ? debug_check_no_locks_freed+0xf7/0x170
    [] ? kfree+0xc2/0x2f0
    [] ? netdev_release+0x45/0x60
    [] ? device_release+0x27/0xa0
    [] ? kobject_release+0x8d/0x1a0
    [] ? kobject_release+0x0/0x1a0
    [] ? kref_put+0x37/0x70
    [] ? kobject_put+0x27/0x60
    [] ? netdev_run_todo+0x1ab/0x270
    [] ? rtnl_unlock+0xe/0x10
    [] ? ieee80211_unregister_hw+0x58/0x120 [mac80211]
    [] ? iwl_pci_remove+0xdb/0x22a [iwlagn]
    [] ? pci_device_remove+0x52/0x120
    [] ? __device_release_driver+0x75/0xe0
    [] ? driver_detach+0xd8/0xe0
    [] ? bus_remove_driver+0x91/0x100
    [] ? driver_unregister+0x62/0xa0
    [] ? pci_unregister_driver+0x44/0xa0
    [] ? iwl_exit+0x15/0x1c [iwlagn]
    [] ? sys_delete_module+0x1a2/0x270
    [] ? trace_hardirqs_on_thunk+0x3a/0x3f
    [] ? system_call_fastpath+0x16/0x1b

    Acked-by: Johannes Berg
    Signed-off-by: Stanislaw Gruszka
    Signed-off-by: John W. Linville

    Stanislaw Gruszka
     

15 Feb, 2011

1 commit


10 Feb, 2011

1 commit

  • When suspending an associated system, and then resuming,
    the station vif is being reconfigured without taking the
    sdata->u.mgd.mtx lock, which results in the following warning:

    WARNING: at net/mac80211/mlme.c:101 ieee80211_ap_probereq_get+0x58/0xb8 [mac80211]()
    Modules linked in: wl12xx_sdio wl12xx firmware_class crc7 mac80211 cfg80211 [last unloaded: crc7]
    Backtrace:
    [] (dump_backtrace+0x0/0x118) from [] (dump_stack+0x20/0x24)
    r7:00000000 r6:bf12d6ec r5:bf154aac r4:00000065
    [] (dump_stack+0x0/0x24) from [] (warn_slowpath_common+0x5c/0x74)
    [] (warn_slowpath_common+0x0/0x74) from [] (warn_slowpath_null+0x2c/0x34)
    r9:000024ff r8:cd006460 r7:00000001 r6:00000000 r5:00000000
    r4:cf1394a0
    [] (warn_slowpath_null+0x0/0x34) from [] (ieee80211_ap_probereq_get+0x58/0xb8 [mac80211])
    [] (ieee80211_ap_probereq_get+0x0/0xb8 [mac80211]) from [] (wl1271_cmd_build_ap_probe_req+0x30/0xf8 [wl12xx])
    r4:cd007440
    [] (wl1271_cmd_build_ap_probe_req+0x0/0xf8 [wl12xx]) from [] (wl1271_op_bss_info_changed+0x4c4/0x808 [wl12xx])
    r5:cd007440 r4:000003b4
    [] (wl1271_op_bss_info_changed+0x0/0x808 [wl12xx]) from [] (ieee80211_bss_info_change_notify+0x1a4/0x1f8 [mac80211])
    [] (ieee80211_bss_info_change_notify+0x0/0x1f8 [mac80211]) from [] (ieee80211_reconfig+0x4d0/0x668 [mac80211])
    r8:cf0eeea4 r7:cd00671c r6:00000000 r5:cd006460 r4:cf1394a0
    [] (ieee80211_reconfig+0x0/0x668 [mac80211]) from [] (ieee80211_resume+0x60/0x70 [mac80211])
    [] (ieee80211_resume+0x0/0x70 [mac80211]) from [] (wiphy_resume+0x6c/0x7c [cfg80211])
    r5:cd006248 r4:cd006110
    [] (wiphy_resume+0x0/0x7c [cfg80211]) from [] (legacy_resume+0x38/0x70)
    r7:00000000 r6:00000000 r5:cd006248 r4:cd0062fc
    [] (legacy_resume+0x0/0x70) from [] (device_resume+0x168/0x1a0)
    r8:c04ca8d8 r7:cd00627c r6:00000010 r5:cd006248 r4:cd0062fc
    [] (device_resume+0x0/0x1a0) from [] (dpm_resume_end+0xf8/0x3bc)
    r7:00000000 r6:00000005 r5:cd006248 r4:cd0062fc
    [] (dpm_resume_end+0x0/0x3bc) from [] (suspend_devices_and_enter+0x1b0/0x204)
    [] (suspend_devices_and_enter+0x0/0x204) from [] (enter_state+0xf0/0x148)
    r7:c037e978 r6:00000003 r5:c043d807 r4:00000000
    [] (enter_state+0x0/0x148) from [] (state_store+0xa4/0xcc)
    r7:c037e978 r6:00000003 r5:00000003 r4:c043d807
    [] (state_store+0x0/0xcc) from [] (kobj_attr_store+0x20/0x24)
    [] (kobj_attr_store+0x0/0x24) from [] (sysfs_write_file+0x11c/0x150)
    [] (sysfs_write_file+0x0/0x150) from [] (vfs_write+0xc0/0x14c)
    [] (vfs_write+0x0/0x14c) from [] (sys_write+0x4c/0x78)
    r8:40126000 r7:00000004 r6:cf1a7c80 r5:00000000 r4:00000000
    [] (sys_write+0x0/0x78) from [] (ret_fast_syscall+0x0/0x30)
    r8:c00502c8 r7:00000004 r6:403525e8 r5:40126000 r4:00000004

    Signed-off-by: Eliad Peller
    Signed-off-by: John W. Linville

    Eliad Peller
     

09 Feb, 2011

1 commit


08 Feb, 2011

1 commit

  • Using skb_header_cloned to check if it's safe to write to the skb is not
    enough - mac80211 also touches the tailroom of the skb.
    Initially this check was only used to increase a counter, however this
    commit changed the code to also skip skb data reallocation if no extra
    head/tailroom was needed:

    commit 4cd06a344db752f513437138953af191cbe9a691
    mac80211: skip unnecessary pskb_expand_head calls

    It added a regression at least with iwl3945, which is fixed by this patch.

    Reported-by: Dmitry Torokhov
    Signed-off-by: Felix Fietkau
    Tested-by: Dmitry Torokhov
    Signed-off-by: John W. Linville

    Felix Fietkau
     

03 Feb, 2011

1 commit

  • When the off-channel TX is done with remain-on-channel
    offloaded to hardware, the reported cookie is wrong as
    in that case we shouldn't use the SKB as the cookie but
    need to instead use the corresponding r-o-c cookie
    (XOR'ed with 2 to prevent API mismatches).

    Fix this by keeping track of the hw_roc_skb pointer
    just for the status processing and use the correct
    cookie to report in this case. We can't use the
    hw_roc_skb pointer itself because it is NULL'ed when
    the frame is transmitted to prevent it being used
    twice.

    This fixes a bug where the P2P state machine in the
    supplicant gets stuck because it never gets a correct
    result for its transmitted frame.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

27 Jan, 2011

1 commit


26 Jan, 2011

1 commit

  • Some drivers (e.g. ath9k) do not always disable beacons when they're
    supposed to. When an interface is changed using the change_interface op,
    the mode specific sdata part is in an undefined state and trying to
    get a beacon at this point can produce weird crashes.

    To fix this, add a check for ieee80211_sdata_running before using
    anything from the sdata.

    Signed-off-by: Felix Fietkau
    Cc: stable@kernel.org
    Signed-off-by: John W. Linville

    Felix Fietkau
     

21 Jan, 2011

1 commit

  • The meaning of CONFIG_EMBEDDED has long since been obsoleted; the option
    is used to configure any non-standard kernel with a much larger scope than
    only small devices.

    This patch renames the option to CONFIG_EXPERT in init/Kconfig and fixes
    references to the option throughout the kernel. A new CONFIG_EMBEDDED
    option is added that automatically selects CONFIG_EXPERT when enabled and
    can be used in the future to isolate options that should only be
    considered for embedded systems (RISC architectures, SLOB, etc).

    Calling the option "EXPERT" more accurately represents its intention: only
    expert users who understand the impact of the configuration changes they
    are making should enable it.

    Reviewed-by: Ingo Molnar
    Acked-by: David Woodhouse
    Signed-off-by: David Rientjes
    Cc: Greg KH
    Cc: "David S. Miller"
    Cc: Jens Axboe
    Cc: Arnd Bergmann
    Cc: Robin Holt
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Rientjes
     

14 Jan, 2011

2 commits

  • When the buffer size is set to zero in the block ack parameter set
    field, we should use the maximum supported number of subframes. The
    existing code was bogus and was doing some unnecessary calculations
    that lead to wrong values.

    Thanks Johannes for helping me figure this one out.

    Cc: stable@kernel.org
    Cc: Johannes Berg
    Signed-off-by: Luciano Coelho
    Reviewed-by: Johannes Berg
    Signed-off-by: John W. Linville

    Luciano Coelho
     
  • Since the introduction of the fixes for the
    reorder timer, mac80211 will cause lockdep
    warnings because lockdep confuses
    local->skb_queue and local->rx_skb_queue
    and treats their lock as the same.

    However, their locks are different, and are
    valid in different contexts (the former is
    used in IRQ context, the latter in BH only)
    and the only thing to be done is mark the
    former as a different lock class so that
    lockdep can tell the difference.

    Reported-by: Larry Finger
    Reported-by: Sujith
    Reported-by: Miles Lane
    Tested-by: Sujith
    Tested-by: Johannes Berg
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     

06 Jan, 2011

5 commits


05 Jan, 2011

7 commits

  • The key documentation is slightly out of date, fix
    that. Also, the list entry in the key struct is no
    longer used that way, so list_del_init() isn't
    necessary any more there.

    Finally, ieee80211_key_link() is no longer invoked
    under RCU read lock, but rather with an appropriate
    station lock held.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • This reverts enables the reorder release timer once again.

    The issues laid out in:

    Have been addressed by:
    mac80211: serialize rx path workers
    mac80211: ignore PSM bit of reordered frames

    Signed-off-by: Christian Lamparter
    Signed-off-by: John W. Linville

    Christian Lamparter
     
  • This patch addresses the issue of serialization between
    the main rx path and various reorder release timers.

    It converts the previously local "frames" queue into
    a global rx queue [rx_skb_queue]. This way, everyone
    (be it the main rx-path or some reorder release timeout)
    can add frames to it.

    Only one active rx handler worker [ieee80211_rx_handlers]
    is needed. All other threads which have lost the race of
    "runnning_rx_handler" can now simply "return", knowing that
    the thread who had the "edge" will also take care of their
    workload.

    Signed-off-by: Christian Lamparter
    Signed-off-by: John W. Linville

    Christian Lamparter
     
  • Fixed a bug where if a mesh interface has a different MAC address from its bridge
    interface, then it would not be able to send data traffic to any other mesh node.
    This also adds support for communication between mesh nodes and external bridged
    nodes by using a 6 address format if the source is a node within the mesh and the
    destination is an external node proxied by a mesh portal.

    Signed-off-by: Joel A Fernandes
    Signed-off-by: John W. Linville

    Joel A Fernandes
     
  • This patch tackles one of the problems of my
    reorder release timer patch from August.

    =>
    What if the reorder release triggers and ap_sta_ps_end
    (called by ieee80211_rx_h_sta_process) accidentally clears
    the WLAN_STA_PS_STA flag, because 100ms ago - when the STA
    was still active - frames were put into the reorder buffer.

    Signed-off-by: Christian Lamparter
    Signed-off-by: John W. Linville

    Christian Lamparter
     
  • commit ad0e2b5a00dbec303e4682b403bb6703d11dcdb2
    Author: Johannes Berg
    Date: Tue Jun 1 10:19:19 2010 +0200

    mac80211: simplify key locking

    removed the synchronization against RCU and thus
    opened a race window where we can use a key for
    TX while it is already freed. Put a synchronisation
    into the right place to close that window.

    Reported-by: Jussi Kivilinna
    Cc: stable@kernel.org [2.6.36+]
    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Commit b51aff057c9d0ef6c529dc25fd9f775faf7b6c63 said:

    Under memory pressure, the mac80211 mesh code
    may helpfully print a message that it failed
    to clone a mesh frame and then will proceed
    to crash trying to use it anyway. Fix that.

    Avoid the reference whenever the frame copy is unsuccessful
    regardless of the debug message being suppressed or printed.

    Cc: stable@kernel.org [2.6.27+]
    Signed-off-by: Milton Miller
    Signed-off-by: John W. Linville

    Milton Miller
     

27 Dec, 2010

2 commits

  • Conflicts:
    net/ipv4/fib_frontend.c

    David S. Miller
     
  • * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (42 commits)
    ipv4: dont create routes on down devices
    epic100: hamachi: yellowfin: Fix skb allocation size
    sundance: Fix oopses with corrupted skb_shared_info
    Revert "ipv4: Allow configuring subnets as local addresses"
    USB: mcs7830: return negative if auto negotiate fails
    irda: prevent integer underflow in IRLMP_ENUMDEVICES
    tcp: fix listening_get_next()
    atl1c: Do not use legacy PCI power management
    mac80211: fix mesh forwarding
    MAINTAINERS: email address change
    net: Fix range checks in tcf_valid_offset().
    net_sched: sch_sfq: fix allot handling
    hostap: remove netif_stop_queue from init
    mac80211/rt2x00: add ieee80211_tx_status_ni()
    typhoon: memory corruption in typhoon_get_drvinfo()
    net: Add USB PID for new MOSCHIP USB ethernet controller MCS7832 variant
    net_sched: always clone skbs
    ipv6: Fragment locally generated tunnel-mode IPSec6 packets as needed.
    netlink: fix gcc -Wconversion compilation warning
    asix: add USB ID for Logitec LAN-GTJ U2A
    ...

    Linus Torvalds
     

23 Dec, 2010

6 commits

  • There's a redundant rcu_read_lock/unlock pair, a
    redundant variable, and a few redundant accesses
    to the 1d_to_ac array. Fix this to make the code
    neater and easier to follow.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • If CONFIG_MAC80211_LEDS is not set, ieee80211_i.h was failing to compile,
    because struct led_trigger is only declared when CONFIG_LEDS_TRIGGERS is
    set.

    This patch adds ifdefs around the tpt_led_trigger declaration in
    ieee80211_i.h to avoid the problem.

    Signed-off-by: Luciano Coelho
    Acked-by: Johannes Berg
    Signed-off-by: John W. Linville

    Luciano Coelho
     
  • The throughput LED trigger was always active when
    the radio was enabled. In most cases that's likely
    the desired behaviour, but iwlwifi requires it to
    be only active when one of the virtual interfaces
    is actually "connected" in some way.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • iwlwifi and other drivers like to blink their LED
    based on throughput. Implement this generically in
    mac80211, based on a throughput table the driver
    specifies. That way, drivers can set the blink
    frequencies depending on their desired behaviour
    and max throughput.

    All the drivers need to do is provide an LED class
    device, best with blink hardware offload.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • The throughput trigger will require doing LED
    classdev/trigger handling before register_hw(),
    so drivers should have access to the trigger
    names before it. If trigger registration fails,
    this will still make the trigger name available,
    but that's not a big problem since the default
    trigger will the simply not be found.

    Signed-off-by: Johannes Berg
    Signed-off-by: John W. Linville

    Johannes Berg
     
  • Under memory pressure, the mac80211 mesh code
    may helpfully print a message that it failed
    to clone a mesh frame and then will proceed
    to crash trying to use it anyway. Fix that.

    Cc: stable@kernel.org [2.6.27+]
    Signed-off-by: Johannes Berg
    Acked-by: Javier Cardona
    Signed-off-by: John W. Linville

    Johannes Berg
     

21 Dec, 2010

7 commits

  • When an skb is shared, it needs to be duplicated, along with its data buffer.
    If the skb does not have enough headroom, using skb_copy might cause the data
    buffer to be copied twice (once by skb_copy and once by pskb_expand_head).
    Fix this by using skb_clone initially and letting ieee80211_skb_resize sort
    out the rest.

    Signed-off-by: Felix Fietkau
    Signed-off-by: John W. Linville

    Felix Fietkau
     
  • If the skb is not cloned and we don't need any extra headroom, there
    is no point in reallocating the skb head.

    Signed-off-by: Felix Fietkau
    Signed-off-by: John W. Linville

    Felix Fietkau
     
  • The change 'mac80211: Fix BUG in pskb_expand_head when transmitting shared skbs'
    added a check for copying the skb if it's shared, however the tx info variable
    still points at the cb of the old skb

    Signed-off-by: Felix Fietkau
    Acked-by: Helmut Schaa
    Signed-off-by: John W. Linville

    Felix Fietkau
     
  • The Mesh Control header only includes 0, 1 or 2 addresses. If there is
    one address, it should be interpreted as Address 4. If there are 2,
    they are interpreted as Addresses 5 and 6 (Address 4 being the 4th
    address in the 802.11 header).

    The address extension used to hold up to 3 addresses instead of the current 2.
    I'm not sure which draft version changed this, but it is very unlikely that it
    will change again given the state of the approval process of this draft. See
    section 7.1.3.6.3 in current draft (8.0).

    Also, note that the extra address that I'm removing was not being used, so this
    change has no effect on over-the-air frame formats. But I thought I better
    remove it before someone does start using it.

    Signed-off-by: Javier Cardona
    Signed-off-by: John W. Linville

    Javier Cardona
     
  • Let path selection frames for protocols other than HWMP be sent to
    userspace via NL80211_CMD_REGISTER_FRAME. Also allow userspace to send
    and receive mesh path selection frames.

    Signed-off-by: Javier Cardona
    Signed-off-by: John W. Linville

    Javier Cardona
     
  • Userspace will now be allowed to toggle between the default path
    selection algorithm (HWMP, implemented in the kernel), and a vendor
    specific alternative. Also in the same patch, allow userspace to add
    information elements to mesh beacons. This is accordance with the
    Extensible Path Selection Framework specified in version 7.0 of the
    802.11s draft.

    Signed-off-by: Javier Cardona
    Signed-off-by: John W. Linville

    Javier Cardona
     
  • Mesh parameters can be to setup a mesh or to configure it.
    This patch renames the ambiguous name mesh_params to mesh_config
    in preparation for mesh_setup.

    Signed-off-by: Javier Cardona
    Signed-off-by: John W. Linville

    Javier Cardona