[RFC] mac80211: fix A-MSDU outer SA/DA

2016-10-07 Thread Michael Braun
According to IEEE 802.11-2012 section 8.3.2 table 8-19, the outer SA/DA of A-MSDU frames need to be changed depending on FromDS/ToDS values. Signed-off-by: Michael Braun --- net/mac80211/tx.c | 24 +++- 1 file changed, 23 insertions(+), 1

[PATCH] mac80211: enable to inject a-msdu frames using monitor interface

2016-10-07 Thread Michael Braun
Problem: When injecting an A-MSDU using a PF_PACKET socket, the qos flag IEEE80211_QOS_CTL_A_MSDU_PRESENT is cleared. How to reproduce: Inject a frame on a mac80211 hwsim monitor interface and have tshark sniffing on this monitor interface. You'll see the packet twice: Once with correct flag and

[PATCH v5 3/4] cfg80211: configure multicast to unicast for AP interfaces

2016-10-07 Thread Michael Braun
This add a userspace toggle to configure multicast to unicast. Signed-off-by: Michael Braun --- include/net/cfg80211.h | 6 ++ include/uapi/linux/nl80211.h | 10 ++ net/wireless/nl80211.c | 36

[PATCH v5 2/4] mac80211: filter multicast data packets on AP / AP_VLAN

2016-10-07 Thread Michael Braun
This patch adds filtering for multicast data packets on AP_VLAN interfaces that have no authorized station connected and changes filtering on AP interfaces to not count stations assigned to AP_VLAN interfaces. This saves airtime and avoids waking up other stations currently authorized in this

[PATCH v5 4/4] mac80211: multicast to unicast conversion

2016-10-07 Thread Michael Braun
This patch adds support for sending multicast data packets with ARP, IPv4 and IPv6 payload (possible 802.1q tagged) as 802.11 unicast frames to all stations. IEEE 802.11 multicast has well known issues, among them: 1. packets are not acked and hence not retransmitted, resulting in decreased

[PATCH v5 1/4] mac80211: remove unnecessary num_mcast_sta user

2016-10-07 Thread Michael Braun
Checking for num_mcast_sta in __ieee80211_request_smps_ap() is unnecessary, as sta list will be empty in this case anyway, so list_for_each_entry(sta, ...) will exit immediately. Signed-off-by: Michael Braun --- net/mac80211/cfg.c | 7 --- 1 file changed, 7

[PATCH] wlcore: Allow scans when in AP mode

2016-10-07 Thread Xander Huff
From: James Minor When in AP mode, scans can be done without changing firmware to the multi-role firmware. Allow the interface to scan if forced in the scan request. Signed-off-by: James Minor Signed-off-by: Xander Huff Reviewed-by:

[PATCH 2/2] ath10k: add support for per sta tx bitrate

2016-10-07 Thread akolli
From: Anilkumar Kolli Per STA tx bitrate info is filled from peer stats. Export per sta txrate info to cfg80211/nl80211 Signed-off-by: Anilkumar Kolli --- drivers/net/wireless/ath/ath10k/debugfs_sta.c | 13 + 1 file changed, 13

[PATCH 1/2] ath10k: add per peer htt tx stats support for 10.4

2016-10-07 Thread akolli
From: Anilkumar Kolli Per peer tx stats are part of 'HTT_10_4_T2H_MSG_TYPE_PEER_STATS' event, Firmware sends one HTT event for every four PPDUs. HTT payload has success pkts/bytes, failed pkts/bytes, retry pkts/bytes and rate info per ppdu. Peer stats are enabled through

[PATCH 0/2] ath10k: add support for tx bitrate

2016-10-07 Thread akolli
From: Anilkumar Kolli This patch series adds support for tx bitrate using .sta_statistics callback. tx bitrate tested on QCA4019 using iw. Anilkumar Kolli (2): ath10k: add per peer htt tx stats support for 10.4 ath10k: add support for per sta tx bitrate

Re: bcmdhd: Strange Power Save messages

2016-10-07 Thread Gucea Doru
On Thu, Oct 6, 2016 at 10:25 AM, Arend Van Spriel wrote: > On 6-10-2016 10:07, Gucea Doru wrote: >> On Wed, Oct 5, 2016 at 11:12 AM, Arend Van Spriel >> wrote: >>> On 4-10-2016 13:39, Gucea Doru wrote: On Sat, Oct 1, 2016 at 2:52

[PATCH v4 4/4] mac80211: multicast to unicast conversion

2016-10-07 Thread Michael Braun
This patch adds support for sending multicast data packets with ARP, IPv4 and IPv6 payload (possible 802.1q tagged) as 802.11 unicast frames to all stations. IEEE 802.11 multicast has well known issues, among them: 1. packets are not acked and hence not retransmitted, resulting in decreased

[PATCH v4 3/4] cfg80211: configure multicast to unicast for AP interfaces

2016-10-07 Thread Michael Braun
This add a userspace toggle to configure multicast to unicast. Signed-off-by: Michael Braun --- include/net/cfg80211.h | 6 ++ include/uapi/linux/nl80211.h | 10 ++ net/wireless/nl80211.c | 36

[PATCH v4 2/4] mac80211: filter multicast data packets on AP / AP_VLAN

2016-10-07 Thread Michael Braun
This patch adds filtering for multicast data packets on AP_VLAN interfaces that have no authorized station connected and changes filtering on AP interfaces to not count stations assigned to AP_VLAN interfaces. This saves airtime and avoids waking up other stations currently authorized in this

[PATCH v4 1/4] mac80211: remove unnecessary num_mcast_sta user

2016-10-07 Thread Michael Braun
Checking for num_mcast_sta in __ieee80211_request_smps_ap() is unnecessary, as sta list will be empty in this case anyway, so list_for_each_entry(sta, ...) will exit immediately. Signed-off-by: Michael Braun --- net/mac80211/cfg.c | 7 --- 1 file changed, 7

Re: [v7, 1/3] Documentation: dt: net: add ath9k wireless device binding

2016-10-07 Thread Kalle Valo
Martin Blumenstingl wrote: > Add documentation how devicetree can be used to configure ath9k based > devices. > > Signed-off-by: Martin Blumenstingl Looks good to me but missing the ack from DT maintainers, will wait for

Re: [1/2] rtl8xxxu: Fix rtl8723bu driver reload issue

2016-10-07 Thread Kalle Valo
Jes Sorensen wrote: > From: Jes Sorensen > > The generic disable_rf() function clears bits 22 and 23 in > REG_RX_WAIT_CCA, however we did not re-enable them again in > rtl8723b_enable_rf() > > This resolves the problem for me with 8723bu

Re: [1/2] rtl8xxxu: Fix memory leak in handling rxdesc16 packets

2016-10-07 Thread Kalle Valo
Jes Sorensen wrote: > From: Jes Sorensen > > A device running without RX package aggregation could return more data > in the USB packet than the actual network packet. In this case we > could would clone the skb but then determine that that

[PATCH 3/3] mac80211: validate DA/SA during A-MSDU decapsulation

2016-10-07 Thread Johannes Berg
From: Johannes Berg As pointed out by Michael Braun, we don't check inner L2 addresses during A-MSDU decapsulation, leading to the possibility that, for example, a station associated to an AP sends frames as though they came from somewhere else. Fix this problem by

[PATCH 1/3] cfg80211: let ieee80211_amsdu_to_8023s() take only header-less SKB

2016-10-07 Thread Johannes Berg
From: Johannes Berg There's only a single case where has_80211_header is passed as true, which is in mac80211. Given that there's only simple code that needs to be done before calling it, export that function from cfg80211 instead and let mac80211 call it itself.

[PATCH 2/3] cfg80211: add ability to check DA/SA in A-MSDU decapsulation

2016-10-07 Thread Johannes Berg
From: Johannes Berg We should not accept arbitrary DA/SA inside A-MSDUs, it could be used to circumvent protections, like allowing a station to send frames and make them seem to come from somewhere else. Add the necessary infrastructure in cfg80211 to allow such checks,

Re: [PATCH v8] cfg80211: Provision to allow the support for different beacon intervals

2016-10-07 Thread Johannes Berg
On Fri, 2016-10-07 at 07:42 +, Kushwaha, Purushottam wrote: > > > > However, it seems pretty easy to solve by passing another bool that > > indicates "all the same"? > Yes . Thanks .  > We are planning to get the following changes in 2 commits . Let me > know your consent .  > 1. cfg80211:

RE: [PATCH v8] cfg80211: Provision to allow the support for different beacon intervals

2016-10-07 Thread Kushwaha, Purushottam
> However, it seems pretty easy to solve by passing another bool that indicates > "all the same"? Yes . Thanks . We are planning to get the following changes in 2 commits . Let me know your consent . 1. cfg80211: Provision to allow the support for different beacon intervals. ( Would like to

Re: [PATCH] wl18xx: Handle kfree() in better way when kzalloc fails

2016-10-07 Thread souptick joarder
On Fri, Oct 7, 2016 at 12:36 PM, Johannes Berg wrote: > > On Fri, 2016-10-07 at 12:19 +0530, Souptick Joarder wrote: > > This patch is added to handle kfree and return error in a better way > > What's "better" about this? > > kfree(NULL) is perfectly valid, adding

Re: [PATCH] wl18xx: Handle kfree() in better way when kzalloc fails

2016-10-07 Thread Johannes Berg
On Fri, 2016-10-07 at 12:19 +0530, Souptick Joarder wrote: > This patch is added to handle kfree and return error in a better way What's "better" about this? kfree(NULL) is perfectly valid, adding another label makes the code harder to read, > - struct wl18xx_cmd_scan_params *cmd; > +

[PATCH] wl18xx: Handle kfree() in better way when kzalloc fails

2016-10-07 Thread Souptick Joarder
This patch is added to handle kfree and return error in a better way if kzalloc fails in wl18xx_scan_send() and wl18xx_scan_sched_scan_config(). Signed-off-by: Souptick joarder --- drivers/net/wireless/ti/wl18xx/scan.c | 20 ++-- 1 file changed, 10