Linux wireless drivers development
 help / color / mirror / Atom feed
* Re: [systemd-devel] [PATCH] Change CONFIG_FW_LOADER_USER_HELPER to default n and don't select it
From: Bryan Kadzban @ 2013-08-06 16:31 UTC (permalink / raw)
  To: Tom Gundersen
  Cc: Maarten Lankhorst, Andy Lutomirski, systemd-devel, linux-hotplug,
	Linux Wireless List, linux-kernel, Intel Linux Wireless,
	Kay Sievers, Johannes Berg
In-Reply-To: <CAG-2HqVvoQK8ggErGGinO9i8Pbu-O-X=eYFW445ce24dpt7HyA@mail.gmail.com>

On Tue, Aug 06, 2013 at 11:17:17AM +0200, Tom Gundersen wrote:
> On Tue, Aug 6, 2013 at 11:11 AM, Tom Gundersen <teg@jklm.no> wrote:
> > On Tue, Aug 6, 2013 at 10:20 AM, Maarten Lankhorst
> > <m.b.lankhorst@gmail.com> wrote:
> >> Op 05-08-13 18:29, Andy Lutomirski schreef:
> >>> The systemd commit below can delay firmware loading by multiple
> >>> minutes if CONFIG_FW_LOADER_USER_HELPER=y.  Unfortunately no one
> >>> noticed that the systemd-udev change would break new kernels as well
> >>> as old kernels.
> >>>
> >>> Since the kernel apparently can't count on reasonable userspace
> >>> support, turn this thing off by default.
> >>>
> >>> commit a3bd8447be4ea2ce230eb8ae0e815c04d85fa15a
> >>> Author: Tom Gundersen <teg@jklm.no>
> >>> Date:   Mon Mar 18 15:12:18 2013 +0100
> >>>
> >>>     udev: make firmware loading optional and disable by default
> >>>
> >>>     Distros that whish to support old kernels should set
> >>>       --with-firmware-dirs="/usr/lib/firmware/updates:/usr/lib/firmware"
> >>>     to retain the old behaviour.
> >>>
> >> methinks this patch should be reverted then,
> >
> > Well, all the code is still there, so it can be enabled if anyone wants it.
> >
> >> or a stub should be added to udev to always fail firmware loading so timeouts don't occur.
> >
> > I think the only use (if any) of a userspace firmware loader would be
> > for anyone who wants a custom one (i.e., not udev), so we shouldn't
> > just fail the loading from udev unconditionally.
> >
> > How about we just improve the udev documentation a bit, similar to
> > Andy's kernel patch?
> 
> Sorry, I should first have checked. We already document this in the README:
> 
> >        Userspace firmware loading is deprecated, will go away, and
> >        sometimes causes problems:
> >          CONFIG_FW_LOADER_USER_HELPER=n

...And this patch is making the kernel default to the correct behavior,
instead of the now-broken-by-udev behavior.

I'm not sure I see the issue with it?  :-)

(Add me to the list of people that think udev is broken too, fwiw.  But
let's at least not leave *both* sides in a broken-by-default state.)


^ permalink raw reply

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Sedat Dilek @ 2013-08-06 16:51 UTC (permalink / raw)
  To: Johannes Berg; +Cc: Stephen Rothwell, wireless
In-Reply-To: <CA+icZUVRgVfXUdJ1xoaN=nciqZDhV-f6EbH+6DS7HAh+My65oQ@mail.gmail.com>

On Tue, Aug 6, 2013 at 6:07 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> On Tue, Aug 6, 2013 at 6:03 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>> [reducing mailing lists - Stephen if you want off let us know]
>>
>> On Tue, 2013-08-06 at 17:58 +0200, Sedat Dilek wrote:
>>
>>> $ cat /proc/version
>>> Linux version 3.11.0-rc4-1-wl-20130805 (sedat.dilek@gmail.com@fambox)
>>> (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #1 SMP Tue Aug 6
>>> 17:52:45 CEST 2013
>>>
>>> This kernel boots fine and has no WiFi problems.
>>>
>>> > You assume a breakage in a different area than wireless or network in general?
>>> >
>>>
>>> Any wild guess?
>>
>> Not really, but maybe you can pull the other trees on top again and see
>> if those broke it? I don't really think/hope so but it's possible that
>> one of my pending pull requests broke it, I guess?
>>
>
> Hmm, I pulled in latest for-john of mac80211(-next) and
> iwlwifi-(fixes|next) which did not help.
>
> I am testing next-20130805 and next-20130802 to identify which
> Linux-next release is BROKEN.
>

GOOD: next-20130801 and next-20130802

BROKEN: next-20130805 and next-20130806

Comparing diffs between next-20130802 and next-20130805.

- Sedat -

^ permalink raw reply

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Sedat Dilek @ 2013-08-06 18:26 UTC (permalink / raw)
  To: Johannes Berg, David Miller; +Cc: Stephen Rothwell, wireless, netdev
In-Reply-To: <CA+icZUUmQbovkwXcdEp6eu=WJkiuiyO8nDVwCHFUuPDbJqU7Kg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2003 bytes --]

On Tue, Aug 6, 2013 at 6:51 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> On Tue, Aug 6, 2013 at 6:07 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
>> On Tue, Aug 6, 2013 at 6:03 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>>> [reducing mailing lists - Stephen if you want off let us know]
>>>
>>> On Tue, 2013-08-06 at 17:58 +0200, Sedat Dilek wrote:
>>>
>>>> $ cat /proc/version
>>>> Linux version 3.11.0-rc4-1-wl-20130805 (sedat.dilek@gmail.com@fambox)
>>>> (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #1 SMP Tue Aug 6
>>>> 17:52:45 CEST 2013
>>>>
>>>> This kernel boots fine and has no WiFi problems.
>>>>
>>>> > You assume a breakage in a different area than wireless or network in general?
>>>> >
>>>>
>>>> Any wild guess?
>>>
>>> Not really, but maybe you can pull the other trees on top again and see
>>> if those broke it? I don't really think/hope so but it's possible that
>>> one of my pending pull requests broke it, I guess?
>>>
>>
>> Hmm, I pulled in latest for-john of mac80211(-next) and
>> iwlwifi-(fixes|next) which did not help.
>>
>> I am testing next-20130805 and next-20130802 to identify which
>> Linux-next release is BROKEN.
>>
>
> GOOD: next-20130801 and next-20130802
>
> BROKEN: next-20130805 and next-20130806
>
> Comparing diffs between next-20130802 and next-20130805.
>

[ To Dave and CC netdev ]

[ Full thread see [1] ]

The diff was not very helpful.

$ cd linux-next-20130805

$ git log --oneline v3.11-rc4.. | grep "Merge remote-tracking" | egrep
'net-next|slave-dma|wireless'
7f84622 Merge remote-tracking branch 'net-next/master' <--- BAD
(before slave-dma/next)
3580d24 Merge remote-tracking branch 'slave-dma/next' <--- GOOD (after
net-next/master)
88825c7 Merge remote-tracking branch 'wireless/master' <--- GOOD

So, the culprit commit seems to be in the merge of 'net-next/master'.

( BTW, disabling IPv6 in NM/wifi-setup did not change behaviour -
still disconnected to AP. )

- Sedat -

[1] http://marc.info/?t=137579712800008&r=1&w=2

[-- Attachment #2: list-of-commits-from-next-next-in-next-20130805.txt --]
[-- Type: text/plain, Size: 10653 bytes --]

f270701 ax88179_178a: avoid copy of tx tcp packets
fba3679 fib_rules: reorder struct fib_rules fields
73f5698 fib_rules: fix suppressor names and default values
0c0667a vlan: cleanup the usage of vlan_dev_priv(dev)
9e9402e cnic, bnx2i: Fix bug on some bnx2x devices that don't support iSCSI
9918d5b bonding: modify only neigh_parms owned by us
6313480 neighbour: populate neigh_parms on alloc before calling ndo_neigh_setup
8a849bb net: netlink: minor: remove unused pointer in alloc_pg_vec
6ef94cf fib_rules: add route suppression based on ifgroup
d1c53c8 icmpv6_filter: allow ICMPv6 messages with bodies < 4 bytes
9cc08af icmpv6_filter: fix "_hdr" incorrectly being a pointer
c483e02 af_packet: simplify VLAN frame check in packet_snd
cbd89ac af_packet: fix for sending VLAN frames via packet_mmap
0f75b09 af_packet: when sending ethernet frames, parse header for skb->protocol
d27fc78 sctp: Don't lookup dst if transport dst is still valid
1409a93 ethernet: Convert mac address uses of 6 to ETH_ALEN
574e2af include: Convert ethernet mac address declarations to use ETH_ALEN
e216975 uapi: Convert some uses of 6 to ETH_ALEN
3753456 qlcnic: Update version to 5.2.45
79da4d0 qlcnic: Enable mailbox interface in poll mode when interrupts are not available
068a8d1 qlcnic: Replace poll mode mailbox interface with interrupt based mailbox interface
e5c4e6c qlcnic: Interrupt based driver firmware mailbox mechanism
b9c1198 qlcnic: Enhance diagnostic loopback error codes.
278b208 bonding: initial RCU conversion
1507722 bonding: factor out slave id tx code and simplify xmit paths
78a646c bonding: simplify broadcast_xmit function
71bc3b2 bonding: remove unnecessary read_locks of curr_slave_lock
dec1e90 bonding: convert to list API and replace bond's custom list
439677d ipv6: bump genid when delete/add address
8b09be5 bnx2x: Revising locking scheme for MAC configuration
4beac02 bonding: fix system hang due to fast igmp timer rescheduling
9ab5ec5 tile: support PTP using the tilegx mPIPE (IEEE 1588)
84e181b tile: remove deprecated NETIF_F_LLTX flag from tile drivers
4aa0264 tile: make "tile_net.custom" a proper bool module parameter
2c7d04a tile: support TSO for IPv6 in tilegx network driver
f3286a3 tile: support multiple mPIPE shims in tilegx network driver
6ab4ae9 tile: enable GRO in the tilegx network driver
5e7a54a tile: fix panic bug in napi support for tilegx network driver
ad01818 tile: update dev->stats directly in tilegx network driver
2628e8a tile: support jumbo frames in the tilegx network driver
48f2a4e tile: remove dead is_dup_ack() function from tilepro net driver
815d3ba tile: avoid bug in tilepro net driver built with old hypervisor
439a93a tile: support rx_dropped/rx_errors in tilepro net driver
a8eaed5 tile: set hw_features and vlan_features in setup
84915c6 gianfar: Remove unused field grp_id from gfar_priv_grp
376c731 net: add a temporary sanity check in skb_orphan()
aa10181 can: flexcan: Check the return value from clk_prepare_enable()
933e4af can: flexcan: Use devm_ioremap_resource()
46b3a42 ipv6: fib6_rules should return exact return value
3783072 cls_cgroup.h netprio_cgroup.h: Remove extern from function prototypes
4fc7074 checksum: Remove extern from function prototypes
10dd9b7 cfg80211.h/mac80211.h: Remove extern from function prototypes
c1d8f80 ax25.h: Remove extern from function prototypes
90972b2 arp/neighbour.h: Remove extern from function prototypes
cd2cf63 af_rxrpc.h: Remove extern from function prototypes
b60a828 af_unix.h: Remove extern from function prototypes
e8e54d3 addrconf.h: Remove extern function prototypes
49dfe76 Documentation: add networking/netdev-FAQ.txt
7764a45 fib_rules: add .suppress operation
5c15257 net: Remove extern from include/net/ scheduling prototypes
c34a761 net: skb_orphan() changes
f2f872f netem: Introduce skb_orphan_partial() helper
ca4c3fc net: split rt_genid for ipv4 and ipv6
ba361cb sh_eth: r8a7790: Handle the RFE (Receive FIFO overflow Error) interrupt
c0155b2 tcp: Remove unused tcpct declarations and comments
8f58332 ixgbe: add support for quad-port x520 adapter
674c18b ixgbe: clear semaphore bits on timeouts
9c432ad ixgbe: rename LL_EXTENDED_STATS to use queue instead of q
8fecf67 ixgbe: fix lockdep annotation issue for ptp's work item
e027d1a ixgbe: call pcie_get_mimimum_link to check if device has enough bandwidth
81377c8 PCI: Add function to obtain minimum link width and speed
4299c8a net: remove an unneeded check
b438f94 flow_dissector: add support for IPPROTO_IPV6
fca4189 flow_dissector: clean up IPIP case
59da381 PCI: move enum pcie_link_width into pci.h
343e51a PCI: expose pcie_link_speed and pcix_bus_speed arrays
a4b6fc6 ixgbe: fix SFF data dumps of SFP+ modules
3dcc2f4 ixgbe: fix semaphore lock for I2C read/writes on 82598
93ac03b ixgbe: bump version number
4e8e1bc ixgbe: add new media type.
ff80e51 net: export physical port id via sysfs
66cae9e rtnl: export physical port id via RT netlink
66b52b0 net: add ndo to get id of physical port of the device
73d8095 ixgbe: fix fc autoneg ethtool reporting.
e507d0c ixgbe: Use pci_vfs_assigned instead of ixgbe_vfs_are_assigned
670224f ixgbe: Retain VLAN filtering in promiscuous + VT mode
9ad8fef net: mvneta: support big endian
6083ed4 net: mvneta: move the RX and TX desc macros outside of the structs
ffd756b pktgen: Require CONFIG_INET due to use of IPv4 checksum function
5ad37d5 tcp: add tcp_syncookies mode to allow unconditionally generation of syncookies
dcfd8d5 drivers: net: cpsw: Add support for set MAC address
d68e2d3 tile: handle 64-bit statistics in tilepro network driver
60ff779 9p: client: remove unused code and any reference to "cancelled" function
4ce1fd6 be2net: don't use dev_err when AER enabling fails
cd77b2e tg3: Update version to 3.133
378b72c tg3: Fix UDP fragments treated as RMCP
92e6457 tg3: Enable support for timesync gpio output
4c305fa tg3: Implement the shutdown handler
5137a2e tg3: Allow NVRAM programming when interface is down
c145935 tg3: Remove incorrect switch to aux power
ca67a3c cnic: Update version to 2.5.17 and copyright year.
28e3a8f cnic: Add missing error checking for RAMROD_CMD_ID_CLOSE
b3bd2d6 cnic: Update TCP options setup for iSCSI.
6cdcdbb cnic: Reset tcp_flags during cnic_cm_create().
b54345e cnic: Simplify cnic_release().
415fb87 cnic: Simplify netdev events handling.
fe6f700 net/mlx4_core: Respond to operation request by firmware
2d4b646 net/mlx4_en: Fix BlueFlame race
73d94e9 pktgen: add needed include file
9d4a031 ipv4, ipv6: send igmpv3/mld packets with TC_PRIO_CONTROL
16b095a e1000e: fix I217/I218 PHY initialization flow
97390ab e1000e: do not resume device from RPM suspend to read PHY status registers
91a3d82 e1000e: enable support for new device IDs
3ef672a e1000e: ethtool unnecessarily takes device out of RPM suspend
e0236ad e1000e: Tx hang on I218 when linked at 100Half and slow response at 10Mbps
ce345e0 e1000e: low throughput using 4K jumbos on I218
da1e204 e1000e: iAMT connections drop on driver unload when jumbo frames enabled
b43e867 e1000e: disable ASPM L1 on 82583
c96ddb0 e1000e: Use marco instead of digit for defining e1000_rx_desc_packet_split
2592881 e1000e: Remove duplicate assignment of default rx/tx ring size
24b41c9 e1000e: restore call to pci_clear_master()
ab90695 e100: dump small buffers via %*ph
dcfe804 bonding: remove bond_resend_igmp_join_requests read_unlock leftover
03c633e pktgen: Use ip_send_check() to compute checksum
c26bf4a pktgen: Add UDPCSUM flag to support UDP checksums
82a54d0 VSOCK: Move af_vsock.h and vsock_addr.h to include/net
452c447 USBNET: increase max rx/tx qlen for improving USB3 thoughtput
a88c32a USBNET: centralize computing of max rx/tx qlen
6680ec6 tuntap: hardware vlan tx support
024ec3d net/sctp: Refactor SCTP skb checksum computation
e7428e9 virtio-net: put virtio net header inline with data
10eccb4 bond: cleanup netpoll code
0fb52a2 team: cleanup netpoll clode
93d8bf9 bridge: cleanup netpoll code
f528094 bonding: use pre-defined macro in bond_mode_name instead of magic number 0
f1a26fd pch_gbe: Add MinnowBoard support
9025c8e drivers/net/ethernet/stmicro/stmmac: don't check resource with devm_ioremap_resource
b04d68e pch_gbe: Use PCH_GBE_PHY_REGS_LEN instead of 32
18afa4b net: Make devnet_rename_seq static
c9bee3b tcp: TCP_NOTSENT_LOWAT socket option
64dc613 net: add sk_stream_is_writeable() helper
4d58c02 net: sctp: trivial: add uapi/linux/sctp.h into maintainers
91705c6 net: sctp: trivial: update mailing list address
d971854 drivers: net: cpsw: add support to show hw stats via ethtool
b07ea07 bonding: Fixed up a error "do not initialise statics to 0 or NULL" in bond_main.c
9402b74 bonding: add rtnl protection for bonding_store_fail_over_mac
38c4916 bonding: bond_sysfs.c checkpatch cleanup
c4cdef9 bonding: don't call slave_xxx_netpoll under spinlocks
f13bbc2 drivers/net: enic: Move ethtool code to a separate file
59ea52d net: trans_rdma: remove unused function
2d17f40 be2net: delete primary MAC address while unloading
3175d8c be2net: use SET/GET_MAC_LIST for SH-R
95046b9 be2net: refactor MAC-addr setup code
b5bb977 be2net: fix pmac_id for BE3 VFs
04a0602 be2net: allow VFs to program MAC and VLAN filters
5a712c1 be2net: fix MAC address modification for VF
e18dbf7 sh_eth: Add support for r8a7790 SoC
55754f1 sh_eth: add support for RMIIMODE register
9225b23 net: ipv6 eliminate parameter "int addrlen" in function fib6_add_1
86a37de net ipv6: Remove rebundant rt6i_nsiblings initialization
b9959fd vti: switch to new ip tunnel code
2b52c3a ip6mr: change the prototype of ip6_mr_forward().
c4854ec ipmr: change the prototype of ip_mr_forward().
492b200 team: add support for sending multicast rejoins
4aa5dee net: convert resend IGMP to notifier event
fc423ff team: add peer notification
ab2cfbb macvlan fdb replace support
906dc18 vxlan fdb replace an existing entry
ed08495 tcp: use RTT from SACK for RTO
59c9af4 tcp: measure RTT from new SACK
5b08e47 tcp: prefer packet timing to TS-ECR for RTT
375fe02 tcp: consolidate SYNACK RTT sampling
0d9b2ab fec: Use devm_request_irq()
399db75 fec: Remove unneeded check in platform_get_resource()
13a097b fec: Check the return value from clk_prepare_enable()
79820e7 fec: Enable/disable clk_ptp in suspend/resume
d265cf4 fec: Fix the order for enabling/disabling the clocks
9514fe7 fec: Do not enable/disable optional clocks unconditionally
eda2977 tun: Support software transmit time stamping.
cb820f8 net: Provide a generic socket error queue delivery method for Tx time stamps.
0887a57 net/velocity: add poll controller function for velocity nic
6e3d677 mISDN: replace sum of bitmasks with OR operation.
aafee33 net/irda: fixed style issues in irttp

^ permalink raw reply

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Sedat Dilek @ 2013-08-06 18:35 UTC (permalink / raw)
  To: Johannes Berg, David Miller; +Cc: Stephen Rothwell, wireless, netdev
In-Reply-To: <CA+icZUV++2+OG=P1SVbNrpHPLyzrfFX0eu8NHrd0nPjkPDUOtQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2293 bytes --]

On Tue, Aug 6, 2013 at 8:26 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> On Tue, Aug 6, 2013 at 6:51 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
>> On Tue, Aug 6, 2013 at 6:07 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
>>> On Tue, Aug 6, 2013 at 6:03 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>>>> [reducing mailing lists - Stephen if you want off let us know]
>>>>
>>>> On Tue, 2013-08-06 at 17:58 +0200, Sedat Dilek wrote:
>>>>
>>>>> $ cat /proc/version
>>>>> Linux version 3.11.0-rc4-1-wl-20130805 (sedat.dilek@gmail.com@fambox)
>>>>> (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #1 SMP Tue Aug 6
>>>>> 17:52:45 CEST 2013
>>>>>
>>>>> This kernel boots fine and has no WiFi problems.
>>>>>
>>>>> > You assume a breakage in a different area than wireless or network in general?
>>>>> >
>>>>>
>>>>> Any wild guess?
>>>>
>>>> Not really, but maybe you can pull the other trees on top again and see
>>>> if those broke it? I don't really think/hope so but it's possible that
>>>> one of my pending pull requests broke it, I guess?
>>>>
>>>
>>> Hmm, I pulled in latest for-john of mac80211(-next) and
>>> iwlwifi-(fixes|next) which did not help.
>>>
>>> I am testing next-20130805 and next-20130802 to identify which
>>> Linux-next release is BROKEN.
>>>
>>
>> GOOD: next-20130801 and next-20130802
>>
>> BROKEN: next-20130805 and next-20130806
>>
>> Comparing diffs between next-20130802 and next-20130805.
>>
>
> [ To Dave and CC netdev ]
>
> [ Full thread see [1] ]
>
> The diff was not very helpful.
>
> $ cd linux-next-20130805
>
> $ git log --oneline v3.11-rc4.. | grep "Merge remote-tracking" | egrep
> 'net-next|slave-dma|wireless'
> 7f84622 Merge remote-tracking branch 'net-next/master' <--- BAD
> (before slave-dma/next)
> 3580d24 Merge remote-tracking branch 'slave-dma/next' <--- GOOD (after
> net-next/master)
> 88825c7 Merge remote-tracking branch 'wireless/master' <--- GOOD
>
> So, the culprit commit seems to be in the merge of 'net-next/master'.
>
> ( BTW, disabling IPv6 in NM/wifi-setup did not change behaviour -
> still disconnected to AP. )
>
> - Sedat -
>
> [1] http://marc.info/?t=137579712800008&r=1&w=2

Attached is a diff comparing all new commits in next-20130805.
If one of the commits smells bad to you, please let me know.

- Sedat -

[-- Attachment #2: list-of-commits-from-net-next_next-20130802-VS-next-20130805.diff --]
[-- Type: application/octet-stream, Size: 1855 bytes --]

--- list-of-commits-from-net-next-in-next-20130802.txt	2013-08-06 20:29:45.312395359 +0200
+++ list-of-commits-from-next-next-in-next-20130805.txt	2013-08-06 20:26:03.829704013 +0200
@@ -1,3 +1,26 @@
+f270701 ax88179_178a: avoid copy of tx tcp packets
+fba3679 fib_rules: reorder struct fib_rules fields
+73f5698 fib_rules: fix suppressor names and default values
+0c0667a vlan: cleanup the usage of vlan_dev_priv(dev)
+9e9402e cnic, bnx2i: Fix bug on some bnx2x devices that don't support iSCSI
+9918d5b bonding: modify only neigh_parms owned by us
+6313480 neighbour: populate neigh_parms on alloc before calling ndo_neigh_setup
+8a849bb net: netlink: minor: remove unused pointer in alloc_pg_vec
+6ef94cf fib_rules: add route suppression based on ifgroup
+d1c53c8 icmpv6_filter: allow ICMPv6 messages with bodies < 4 bytes
+9cc08af icmpv6_filter: fix "_hdr" incorrectly being a pointer
+c483e02 af_packet: simplify VLAN frame check in packet_snd
+cbd89ac af_packet: fix for sending VLAN frames via packet_mmap
+0f75b09 af_packet: when sending ethernet frames, parse header for skb->protocol
+d27fc78 sctp: Don't lookup dst if transport dst is still valid
+1409a93 ethernet: Convert mac address uses of 6 to ETH_ALEN
+574e2af include: Convert ethernet mac address declarations to use ETH_ALEN
+e216975 uapi: Convert some uses of 6 to ETH_ALEN
+3753456 qlcnic: Update version to 5.2.45
+79da4d0 qlcnic: Enable mailbox interface in poll mode when interrupts are not available
+068a8d1 qlcnic: Replace poll mode mailbox interface with interrupt based mailbox interface
+e5c4e6c qlcnic: Interrupt based driver firmware mailbox mechanism
+b9c1198 qlcnic: Enhance diagnostic loopback error codes.
 278b208 bonding: initial RCU conversion
 1507722 bonding: factor out slave id tx code and simplify xmit paths
 78a646c bonding: simplify broadcast_xmit function

^ permalink raw reply

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Johannes Berg @ 2013-08-06 19:08 UTC (permalink / raw)
  To: sedat.dilek; +Cc: David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <CA+icZUXpZaHu-FjR6FGnbkG0XEkiukEgYYbDmrSjdqNz4rWCNg@mail.gmail.com>

On Tue, 2013-08-06 at 20:35 +0200, Sedat Dilek wrote:

> Attached is a diff comparing all new commits in next-20130805.
> If one of the commits smells bad to you, please let me know.

Out of that list, only the af_packet changes would seem to have any
impact on wireless at all.

johannes


^ permalink raw reply

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Sedat Dilek @ 2013-08-06 19:14 UTC (permalink / raw)
  To: Johannes Berg; +Cc: David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <1375816128.8219.28.camel@jlt4.sipsolutions.net>

On Tue, Aug 6, 2013 at 9:08 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Tue, 2013-08-06 at 20:35 +0200, Sedat Dilek wrote:
>
>> Attached is a diff comparing all new commits in next-20130805.
>> If one of the commits smells bad to you, please let me know.
>
> Out of that list, only the af_packet changes would seem to have any
> impact on wireless at all.
>

git-bisecting... 2 steps to go...

This one is bad... "af_packet: simplify VLAN frame check in packet_snd"

http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=c483e02614551e44ced3fe6eedda8e36d3277ccc

- Sedat -

^ permalink raw reply

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Johannes Berg @ 2013-08-06 19:18 UTC (permalink / raw)
  To: sedat.dilek; +Cc: David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <CA+icZUXaTYVc_iv3hny6Je9mVdX8KCVpFSNBeukS+Fh-347Wvw@mail.gmail.com>

On Tue, 2013-08-06 at 21:14 +0200, Sedat Dilek wrote:
> On Tue, Aug 6, 2013 at 9:08 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> > On Tue, 2013-08-06 at 20:35 +0200, Sedat Dilek wrote:
> >
> >> Attached is a diff comparing all new commits in next-20130805.
> >> If one of the commits smells bad to you, please let me know.
> >
> > Out of that list, only the af_packet changes would seem to have any
> > impact on wireless at all.
> >
> 
> git-bisecting... 2 steps to go...
> 
> This one is bad... "af_packet: simplify VLAN frame check in packet_snd"
> 
> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=c483e02614551e44ced3fe6eedda8e36d3277ccc

That seems weird, does reverting it fix it?

johannes


^ permalink raw reply

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Sedat Dilek @ 2013-08-06 19:32 UTC (permalink / raw)
  To: Johannes Berg, Phil Sutter
  Cc: David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <1375816715.8219.29.camel@jlt4.sipsolutions.net>

[-- Attachment #1: Type: text/plain, Size: 1875 bytes --]

On Tue, Aug 6, 2013 at 9:18 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> On Tue, 2013-08-06 at 21:14 +0200, Sedat Dilek wrote:
>> On Tue, Aug 6, 2013 at 9:08 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>> > On Tue, 2013-08-06 at 20:35 +0200, Sedat Dilek wrote:
>> >
>> >> Attached is a diff comparing all new commits in next-20130805.
>> >> If one of the commits smells bad to you, please let me know.
>> >
>> > Out of that list, only the af_packet changes would seem to have any
>> > impact on wireless at all.
>> >
>>
>> git-bisecting... 2 steps to go...
>>
>> This one is bad... "af_packet: simplify VLAN frame check in packet_snd"
>>
>> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=c483e02614551e44ced3fe6eedda8e36d3277ccc
>
> That seems weird, does reverting it fix it?
>

[ TO Phil Sutter ]

This was 3/3 of af_packet patches :-).

So, the culprit commit is...

0f75b09c798ed00c30d7d5551b896be883bc2aeb is the first bad commit
commit 0f75b09c798ed00c30d7d5551b896be883bc2aeb
Author: Phil Sutter <phil@nwl.cc>
Date:   Fri Aug 2 11:37:39 2013 +0200

    af_packet: when sending ethernet frames, parse header for skb->protocol

    This may be necessary when the SKB is passed to other layers on the go,
    which check the protocol field on their own. An example is a VLAN packet
    sent out using AF_PACKET on a bridge interface. The bridging code checks
    the SKB size, accounting for any VLAN header only if the protocol field
    is set accordingly.

    Note that eth_type_trans() sets skb->dev to the passed argument, so this
    can be skipped in packet_snd() for ethernet frames, as well.

    Signed-off-by: Phil Sutter <phil@nwl.cc>
    Signed-off-by: David S. Miller <davem@davemloft.net>

:040000 040000 af403a20a321517f6cfb51d2e22c17ca5a60e947
1f302ebd62a87b9e874a3e61203499e17d6fce3c M      net

- Sedat -

[-- Attachment #2: git-bisect-log.txt --]
[-- Type: text/plain, Size: 1834 bytes --]

git bisect start
# good: [88825c70d47953e7f38b86fb2ef00623439217d0] Merge remote-tracking branch 'wireless/master'
git bisect good 88825c70d47953e7f38b86fb2ef00623439217d0
# good: [3580d2439702fa29efcbce9e2bb1bceb2688d352] Merge remote-tracking branch 'slave-dma/next'
git bisect good 3580d2439702fa29efcbce9e2bb1bceb2688d352
# good: [88825c70d47953e7f38b86fb2ef00623439217d0] Merge remote-tracking branch 'wireless/master'
git bisect good 88825c70d47953e7f38b86fb2ef00623439217d0
# good: [3580d2439702fa29efcbce9e2bb1bceb2688d352] Merge remote-tracking branch 'slave-dma/next'
git bisect good 3580d2439702fa29efcbce9e2bb1bceb2688d352
# good: [a594e4f8c31c400024293b2e97fc7d3faaae74da] Merge branch 'bond_rcu'
git bisect good a594e4f8c31c400024293b2e97fc7d3faaae74da
# bad: [7f84622b9ac741614e7d066f7e8511d054f513ec] Merge remote-tracking branch 'net-next/master'
git bisect bad 7f84622b9ac741614e7d066f7e8511d054f513ec
# bad: [c483e02614551e44ced3fe6eedda8e36d3277ccc] af_packet: simplify VLAN frame check in packet_snd
git bisect bad c483e02614551e44ced3fe6eedda8e36d3277ccc
# good: [e216975ad97cfcfc436789aa66d59a0e93f337f7] uapi: Convert some uses of 6 to ETH_ALEN
git bisect good e216975ad97cfcfc436789aa66d59a0e93f337f7
# good: [ba5082c71476891623757956ebfc36040ac317e2] Merge branch 'eth_alen'
git bisect good ba5082c71476891623757956ebfc36040ac317e2
# bad: [0f75b09c798ed00c30d7d5551b896be883bc2aeb] af_packet: when sending ethernet frames, parse header for skb->protocol
git bisect bad 0f75b09c798ed00c30d7d5551b896be883bc2aeb
# good: [d27fc78208b53ccdfd6a57d4ac44a459ca66806f] sctp: Don't lookup dst if transport dst is still valid
git bisect good d27fc78208b53ccdfd6a57d4ac44a459ca66806f
# first bad commit: [0f75b09c798ed00c30d7d5551b896be883bc2aeb] af_packet: when sending ethernet frames, parse header for skb->protocol

[-- Attachment #3: git-bisect-visualize.txt --]
[-- Type: text/plain, Size: 786 bytes --]

commit 0f75b09c798ed00c30d7d5551b896be883bc2aeb
Author: Phil Sutter <phil@nwl.cc>
Date:   Fri Aug 2 11:37:39 2013 +0200

    af_packet: when sending ethernet frames, parse header for skb->protocol
    
    This may be necessary when the SKB is passed to other layers on the go,
    which check the protocol field on their own. An example is a VLAN packet
    sent out using AF_PACKET on a bridge interface. The bridging code checks
    the SKB size, accounting for any VLAN header only if the protocol field
    is set accordingly.
    
    Note that eth_type_trans() sets skb->dev to the passed argument, so this
    can be skipped in packet_snd() for ethernet frames, as well.
    
    Signed-off-by: Phil Sutter <phil@nwl.cc>
    Signed-off-by: David S. Miller <davem@davemloft.net>

^ permalink raw reply

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Sedat Dilek @ 2013-08-06 19:47 UTC (permalink / raw)
  To: Johannes Berg, Phil Sutter
  Cc: David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <CA+icZUXdAjEDgu2XrA4Dg2hsLDJYdFTCpJwiW6=ZUgULe2noyw@mail.gmail.com>

On Tue, Aug 6, 2013 at 9:32 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> On Tue, Aug 6, 2013 at 9:18 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>> On Tue, 2013-08-06 at 21:14 +0200, Sedat Dilek wrote:
>>> On Tue, Aug 6, 2013 at 9:08 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>>> > On Tue, 2013-08-06 at 20:35 +0200, Sedat Dilek wrote:
>>> >
>>> >> Attached is a diff comparing all new commits in next-20130805.
>>> >> If one of the commits smells bad to you, please let me know.
>>> >
>>> > Out of that list, only the af_packet changes would seem to have any
>>> > impact on wireless at all.
>>> >
>>>
>>> git-bisecting... 2 steps to go...
>>>
>>> This one is bad... "af_packet: simplify VLAN frame check in packet_snd"
>>>
>>> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=c483e02614551e44ced3fe6eedda8e36d3277ccc
>>
>> That seems weird, does reverting it fix it?
>>
>
> [ TO Phil Sutter ]
>
> This was 3/3 of af_packet patches :-).
>
> So, the culprit commit is...
>
> 0f75b09c798ed00c30d7d5551b896be883bc2aeb is the first bad commit
> commit 0f75b09c798ed00c30d7d5551b896be883bc2aeb
> Author: Phil Sutter <phil@nwl.cc>
> Date:   Fri Aug 2 11:37:39 2013 +0200
>
>     af_packet: when sending ethernet frames, parse header for skb->protocol
>
>     This may be necessary when the SKB is passed to other layers on the go,
>     which check the protocol field on their own. An example is a VLAN packet
>     sent out using AF_PACKET on a bridge interface. The bridging code checks
>     the SKB size, accounting for any VLAN header only if the protocol field
>     is set accordingly.
>
>     Note that eth_type_trans() sets skb->dev to the passed argument, so this
>     can be skipped in packet_snd() for ethernet frames, as well.
>
>     Signed-off-by: Phil Sutter <phil@nwl.cc>
>     Signed-off-by: David S. Miller <davem@davemloft.net>
>
> :040000 040000 af403a20a321517f6cfb51d2e22c17ca5a60e947
> 1f302ebd62a87b9e874a3e61203499e17d6fce3c M      net
>
> - Sedat -

[ net/packet/af_packet.c ]
...
#include <linux/if_arp.h>

$ find include/ -name if_arp.h
include/uapi/linux/if_arp.h
include/linux/if_arp.h

$ LC_ALL=C ll include/uapi/linux/if_arp.h include/linux/if_arp.h
-rw-r--r-- 1 wearefam wearefam 1560 Jul 11 19:42 include/linux/if_arp.h
-rw-r--r-- 1 wearefam wearefam 6344 Jul 26 12:36 include/uapi/linux/if_arp.h

$ grep ARPHRD_ETHER include/linux/if_arp.h include/uapi/linux/if_arp.h
include/uapi/linux/if_arp.h:#define ARPHRD_ETHER        1
 /* Ethernet 10Mbps              */

Wrong include?

- Sedat -

^ permalink raw reply

* Re: [PATCH] mac80211: add control port protocol TX control flag
From: Kalle Valo @ 2013-08-06 20:15 UTC (permalink / raw)
  To: Johannes Berg; +Cc: linux-wireless, Johannes Berg
In-Reply-To: <1375783056-2665-1-git-send-email-johannes@sipsolutions.net>

Johannes Berg <johannes@sipsolutions.net> writes:

> From: Johannes Berg <johannes.berg@intel.com>
>
> A lot of drivers check the frame protocol for ETH_P_PAE,
> for various reasons (like making those more reliable).
> Add a new flags bitmap to the TX control info and a new
> flag indicating the control port protocol is in use to
> let all drivers also apply such logic to other control
> port protocols, should they be configured.
>
> Change-Id: I292ba4865694142670f005856b6320f7f3fa05c8
> Signed-off-by: Johannes Berg <johannes.berg@intel.com>

I'm sure you noticed, but there's a Change-Id tag.

-- 
Kalle Valo

^ permalink raw reply

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Phil Sutter @ 2013-08-06 21:29 UTC (permalink / raw)
  To: Sedat Dilek
  Cc: Johannes Berg, David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <CA+icZUVmokQ1fKmtbuPyp7f5Z2wdFYfjG5HCAm4Kue7efyKV8w@mail.gmail.com>

On Tue, Aug 06, 2013 at 09:47:01PM +0200, Sedat Dilek wrote:
> On Tue, Aug 6, 2013 at 9:32 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
> > On Tue, Aug 6, 2013 at 9:18 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> >> On Tue, 2013-08-06 at 21:14 +0200, Sedat Dilek wrote:
> >>> On Tue, Aug 6, 2013 at 9:08 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
> >>> > On Tue, 2013-08-06 at 20:35 +0200, Sedat Dilek wrote:
> >>> >
> >>> >> Attached is a diff comparing all new commits in next-20130805.
> >>> >> If one of the commits smells bad to you, please let me know.
> >>> >
> >>> > Out of that list, only the af_packet changes would seem to have any
> >>> > impact on wireless at all.
> >>> >
> >>>
> >>> git-bisecting... 2 steps to go...
> >>>
> >>> This one is bad... "af_packet: simplify VLAN frame check in packet_snd"
> >>>
> >>> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=c483e02614551e44ced3fe6eedda8e36d3277ccc
> >>
> >> That seems weird, does reverting it fix it?
> >>
> >
> > [ TO Phil Sutter ]
> >
> > This was 3/3 of af_packet patches :-).
> >
> > So, the culprit commit is...
> >
> > 0f75b09c798ed00c30d7d5551b896be883bc2aeb is the first bad commit
> > commit 0f75b09c798ed00c30d7d5551b896be883bc2aeb
> > Author: Phil Sutter <phil@nwl.cc>
> > Date:   Fri Aug 2 11:37:39 2013 +0200
> >
> >     af_packet: when sending ethernet frames, parse header for skb->protocol
> >
> >     This may be necessary when the SKB is passed to other layers on the go,
> >     which check the protocol field on their own. An example is a VLAN packet
> >     sent out using AF_PACKET on a bridge interface. The bridging code checks
> >     the SKB size, accounting for any VLAN header only if the protocol field
> >     is set accordingly.
> >
> >     Note that eth_type_trans() sets skb->dev to the passed argument, so this
> >     can be skipped in packet_snd() for ethernet frames, as well.
> >
> >     Signed-off-by: Phil Sutter <phil@nwl.cc>
> >     Signed-off-by: David S. Miller <davem@davemloft.net>
> >
> > :040000 040000 af403a20a321517f6cfb51d2e22c17ca5a60e947
> > 1f302ebd62a87b9e874a3e61203499e17d6fce3c M      net
> >
> > - Sedat -
> 
> [ net/packet/af_packet.c ]
> ...
> #include <linux/if_arp.h>
> 
> $ find include/ -name if_arp.h
> include/uapi/linux/if_arp.h
> include/linux/if_arp.h
> 
> $ LC_ALL=C ll include/uapi/linux/if_arp.h include/linux/if_arp.h
> -rw-r--r-- 1 wearefam wearefam 1560 Jul 11 19:42 include/linux/if_arp.h
> -rw-r--r-- 1 wearefam wearefam 6344 Jul 26 12:36 include/uapi/linux/if_arp.h
> 
> $ grep ARPHRD_ETHER include/linux/if_arp.h include/uapi/linux/if_arp.h
> include/uapi/linux/if_arp.h:#define ARPHRD_ETHER        1
>  /* Ethernet 10Mbps              */
> 
> Wrong include?

Nope, <linux/if_arp.h> includes <uapi/linux/if_arp.h>. I suppose there
is a semantical problem here.

Did you verify your bisect by reverting just the three patches?

Does the problem occur on client or server side? AFAICT, hostapd as well
as wpa_supplicant use AF_PACKET.

The tricky thing is, these patches are meant to *loosen* the
restrictions in af_packet.c, so *should* not be harmful. So either my
patches create a side effect I did not foresee, or it's something nasty
(too much delay introduced by calling eth_type_trans() or so).

Could you please provide steps on how to reproduce the faulty behaviour?

Best wishes, Phil

^ permalink raw reply

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Sedat Dilek @ 2013-08-06 21:40 UTC (permalink / raw)
  To: Sedat Dilek, Johannes Berg, David Miller, Stephen Rothwell,
	wireless, netdev
In-Reply-To: <20130806213006.078C72210F@mail.nwl.cc>

[-- Attachment #1: Type: text/plain, Size: 3648 bytes --]

On Tue, Aug 6, 2013 at 11:29 PM, Phil Sutter <phil@nwl.cc> wrote:
> On Tue, Aug 06, 2013 at 09:47:01PM +0200, Sedat Dilek wrote:
>> On Tue, Aug 6, 2013 at 9:32 PM, Sedat Dilek <sedat.dilek@gmail.com> wrote:
>> > On Tue, Aug 6, 2013 at 9:18 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>> >> On Tue, 2013-08-06 at 21:14 +0200, Sedat Dilek wrote:
>> >>> On Tue, Aug 6, 2013 at 9:08 PM, Johannes Berg <johannes@sipsolutions.net> wrote:
>> >>> > On Tue, 2013-08-06 at 20:35 +0200, Sedat Dilek wrote:
>> >>> >
>> >>> >> Attached is a diff comparing all new commits in next-20130805.
>> >>> >> If one of the commits smells bad to you, please let me know.
>> >>> >
>> >>> > Out of that list, only the af_packet changes would seem to have any
>> >>> > impact on wireless at all.
>> >>> >
>> >>>
>> >>> git-bisecting... 2 steps to go...
>> >>>
>> >>> This one is bad... "af_packet: simplify VLAN frame check in packet_snd"
>> >>>
>> >>> http://git.kernel.org/cgit/linux/kernel/git/davem/net-next.git/commit/?id=c483e02614551e44ced3fe6eedda8e36d3277ccc
>> >>
>> >> That seems weird, does reverting it fix it?
>> >>
>> >
>> > [ TO Phil Sutter ]
>> >
>> > This was 3/3 of af_packet patches :-).
>> >
>> > So, the culprit commit is...
>> >
>> > 0f75b09c798ed00c30d7d5551b896be883bc2aeb is the first bad commit
>> > commit 0f75b09c798ed00c30d7d5551b896be883bc2aeb
>> > Author: Phil Sutter <phil@nwl.cc>
>> > Date:   Fri Aug 2 11:37:39 2013 +0200
>> >
>> >     af_packet: when sending ethernet frames, parse header for skb->protocol
>> >
>> >     This may be necessary when the SKB is passed to other layers on the go,
>> >     which check the protocol field on their own. An example is a VLAN packet
>> >     sent out using AF_PACKET on a bridge interface. The bridging code checks
>> >     the SKB size, accounting for any VLAN header only if the protocol field
>> >     is set accordingly.
>> >
>> >     Note that eth_type_trans() sets skb->dev to the passed argument, so this
>> >     can be skipped in packet_snd() for ethernet frames, as well.
>> >
>> >     Signed-off-by: Phil Sutter <phil@nwl.cc>
>> >     Signed-off-by: David S. Miller <davem@davemloft.net>
>> >
>> > :040000 040000 af403a20a321517f6cfb51d2e22c17ca5a60e947
>> > 1f302ebd62a87b9e874a3e61203499e17d6fce3c M      net
>> >
>> > - Sedat -
>>
>> [ net/packet/af_packet.c ]
>> ...
>> #include <linux/if_arp.h>
>>
>> $ find include/ -name if_arp.h
>> include/uapi/linux/if_arp.h
>> include/linux/if_arp.h
>>
>> $ LC_ALL=C ll include/uapi/linux/if_arp.h include/linux/if_arp.h
>> -rw-r--r-- 1 wearefam wearefam 1560 Jul 11 19:42 include/linux/if_arp.h
>> -rw-r--r-- 1 wearefam wearefam 6344 Jul 26 12:36 include/uapi/linux/if_arp.h
>>
>> $ grep ARPHRD_ETHER include/linux/if_arp.h include/uapi/linux/if_arp.h
>> include/uapi/linux/if_arp.h:#define ARPHRD_ETHER        1
>>  /* Ethernet 10Mbps              */
>>
>> Wrong include?
>
> Nope, <linux/if_arp.h> includes <uapi/linux/if_arp.h>. I suppose there
> is a semantical problem here.
>
> Did you verify your bisect by reverting just the three patches?
>
> Does the problem occur on client or server side? AFAICT, hostapd as well
> as wpa_supplicant use AF_PACKET.
>
> The tricky thing is, these patches are meant to *loosen* the
> restrictions in af_packet.c, so *should* not be harmful. So either my
> patches create a side effect I did not foresee, or it's something nasty
> (too much delay introduced by calling eth_type_trans() or so).
>
> Could you please provide steps on how to reproduce the faulty behaviour?
>

By reverting the culprit commit my network/wifi is fine, again.
See also attached patch with changelog.

- Sedat -

[-- Attachment #2: 0001-Revert-af_packet-when-sending-ethernet-frames-parse-.patch --]
[-- Type: application/octet-stream, Size: 2301 bytes --]

From 82d8f55ceab00c9ef829195e454a9cd74fded166 Mon Sep 17 00:00:00 2001
From: Sedat Dilek <sedat.dilek@gmail.com>
Date: Tue, 6 Aug 2013 23:03:57 +0200
Subject: [PATCH next-20130805] Revert "af_packet: when sending ethernet
 frames, parse header for skb->protocol"

This reverts commit 0f75b09c798ed00c30d7d5551b896be883bc2aeb
("af_packet: when sending ethernet frames, parse header for skb->protocol").

I noticed with next-20130806 that I cannot connect to my WLAN-AP anymore.
next-20130802 was the last GOOD and next-20130805 the first BAD Linux-next
release.

Debugging with wpasupplicant did not show any inconsistency.
To ensure it is not a problem of wireless, I tried wireless-testing
(master-2013-08-05), which did not show the symptoms.
Thanks Johannes Berg for the vital help.

After a git-bisect session it turned out that the above commit is the
culprit.

Reverting it fixes the issue for me.

Adapted and tested against Linux-next (next-20130805).

Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
---
 net/packet/af_packet.c | 15 ++-------------
 1 file changed, 2 insertions(+), 13 deletions(-)

diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 0c0f6c9..9343ea7 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -88,7 +88,6 @@
 #include <linux/virtio_net.h>
 #include <linux/errqueue.h>
 #include <linux/net_tstamp.h>
-#include <linux/if_arp.h>
 
 #ifdef CONFIG_INET
 #include <net/inet_common.h>
@@ -2002,9 +2001,6 @@ static int tpacket_fill_skb(struct packet_sock *po, struct sk_buff *skb,
 		if (unlikely(err))
 			return err;
 
-		if (dev->type == ARPHRD_ETHER)
-			skb->protocol = eth_type_trans(skb, dev);
-
 		data += dev->hard_header_len;
 		to_write -= dev->hard_header_len;
 	}
@@ -2331,20 +2327,13 @@ static int packet_snd(struct socket *sock,
 
 	sock_tx_timestamp(sk, &skb_shinfo(skb)->tx_flags);
 
-	if (dev->type == ARPHRD_ETHER) {
-		skb->protocol = eth_type_trans(skb, dev);
-		if (skb->protocol == htons(ETH_P_8021Q))
-			reserve += VLAN_HLEN;
-	} else {
-		skb->protocol = proto;
-		skb->dev = dev;
-	}
-
 	if (!gso_type && (len > dev->mtu + reserve + extra_len)) {
 		err = -EMSGSIZE;
 		goto out_free;
 	}
 
+	skb->protocol = proto;
+	skb->dev = dev;
 	skb->priority = sk->sk_priority;
 	skb->mark = sk->sk_mark;
 
-- 
1.8.3.4


^ permalink raw reply related

* [PATCH v2] mac80211: allow lowest basic rate for unicast management for mesh
From: Chun-Yeow Yeoh @ 2013-08-06 21:45 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, linville, Chun-Yeow Yeoh

Allow lowest basic rate to be used for unicast management frame in
mesh. Otherwise, the lowest supported rate is used for unicast
management frame, such as 1Mbps for 2.4GHz and 6Mbps for 5GHz. Rename
the rc_send_low_broadcast to re_send_low_basicrate since now it is
also applied to unicast management frame in mesh.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
---

v2: Refactor to avoid duplication of code (Johannes)

 net/mac80211/rate.c |   23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index ba63ac8..4aa7bb6 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -210,7 +210,7 @@ static bool rc_no_data_or_no_ack_use_min(struct ieee80211_tx_rate_control *txrc)
 		!ieee80211_is_data(fc);
 }
 
-static void rc_send_low_broadcast(s8 *idx, u32 basic_rates,
+static void rc_send_low_basicrate(s8 *idx, u32 basic_rates,
 				  struct ieee80211_supported_band *sband)
 {
 	u8 i;
@@ -263,28 +263,37 @@ static void __rate_control_send_low(struct ieee80211_hw *hw,
 }
 
 
-bool rate_control_send_low(struct ieee80211_sta *sta,
+bool rate_control_send_low(struct ieee80211_sta *pubsta,
 			   void *priv_sta,
 			   struct ieee80211_tx_rate_control *txrc)
 {
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(txrc->skb);
 	struct ieee80211_supported_band *sband = txrc->sband;
+	struct sta_info *sta;
 	int mcast_rate;
+	bool use_basicrate = false;
 
-	if (!sta || !priv_sta || rc_no_data_or_no_ack_use_min(txrc)) {
-		__rate_control_send_low(txrc->hw, sband, sta, info);
+	if (!pubsta || !priv_sta || rc_no_data_or_no_ack_use_min(txrc)) {
+		__rate_control_send_low(txrc->hw, sband, pubsta, info);
 
-		if (!sta && txrc->bss) {
+		if (!pubsta && txrc->bss) {
 			mcast_rate = txrc->bss_conf->mcast_rate[sband->band];
 			if (mcast_rate > 0) {
 				info->control.rates[0].idx = mcast_rate - 1;
 				return true;
 			}
+			use_basicrate = true;
+		} else {
+			sta = container_of(pubsta, struct sta_info, sta);
+			if (ieee80211_vif_is_mesh(&sta->sdata->vif))
+				use_basicrate = true;
+		}
 
-			rc_send_low_broadcast(&info->control.rates[0].idx,
+		if (use_basicrate)
+			rc_send_low_basicrate(&info->control.rates[0].idx,
 					      txrc->bss_conf->basic_rates,
 					      sband);
-		}
+
 		return true;
 	}
 	return false;
-- 
1.7.9.5


^ permalink raw reply related

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Johannes Berg @ 2013-08-06 21:45 UTC (permalink / raw)
  To: sedat.dilek; +Cc: David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <CA+icZUVk1HM-VVYcARvY7p5KBYz0YcY9+rW8s-nKPTeVYh4tgw@mail.gmail.com>

On Tue, 2013-08-06 at 23:40 +0200, Sedat Dilek wrote:

> > Does the problem occur on client or server side? AFAICT, hostapd as well
> > as wpa_supplicant use AF_PACKET.
> >
> > The tricky thing is, these patches are meant to *loosen* the
> > restrictions in af_packet.c, so *should* not be harmful. So either my
> > patches create a side effect I did not foresee, or it's something nasty
> > (too much delay introduced by calling eth_type_trans() or so).

> By reverting the culprit commit my network/wifi is fine, again.
> See also attached patch with changelog.

I think skb->protocol is probably getting set up wrong, and just putting
back the last two lines

        skb->protocol = proto;
        skb->dev = dev;

is probably sufficient to fix wifi. If skb->protocol isn't set to
ETH_P_PAE, then we'd drop the packet in the wifi stack - might be worth
printing out what it's set to at the point where the skb->protocol
assignment above was removed.

I'm trying to wrap my head around all this right now but I don't yet see
how the code after the patch would not get skb->protocol correct.

johannes


^ permalink raw reply

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Hannes Frederic Sowa @ 2013-08-06 21:56 UTC (permalink / raw)
  To: Johannes Berg
  Cc: sedat.dilek, David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <1375825538.10459.1.camel@jlt4.sipsolutions.net>

On Tue, Aug 06, 2013 at 11:45:38PM +0200, Johannes Berg wrote:
> On Tue, 2013-08-06 at 23:40 +0200, Sedat Dilek wrote:
> 
> > > Does the problem occur on client or server side? AFAICT, hostapd as well
> > > as wpa_supplicant use AF_PACKET.
> > >
> > > The tricky thing is, these patches are meant to *loosen* the
> > > restrictions in af_packet.c, so *should* not be harmful. So either my
> > > patches create a side effect I did not foresee, or it's something nasty
> > > (too much delay introduced by calling eth_type_trans() or so).
> 
> > By reverting the culprit commit my network/wifi is fine, again.
> > See also attached patch with changelog.
> 
> I think skb->protocol is probably getting set up wrong, and just putting
> back the last two lines
> 
>         skb->protocol = proto;
>         skb->dev = dev;
> 
> is probably sufficient to fix wifi. If skb->protocol isn't set to
> ETH_P_PAE, then we'd drop the packet in the wifi stack - might be worth
> printing out what it's set to at the point where the skb->protocol
> assignment above was removed.
> 
> I'm trying to wrap my head around all this right now but I don't yet see
> how the code after the patch would not get skb->protocol correct.

Has anybody tested plain ethernet? I have a malfunctioning dhclient on
ethernet since the weekend(it seems to not receive any packet). I did not
look after it because have other patches on my todo list currently. Maybe
it is the same error?

Greetings,

  Hannes


^ permalink raw reply

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Johannes Berg @ 2013-08-06 21:58 UTC (permalink / raw)
  To: sedat.dilek; +Cc: David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <1375825538.10459.1.camel@jlt4.sipsolutions.net>

On Tue, 2013-08-06 at 23:45 +0200, Johannes Berg wrote:

> I think skb->protocol is probably getting set up wrong, and just putting
> back the last two lines
> 
>         skb->protocol = proto;
>         skb->dev = dev;
> 
> is probably sufficient to fix wifi. If skb->protocol isn't set to
> ETH_P_PAE, then we'd drop the packet in the wifi stack - might be worth
> printing out what it's set to at the point where the skb->protocol
> assignment above was removed.
> 
> I'm trying to wrap my head around all this right now but I don't yet see
> how the code after the patch would not get skb->protocol correct.

Actually, I think that's not it, but the code now behaves totally
differently?

Say this is the frame data with two points marked:

(1)                   (2)
 | dst | src | ethtype | ... |

As I understand it (in my admittedly rather tired state), previously we
had

skb_network_header() == (1)
skb_mac_header()     == (1)
skb->data            == (1)

After calling eth_type_trans(), we get

skb_network_header() == (1)
skb_mac_header()     == (1)
skb->data            == (2)

I think? Maybe I'm totally confused though.

johannes


^ permalink raw reply

* [PATCH v3] mac80211: allow lowest basic rate for unicast management for mesh
From: Chun-Yeow Yeoh @ 2013-08-06 22:39 UTC (permalink / raw)
  To: linux-wireless; +Cc: johannes, linville, devel, Chun-Yeow Yeoh

Allow lowest basic rate to be used for unicast management frame in
mesh. Otherwise, the lowest supported rate is used for unicast
management frame, such as 1Mbps for 2.4GHz and 6Mbps for 5GHz. Rename
the rc_send_low_broadcast to re_send_low_basicrate since now it is
also applied to unicast management frame in mesh.

Signed-off-by: Chun-Yeow Yeoh <yeohchunyeow@cozybit.com>
---

v2: Refactor to avoid duplication of code (Johannes)
v3: Add checking to avoid NULL in pubsta (Yeoh)

 net/mac80211/rate.c |   23 ++++++++++++++++-------
 1 file changed, 16 insertions(+), 7 deletions(-)

diff --git a/net/mac80211/rate.c b/net/mac80211/rate.c
index ba63ac8..e126605 100644
--- a/net/mac80211/rate.c
+++ b/net/mac80211/rate.c
@@ -210,7 +210,7 @@ static bool rc_no_data_or_no_ack_use_min(struct ieee80211_tx_rate_control *txrc)
 		!ieee80211_is_data(fc);
 }
 
-static void rc_send_low_broadcast(s8 *idx, u32 basic_rates,
+static void rc_send_low_basicrate(s8 *idx, u32 basic_rates,
 				  struct ieee80211_supported_band *sband)
 {
 	u8 i;
@@ -263,28 +263,37 @@ static void __rate_control_send_low(struct ieee80211_hw *hw,
 }
 
 
-bool rate_control_send_low(struct ieee80211_sta *sta,
+bool rate_control_send_low(struct ieee80211_sta *pubsta,
 			   void *priv_sta,
 			   struct ieee80211_tx_rate_control *txrc)
 {
 	struct ieee80211_tx_info *info = IEEE80211_SKB_CB(txrc->skb);
 	struct ieee80211_supported_band *sband = txrc->sband;
+	struct sta_info *sta;
 	int mcast_rate;
+	bool use_basicrate = false;
 
-	if (!sta || !priv_sta || rc_no_data_or_no_ack_use_min(txrc)) {
-		__rate_control_send_low(txrc->hw, sband, sta, info);
+	if (!pubsta || !priv_sta || rc_no_data_or_no_ack_use_min(txrc)) {
+		__rate_control_send_low(txrc->hw, sband, pubsta, info);
 
-		if (!sta && txrc->bss) {
+		if (!pubsta && txrc->bss) {
 			mcast_rate = txrc->bss_conf->mcast_rate[sband->band];
 			if (mcast_rate > 0) {
 				info->control.rates[0].idx = mcast_rate - 1;
 				return true;
 			}
+			use_basicrate = true;
+		} else if (pubsta) {
+			sta = container_of(pubsta, struct sta_info, sta);
+			if (ieee80211_vif_is_mesh(&sta->sdata->vif))
+				use_basicrate = true;
+		}
 
-			rc_send_low_broadcast(&info->control.rates[0].idx,
+		if (use_basicrate)
+			rc_send_low_basicrate(&info->control.rates[0].idx,
 					      txrc->bss_conf->basic_rates,
 					      sband);
-		}
+
 		return true;
 	}
 	return false;
-- 
1.7.9.5


^ permalink raw reply related

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Sedat Dilek @ 2013-08-06 22:55 UTC (permalink / raw)
  To: Johannes Berg, sedat.dilek, David Miller, Stephen Rothwell,
	wireless, netdev
In-Reply-To: <20130806215657.GA16410@order.stressinduktion.org>

On Tue, Aug 6, 2013 at 11:56 PM, Hannes Frederic Sowa
<hannes@stressinduktion.org> wrote:
> On Tue, Aug 06, 2013 at 11:45:38PM +0200, Johannes Berg wrote:
>> On Tue, 2013-08-06 at 23:40 +0200, Sedat Dilek wrote:
>>
>> > > Does the problem occur on client or server side? AFAICT, hostapd as well
>> > > as wpa_supplicant use AF_PACKET.
>> > >
>> > > The tricky thing is, these patches are meant to *loosen* the
>> > > restrictions in af_packet.c, so *should* not be harmful. So either my
>> > > patches create a side effect I did not foresee, or it's something nasty
>> > > (too much delay introduced by calling eth_type_trans() or so).
>>
>> > By reverting the culprit commit my network/wifi is fine, again.
>> > See also attached patch with changelog.
>>
>> I think skb->protocol is probably getting set up wrong, and just putting
>> back the last two lines
>>
>>         skb->protocol = proto;
>>         skb->dev = dev;
>>
>> is probably sufficient to fix wifi. If skb->protocol isn't set to
>> ETH_P_PAE, then we'd drop the packet in the wifi stack - might be worth
>> printing out what it's set to at the point where the skb->protocol
>> assignment above was removed.
>>
>> I'm trying to wrap my head around all this right now but I don't yet see
>> how the code after the patch would not get skb->protocol correct.
>
> Has anybody tested plain ethernet? I have a malfunctioning dhclient on
> ethernet since the weekend(it seems to not receive any packet). I did not
> look after it because have other patches on my todo list currently. Maybe
> it is the same error?
>

No, tested only with iwlwifi.
Can you try the patch from [1]?

- Sedat -

[1] http://marc.info/?l=linux-netdev&m=137582524017840&w=2

> Greetings,
>
>   Hannes
>

^ permalink raw reply

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Hannes Frederic Sowa @ 2013-08-06 23:07 UTC (permalink / raw)
  To: Sedat Dilek
  Cc: Johannes Berg, David Miller, Stephen Rothwell, wireless, netdev
In-Reply-To: <CA+icZUWY8PfYeV-iaPCm4MZenNaHRboK6Kmc8=Fnse9_dwfdqg@mail.gmail.com>

On Wed, Aug 07, 2013 at 12:55:33AM +0200, Sedat Dilek wrote:
> No, tested only with iwlwifi.
> Can you try the patch from [1]?
> 
> - Sedat -
> 
> [1] http://marc.info/?l=linux-netdev&m=137582524017840&w=2

Fixed the problem with virtio_net, too.

Thanks,

  Hannes


^ permalink raw reply

* Re: linux-next: Tree for Aug 6 [ wireless | iwlwifi | mac80211 ? ]
From: Sedat Dilek @ 2013-08-06 23:14 UTC (permalink / raw)
  To: Sedat Dilek, Johannes Berg, David Miller, Stephen Rothwell,
	wireless, netdev
In-Reply-To: <20130806230749.GC16410@order.stressinduktion.org>

On Wed, Aug 7, 2013 at 1:07 AM, Hannes Frederic Sowa
<hannes@stressinduktion.org> wrote:
> On Wed, Aug 07, 2013 at 12:55:33AM +0200, Sedat Dilek wrote:
>> No, tested only with iwlwifi.
>> Can you try the patch from [1]?
>>
>> - Sedat -
>>
>> [1] http://marc.info/?l=linux-netdev&m=137582524017840&w=2
>
> Fixed the problem with virtio_net, too.
>
> Thanks,
>

Cool!
I retested with latest next-20130806 which is also fine with this patch.

- Sedat -

>   Hannes
>

^ permalink raw reply

* Re: [systemd-devel] [PATCH] Change CONFIG_FW_LOADER_USER_HELPER to default n and don't select it
From: Andy Lutomirski @ 2013-08-07  0:26 UTC (permalink / raw)
  To: Tom Gundersen
  Cc: Bryan Kadzban, systemd Mailing List, Linux Wireless List,
	Johannes Berg, Intel Linux Wireless, linux-hotplug,
	Maarten Lankhorst, Kay Sievers, linux-kernel
In-Reply-To: <CAG-2HqU=yyxomNTg9-2+bxMKP=e5_pdVT7bhB_CHhFzB-ac_mQ@mail.gmail.com>

On Tue, Aug 6, 2013 at 5:24 PM, Tom Gundersen <teg@jklm.no> wrote:
>
> On 6 Aug 2013 18:32, "Bryan Kadzban" <bryan@kadzban.is-a-geek.net> wrote:
>>
>> On Tue, Aug 06, 2013 at 11:17:17AM +0200, Tom Gundersen wrote:
>> > On Tue, Aug 6, 2013 at 11:11 AM, Tom Gundersen <teg@jklm.no> wrote:
>> > > On Tue, Aug 6, 2013 at 10:20 AM, Maarten Lankhorst
>> > > <m.b.lankhorst@gmail.com> wrote:
>> > >> Op 05-08-13 18:29, Andy Lutomirski schreef:
>> > >>> The systemd commit below can delay firmware loading by multiple
>> > >>> minutes if CONFIG_FW_LOADER_USER_HELPER=y.  Unfortunately no one
>> > >>> noticed that the systemd-udev change would break new kernels as well
>> > >>> as old kernels.
>> > >>>
>> > >>> Since the kernel apparently can't count on reasonable userspace
>> > >>> support, turn this thing off by default.
>> > >>>
>> > >>> commit a3bd8447be4ea2ce230eb8ae0e815c04d85fa15a
>> > >>> Author: Tom Gundersen <teg@jklm.no>
>> > >>> Date:   Mon Mar 18 15:12:18 2013 +0100
>> > >>>
>> > >>>     udev: make firmware loading optional and disable by default
>> > >>>
>> > >>>     Distros that whish to support old kernels should set
>> > >>>
>> > >>> --with-firmware-dirs="/usr/lib/firmware/updates:/usr/lib/firmware"
>> > >>>     to retain the old behaviour.
>> > >>>
>> > >> methinks this patch should be reverted then,
>> > >
>> > > Well, all the code is still there, so it can be enabled if anyone
>> > > wants it.
>> > >
>> > >> or a stub should be added to udev to always fail firmware loading so
>> > >> timeouts don't occur.
>> > >
>> > > I think the only use (if any) of a userspace firmware loader would be
>> > > for anyone who wants a custom one (i.e., not udev), so we shouldn't
>> > > just fail the loading from udev unconditionally.
>> > >
>> > > How about we just improve the udev documentation a bit, similar to
>> > > Andy's kernel patch?
>> >
>> > Sorry, I should first have checked. We already document this in the
>> > README:
>> >
>> > >        Userspace firmware loading is deprecated, will go away, and
>> > >        sometimes causes problems:
>> > >          CONFIG_FW_LOADER_USER_HELPER=n
>>
>> ...And this patch is making the kernel default to the correct behavior,
>> instead of the now-broken-by-udev behavior.
>>
>> I'm not sure I see the issue with it?  :-)
>
> Oh yeah this patch is totally the right thing to do, I was just arguing that
> there is nothing to be done on the udev side.
>
>> (Add me to the list of people that think udev is broken too, fwiw.  But
>> let's at least not leave *both* sides in a broken-by-default state.)
>
> Well I don't think it is too much to ask that the kernel and udev should be
> configured in a consistent way. Especially as thing still work even if you
> get it wrong, albeit with a delay.

Except that the current defaults are inconsistent and there is no
explanation anywhere in the logs when this is screwed up.

--Andy

^ permalink raw reply

* [PATCH] ath10k: setup peer UAPSD flag correctly
From: Janusz Dziedzic @ 2013-08-07  5:23 UTC (permalink / raw)
  To: ath10k; +Cc: linux-wireless, Janusz Dziedzic

Setup UAPSD peer rate control (FW flag)
correctly.

Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>
---
 drivers/net/wireless/ath/ath10k/mac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/wireless/ath/ath10k/mac.c b/drivers/net/wireless/ath/ath10k/mac.c
index cf2ba4d..505be82 100644
--- a/drivers/net/wireless/ath/ath10k/mac.c
+++ b/drivers/net/wireless/ath/ath10k/mac.c
@@ -973,7 +973,7 @@ static void ath10k_peer_assoc_h_qos_ap(struct ath10k *ar,
 			   sta->uapsd_queues, sta->max_sp);
 
 		arg->peer_flags |= WMI_PEER_APSD;
-		arg->peer_flags |= WMI_RC_UAPSD_FLAG;
+		arg->peer_rate_caps |= WMI_RC_UAPSD_FLAG;
 
 		if (sta->uapsd_queues & IEEE80211_WMM_IE_STA_QOSINFO_AC_VO)
 			uapsd |= WMI_AP_PS_UAPSD_AC3_DELIVERY_EN |
-- 
1.7.9.5


^ permalink raw reply related

* Re: [PATCH] ath10k: setup peer UAPSD flag correctly
From: Kalle Valo @ 2013-08-07  6:59 UTC (permalink / raw)
  To: Janusz Dziedzic; +Cc: ath10k, linux-wireless
In-Reply-To: <1375853036-2418-1-git-send-email-janusz.dziedzic@tieto.com>

Janusz Dziedzic <janusz.dziedzic@tieto.com> writes:

> Setup UAPSD peer rate control (FW flag)
> correctly.
>
> Signed-off-by: Janusz Dziedzic <janusz.dziedzic@tieto.com>

This doesn't answer the question "Why?". I have now added a section in
the wiki about what the commit log should contain. Hopefully that helps.

Submitting patches

Send patches to the mailing lists below. Kalle Valo reviews the patches
within the next few days and, if they are ok, commits them to ath.git.

To: ath10k@lists.infradead.org
Cc: linux-wireless@vger.kernel.org

Preferably use ath.git master as the baseline for patches. Other trees
can be used as well, but then the chances of conflicts are higher.

Guidelines for patches:

* MUST be compiler warning free.

* MUST be sparse warning free.

* Commit log MUST not be empty.

* The commit log MUST answer the question "Why?":

  * Describe the motivation behind the bug.

  * How does it change the functionality from user's point of view?

  * Does it fix a bug? If it does, please describe the bug (doesn't need
    to be long). Also if there's a public bug report add a link to the
    bug report.

* If others have reported the issue commit log SHOULD use Reported-by:
  and Tested-by: tags.

* SHOULD be checkpatch clean:

  * FIXME: add checkpatch example with correct arguments

* Patches SHOULD be sent with git send-email tool.

* Patchsets SHOULD contain no more than 12 patches.

The terminology is from http://www.ietf.org/rfc/rfc2119.txt

http://wireless.kernel.org/en/users/Drivers/ath10k#Submitting_patches

Please comment.

-- 
Kalle Valo

^ permalink raw reply

* [PATCH 2/2] ath9k: Run the LNA combining algorithm properly
From: Sujith Manoharan @ 2013-08-07  6:59 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, ath9k-devel
In-Reply-To: <1375858768-24655-1-git-send-email-sujith@msujith.org>

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

The LNA combining algorithm has to be run for cards
that support the required diversity features, make
sure that that correct conditions are met before
enabing this algorithm.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/recv.c | 46 ++++++++++++++++++++++-------------
 1 file changed, 29 insertions(+), 17 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/recv.c b/drivers/net/wireless/ath/ath9k/recv.c
index 865e043..e359557 100644
--- a/drivers/net/wireless/ath/ath9k/recv.c
+++ b/drivers/net/wireless/ath/ath9k/recv.c
@@ -1156,7 +1156,8 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
 	struct ath_buf *bf;
 	struct sk_buff *skb = NULL, *requeue_skb, *hdr_skb;
 	struct ieee80211_rx_status *rxs;
-	struct ath_hw *ah = sc->sc_ah;
+	struct ath_hw *ah = sc->sc_ah
+;	struct ath9k_hw_capabilities *pCap = &ah->caps;
 	struct ath_common *common = ath9k_hw_common(ah);
 	struct ieee80211_hw *hw = sc->hw;
 	struct ieee80211_hdr *hdr;
@@ -1328,11 +1329,30 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
 			skb = hdr_skb;
 		}
 
+		if (rxs->flag & RX_FLAG_MMIC_STRIPPED)
+			skb_trim(skb, skb->len - 8);
 
-		if (ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) {
+		spin_lock_irqsave(&sc->sc_pm_lock, flags);
+		if ((sc->ps_flags & (PS_WAIT_FOR_BEACON |
+				     PS_WAIT_FOR_CAB |
+				     PS_WAIT_FOR_PSPOLL_DATA)) ||
+		    ath9k_check_auto_sleep(sc))
+			ath_rx_ps(sc, skb, rs.is_mybeacon);
+		spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
 
+		/*
+		 * Run the LNA combining algorithm only in these cases:
+		 *
+		 * Standalone WLAN cards with both LNA/Antenna diversity
+		 * enabled in the EEPROM.
+		 *
+		 * WLAN+BT cards which are in the supported card list
+		 * in ath_pci_id_table and the user has loaded the
+		 * driver with "bt_ant_diversity" set to true.
+		 */
+		if (ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) {
 			/*
-			 * change the default rx antenna if rx diversity
+			 * Change the default rx antenna if rx diversity
 			 * chooses the other antenna 3 times in a row.
 			 */
 			if (sc->rx.defant != rs.rs_antenna) {
@@ -1342,22 +1362,14 @@ int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
 				sc->rx.rxotherant = 0;
 			}
 
+			if (pCap->hw_caps & ATH9K_HW_CAP_BT_ANT_DIV) {
+				if (common->bt_ant_diversity)
+					ath_ant_comb_scan(sc, &rs);
+			} else {
+				ath_ant_comb_scan(sc, &rs);
+			}
 		}
 
-		if (rxs->flag & RX_FLAG_MMIC_STRIPPED)
-			skb_trim(skb, skb->len - 8);
-
-		spin_lock_irqsave(&sc->sc_pm_lock, flags);
-		if ((sc->ps_flags & (PS_WAIT_FOR_BEACON |
-				     PS_WAIT_FOR_CAB |
-				     PS_WAIT_FOR_PSPOLL_DATA)) ||
-		    ath9k_check_auto_sleep(sc))
-			ath_rx_ps(sc, skb, rs.is_mybeacon);
-		spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
-
-		if ((ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) && sc->ant_rx == 3)
-			ath_ant_comb_scan(sc, &rs);
-
 		ath9k_apply_ampdu_details(sc, &rs, rxs);
 
 		ieee80211_rx(hw, skb);
-- 
1.8.3.4


^ permalink raw reply related

* [PATCH 1/2] ath9k: Fix BTCOEX usage for RX diversity
From: Sujith Manoharan @ 2013-08-07  6:59 UTC (permalink / raw)
  To: John Linville; +Cc: linux-wireless, ath9k-devel
In-Reply-To: <1375858768-24655-1-git-send-email-sujith@msujith.org>

From: Sujith Manoharan <c_manoha@qca.qualcomm.com>

BTCOEX has to be *disabled* for WLAN RX diversity to
work on combo cards.

Signed-off-by: Sujith Manoharan <c_manoha@qca.qualcomm.com>
---
 drivers/net/wireless/ath/ath9k/init.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/wireless/ath/ath9k/init.c b/drivers/net/wireless/ath/ath9k/init.c
index 4afe30e..3b56c2e 100644
--- a/drivers/net/wireless/ath/ath9k/init.c
+++ b/drivers/net/wireless/ath/ath9k/init.c
@@ -645,11 +645,11 @@ static int ath9k_init_softc(u16 devid, struct ath_softc *sc,
 	/*
 	 * Enable WLAN/BT RX Antenna diversity only when:
 	 *
-	 * - BTCOEX is enabled
+	 * - BTCOEX is disabled.
 	 * - the user manually requests the feature.
 	 * - the HW cap is set using the platform data.
 	 */
-	if (common->btcoex_enabled && ath9k_bt_ant_diversity &&
+	if (!common->btcoex_enabled && ath9k_bt_ant_diversity &&
 	    (pCap->hw_caps & ATH9K_HW_CAP_BT_ANT_DIV))
 		common->bt_ant_diversity = 1;
 
-- 
1.8.3.4


^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox