* Re: [1/3] rtlwifi: rtl_pci: 8822BE puts broadcast and multicast packet to HIQ
From: Kalle Valo @ 2017-12-14 12:43 UTC (permalink / raw)
To: Larry Finger
Cc: linux-wireless, Ping-Ke Shih, Larry Finger, Yan-Hsuan Chuang,
Birming Chiu, Shaofu, Steven Ting
In-Reply-To: <20171209173710.9879-2-Larry.Finger@lwfinger.net>
Larry Finger <Larry.Finger@lwfinger.net> wrote:
> From: Ping-Ke Shih <pkshih@realtek.com>
>
> Making this change to HIQ, which has high priority, improves the response
> time for transmission after TBTT or beacon.
>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
> Cc: Birming Chiu <birming@realtek.com>
> Cc: Shaofu <shaofu@realtek.com>
> Cc: Steven Ting <steventing@realtek.com>
2 patches applied to wireless-drivers-next.git, thanks.
e298be2a97fd rtlwifi: rtl_pci: 8822BE puts broadcast and multicast packet to HIQ
b7573a0a27bf rtlwifi: rtl_pci: Fix the bug when inactiveps is enabled.
--
https://patchwork.kernel.org/patch/10103759/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: brcmfmac: enlarge buffer size of caps to 512 bytes
From: Kalle Valo @ 2017-12-14 12:42 UTC (permalink / raw)
To: Wright Feng
Cc: arend.vanspriel, franky.lin, hante.meuleman, chi-hsien.lin,
wright.feng, linux-wireless, brcm80211-dev-list.pdl
In-Reply-To: <1512977901-12726-1-git-send-email-wright.feng@cypress.com>
Wright Feng <wright.feng@cypress.com> wrote:
> The buffer size of return of cap iovar is greater than 256 bytes in some
> firmwares. For instance, the return size of cap iovar is 271 bytes in 4373
> 13.10.246.79 firmare. It makes feature capability parsing failed because
> caps buffer is default value.
> So we enlarge caps buffer size to 512 bytes and add the error print for
> cap iovar error.
>
> Signed-off-by: Wright Feng <wright.feng@cypress.com>
> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Patch applied to wireless-drivers-next.git, thanks.
7762bb134e3b brcmfmac: enlarge buffer size of caps to 512 bytes
--
https://patchwork.kernel.org/patch/10104357/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [01/10] brcmfmac: Split brcmf_sdiod_buffrw function up.
From: Kalle Valo @ 2017-12-14 12:41 UTC (permalink / raw)
To: Arend Van Spriel; +Cc: linux-wireless, Ian Molton, Arend van Spriel
In-Reply-To: <1512735035-342-2-git-send-email-arend.vanspriel@broadcom.com>
Arend Van Spriel <arend.vanspriel@broadcom.com> wrote:
> From: Ian Molton <ian@mnementh.co.uk>
>
> This function needs to be split up into separate read / write variants
> for clarity.
>
> Signed-off-by: Ian Molton <ian@mnementh.co.uk>
> Reviewed-by: Arend van Spriel <arend.vanspriel@broadcom.com>
> Signed-off-by: Arend van Spriel <arend.vanspriel@broadcom.com>
10 patches applied to wireless-drivers-next.git, thanks.
8f13c87ccc49 brcmfmac: Split brcmf_sdiod_buffrw function up.
6e24dd012bfd brcmfmac: whitespace fixes in brcmf_sdiod_send_buf()
a7323378dcf1 brcmfmac: Clarify if using braces.
71bd508d7ded brcmfmac: Rename / replace old IO functions with simpler ones.
eeef8a5da781 brcmfmac: Tidy register definitions a little
a7c3aa1509e2 brcmfmac: Remove brcmf_sdiod_addrprep()
c900072bd6fa brcmfmac: remove unnecessary call to brcmf_sdiod_set_backplane_window()
e4c05fc3c0a6 brcmfmac: Cleanup offsetof()
5cfe38f1f8d3 brcmfmac: Remove unused macro.
21a10846d09d brcmfmac: Remove repeated calls to brcmf_chip_get_core()
--
https://patchwork.kernel.org/patch/10102409/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: brcmsmac: use ARRAY_SIZE on rfseq_updategainu_events
From: Kalle Valo @ 2017-12-14 12:40 UTC (permalink / raw)
To: Colin Ian King
Cc: Arend van Spriel, Franky Lin, Hante Meuleman, Chi-Hsien Lin,
Wright Feng, linux-wireless, brcm80211-dev-list.pdl,
brcm80211-dev-list, netdev, kernel-janitors, linux-kernel
In-Reply-To: <20171207102047.21635-1-colin.king@canonical.com>
Colin Ian King <colin.king@canonical.com> wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Use the ARRAY_SIZE macro on rfseq_updategainu_events to determine
> size of the array. Improvement suggested by coccinelle.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> Acked-by: Arend van Spriel <arend.vanspriel@broadcom.com>
Patch applied to wireless-drivers-next.git, thanks.
18907f20ea71 brcmsmac: use ARRAY_SIZE on rfseq_updategainu_events
--
https://patchwork.kernel.org/patch/10098257/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: brcmfmac: Support 43455 save-restore (SR) feature if FW include -sr
From: Kalle Valo @ 2017-12-14 12:39 UTC (permalink / raw)
To: Wright Feng
Cc: arend.vanspriel, franky.lin, hante.meuleman, chi-hsien.lin,
wright.feng, linux-wireless, brcm80211-dev-list.pdl, Double Lo
In-Reply-To: <1512639183-3357-1-git-send-email-wright.feng@cypress.com>
Wright Feng <wright.feng@cypress.com> wrote:
> From: Double Lo <double.lo@cypress.com>
>
> This patch will add 43455 into the save-restore(SR) capable chip list, so
> the SR engine will be enabled with 43455 FW which built-in the -sr
> function.
>
> Signed-off-by: Double Lo <double.lo@cypress.com>
Wright's s-o-b is missing:
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches#signed-off-by_missing
--
https://patchwork.kernel.org/patch/10097897/
https://wireless.wiki.kernel.org/en/developers/documentation/submittingpatches
^ permalink raw reply
* Re: [PATCH 2/3] rtlwifi: Add beacon check mechanism to check if AP settings changed.
From: Kalle Valo @ 2017-12-14 12:35 UTC (permalink / raw)
To: Larry Finger
Cc: linux-wireless, Tsang-Shian Lin, Ping-Ke Shih, Yan-Hsuan Chuang,
Birming Chiu, Shaofu, Steven Ting
In-Reply-To: <20171209173710.9879-3-Larry.Finger@lwfinger.net>
Larry Finger <Larry.Finger@lwfinger.net> writes:
> From: Tsang-Shian Lin <thlin@realtek.com>
>
> AP WiFi settings are changed(channel, bandwidth), but deauth may not
> received by STA. For these cases, we need to detect and handle beacon
> changes.
>
> Signed-off-by: Tsang-Shian Lin <thlin@realtek.com>
> Signed-off-by: Ping-Ke Shih <pkshih@realtek.com>
> Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
> Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
> Cc: Birming Chiu <birming@realtek.com>
> Cc: Shaofu <shaofu@realtek.com>
> Cc: Steven Ting <steventing@realtek.com>
[...]
> --- a/drivers/net/wireless/realtek/rtlwifi/base.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/base.c
> @@ -2360,6 +2360,185 @@ struct sk_buff *rtl_make_del_ba(struct ieee80211_hw *hw,
> return skb;
> }
>
> +bool rtl_check_beacon_key(struct ieee80211_hw *hw, void *data, unsigned int len)
> +{
> + struct rtl_priv *rtlpriv = rtl_priv(hw);
> + struct rtl_mac *mac = rtl_mac(rtl_priv(hw));
> + struct rtl_phy *rtlphy = &rtlpriv->phy;
> + struct ieee80211_hdr *hdr = data;
> + struct ieee80211_ht_cap *ht_cap_ie;
> + struct ieee80211_ht_operation *ht_oper_ie = NULL;
> + struct rtl_beacon_keys bcn_key = {0};
> + struct rtl_beacon_keys *cur_bcn_key;
> + u8 *ht_cap;
> + u8 ht_cap_len;
> + u8 *ht_oper;
> + u8 ht_oper_len;
> + u8 *ds_param;
> + u8 ds_param_len;
> +
> + if (mac->opmode != NL80211_IFTYPE_STATION)
> + return false;
> +
> + /* check if this really is a beacon*/
> + if (!ieee80211_is_beacon(hdr->frame_control))
> + return false;
> +
> + /* min. beacon length + FCS_LEN */
> + if (len <= 40 + FCS_LEN)
> + return false;
> +
> + cur_bcn_key = &mac->cur_beacon_keys;
> +
> + if (rtlpriv->mac80211.link_state == MAC80211_NOLINK) {
> + if (cur_bcn_key->valid) {
> + cur_bcn_key->valid = false;
> + RT_TRACE(rtlpriv, COMP_BEACON, DBG_LOUD,
> + "Reset cur_beacon_keys.valid to false!\n");
> + }
> + return false;
> + }
> +
> + /* and only beacons from the associated BSSID, please */
> + if (!ether_addr_equal(hdr->addr3, rtlpriv->mac80211.bssid))
> + return false;
> +
> + /***** Parsing DS Param IE ******/
> + ds_param = rtl_find_ie(data, len - FCS_LEN, WLAN_EID_DS_PARAMS);
> +
> + if (ds_param && !(ds_param[1] < sizeof(*ds_param)))
> + ds_param_len = ds_param[1];
> + else
> + ds_param = NULL;
> +
> + /***** Parsing HT Cap. IE ******/
> + ht_cap = rtl_find_ie(data, len - FCS_LEN, WLAN_EID_HT_CAPABILITY);
> +
> + if (ht_cap && !(ht_cap[1] < sizeof(*ht_cap))) {
> + ht_cap_len = ht_cap[1];
> + ht_cap_ie = (struct ieee80211_ht_cap *)&ht_cap[2];
> + } else {
> + ht_cap = NULL;
> + ht_cap_ie = NULL;
> + }
> +
> + /***** Parsing HT Info. IE ******/
> + ht_oper = rtl_find_ie(data, len - FCS_LEN, WLAN_EID_HT_OPERATION);
> +
> + if (ht_oper && !(ht_oper[1] < sizeof(*ht_oper))) {
> + ht_oper_len = ht_oper[1];
> + ht_oper_ie = (struct ieee80211_ht_operation *)&ht_oper[2];
> + } else {
> + ht_oper = NULL;
> + }
> +
> + /* update bcn_key */
> + memset(&bcn_key, 0, sizeof(bcn_key));
> +
> + if (ds_param)
> + bcn_key.bcn_channel = ds_param[2];
> + else if (ht_oper && ht_oper_ie)
> + bcn_key.bcn_channel = ht_oper_ie->primary_chan;
> +
> + if (ht_cap_ie)
> + bcn_key.ht_cap_info = ht_cap_ie->cap_info;
> +
> + if (ht_oper && ht_oper_ie)
> + bcn_key.ht_info_infos_0_sco = ht_oper_ie->ht_param & 0x03;
> +
> + bcn_key.valid = true;
> +
> + /* update cur_beacon_keys or compare beacon key */
> + if (rtlpriv->mac80211.link_state != MAC80211_LINKED &&
> + rtlpriv->mac80211.link_state != MAC80211_LINKED_SCANNING)
> + return true;
> +
> + if (!cur_bcn_key->valid) {
> + /* update cur_beacon_keys */
> + memset(cur_bcn_key, 0, sizeof(bcn_key));
> + memcpy(cur_bcn_key, &bcn_key, sizeof(bcn_key));
> + cur_bcn_key->valid = true;
> +
> + RT_TRACE(rtlpriv, COMP_BEACON, DBG_LOUD,
> + "Beacon key update!ch=%d, ht_cap_info=0x%x, sco=0x%x\n",
> + cur_bcn_key->bcn_channel,
> + cur_bcn_key->ht_cap_info,
> + cur_bcn_key->ht_info_infos_0_sco);
> +
> + return true;
> + }
> +
> + /* compare beacon key */
> + if (!memcmp(cur_bcn_key, &bcn_key, sizeof(bcn_key))) {
> + /* same beacon key */
> + mac->new_beacon_cnt = 0;
> + goto chk_exit;
> + }
> +
> + if (cur_bcn_key->bcn_channel == bcn_key.bcn_channel &&
> + cur_bcn_key->ht_cap_info == bcn_key.ht_cap_info) {
> + /* Beacon HT info IE, secondary channel offset check */
> + /* 40M -> 20M */
> + if (cur_bcn_key->ht_info_infos_0_sco >
> + bcn_key.ht_info_infos_0_sco) {
> + /* Not a new beacon */
> + RT_TRACE(rtlpriv, COMP_BEACON, DBG_DMESG,
> + "Beacon BW change! sco:0x%x -> 0x%x\n",
> + cur_bcn_key->ht_info_infos_0_sco,
> + bcn_key.ht_info_infos_0_sco);
> +
> + cur_bcn_key->ht_info_infos_0_sco =
> + bcn_key.ht_info_infos_0_sco;
> + } else {
> + /* 20M -> 40M */
> + if (rtlphy->max_ht_chan_bw >= HT_CHANNEL_WIDTH_20_40) {
> + /* Not a new beacon */
> + RT_TRACE(rtlpriv, COMP_BEACON, DBG_DMESG,
> + "Beacon BW change! sco:0x%x -> 0x%x\n",
> + cur_bcn_key->ht_info_infos_0_sco,
> + bcn_key.ht_info_infos_0_sco);
> +
> + cur_bcn_key->ht_info_infos_0_sco =
> + bcn_key.ht_info_infos_0_sco;
> + } else {
> + mac->new_beacon_cnt++;
> + }
> + }
> + } else {
> + mac->new_beacon_cnt++;
> + }
> +
> + if (mac->new_beacon_cnt == 1) {
> + RT_TRACE(rtlpriv, COMP_BEACON, DBG_DMESG,
> + "Get new beacon.\n");
> + RT_TRACE(rtlpriv, COMP_BEACON, DBG_DMESG,
> + "Cur : ch=%d, ht_cap=0x%x, sco=0x%x\n",
> + cur_bcn_key->bcn_channel,
> + cur_bcn_key->ht_cap_info,
> + cur_bcn_key->ht_info_infos_0_sco);
> + RT_TRACE(rtlpriv, COMP_BEACON, DBG_DMESG,
> + "New RX : ch=%d, ht_cap=0x%x, sco=0x%x\n",
> + bcn_key.bcn_channel,
> + bcn_key.ht_cap_info,
> + bcn_key.ht_info_infos_0_sco);
> +
> + } else if (mac->new_beacon_cnt > 1) {
> + RT_TRACE(rtlpriv, COMP_BEACON, DBG_DMESG,
> + "new beacon cnt: %d\n",
> + mac->new_beacon_cnt);
> + }
> +
> + if (mac->new_beacon_cnt > 3) {
> + ieee80211_connection_loss(rtlpriv->mac80211.vif);
> + RT_TRACE(rtlpriv, COMP_BEACON, DBG_DMESG,
> + "new beacon cnt >3, disconnect !\n");
> + }
> +
> +chk_exit:
> +
> + return true;
> +}
> +EXPORT_SYMBOL_GPL(rtl_check_beacon_key);
Why do all this in the driver? I would expect something like this to be
done in mac80211, not in the driver.
> +struct rtl_beacon_keys {
> + /*u8 ssid[32];*/
> + /*u32 ssid_len;*/
Commented out fields, please drop.
--
Kalle Valo
^ permalink raw reply
* Re: [v4 5/8] Bluetooth: btrsi: add new rsi bluetooth driver
From: Kalle Valo @ 2017-12-14 12:16 UTC (permalink / raw)
To: Marcel Holtmann
Cc: Amitkumar Karwar, linux-wireless, Amitkumar Karwar,
Prameela Rani Garnepudi, open list:BLUETOOTH DRIVERS,
Siva Rebbagondla
In-Reply-To: <92506E80-6329-4A53-BCB2-060AF1A1A396@holtmann.org>
Marcel Holtmann <marcel@holtmann.org> writes:
>> Thanks for your review.
>> We have addressed these comments and submitted v5.
>
> minor comment from my side, but otherwise looks good to me. Due to the
> dependency, I think this should go via wireless-drivers tree.
>
> Kalle, I think it is up to you to take the whole set.
Ok, thanks.. But please note that I haven't had a chance to review the
wireless part yet.
--
Kalle Valo
^ permalink raw reply
* Re: [PATCH v3 1/3] mac80211: Add TXQ scheduling API
From: Toke Høiland-Jørgensen @ 2017-12-14 12:15 UTC (permalink / raw)
To: Felix Fietkau, make-wifi-fast, linux-wireless; +Cc: Johannes Berg
In-Reply-To: <b2ed2696-db3d-4797-b5e2-161172fd2413@nbd.name>
Felix Fietkau <nbd@nbd.name> writes:
> On 2017-10-31 12:27, Toke H=C3=B8iland-J=C3=B8rgensen wrote:
>> This adds an API to mac80211 to handle scheduling of TXQs and changes the
>> interface between driver and mac80211 for TXQ handling as follows:
>>=20
>> - The wake_tx_queue callback interface no longer includes the TXQ. Inste=
ad,
>> the driver is expected to retrieve that from ieee80211_next_txq()
>>=20
>> - Two new mac80211 functions are added: ieee80211_next_txq() and
>> ieee80211_schedule_txq(). The former returns the next TXQ that should =
be
>> scheduled, and is how the driver gets a queue to pull packets from. The
>> latter is called internally by mac80211 to start scheduling a queue, a=
nd
>> the driver is supposed to call it to re-schedule the TXQ after it is
>> finished pulling packets from it (unless the queue emptied).
>>=20
>> The ath9k and ath10k drivers are changed to use the new API.
>>=20
>> Signed-off-by: Toke H=C3=B8iland-J=C3=B8rgensen <toke@toke.dk>
> Sorry that I didn't have time to give this a thorough review earlier,
> since I was pretty busy with other projects. Now that I'm working on
> porting mt76 to this new API, some things in this patch strike me as
> rather odd, and there might be some bugs and nasty limitations here:
>
> In the new API you can no longer select txq entries by hardware queue.
> When using multiple WMM queues, this could lead to station entries being
> requeued unnecessarily (because there is no room in the hw queue for the
> txq entry that ieee80211_next_txq happens to return).
Yeah, there's some tension between enforcing fairness (which is a per
station thing) and the WMM queueing stuff (which gives priority based on
WMM levels and ignores stations). There are basically two ways to
resolve this: Prioritising fairness or prioritising WMM levels. In the
former case, we first select which station to transmit to, and then
select the highest WMM priority level queued *for that station* (the
last part of this is missing from the code as it is now). In the latter
case, we keep scheduling per-WMM, then enforce fairness within that.
The former case has the potential to lead to starved hardware queues,
while the latter leads to unfairness. We had a bit of discussion of
which is better at netdev, but did not resolve it. Personally, I think
prioritising fairness is better, but I'm willing to be convinced
otherwise by data :). So my plan is to implement that fully and try it
out, then evaluate based on actual experiments...
> Since ieee80211_next_txq also refills the airtime fairness quantum, this
> might lead to some minor fairness issues.
I'm planning to change the way the scheduler works anyway, so this issue
should go away. Haven't had time to do that yet, unfortunately.
> In ath9k the code used to have a loop that goes through all pending txq
> entries until it has filled the hw queues again. You replaced that with
> some calls to ath_txq_schedule which now only considers one single txq.
> There are several reasons why this queue could potentially not be service=
d:
> - ieee80211_tx_dequeue returned no frame
> - frame does not fit within BA window
> - txq was for another queue which is already filled
> Depending on the exact circumstances with enough stations this might
> lead to hardware queues getting starved.
Well, that loop was already removed when I implemented the in-driver
fairness scheduler. We can't really avoid those cases entirely if we
want to enforce fairness (the BAW case in particular; if the only
eligible station from an airtime PoW has a full BAW, you have to
throttle and can potentially starve hwqs). However, don't think this
happens much in practice (or we would have seen performance regressions
by now).
The 'txq was for another queue' case is new with this patch, but that
goes back to the WMM/fairness tention above.
> In ath10k the issues are different. You left a loop to service queues in
> place, and if I'm reading it correctly, you could be facing an infinite
> loop here:
> Let's assume that ath10k_mac_tx_push_pending gets called and there are
> multiple txqs pending.
> The first txq has 16 frames pending, gets serviced, requeued.
> Second txq has lots of frames pending, 16 frames are pushed out, the txq
> is requeued.
> Back to the first one, ath10k_mac_tx_push_txq returns -ENOENT, so no
> requeue.
> Back to the second one, hardware queues are filled,
> ath10k_mac_tx_can_push returns false, so ret stays 0, txq gets requeued.
> By now first =3D=3D txq can never happen anymore because the first txq is
> not scheduled anymore.
> Seems like an infinite loop to me.
Hmm, you may be right here. I don't have the hardware to test this on
ath10k :/
> I think dealing with these corner cases will be easier if we support
> filtering by queue in ieee80211_next_txq, so I will send a patch for
> that.
Not necessarily opposed to a flag (or however you end up implementing
this). We may have to ignore it if we want to prioritise fairness, as
noted above. However, having the flag could potentially make this user
configurable. I guess I'll have a look at your patch :)
-Toke
^ permalink raw reply
* [PATCH 2/2] mt76: fix possible NULL pointer dereferencing in mt76x2_mac_write_txwi()
From: Lorenzo Bianconi @ 2017-12-14 12:03 UTC (permalink / raw)
To: nbd; +Cc: dan.carpenter, linux-wireless
In-Reply-To: <cover.1513252573.git.lorenzo.bianconi@redhat.com>
Verify wcid is not NULL before dereferencing the pointer to initialize
txwi rate/power info
Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
drivers/net/wireless/mediatek/mt76/mt76x2_mac.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c b/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c
index 39fc1d7b65ce..a1f695e9b51c 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_mac.c
@@ -185,7 +185,7 @@ void mt76x2_mac_write_txwi(struct mt76x2_dev *dev, struct mt76x2_txwi *txwi,
txwi->pktid = 1;
spin_lock_bh(&dev->mt76.lock);
- if (rate->idx < 0 || !rate->count) {
+ if (wcid && (rate->idx < 0 || !rate->count)) {
txwi->rate = wcid->tx_rate;
max_txpwr_adj = wcid->max_txpwr_adj;
nss = wcid->tx_rate_nss;
--
2.13.6
^ permalink raw reply related
* [PATCH 1/2] mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
From: Lorenzo Bianconi @ 2017-12-14 12:03 UTC (permalink / raw)
To: nbd; +Cc: dan.carpenter, linux-wireless
In-Reply-To: <cover.1513252573.git.lorenzo.bianconi@redhat.com>
Initialize mt76_txq pointer after ieee80211_txq pointer check.
Remove space after the pointer cast
Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c
index 2cef48edb275..33469e32567b 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_main.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_main.c
@@ -450,13 +450,15 @@ mt76x2_ampdu_action(struct ieee80211_hw *hw, struct ieee80211_vif *vif,
struct mt76x2_dev *dev = hw->priv;
struct mt76x2_sta *msta = (struct mt76x2_sta *) sta->drv_priv;
struct ieee80211_txq *txq = sta->txq[params->tid];
- struct mt76_txq *mtxq = (struct mt76_txq *) txq->drv_priv;
u16 tid = params->tid;
u16 *ssn = ¶ms->ssn;
+ struct mt76_txq *mtxq;
if (!txq)
return -EINVAL;
+ mtxq = (struct mt76_txq *)txq->drv_priv;
+
switch (action) {
case IEEE80211_AMPDU_RX_START:
mt76_set(dev, MT_WCID_ADDR(msta->wcid.idx) + 4, BIT(16 + tid));
--
2.13.6
^ permalink raw reply related
* [PATCH 0/2] Fix two possible NULL pointer dereferencing issues
From: Lorenzo Bianconi @ 2017-12-14 12:03 UTC (permalink / raw)
To: nbd; +Cc: dan.carpenter, linux-wireless
Lorenzo Bianconi (2):
mt76: fix possible NULL pointer dereferencing in mt76x2_ampdu_action()
mt76: fix possible NULL pointer dereferencing in
mt76x2_mac_write_txwi()
drivers/net/wireless/mediatek/mt76/mt76x2_mac.c | 2 +-
drivers/net/wireless/mediatek/mt76/mt76x2_main.c | 4 +++-
2 files changed, 4 insertions(+), 2 deletions(-)
--
2.13.6
^ permalink raw reply
* Re: [PATCH v3 1/3] mac80211: Add TXQ scheduling API
From: Felix Fietkau @ 2017-12-14 11:33 UTC (permalink / raw)
To: Toke Høiland-Jørgensen, make-wifi-fast, linux-wireless
Cc: Johannes Berg
In-Reply-To: <20171031112747.5778-1-toke@toke.dk>
On 2017-10-31 12:27, Toke Høiland-Jørgensen wrote:
> This adds an API to mac80211 to handle scheduling of TXQs and changes the
> interface between driver and mac80211 for TXQ handling as follows:
>
> - The wake_tx_queue callback interface no longer includes the TXQ. Instead,
> the driver is expected to retrieve that from ieee80211_next_txq()
>
> - Two new mac80211 functions are added: ieee80211_next_txq() and
> ieee80211_schedule_txq(). The former returns the next TXQ that should be
> scheduled, and is how the driver gets a queue to pull packets from. The
> latter is called internally by mac80211 to start scheduling a queue, and
> the driver is supposed to call it to re-schedule the TXQ after it is
> finished pulling packets from it (unless the queue emptied).
>
> The ath9k and ath10k drivers are changed to use the new API.
>
> Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
Sorry that I didn't have time to give this a thorough review earlier,
since I was pretty busy with other projects. Now that I'm working on
porting mt76 to this new API, some things in this patch strike me as
rather odd, and there might be some bugs and nasty limitations here:
In the new API you can no longer select txq entries by hardware queue.
When using multiple WMM queues, this could lead to station entries being
requeued unnecessarily (because there is no room in the hw queue for the
txq entry that ieee80211_next_txq happens to return).
Since ieee80211_next_txq also refills the airtime fairness quantum, this
might lead to some minor fairness issues.
In ath9k the code used to have a loop that goes through all pending txq
entries until it has filled the hw queues again. You replaced that with
some calls to ath_txq_schedule which now only considers one single txq.
There are several reasons why this queue could potentially not be serviced:
- ieee80211_tx_dequeue returned no frame
- frame does not fit within BA window
- txq was for another queue which is already filled
Depending on the exact circumstances with enough stations this might
lead to hardware queues getting starved.
In ath10k the issues are different. You left a loop to service queues in
place, and if I'm reading it correctly, you could be facing an infinite
loop here:
Let's assume that ath10k_mac_tx_push_pending gets called and there are
multiple txqs pending.
The first txq has 16 frames pending, gets serviced, requeued.
Second txq has lots of frames pending, 16 frames are pushed out, the txq
is requeued.
Back to the first one, ath10k_mac_tx_push_txq returns -ENOENT, so no
requeue.
Back to the second one, hardware queues are filled,
ath10k_mac_tx_can_push returns false, so ret stays 0, txq gets requeued.
By now first == txq can never happen anymore because the first txq is
not scheduled anymore.
Seems like an infinite loop to me.
I think dealing with these corner cases will be easier if we support
filtering by queue in ieee80211_next_txq, so I will send a patch for that.
- Felix
^ permalink raw reply
* [PATCH] mt76x2: eeprom: fix typo in mt76x2_get_power_info_5g()
From: Lorenzo Bianconi @ 2017-12-14 10:46 UTC (permalink / raw)
To: nbd; +Cc: colin.king, linux-wireless
In-Reply-To: <cover.1513248071.git.lorenzo.bianconi@redhat.com>
Fix typo in 5GHz power vs channel eeprom parsing
Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Signed-off-by: Lorenzo Bianconi <lorenzo.bianconi@redhat.com>
---
drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.c b/drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.c
index 440b7e7d73a9..29dc52ef629d 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_eeprom.c
@@ -524,7 +524,7 @@ mt76x2_get_power_info_5g(struct mt76x2_dev *dev, struct mt76x2_tx_power_info *t,
if (channel >= 192)
delta_idx = 4;
- else if (channel >= 484)
+ else if (channel >= 184)
delta_idx = 3;
else if (channel < 44)
delta_idx = 3;
--
2.13.6
^ permalink raw reply related
* Re: [PATCH] mt76: fix memcpy to potential null pointer on failed allocation
From: Felix Fietkau @ 2017-12-14 10:17 UTC (permalink / raw)
To: Colin King, Kalle Valo, Matthias Brugger, Lorenzo Bianconi,
linux-wireless, netdev, linux-arm-kernel, linux-mediatek
Cc: kernel-janitors, linux-kernel
In-Reply-To: <20171214101322.10178-1-colin.king@canonical.com>
On 2017-12-14 11:13, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> Currently if the allocation of skb fails and returns NULL then the
> call to skb_put will cause a null pointer dereference. Fix this by
> checking for a null skb and returning NULL. Note that calls to
> function mt76x2_mcu_msg_alloc don't directly check the null return
> but instead pass the NULL pointer to mt76x2_mcu_msg_send which
> checks for the NULL and returns ENOMEM in this case.
>
> Detected by CoverityScan, CID#1462624 ("Dereference null return value")
>
> Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Acked-by: Felix Fietkau <nbd@nbd.name>
^ permalink raw reply
* [PATCH] mt76: fix memcpy to potential null pointer on failed allocation
From: Colin King @ 2017-12-14 10:13 UTC (permalink / raw)
To: Kalle Valo, Matthias Brugger, Lorenzo Bianconi, Felix Fietkau,
linux-wireless, netdev, linux-arm-kernel, linux-mediatek
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
Currently if the allocation of skb fails and returns NULL then the
call to skb_put will cause a null pointer dereference. Fix this by
checking for a null skb and returning NULL. Note that calls to
function mt76x2_mcu_msg_alloc don't directly check the null return
but instead pass the NULL pointer to mt76x2_mcu_msg_send which
checks for the NULL and returns ENOMEM in this case.
Detected by CoverityScan, CID#1462624 ("Dereference null return value")
Fixes: 7bc04215a66b ("mt76: add driver code for MT76x2e")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c b/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c
index d45737ee1412..15820b11f9db 100644
--- a/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c
+++ b/drivers/net/wireless/mediatek/mt76/mt76x2_mcu.c
@@ -45,6 +45,8 @@ static struct sk_buff *mt76x2_mcu_msg_alloc(const void *data, int len)
struct sk_buff *skb;
skb = alloc_skb(len, GFP_KERNEL);
+ if (!skb)
+ return NULL;
memcpy(skb_put(skb, len), data, len);
return skb;
--
2.14.1
^ permalink raw reply related
* Re: BCM4356 does not initalize after firmware update
From: Arend van Spriel @ 2017-12-14 9:13 UTC (permalink / raw)
To: Stanislaw Gruszka; +Cc: linux-wireless
In-Reply-To: <20171213161257.GB2811@redhat.com>
On 12/13/2017 5:12 PM, Stanislaw Gruszka wrote:
> Hi
>
> After firmware update, this device:
>
> [0280]: Broadcom Limited BCM4356 802.11ac Wireless Network Adapter [14e4:43ec] (rev 02)
>
> no longer initialize. With the firmware update I have:
>
> [ 272.063814] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac4356-pcie.bin for chip 0x004356(17238) rev 0x000002
> [ 272.529582] brcmfmac 0000:03:00.0: irq 31 for MSI/MSI-X
> [ 274.529476] brcmfmac: brcmf_msgbuf_query_dcmd: Timeout on response for query command
> [ 274.537356] brcmfmac: brcmf_c_preinit_dcmds: Retreiving cur_etheraddr failed, -5
> [ 274.544881] brcmfmac: brcmf_bus_started: failed: -5
> [ 274.549854] brcmfmac: brcmf_pcie_attach_bus: dongle is not responding
>
> and no wlan device is created. With older version of the firmware I have:
>
> [ 10.716878] brcmfmac: brcmf_fw_map_chip_to_name: using brcm/brcmfmac4356-pcie.bin for chip 0x004356(17238) rev 0x000002
> [ 11.312875] brcmfmac 0000:03:00.0: irq 31 for MSI/MSI-X
> [ 11.314735] brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: Oct 22 2015 06:16:41 version 7.35.180.119 (r594535) FWID 01-1a5c4016
> [ 16.598211] brcmfmac: brcmf_p2p_create_p2pdev: set p2p_disc error
> [ 16.604416] brcmfmac: brcmf_cfg80211_add_iface: add iface p2p-dev-wlp3s0 type 10 failed: err=-16
>
> and despite P2P errors, device works correctly.
The cur_etheraddr is the first piece of info we try to get from the
firmware. Could you build the driver with CONFIG_BRCMDBG and load the
module with 'debug=0x181416'.
Regards,
Arend
^ permalink raw reply
* [bug report] mt76: add driver code for MT76x2e
From: Dan Carpenter @ 2017-12-14 8:02 UTC (permalink / raw)
To: nbd; +Cc: linux-wireless
Hello Felix Fietkau,
This is a semi-automatic email about new static checker warnings.
The patch 7bc04215a66b: "mt76: add driver code for MT76x2e" from Nov
21, 2017, leads to the following Smatch complaint:
drivers/net/wireless/mediatek/mt76/mt76x2_main.c:457 mt76x2_ampdu_action()
warn: variable dereferenced before check 'txq' (see line 453)
drivers/net/wireless/mediatek/mt76/mt76x2_main.c
452 struct ieee80211_txq *txq = sta->txq[params->tid];
453 struct mt76_txq *mtxq = (struct mt76_txq *) txq->drv_priv;
^^^^^^^^^^^^^
Unchecked dereference. Also the cast is has a checkpatch a space issue.
No space after the cast, because casting is a high precedence operation.
454 u16 tid = params->tid;
455 u16 *ssn = ¶ms->ssn;
456
457 if (!txq)
^^^
Check is too late.
458 return -EINVAL;
459
regards,
dan carpenter
^ permalink raw reply
* [bug report] mt76: add driver code for MT76x2e
From: Dan Carpenter @ 2017-12-14 8:02 UTC (permalink / raw)
To: nbd; +Cc: linux-wireless
Hello Felix Fietkau,
This is a semi-automatic email about new static checker warnings.
The patch 7bc04215a66b: "mt76: add driver code for MT76x2e" from Nov
21, 2017, leads to the following Smatch complaint:
drivers/net/wireless/mediatek/mt76/mt76x2_mac.c:189 mt76x2_mac_write_txwi()
error: we previously assumed 'wcid' could be null (see line 180)
drivers/net/wireless/mediatek/mt76/mt76x2_mac.c
179
180 if (wcid)
^^^^
Check for NULL
181 txwi->wcid = wcid->idx;
182 else
183 txwi->wcid = 0xff;
184
185 txwi->pktid = 1;
186
187 spin_lock_bh(&dev->mt76.lock);
188 if (rate->idx < 0 || !rate->count) {
189 txwi->rate = wcid->tx_rate;
^^^^^^^^^^^^^
Unchecked dereference
190 max_txpwr_adj = wcid->max_txpwr_adj;
191 nss = wcid->tx_rate_nss;
regards,
dan carpenter
^ permalink raw reply
* RE: regulatory.db file for ath10k
From: Manikanta Pubbisetty @ 2017-12-14 7:11 UTC (permalink / raw)
To: KAVITA MATHUR, ath10k@lists.infradead.org; +Cc: linux-wireless@vger.kernel.org
In-Reply-To: <20171213081213.M75864@cdot.in>
VGhlcmUgaXMgbm8gc3BlY2lhbCBjb25maWcsIGJ1dCBhbnl3YXkgaGVyZSBpcyB0aGUgY29uZmln
KG9ubHkgd2lyZ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pJfgpLLgpYLgpLDgpYEgICAgICAgICAgICAgICBIb3N1ciBS
b2FkLCBCZW5nYWx1cnUg4oCTIDU2MDEwMA0KPuCkq+Cli+CkqCAgUGggMDgwLTI4NTI5ODk2DQo+
RGlzY2xhaW1lcjoNCj4tLS0tLS0tLS0tDQo+VGhpcyBlbWFpbCBhbmQgYW55IGZpbGVzIHRyYW5z
bWl0dGVkIHdpdGggaXQNCj4NCj4NCj5fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f
X19fX19fX19fX19fXw0KPmF0aDEwayBtYWlsaW5nIGxpc3QNCj5hdGgxMGtAbGlzdHMuaW5mcmFk
ZWFkLm9yZw0KPmh0dHA6Ly9saXN0cy5pbmZyYWRlYWQub3JnL21haWxtYW4vbGlzdGluZm8vYXRo
MTBrDQo=
^ permalink raw reply
* RE: rt2800usb firmware rt2870.bin 0.36 not scanning
From: Craig McQueen @ 2017-12-13 23:24 UTC (permalink / raw)
To: Craig McQueen, linux-wireless
In-Reply-To: <5500469A22567C4BAF673A6E86AFA3A4022D2BB5ED6C@IR-CENTRAL.corp.innerrange.com>
SSB3cm90ZToNCj4gSSB3cm90ZToNCj4gPiBJIHdyb3RlOg0KPiA+ID4gSSB3cm90ZToNCj4gPiA+
ID4gWG9zZSBWYXpxdWV6IFBlcmV6IHdyb3RlOg0KPiA+ID4gPiA+IENyYWlnIE1jUXVlZW4gd3Jv
dGU6DQo+ID4gPiA+ID4NCj4gPiA+ID4gPiA+IEkgaGF2ZSBhIEQtTGluayBEV0EtMTQwIFVTQiBX
aS1GaSBkZXZpY2Ugd2hpY2ggaXMgcnQyODAwIGJhc2VkDQo+ID4gPiA+ID4gPiAoNTM5MiBjaGlw
c2V0KS4gSSdtIHRyeWluZyB0byB1c2UgaXQgb24gYSBCZWFnbGVCb25lIEJsYWNrDQo+ID4gPiA+
ID4gPiBiYXNlZCBzeXN0ZW0gd2l0aCAzLjE0Lngga2VybmVsIGJ1aWx0IHdpdGggWW9jdG8uIFdl
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gYW5kIGluaXRpYWxpc2F0aW9uLiBCdXQgYWRk
aW5nIGEgdGltZSBkZWxheSBiZXR3ZWVuIHRoZSBjYWxscyB0byBydDJ4MDBsaWJfbG9hZF9maXJt
d2FyZSgpIGFuZCBydDJ4MDBsaWJfaW5pdGlhbGl6ZSgpIGRpZG4ndCBoZWxwLiBBZGRpbmcgdGlt
ZSBkZWxheXMgYXQgbWFueSBwb3NzaWJsZSBwb2ludHMgaW4gdGhlIGluaXRpYWxpc2F0aW9uIGRp
ZG4ndCBzZWVtIHRvIGhlbHAuIEkgdGhvdWdodCB0aGVyZSBtdXN0IGJlIGEgcmFjZSBjb25kaXRp
b24gaW4gYSB2ZXJ5IHNwZWNpZmljIGxvY2F0aW9uIGluIHRoZSBpbml0aWFsaXNhdGlvbiBzZXF1
ZW5jZSwgYnV0IGNvdWxkIG5vdCBjb25maXJtIHRoYXQgaHlwb3RoZXNpcy4gU28gbm93IEkndmUg
ZHJhd24gYSBibGFuay4NCg0KQW55IGFkdmljZSBvbiBob3cgdG8gZGlhZ25vc2UgYW5kIHJlbWVk
eSB0aGlzIGlzc3VlPw0KDQotLSANCkNyYWlnIE1jUXVlZW4NCg0K
^ permalink raw reply
* Re: [PATCH] nl80211: Introduce scan flags to emphasize requested scan behavior
From: Dan Williams @ 2017-12-13 19:09 UTC (permalink / raw)
To: Jouni Malinen, Johannes Berg; +Cc: linux-wireless, Sunil Dutt
In-Reply-To: <1513187523-24054-1-git-send-email-jouni@qca.qualcomm.com>
On Wed, 2017-12-13 at 19:52 +0200, Jouni Malinen wrote:
> From: Sunil Dutt <usdutt@qti.qualcomm.com>
>
> This commit defines new scan flags (LOW_SPAN, LOW_POWER,
> HIGH_LATENCY)
> to emphasize the requested scan behavior for the driver. These flags
> are
> optional and are mutually exclusive. Driver shall resort to default
> behavior if a respective flag is not supported. The implementation of
> the respective functionality can be driver/hardware specific.
Can't we have some kind of capability indication that the driver
supports each of these flags or not? Otherwise we get into a situation
where you just have to try the flag and hope it works, since it doesn't
look like drivers are required to error out if they don't support the
flag.
Dan
> These flags can be used to control the compromise between how long a
> scan takes, how much power it uses, and high accurate/complete the
> scan
> is in finding the BSSs.
>
> Signed-off-by: Sunil Dutt <usdutt@qti.qualcomm.com>
> Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
> ---
> include/uapi/linux/nl80211.h | 23 ++++++++++++++++++++++-
> 1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/include/uapi/linux/nl80211.h
> b/include/uapi/linux/nl80211.h
> index 6dd6939..68fdb95 100644
> --- a/include/uapi/linux/nl80211.h
> +++ b/include/uapi/linux/nl80211.h
> @@ -5059,6 +5059,11 @@ enum nl80211_timeout_reason {
> * of NL80211_CMD_TRIGGER_SCAN and NL80211_CMD_START_SCHED_SCAN
> * requests.
> *
> + * NL80211_SCAN_FLAG_LOW_SPAN, NL80211_SCAN_FLAG_LOW_POWER, and
> + * NL80211_SCAN_FLAG_HIGH_ACCURACY flags are exclusive of each
> other, i.e., only
> + * one of them can be used in the request. If the driver does not
> support the
> + * requested behavior, default scan behavior will be used instead.
> + *
> * @NL80211_SCAN_FLAG_LOW_PRIORITY: scan request has low priority
> * @NL80211_SCAN_FLAG_FLUSH: flush cache before scanning
> * @NL80211_SCAN_FLAG_AP: force a scan even if the interface is
> configured
> @@ -5086,7 +5091,20 @@ enum nl80211_timeout_reason {
> * and suppression (if it has received a broadcast Probe
> Response frame,
> * Beacon frame or FILS Discovery frame from an AP that the
> STA considers
> * a suitable candidate for (re-)association - suitable in
> terms of
> - * SSID and/or RSSI
> + * SSID and/or RSSI.
> + * @NL80211_SCAN_FLAG_LOW_SPAN: Span corresponds to the total time
> taken to
> + * accomplish the scan. Thus, this flag intends the driver to
> perform the
> + * scan request with lesser span/duration. It is specific to
> the driver
> + * implementations on how this is accomplished. Scan accuracy
> may get
> + * impacted with this flag. This flag cannot be used with
> + * @NL80211_SCAN_FLAG_LOW_POWER: This flag intends the scan attempts
> to consume
> + * optimal possible power. Drivers can resort to their
> specific means to
> + * optimize the power. Scan accuracy may get impacted with
> this flag.
> + * @NL80211_SCAN_FLAG_HIGH_ACCURACY: Accuracy here intends to the
> extent of scan
> + * results obtained. Thus HIGH_ACCURACY scan flag aims to get
> maximum
> + * possible scan results. This flag hints the driver to use
> the best
> + * possible scan configuration to improve the accuracy in
> scanning.
> + * Latency and power use may get impacted with this flag.
> */
> enum nl80211_scan_flags {
> NL80211_SCAN_FLAG_LOW_PRIORITY
> = 1<<0,
> @@ -5097,6 +5115,9 @@ enum nl80211_scan_flags {
> NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP =
> 1<<5,
> NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE
> = 1<<6,
> NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION
> = 1<<7,
> + NL80211_SCAN_FLAG_LOW_SPAN =
> 1<<8,
> + NL80211_SCAN_FLAG_LOW_POWER =
> 1<<9,
> + NL80211_SCAN_FLAG_HIGH_ACCURACY
> = 1<<10,
> };
>
> /**
^ permalink raw reply
* [PATCH] nl80211: Introduce scan flags to emphasize requested scan behavior
From: Jouni Malinen @ 2017-12-13 17:52 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Sunil Dutt, Jouni Malinen
From: Sunil Dutt <usdutt@qti.qualcomm.com>
This commit defines new scan flags (LOW_SPAN, LOW_POWER, HIGH_LATENCY)
to emphasize the requested scan behavior for the driver. These flags are
optional and are mutually exclusive. Driver shall resort to default
behavior if a respective flag is not supported. The implementation of
the respective functionality can be driver/hardware specific.
These flags can be used to control the compromise between how long a
scan takes, how much power it uses, and high accurate/complete the scan
is in finding the BSSs.
Signed-off-by: Sunil Dutt <usdutt@qti.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
---
include/uapi/linux/nl80211.h | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index 6dd6939..68fdb95 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -5059,6 +5059,11 @@ enum nl80211_timeout_reason {
* of NL80211_CMD_TRIGGER_SCAN and NL80211_CMD_START_SCHED_SCAN
* requests.
*
+ * NL80211_SCAN_FLAG_LOW_SPAN, NL80211_SCAN_FLAG_LOW_POWER, and
+ * NL80211_SCAN_FLAG_HIGH_ACCURACY flags are exclusive of each other, i.e., only
+ * one of them can be used in the request. If the driver does not support the
+ * requested behavior, default scan behavior will be used instead.
+ *
* @NL80211_SCAN_FLAG_LOW_PRIORITY: scan request has low priority
* @NL80211_SCAN_FLAG_FLUSH: flush cache before scanning
* @NL80211_SCAN_FLAG_AP: force a scan even if the interface is configured
@@ -5086,7 +5091,20 @@ enum nl80211_timeout_reason {
* and suppression (if it has received a broadcast Probe Response frame,
* Beacon frame or FILS Discovery frame from an AP that the STA considers
* a suitable candidate for (re-)association - suitable in terms of
- * SSID and/or RSSI
+ * SSID and/or RSSI.
+ * @NL80211_SCAN_FLAG_LOW_SPAN: Span corresponds to the total time taken to
+ * accomplish the scan. Thus, this flag intends the driver to perform the
+ * scan request with lesser span/duration. It is specific to the driver
+ * implementations on how this is accomplished. Scan accuracy may get
+ * impacted with this flag. This flag cannot be used with
+ * @NL80211_SCAN_FLAG_LOW_POWER: This flag intends the scan attempts to consume
+ * optimal possible power. Drivers can resort to their specific means to
+ * optimize the power. Scan accuracy may get impacted with this flag.
+ * @NL80211_SCAN_FLAG_HIGH_ACCURACY: Accuracy here intends to the extent of scan
+ * results obtained. Thus HIGH_ACCURACY scan flag aims to get maximum
+ * possible scan results. This flag hints the driver to use the best
+ * possible scan configuration to improve the accuracy in scanning.
+ * Latency and power use may get impacted with this flag.
*/
enum nl80211_scan_flags {
NL80211_SCAN_FLAG_LOW_PRIORITY = 1<<0,
@@ -5097,6 +5115,9 @@ enum nl80211_scan_flags {
NL80211_SCAN_FLAG_ACCEPT_BCAST_PROBE_RESP = 1<<5,
NL80211_SCAN_FLAG_OCE_PROBE_REQ_HIGH_TX_RATE = 1<<6,
NL80211_SCAN_FLAG_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION = 1<<7,
+ NL80211_SCAN_FLAG_LOW_SPAN = 1<<8,
+ NL80211_SCAN_FLAG_LOW_POWER = 1<<9,
+ NL80211_SCAN_FLAG_HIGH_ACCURACY = 1<<10,
};
/**
--
2.7.4
^ permalink raw reply related
* [PATCH] cfg80211: Scan results to also report the per chain signal strength
From: Jouni Malinen @ 2017-12-13 17:51 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Sunil Dutt, Jouni Malinen
From: Sunil Dutt <usdutt@qti.qualcomm.com>
This commit enhances the scan results to report the per chain signal
strength based on the latest BSS update. This provides similar
information to what is already available through STA information.
Signed-off-by: Sunil Dutt <usdutt@qti.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
---
include/net/cfg80211.h | 8 ++++++++
include/uapi/linux/nl80211.h | 3 +++
net/wireless/nl80211.c | 5 +++++
net/wireless/scan.c | 5 +++++
4 files changed, 21 insertions(+)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index fa1f575..c2b26a5 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -1773,6 +1773,8 @@ enum cfg80211_signal_type {
* by %parent_bssid.
* @parent_bssid: the BSS according to which %parent_tsf is set. This is set to
* the BSS that requested the scan in which the beacon/probe was received.
+ * @chains: bitmask for filled values in @chain_signal.
+ * @chain_signal: per-chain signal strength of last received BSS in dBm.
*/
struct cfg80211_inform_bss {
struct ieee80211_channel *chan;
@@ -1781,6 +1783,8 @@ struct cfg80211_inform_bss {
u64 boottime_ns;
u64 parent_tsf;
u8 parent_bssid[ETH_ALEN] __aligned(2);
+ u8 chains;
+ s8 chain_signal[IEEE80211_MAX_CHAINS];
};
/**
@@ -1824,6 +1828,8 @@ struct cfg80211_bss_ies {
* that holds the beacon data. @beacon_ies is still valid, of course, and
* points to the same data as hidden_beacon_bss->beacon_ies in that case.
* @signal: signal strength value (type depends on the wiphy's signal_type)
+ * @chains: bitmask for filled values in @chain_signal.
+ * @chain_signal: per-chain signal strength of last received BSS in dBm.
* @priv: private area for driver use, has at least wiphy->bss_priv_size bytes
*/
struct cfg80211_bss {
@@ -1842,6 +1848,8 @@ struct cfg80211_bss {
u16 capability;
u8 bssid[ETH_ALEN];
+ u8 chains;
+ s8 chain_signal[IEEE80211_MAX_CHAINS];
u8 priv[0] __aligned(sizeof(void *));
};
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index e86edf0..6dd6939 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -3888,6 +3888,8 @@ enum nl80211_bss_scan_width {
* @NL80211_BSS_PARENT_BSSID. (u64).
* @NL80211_BSS_PARENT_BSSID: the BSS according to which @NL80211_BSS_PARENT_TSF
* is set.
+ * @NL80211_BSS_CHAIN_SIGNAL: per-chain signal strength of last BSS update.
+ * Contains a nested array of signal strength attributes (u8, dBm).
* @__NL80211_BSS_AFTER_LAST: internal
* @NL80211_BSS_MAX: highest BSS attribute
*/
@@ -3911,6 +3913,7 @@ enum nl80211_bss {
NL80211_BSS_PAD,
NL80211_BSS_PARENT_TSF,
NL80211_BSS_PARENT_BSSID,
+ NL80211_BSS_CHAIN_SIGNAL,
/* keep last */
__NL80211_BSS_AFTER_LAST,
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index e920c3a..d9953bd 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -7840,6 +7840,11 @@ static int nl80211_send_bss(struct sk_buff *msg, struct netlink_callback *cb,
intbss->ts_boottime, NL80211_BSS_PAD))
goto nla_put_failure;
+ if (!nl80211_put_signal(msg, intbss->pub.chains,
+ intbss->pub.chain_signal,
+ NL80211_BSS_CHAIN_SIGNAL))
+ goto nla_put_failure;
+
switch (rdev->wiphy.signal_type) {
case CFG80211_SIGNAL_TYPE_MBM:
if (nla_put_u32(msg, NL80211_BSS_SIGNAL_MBM, res->signal))
diff --git a/net/wireless/scan.c b/net/wireless/scan.c
index f6c5fe48..d36c3eb 100644
--- a/net/wireless/scan.c
+++ b/net/wireless/scan.c
@@ -981,6 +981,9 @@ cfg80211_bss_update(struct cfg80211_registered_device *rdev,
found->ts = tmp->ts;
found->ts_boottime = tmp->ts_boottime;
found->parent_tsf = tmp->parent_tsf;
+ found->pub.chains = tmp->pub.chains;
+ memcpy(found->pub.chain_signal, tmp->pub.chain_signal,
+ IEEE80211_MAX_CHAINS);
ether_addr_copy(found->parent_bssid, tmp->parent_bssid);
} else {
struct cfg80211_internal_bss *new;
@@ -1233,6 +1236,8 @@ cfg80211_inform_bss_frame_data(struct wiphy *wiphy,
tmp.pub.capability = le16_to_cpu(mgmt->u.probe_resp.capab_info);
tmp.ts_boottime = data->boottime_ns;
tmp.parent_tsf = data->parent_tsf;
+ tmp.pub.chains = data->chains;
+ memcpy(tmp.pub.chain_signal, data->chain_signal, IEEE80211_MAX_CHAINS);
ether_addr_copy(tmp.parent_bssid, data->parent_bssid);
signal_valid = abs(data->chan->center_freq - channel->center_freq) <=
--
2.7.4
^ permalink raw reply related
* [PATCH 2/2] nl80211: Allow SAE Authentication for NL80211_CMD_CONNECT
From: Jouni Malinen @ 2017-12-13 17:50 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Srinivas Dasari, Jouni Malinen
In-Reply-To: <1513187438-23967-1-git-send-email-jouni@qca.qualcomm.com>
From: Srinivas Dasari <dasaris@qti.qualcomm.com>
This commit allows SAE Authentication for NL80211_CMD_CONNECT
interface, provided this is supported by the host driver.
Signed-off-by: Srinivas Dasari <dasaris@qti.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
---
net/wireless/nl80211.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index 72ec615..e920c3a 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -3916,7 +3916,8 @@ static bool nl80211_valid_auth_type(struct cfg80211_registered_device *rdev,
return true;
case NL80211_CMD_CONNECT:
/* SAE not supported yet */
- if (auth_type == NL80211_AUTHTYPE_SAE)
+ if (!(rdev->wiphy.features & NL80211_FEATURE_SAE) &&
+ auth_type == NL80211_AUTHTYPE_SAE)
return false;
/* FILS with SK PFS or PK not supported yet */
if (auth_type == NL80211_AUTHTYPE_FILS_SK_PFS ||
--
2.7.4
^ permalink raw reply related
* [PATCH 1/2] cfg80211/nl80211: Optional authentication offload to userspace
From: Jouni Malinen @ 2017-12-13 17:50 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless, Srinivas Dasari, Jouni Malinen
From: Srinivas Dasari <dasaris@qti.qualcomm.com>
This interface allows the host driver to offload the authentication to
user space. This is exclusively defined for host drivers that do not
define separate commands for authentication and association, but rely on
userspace SME (e.g., in wpa_supplicant for the ~WPA_DRIVER_FLAGS_SME
case) for the authentication to happen. This can be used to implement
SAE without full implementation in the kernel/firmware while still being
able to use NL80211_CMD_CONNECT with driver-based BSS selection.
The host driver sends the NL80211_CMD_EXTERNAL_AUTH event to start/abort
the authentication to userspace and status of authentication is further
indicated by user space to host driver through the same command
interface. Such drivers advertise the capability through
NL80211_EXT_FEATURE_EXTERNAL_AUTH.
Signed-off-by: Srinivas Dasari <dasaris@qti.qualcomm.com>
Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
---
include/net/cfg80211.h | 40 ++++++++++++++++++++
include/uapi/linux/nl80211.h | 39 ++++++++++++++++++++
net/wireless/nl80211.c | 87 ++++++++++++++++++++++++++++++++++++++++++++
net/wireless/rdev-ops.h | 15 ++++++++
net/wireless/trace.h | 25 +++++++++++++
5 files changed, 206 insertions(+)
diff --git a/include/net/cfg80211.h b/include/net/cfg80211.h
index d7f8e7b..fa1f575 100644
--- a/include/net/cfg80211.h
+++ b/include/net/cfg80211.h
@@ -2591,6 +2591,30 @@ struct cfg80211_pmk_conf {
};
/**
+ * struct cfg80211_external_auth_params - External authentication
+ * trigger parameters. Commonly used across the external auth request and
+ * event interfaces.
+ * @action: action type / trigger for external authentication. Only significant
+ * for the event interface (from driver to user space).
+ * @bssid: BSSID of the peer with which the authentication has
+ * to happen. Used by both the request and event interface.
+ * @ssid: SSID of the AP. Used by both the request and event interface.
+ * @key_mgmt_suite: AKM suite of the respective authentication. Optional for
+ * the request interface.
+ * @status: status code, %WLAN_STATUS_SUCCESS for successful authentication,
+ * use %WLAN_STATUS_UNSPECIFIED_FAILURE if user space cannot give you
+ * the real status code for failures. Used only for the request
+ * interface from user space to the driver.
+ */
+struct cfg80211_external_auth_params {
+ enum nl80211_external_auth_action action;
+ u8 bssid[ETH_ALEN] __aligned(2);
+ struct cfg80211_ssid ssid;
+ unsigned int key_mgmt_suite;
+ u16 status;
+};
+
+/**
* struct cfg80211_ops - backend description for wireless configuration
*
* This struct is registered by fullmac card drivers and/or wireless stacks
@@ -2913,6 +2937,9 @@ struct cfg80211_pmk_conf {
* (invoked with the wireless_dev mutex held)
* @del_pmk: delete the previously configured PMK for the given authenticator.
* (invoked with the wireless_dev mutex held)
+ *
+ * @external_auth: indicates result of offloaded authentication processing from
+ * user space
*/
struct cfg80211_ops {
int (*suspend)(struct wiphy *wiphy, struct cfg80211_wowlan *wow);
@@ -3206,6 +3233,8 @@ struct cfg80211_ops {
const struct cfg80211_pmk_conf *conf);
int (*del_pmk)(struct wiphy *wiphy, struct net_device *dev,
const u8 *aa);
+ int (*external_auth)(struct wiphy *wiphy, struct net_device *dev,
+ struct cfg80211_external_auth_params *params);
};
/*
@@ -6193,6 +6222,17 @@ void cfg80211_nan_func_terminated(struct wireless_dev *wdev,
/* ethtool helper */
void cfg80211_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info);
+/**
+ * cfg80211_external_auth_request - userspace request for authentication
+ * @netdev: network device
+ * @params: External authentication parameters
+ * @gfp: allocation flags
+ * Returns: 0 on success, < 0 on error
+ */
+int cfg80211_external_auth_request(struct net_device *netdev,
+ struct cfg80211_external_auth_params *params,
+ gfp_t gfp);
+
/* Logging, debugging and troubleshooting/diagnostic helpers. */
/* wiphy_printk helpers, similar to dev_printk */
diff --git a/include/uapi/linux/nl80211.h b/include/uapi/linux/nl80211.h
index f882fe1..e86edf0 100644
--- a/include/uapi/linux/nl80211.h
+++ b/include/uapi/linux/nl80211.h
@@ -992,6 +992,23 @@
*
* @NL80211_CMD_RELOAD_REGDB: Request that the regdb firmware file is reloaded.
*
+ * @NL80211_CMD_EXTERNAL_AUTH: This command/event interface is exclusively
+ * defined for host drivers that do not define separate commands for
+ * authentication and association, bute rely on user space SME (e.g., in
+ * wpa_supplicant for the ~WPA_DRIVER_FLAGS_SME case) for the
+ * authentication to happen.
+ *
+ * User space uses the %NL80211_CMD_CONNECT command to the host driver for
+ * triggering a connection. The host driver selects a BSS and further uses
+ * this interface to offload only the authentication part to the user
+ * space. Authentication frames are passed between the driver and user
+ * space through the %NL80211_CMD_FRAME interface. The status of
+ * authentication is further indicated by user space to the host driver
+ * with the %NL80211_CMD_EXTERNAL_AUTH command through
+ * %NL80211_ATTR_STATUS_CODE attribute. This enables the driver to proceed
+ * with association on successful authentication. Driver shall use this
+ * %NL80211_ATTR_STATUS_CODE attribute to report the connect result to
+ * user space on an authentication failure.
* @NL80211_CMD_MAX: highest used command number
* @__NL80211_CMD_AFTER_LAST: internal use
*/
@@ -1198,6 +1215,8 @@ enum nl80211_commands {
NL80211_CMD_RELOAD_REGDB,
+ NL80211_CMD_EXTERNAL_AUTH,
+
/* add new commands above here */
/* used to define NL80211_CMD_MAX below */
@@ -2153,6 +2172,11 @@ enum nl80211_commands {
* @NL80211_ATTR_PMKR0_NAME: PMK-R0 Name for offloaded FT.
* @NL80211_ATTR_PORT_AUTHORIZED: (reserved)
*
+ * @NL80211_ATTR_EXTERNAL_AUTH_ACTION: Identify the requested external
+ * authentication operation (u32 attribute with an
+ * &enum nl80211_external_auth_action value). This is used with the
+ * &NL80211_CMD_EXTERNAL_AUTH event.
+ *
* @NUM_NL80211_ATTR: total number of nl80211_attrs available
* @NL80211_ATTR_MAX: highest attribute number currently defined
* @__NL80211_ATTR_AFTER_LAST: internal use
@@ -2579,6 +2603,8 @@ enum nl80211_attrs {
NL80211_ATTR_PMKR0_NAME,
NL80211_ATTR_PORT_AUTHORIZED,
+ NL80211_ATTR_EXTERNAL_AUTH_ACTION,
+
/* add attributes here, update the policy in nl80211.c */
__NL80211_ATTR_AFTER_LAST,
@@ -4941,6 +4967,7 @@ enum nl80211_feature_flags {
* probe request tx deferral and suppression
* @NL80211_EXT_FEATURE_MFP_OPTIONAL: Driver supports the %NL80211_MFP_OPTIONAL
* value in %NL80211_ATTR_USE_MFP.
+ * @NL80211_EXT_FEATURE_EXTERNAL_AUTH: Driver supports external authentication
*
* @NUM_NL80211_EXT_FEATURES: number of extended features.
* @MAX_NL80211_EXT_FEATURES: highest extended feature index.
@@ -4968,6 +4995,7 @@ enum nl80211_ext_feature_index {
NL80211_EXT_FEATURE_OCE_PROBE_REQ_HIGH_TX_RATE,
NL80211_EXT_FEATURE_OCE_PROBE_REQ_DEFERRAL_SUPPRESSION,
NL80211_EXT_FEATURE_MFP_OPTIONAL,
+ NL80211_EXT_FEATURE_EXTERNAL_AUTH,
/* add new features before the definition below */
NUM_NL80211_EXT_FEATURES,
@@ -5465,4 +5493,15 @@ enum nl80211_nan_match_attributes {
NL80211_NAN_MATCH_ATTR_MAX = NUM_NL80211_NAN_MATCH_ATTR - 1
};
+/**
+ * nl80211_external_auth_action - Action to perform with external
+ * authentication. Used by NL80211_ATTR_EXTERNAL_AUTH_ACTION.
+ * @NL80211_EXTERNAL_AUTH_START: Start the authentication.
+ * @NL80211_EXTERNAL_AUTH_ABORT: Abort the ongoing authentication.
+ */
+enum nl80211_external_auth_action {
+ NL80211_EXTERNAL_AUTH_START,
+ NL80211_EXTERNAL_AUTH_ABORT,
+};
+
#endif /* __LINUX_NL80211_H */
diff --git a/net/wireless/nl80211.c b/net/wireless/nl80211.c
index e4522ad..72ec615 100644
--- a/net/wireless/nl80211.c
+++ b/net/wireless/nl80211.c
@@ -12449,6 +12449,43 @@ static int nl80211_del_pmk(struct sk_buff *skb, struct genl_info *info)
return ret;
}
+static int nl80211_external_auth(struct sk_buff *skb, struct genl_info *info)
+{
+ struct cfg80211_registered_device *rdev = info->user_ptr[0];
+ struct net_device *dev = info->user_ptr[1];
+ struct cfg80211_external_auth_params params;
+
+ if (!wiphy_ext_feature_isset(&rdev->wiphy,
+ NL80211_EXT_FEATURE_EXTERNAL_AUTH) ||
+ !rdev->ops->external_auth)
+ return -EOPNOTSUPP;
+
+ if (!info->attrs[NL80211_ATTR_SSID])
+ return -EINVAL;
+
+ if (!info->attrs[NL80211_ATTR_BSSID])
+ return -EINVAL;
+
+ if (!info->attrs[NL80211_ATTR_STATUS_CODE])
+ return -EINVAL;
+
+ memset(¶ms, 0, sizeof(params));
+
+ params.ssid.ssid_len = nla_len(info->attrs[NL80211_ATTR_SSID]);
+ if (params.ssid.ssid_len == 0 ||
+ params.ssid.ssid_len > IEEE80211_MAX_SSID_LEN)
+ return -EINVAL;
+ memcpy(params.ssid.ssid, nla_data(info->attrs[NL80211_ATTR_SSID]),
+ params.ssid.ssid_len);
+
+ memcpy(params.bssid, nla_data(info->attrs[NL80211_ATTR_BSSID]),
+ ETH_ALEN);
+
+ params.status = nla_get_u16(info->attrs[NL80211_ATTR_STATUS_CODE]);
+
+ return rdev_external_auth(rdev, dev, ¶ms);
+}
+
#define NL80211_FLAG_NEED_WIPHY 0x01
#define NL80211_FLAG_NEED_NETDEV 0x02
#define NL80211_FLAG_NEED_RTNL 0x04
@@ -13344,6 +13381,14 @@ static const struct genl_ops nl80211_ops[] = {
.internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
NL80211_FLAG_NEED_RTNL,
},
+ {
+ .cmd = NL80211_CMD_EXTERNAL_AUTH,
+ .doit = nl80211_external_auth,
+ .policy = nl80211_policy,
+ .flags = GENL_ADMIN_PERM,
+ .internal_flags = NL80211_FLAG_NEED_NETDEV_UP |
+ NL80211_FLAG_NEED_RTNL,
+ },
};
@@ -15355,6 +15400,48 @@ void nl80211_send_ap_stopped(struct wireless_dev *wdev)
nlmsg_free(msg);
}
+int cfg80211_external_auth_request(struct net_device *dev,
+ struct cfg80211_external_auth_params *params,
+ gfp_t gfp)
+{
+ struct wireless_dev *wdev = dev->ieee80211_ptr;
+ struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
+ struct sk_buff *msg;
+ void *hdr;
+
+ msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
+ if (!msg)
+ return -ENOMEM;
+
+ hdr = nl80211hdr_put(msg, 0, 0, 0, NL80211_CMD_EXTERNAL_AUTH);
+ if (!hdr) {
+ nlmsg_free(msg);
+ return -ENOMEM;
+ }
+
+ if (nla_put_u32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx) ||
+ nla_put_u32(msg, NL80211_ATTR_IFINDEX, dev->ifindex) ||
+ nla_put_u32(msg, NL80211_ATTR_AKM_SUITES, params->key_mgmt_suite) ||
+ nla_put_u32(msg, NL80211_ATTR_EXTERNAL_AUTH_ACTION,
+ params->action) ||
+ nla_put(msg, NL80211_ATTR_BSSID, ETH_ALEN, params->bssid) ||
+ nla_put(msg, NL80211_ATTR_SSID, params->ssid.ssid_len,
+ params->ssid.ssid))
+ goto nla_put_failure;
+
+ genlmsg_end(msg, hdr);
+
+ genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0,
+ NL80211_MCGRP_MLME, gfp);
+ return 0;
+
+ nla_put_failure:
+ genlmsg_cancel(msg, hdr);
+ nlmsg_free(msg);
+ return -ENOBUFS;
+}
+EXPORT_SYMBOL(cfg80211_external_auth_request);
+
/* initialisation/exit functions */
int __init nl80211_init(void)
diff --git a/net/wireless/rdev-ops.h b/net/wireless/rdev-ops.h
index 0c06240..84f23ae 100644
--- a/net/wireless/rdev-ops.h
+++ b/net/wireless/rdev-ops.h
@@ -1190,4 +1190,19 @@ static inline int rdev_del_pmk(struct cfg80211_registered_device *rdev,
trace_rdev_return_int(&rdev->wiphy, ret);
return ret;
}
+
+static inline int
+rdev_external_auth(struct cfg80211_registered_device *rdev,
+ struct net_device *dev,
+ struct cfg80211_external_auth_params *params)
+{
+ int ret = -EOPNOTSUPP;
+
+ trace_rdev_external_auth(&rdev->wiphy, dev, params);
+ if (rdev->ops->external_auth)
+ ret = rdev->ops->external_auth(&rdev->wiphy, dev, params);
+ trace_rdev_return_int(&rdev->wiphy, ret);
+ return ret;
+}
+
#endif /* __CFG80211_RDEV_OPS */
diff --git a/net/wireless/trace.h b/net/wireless/trace.h
index bcfedd3..2ed7cad 100644
--- a/net/wireless/trace.h
+++ b/net/wireless/trace.h
@@ -2319,6 +2319,31 @@ TRACE_EVENT(rdev_del_pmk,
WIPHY_PR_ARG, NETDEV_PR_ARG, MAC_PR_ARG(aa))
);
+TRACE_EVENT(rdev_external_auth,
+ TP_PROTO(struct wiphy *wiphy, struct net_device *netdev,
+ struct cfg80211_external_auth_params *params),
+ TP_ARGS(wiphy, netdev, params),
+ TP_STRUCT__entry(
+ WIPHY_ENTRY
+ NETDEV_ENTRY
+ MAC_ENTRY(bssid)
+ __array(u8, ssid, IEEE80211_MAX_SSID_LEN + 1)
+ __field(u16, status)
+ ),
+ TP_fast_assign(
+ WIPHY_ASSIGN;
+ NETDEV_ASSIGN;
+ MAC_ASSIGN(bssid, params->bssid);
+ memset(__entry->ssid, 0, IEEE80211_MAX_SSID_LEN + 1);
+ memcpy(__entry->ssid, params->ssid.ssid,
+ params->ssid.ssid_len);
+ __entry->status = params->status;
+ ),
+ TP_printk(WIPHY_PR_FMT ", " NETDEV_PR_FMT ", bssid: " MAC_PR_FMT
+ ", ssid: %s, status: %u", WIPHY_PR_ARG, NETDEV_PR_ARG,
+ __entry->bssid, __entry->ssid, __entry->status)
+);
+
/*************************************************************
* cfg80211 exported functions traces *
*************************************************************/
--
2.7.4
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox