From: Johannes Berg <johannes@sipsolutions.net>
To: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
Cc: linux-wireless@vger.kernel.org, quic_usdutt@quicinc.com
Subject: Re: [PATCH v2 3/3] cfg80211: Add support for key operations on NL80211_IFTYPE_MLO_LINK
Date: Fri, 11 Mar 2022 13:20:30 +0100 [thread overview]
Message-ID: <fa3389544e67220b11e0f905a0fa724a165f0445.camel@sipsolutions.net> (raw)
In-Reply-To: <1645613200-30221-4-git-send-email-quic_vjakkam@quicinc.com>
On Wed, 2022-02-23 at 16:16 +0530, Veerendranath Jakkam wrote:
>
> --- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
> +++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
> @@ -1123,17 +1123,25 @@ void ath6kl_cfg80211_ch_switch_notify(struct ath6kl_vif *vif, int freq,
> mutex_unlock(&vif->wdev.mtx);
> }
>
> -static int ath6kl_cfg80211_add_key(struct wiphy *wiphy, struct net_device *ndev,
> +static int ath6kl_cfg80211_add_key(struct wiphy *wiphy,
> + struct wireless_dev *wdev,
> u8 key_index, bool pairwise,
> const u8 *mac_addr,
> struct key_params *params)
> {
> - struct ath6kl *ar = ath6kl_priv(ndev);
> - struct ath6kl_vif *vif = netdev_priv(ndev);
> + struct ath6kl *ar;
> + struct ath6kl_vif *vif;
> struct ath6kl_key *key = NULL;
> int seq_len;
> u8 key_usage;
> u8 key_type;
> + struct net_device *ndev = wdev->netdev;
> +
> + if (!ndev)
> + return -EOPNOTSUPP;
>
Rather than changing all the drivers in this way, it's probably better
to introduce a WIPHY flag "supports MLD" and allow a non-netdev wdev to
appear only when the flag is set?
That still changes the prototype from ndev to wdev, but doesn't require
the introduction of a lot of "!ndev" changes, which would be needed for
more operations, and probably we can then just add a single line
struct net_device *ndev = wdev->netdev;
at the beginning of the variable initializer block (even with spatch),
without changing everything else.
Seems nicer? What do you think?
johannes
prev parent reply other threads:[~2022-03-11 12:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-23 10:46 [PATCH v2 0/3] cfg80211: Add MLO Link Device abstraction Veerendranath Jakkam
2022-02-23 10:46 ` [PATCH v2 1/3] cfg80211: Add NL80211_IFTYPE_MLO_LINK type for MLO links on MLD STA Veerendranath Jakkam
2022-02-23 12:39 ` Arend van Spriel
2022-02-24 3:28 ` Vasanthakumar Thiagarajan
2022-02-24 7:59 ` Veerendranath Jakkam
2022-02-26 19:36 ` Arend Van Spriel
2022-03-11 12:17 ` Johannes Berg
2022-03-17 21:42 ` Jeff Johnson
2022-02-23 10:46 ` [PATCH v2 2/3] cfg80211: Indicate MLO links info in connect/roam events Veerendranath Jakkam
2022-02-23 10:46 ` [PATCH v2 3/3] cfg80211: Add support for key operations on NL80211_IFTYPE_MLO_LINK Veerendranath Jakkam
2022-03-11 12:20 ` Johannes Berg [this message]
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=fa3389544e67220b11e0f905a0fa724a165f0445.camel@sipsolutions.net \
--to=johannes@sipsolutions.net \
--cc=linux-wireless@vger.kernel.org \
--cc=quic_usdutt@quicinc.com \
--cc=quic_vjakkam@quicinc.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.