Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 043ef9db authored by Lior David's avatar Lior David Committed by Maya Erez
Browse files

wil6210: remove reference to preset_chandef



The field preset_chandef of wireless_dev must not be accessed
by the driver because it is private to cfg80211. Store the
monitor channel locally in wil6210_priv instead.

Change-Id: Ie3a5fb48d4e4dcbd731f89c8dcf415a6fb44fae5
Signed-off-by: default avatarLior David <qca_liord@qca.qualcomm.com>
Signed-off-by: default avatarMaya Erez <qca_merez@qca.qualcomm.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
Git-commit: 7d3e4dbe570e79940624ff46387e34db741dcb5c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/kvalo/ath.git


Signed-off-by: default avatarMaya Erez <merez@codeaurora.org>
parent 8cdf067d
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -1031,9 +1031,8 @@ static int wil_cfg80211_set_channel(struct wiphy *wiphy,
				    struct cfg80211_chan_def *chandef)
				    struct cfg80211_chan_def *chandef)
{
{
	struct wil6210_priv *wil = wiphy_to_wil(wiphy);
	struct wil6210_priv *wil = wiphy_to_wil(wiphy);
	struct wireless_dev *wdev = wil_to_wdev(wil);


	wdev->preset_chandef = *chandef;
	wil->monitor_chandef = *chandef;


	return 0;
	return 0;
}
}
+0 −1
Original line number Original line Diff line number Diff line
@@ -875,7 +875,6 @@ static ssize_t wil_write_file_txmgmt(struct file *file, const char __user *buf,


	params.buf = frame;
	params.buf = frame;
	params.len = len;
	params.len = len;
	params.chan = wdev->preset_chandef.chan;


	rc = wil_cfg80211_mgmt_tx(wiphy, wdev, &params, NULL);
	rc = wil_cfg80211_mgmt_tx(wiphy, wdev, &params, NULL);


+1 −1
Original line number Original line Diff line number Diff line
@@ -179,7 +179,7 @@ void *wil_if_alloc(struct device *dev)
	wdev->iftype = NL80211_IFTYPE_STATION; /* TODO */
	wdev->iftype = NL80211_IFTYPE_STATION; /* TODO */
	/* default monitor channel */
	/* default monitor channel */
	ch = wdev->wiphy->bands[NL80211_BAND_60GHZ]->channels;
	ch = wdev->wiphy->bands[NL80211_BAND_60GHZ]->channels;
	cfg80211_chandef_create(&wdev->preset_chandef, ch, NL80211_CHAN_NO_HT);
	cfg80211_chandef_create(&wil->monitor_chandef, ch, NL80211_CHAN_NO_HT);


	ndev = alloc_netdev(0, ifname, NET_NAME_UNKNOWN, wil_dev_setup);
	ndev = alloc_netdev(0, ifname, NET_NAME_UNKNOWN, wil_dev_setup);
	if (!ndev) {
	if (!ndev) {
+1 −2
Original line number Original line Diff line number Diff line
@@ -348,7 +348,6 @@ static int wil_vring_alloc_skb(struct wil6210_priv *wil, struct vring *vring,
static void wil_rx_add_radiotap_header(struct wil6210_priv *wil,
static void wil_rx_add_radiotap_header(struct wil6210_priv *wil,
				       struct sk_buff *skb)
				       struct sk_buff *skb)
{
{
	struct wireless_dev *wdev = wil->wdev;
	struct wil6210_rtap {
	struct wil6210_rtap {
		struct ieee80211_radiotap_header rthdr;
		struct ieee80211_radiotap_header rthdr;
		/* fields should be in the order of bits in rthdr.it_present */
		/* fields should be in the order of bits in rthdr.it_present */
@@ -375,7 +374,7 @@ static void wil_rx_add_radiotap_header(struct wil6210_priv *wil,
	int rtap_len = sizeof(struct wil6210_rtap);
	int rtap_len = sizeof(struct wil6210_rtap);
	int phy_length = 0; /* phy info header size, bytes */
	int phy_length = 0; /* phy info header size, bytes */
	static char phy_data[128];
	static char phy_data[128];
	struct ieee80211_channel *ch = wdev->preset_chandef.chan;
	struct ieee80211_channel *ch = wil->monitor_chandef.chan;


	if (rtap_include_phy_info) {
	if (rtap_include_phy_info) {
		rtap_len = sizeof(*rtap_vendor) + sizeof(*d);
		rtap_len = sizeof(*rtap_vendor) + sizeof(*d);
+1 −0
Original line number Original line Diff line number Diff line
@@ -657,6 +657,7 @@ struct wil6210_priv {
	unsigned long last_fw_recovery; /* jiffies of last fw recovery */
	unsigned long last_fw_recovery; /* jiffies of last fw recovery */
	wait_queue_head_t wq; /* for all wait_event() use */
	wait_queue_head_t wq; /* for all wait_event() use */
	/* profile */
	/* profile */
	struct cfg80211_chan_def monitor_chandef;
	u32 monitor_flags;
	u32 monitor_flags;
	u32 privacy; /* secure connection? */
	u32 privacy; /* secure connection? */
	u8 hidden_ssid; /* relevant in AP mode */
	u8 hidden_ssid; /* relevant in AP mode */
Loading