From: Johannes Berg <johannes@sipsolutions.net>
To: Vasanthakumar Thiagarajan <vthiagar@qti.qualcomm.com>
Cc: linux-wireless@vger.kernel.org
Subject: Re: [RFC 3/3] mac80211: Add receive path for ethernet frame format
Date: Thu, 15 Dec 2016 10:38:15 +0100 [thread overview]
Message-ID: <1481794695.31776.7.camel@sipsolutions.net> (raw)
In-Reply-To: <1481781608-5181-4-git-send-email-vthiagar@qti.qualcomm.com>
> This rx path only checks if the driver has advertised
> it's support of 802.11 header encap/decap offload for
> data frames.
I'm not even sure I see the point in that? Other than that (and the
various other offload requirements), it seems that encap/decap could be
considered orthogonal.
> + * Adhoc interface depends on bssid to udpate last_rx.
type - update
> + if (!(status->flag & RX_FLAG_MCAST)) {
> + sta->rx_stats.last_rx = jiffies;
> + sta->rx_stats.last_rate =
> sta_stats_encode_rate(status);
> + }
You should probably rename that flag to something like
RX_FLAG_80211_MCAST since otherwise it's confusing with the next
multicast ether addr check:
> + if (sdata->vif.type == NL80211_IFTYPE_STATION &&
> + !is_multicast_ether_addr(ehdr->h_dest))
> + ieee80211_sta_reset_conn_monitor(sdata);
But this could just also use the flag, since in station mode the two
are equivalent, and it'd be easier to figure out if this was "else if
(station mode)"?
> + memset(&rx, 0, sizeof(rx));
That seems a bit pointless?
> + rx.skb = skb;
> + rx.sdata = sdata;
> + rx.local = local;
> + rx.sta = sta;
> +
> + if (vif->type == NL80211_IFTYPE_AP_VLAN && sdata->bss &&
> + unlikely(ehdr->h_proto == sdata->control_port_protocol))
> {
> + sdata = container_of(sdata->bss, struct
> ieee80211_sub_if_data,
> + u.ap);
> + dev = sdata->dev;
> + rx.sdata = sdata;
> + }
> +
> + rx.skb->dev = dev;
> +
> + /* XXX: Since rx.seqno_idx is not available for decap
> offloaded frames
> + * rx msdu stats update at the seqno_idx in
> ieee80211_deliver_skb()
> + * will always be updated at index 0 and will not be very
> useful.
> + */
> + ieee80211_deliver_skb(&rx);
Yeah, that's not nice - perhaps we can provide the TID out of band? If
not, we'll have to disable those statistics *all the way*, i.e. not
even report them to userspace when filling sinfo.
> + return;
> +
> +mic_fail:
> + cfg80211_michael_mic_failure(sdata->dev, sta->addr,
> + (status->flag & RX_FLAG_MCAST)
> ?
> + NL80211_KEYTYPE_GROUP :
> + NL80211_KEYTYPE_PAIRWISE,
> + key ? key->conf.keyidx : -1,
> + NULL, GFP_ATOMIC);
Do we really want to handle that inline here? The driver probably has a
different check to even set RX_FLAG_MMIC_ERROR, so we could just ask it
to call cfg80211_michael_mic_failure() [or a wrapper to get sdata->dev]
instead? I guess this works too though, and might be easier to
understand.
johannes
next prev parent reply other threads:[~2016-12-15 9:39 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-15 6:00 [RFC 0/3] Add new data path for ethernet frame format Vasanthakumar Thiagarajan
2016-12-15 6:00 ` [RFC 1/3] mac80211: Add provision for 802.11 encap/decap offload Vasanthakumar Thiagarajan
2016-12-15 9:16 ` Johannes Berg
2016-12-15 10:43 ` Thiagarajan, Vasanthakumar
2016-12-16 9:30 ` Johannes Berg
2016-12-15 6:00 ` [RFC 2/3] mac80211: Implement data xmit for 802.11 encap offload Vasanthakumar Thiagarajan
2016-12-15 9:29 ` Johannes Berg
2016-12-15 12:01 ` Thiagarajan, Vasanthakumar
2016-12-15 13:32 ` Felix Fietkau
2016-12-15 13:53 ` Johannes Berg
2016-12-16 5:37 ` Thiagarajan, Vasanthakumar
2016-12-16 9:25 ` Johannes Berg
2016-12-19 11:45 ` Kalle Valo
2016-12-19 12:02 ` Thiagarajan, Vasanthakumar
2016-12-15 6:00 ` [RFC 3/3] mac80211: Add receive path for ethernet frame format Vasanthakumar Thiagarajan
2016-12-15 9:38 ` Johannes Berg [this message]
2016-12-16 6:47 ` Thiagarajan, Vasanthakumar
2016-12-16 9:13 ` Johannes Berg
2016-12-16 9:14 ` Johannes Berg
2016-12-15 9:08 ` [RFC 0/3] Add new data " Johannes Berg
2016-12-15 10:03 ` Thiagarajan, Vasanthakumar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1481794695.31776.7.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=vthiagar@qti.qualcomm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.