<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/net/mac80211, branch linux-4.20.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-4.20.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2019-03-05T16:59:42Z</updated>
<entry>
<title>mac80211: Add attribute aligned(2) to struct 'action'</title>
<updated>2019-03-05T16:59:42Z</updated>
<author>
<name>Mathieu Malaterre</name>
</author>
<published>2019-01-24T18:19:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b37004261e893284c3e88c42c97568a6b289c13a'/>
<id>urn:sha1:b37004261e893284c3e88c42c97568a6b289c13a</id>
<content type='text'>
[ Upstream commit 7c53eb5d87bc21464da4268c3c0c47457b6d9c9b ]

During refactor in commit 9e478066eae4 ("mac80211: fix MU-MIMO
follow-MAC mode") a new struct 'action' was declared with packed
attribute as:

  struct {
          struct ieee80211_hdr_3addr hdr;
          u8 category;
          u8 action_code;
  } __packed action;

But since struct 'ieee80211_hdr_3addr' is declared with an aligned
keyword as:

  struct ieee80211_hdr {
  	__le16 frame_control;
  	__le16 duration_id;
  	u8 addr1[ETH_ALEN];
  	u8 addr2[ETH_ALEN];
  	u8 addr3[ETH_ALEN];
  	__le16 seq_ctrl;
  	u8 addr4[ETH_ALEN];
  } __packed __aligned(2);

Solve the ambiguity of placing aligned structure in a packed one by
adding the aligned(2) attribute to struct 'action'.

This removes the following warning (W=1):

  net/mac80211/rx.c:234:2: warning: alignment 1 of 'struct &lt;anonymous&gt;' is less than 2 [-Wpacked-not-aligned]

Cc: Johannes Berg &lt;johannes.berg@intel.com&gt;
Suggested-by: Johannes Berg &lt;johannes@sipsolutions.net&gt;
Signed-off-by: Mathieu Malaterre &lt;malat@debian.org&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mac80211: don't initiate TDLS connection if station is not associated to AP</title>
<updated>2019-03-05T16:59:42Z</updated>
<author>
<name>Balaji Pothunoori</name>
</author>
<published>2019-01-21T07:00:43Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=01be2a3ed188fa09b7cec88173b0a1dff5c1dbf8'/>
<id>urn:sha1:01be2a3ed188fa09b7cec88173b0a1dff5c1dbf8</id>
<content type='text'>
[ Upstream commit 7ed5285396c257fd4070b1e29e7b2341aae2a1ce ]

Following call trace is observed while adding TDLS peer entry in driver
during TDLS setup.

Call Trace:
[&lt;c1301476&gt;] dump_stack+0x47/0x61
[&lt;c10537d2&gt;] __warn+0xe2/0x100
[&lt;fa22415f&gt;] ? sta_apply_parameters+0x49f/0x550 [mac80211]
[&lt;c1053895&gt;] warn_slowpath_null+0x25/0x30
[&lt;fa22415f&gt;] sta_apply_parameters+0x49f/0x550 [mac80211]
[&lt;fa20ad42&gt;] ? sta_info_alloc+0x1c2/0x450 [mac80211]
[&lt;fa224623&gt;] ieee80211_add_station+0xe3/0x160 [mac80211]
[&lt;c1876fe3&gt;] nl80211_new_station+0x273/0x420
[&lt;c170f6d9&gt;] genl_rcv_msg+0x219/0x3c0
[&lt;c170f4c0&gt;] ? genl_rcv+0x30/0x30
[&lt;c170ee7e&gt;] netlink_rcv_skb+0x8e/0xb0
[&lt;c170f4ac&gt;] genl_rcv+0x1c/0x30
[&lt;c170e8aa&gt;] netlink_unicast+0x13a/0x1d0
[&lt;c170ec18&gt;] netlink_sendmsg+0x2d8/0x390
[&lt;c16c5acd&gt;] sock_sendmsg+0x2d/0x40
[&lt;c16c6369&gt;] ___sys_sendmsg+0x1d9/0x1e0

Fixing this by allowing TDLS setup request only when we have completed
association.

Signed-off-by: Balaji Pothunoori &lt;bpothuno@codeaurora.org&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mac80211: fix miscounting of ttl-dropped frames</title>
<updated>2019-03-05T16:59:39Z</updated>
<author>
<name>Bob Copeland</name>
</author>
<published>2019-01-17T21:32:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5373e2320ecbdaf0154302e9bdc759ccac1707ed'/>
<id>urn:sha1:5373e2320ecbdaf0154302e9bdc759ccac1707ed</id>
<content type='text'>
[ Upstream commit a0dc02039a2ee54fb4ae400e0b755ed30e73e58c ]

In ieee80211_rx_h_mesh_fwding, we increment the 'dropped_frames_ttl'
counter when we decrement the ttl to zero.  For unicast frames
destined for other hosts, we stop processing the frame at that point.

For multicast frames, we do not rebroadcast it in this case, but we
do pass the frame up the stack to process it on this STA.  That
doesn't match the usual definition of "dropped," so don't count
those as such.

With this change, something like `ping6 -i0.2 ff02::1%mesh0` from a
peer in a ttl=1 network no longer increments the counter rapidly.

Signed-off-by: Bob Copeland &lt;bobcopeland@fb.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
<entry>
<title>mac80211: allocate tailroom for forwarded mesh packets</title>
<updated>2019-02-27T09:09:56Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2019-02-22T12:21:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1b983c699984ae046be507ff3cba96fb260acc7e'/>
<id>urn:sha1:1b983c699984ae046be507ff3cba96fb260acc7e</id>
<content type='text'>
commit 51d0af222f6fa43134c6187ab4f374630f6e0d96 upstream.

Forwarded packets enter the tx path through ieee80211_add_pending_skb,
which skips the ieee80211_skb_resize call.
Fixes WARN_ON in ccmp_encrypt_skb and resulting packet loss.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mac80211: Change default tx_sk_pacing_shift to 7</title>
<updated>2019-02-27T09:09:55Z</updated>
<author>
<name>Toke Høiland-Jørgensen</name>
</author>
<published>2019-02-21T17:29:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8050aa445a84cdc65ae4f4a2a668b79f74fdf97d'/>
<id>urn:sha1:8050aa445a84cdc65ae4f4a2a668b79f74fdf97d</id>
<content type='text'>
commit 5c14a4d05f68415af9e41a4e667d1748d41d1baf upstream.

When we did the original tests for the optimal value of sk_pacing_shift, we
came up with 6 ms of buffering as the default. Sadly, 6 is not a power of
two, so when picking the shift value I erred on the size of less buffering
and picked 4 ms instead of 8. This was probably wrong; those 2 ms of extra
buffering makes a larger difference than I thought.

So, change the default pacing shift to 7, which corresponds to 8 ms of
buffering. The point of diminishing returns really kicks in after 8 ms, and
so having this as a default should cut down on the need for extensive
per-device testing and overrides needed in the drivers.

Cc: stable@vger.kernel.org
Signed-off-by: Toke Høiland-Jørgensen &lt;toke@redhat.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mac80211: Free mpath object when rhashtable insertion fails</title>
<updated>2019-02-27T09:09:41Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2019-02-14T14:03:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1102ace16c26ab1fccc3ba348f7685d659ddc8f7'/>
<id>urn:sha1:1102ace16c26ab1fccc3ba348f7685d659ddc8f7</id>
<content type='text'>
commit 4ff3a9d14c6c06eaa4e5976c61599ea2bd9e81b2 upstream.

When rhashtable insertion fails the mesh table code doesn't free
the now-orphan mesh path object.  This patch fixes that.

Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mac80211: Use linked list instead of rhashtable walk for mesh tables</title>
<updated>2019-02-27T09:09:41Z</updated>
<author>
<name>Herbert Xu</name>
</author>
<published>2019-02-14T14:03:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e327e1307531bb3a6a39571782cd397fe81b6873'/>
<id>urn:sha1:e327e1307531bb3a6a39571782cd397fe81b6873</id>
<content type='text'>
commit b4c3fbe6360178dc2181b7b43b7ae793a192b282 upstream.

The mesh table code walks over hash tables for two purposes.  First of
all it's used as part of a netlink dump process, but it is also used
for looking up entries to delete using criteria other than the hash
key.

The second purpose is directly contrary to the design specification
of rhashtable walks.  It is only meant for use by netlink dumps.

This is because rhashtable is resizable and you cannot obtain a
stable walk over it during a resize process.

In fact mesh's use of rhashtable for dumping is bogus too.  Rather
than using rhashtable walk's iterator to keep track of the current
position, it always converts the current position to an integer
which defeats the purpose of the iterator.

Therefore this patch converts all uses of rhashtable walk into a
simple linked list.

This patch also adds a new spin lock to protect the hash table
insertion/removal as well as the walk list modifications.  In fact
the previous code was buggy as the removals can race with each
other, potentially resulting in a double-free.

Cc: stable@vger.kernel.org
Signed-off-by: Herbert Xu &lt;herbert@gondor.apana.org.au&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mac80211: Restore vif beacon interval if start ap fails</title>
<updated>2019-02-27T09:09:41Z</updated>
<author>
<name>Rakesh Pillai</name>
</author>
<published>2019-02-15T08:46:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=9a446c0f8302f67ff610437dbcc7f42e6e6282fe'/>
<id>urn:sha1:9a446c0f8302f67ff610437dbcc7f42e6e6282fe</id>
<content type='text'>
commit 83e37e0bdd1470bbe6612250b745ad39b1a7b130 upstream.

The starting of AP interface can fail due to invalid
beacon interval, which does not match the minimum gcd
requirement set by the wifi driver. In such case, the
beacon interval of that interface gets updated with
that invalid beacon interval.

The next time that interface is brought up in AP mode,
an interface combination check is performed and the
beacon interval is taken from the previously set value.

In a case where an invalid beacon interval, i.e. a beacon
interval value which does not satisfy the minimum gcd criteria
set by the driver, is set, all the subsequent trials to
bring that interface in AP mode will fail, even if the
subsequent trials have a valid beacon interval.

To avoid this, in case of a failure in bringing up an
interface in AP mode due to interface combination error,
the interface beacon interval which is stored in bss
conf, needs to be restored with the last working value
of beacon interval.

Tested on ath10k using WCN3990.

Cc: stable@vger.kernel.org
Fixes: 0c317a02ca98 ("cfg80211: support virtual interfaces with different beacon intervals")
Signed-off-by: Rakesh Pillai &lt;pillair@codeaurora.org&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mac80211: ensure that mgmt tx skbs have tailroom for encryption</title>
<updated>2019-02-15T07:11:06Z</updated>
<author>
<name>Felix Fietkau</name>
</author>
<published>2019-01-29T10:10:57Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1866505506b5a5e3448517fc214c13c4957ce044'/>
<id>urn:sha1:1866505506b5a5e3448517fc214c13c4957ce044</id>
<content type='text'>
commit 9d0f50b80222dc273e67e4e14410fcfa4130a90c upstream.

Some drivers use IEEE80211_KEY_FLAG_SW_MGMT_TX to indicate that management
frames need to be software encrypted. Since normal data packets are still
encrypted by the hardware, crypto_tx_tailroom_needed_cnt gets decremented
after key upload to hw. This can lead to passing skbs to ccmp_encrypt_skb,
which don't have the necessary tailroom for software encryption.

Change the code to add tailroom for encrypted management packets, even if
crypto_tx_tailroom_needed_cnt is 0.

Cc: stable@vger.kernel.org
Signed-off-by: Felix Fietkau &lt;nbd@nbd.name&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>mac80211: fix radiotap vendor presence bitmap handling</title>
<updated>2019-02-12T19:02:23Z</updated>
<author>
<name>Johannes Berg</name>
</author>
<published>2018-12-15T09:03:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6098aab90073580f073aa5a9a7eb96040c4cd0ef'/>
<id>urn:sha1:6098aab90073580f073aa5a9a7eb96040c4cd0ef</id>
<content type='text'>
[ Upstream commit efc38dd7d5fa5c8cdd0c917c5d00947aa0539443 ]

Due to the alignment handling, it actually matters where in the code
we add the 4 bytes for the presence bitmap to the length; the first
field is the timestamp with 8 byte alignment so we need to add the
space for the extra vendor namespace presence bitmap *before* we do
any alignment for the fields.

Move the presence bitmap length accounting to the right place to fix
the alignment for the data properly.

Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Luca Coelho &lt;luciano.coelho@intel.com&gt;
Signed-off-by: Johannes Berg &lt;johannes.berg@intel.com&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
</entry>
</feed>
