* [PATCH -stable 3.7] carl9170: fix -EINVAL bailout during init with !CONFIG_MAC80211_MESH
@ 2012-12-22 3:35 Christian Lamparter
[not found] ` <CAFR4Aqa3qVQaLGYDwmAvOm8S5=0DkwtsDXMVGUNuOLuvkeAAeA@mail.gmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: Christian Lamparter @ 2012-12-22 3:35 UTC (permalink / raw)
To: linux-wireless; +Cc: linville, quantheory
Sean reported that as of 3.7, his AR9170 device no longer works
because the driver fails during initialization. He noted this
is due to:
"In carl9170/fw.c, ar->hw->wiphy is tagged with
NL80211_IFTYPE_MESH_POINT support if the firmware has Content
after Beacon Queuing. This is both in interface_modes and the
only iface_combinations entry.
If CONFIG_MAC80211_MESH is not set, ieee80211_register_hw
removes NL80211_IFTYPE_MESH_POINT from interface_modes, but
not iface_combinations.
wiphy_register then checks to see if every interface type in
every interface combination is in interface_modes.
NL80211_IFTYPE_MESH_POINT was removed, so you get a WARN_ON
warning and it returns -EINVAL, giving up."
Unfortunately, the iface_combination (types) feature bitmap
in ieee80211_iface_limit is part of a const member in the
ieee80211_iface_combination struct. Hence, the MESH_POINT
feature flag can't be masked by wiphy_register in the
same way as interface_modes in ieee80211_register_hw.
Cc: <stable@vger.kernel.org>
Reported-by: Sean Patrick Santos <quantheory@gmail.com>
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
---
only compile tested.
---
drivers/net/wireless/ath/carl9170/fw.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/wireless/ath/carl9170/fw.c b/drivers/net/wireless/ath/carl9170/fw.c
index aaebecd..63fd9af 100644
--- a/drivers/net/wireless/ath/carl9170/fw.c
+++ b/drivers/net/wireless/ath/carl9170/fw.c
@@ -336,8 +336,12 @@ static int carl9170_fw(struct ar9170 *ar, const __u8 *data, size_t len)
if (SUPP(CARL9170FW_WLANTX_CAB)) {
if_comb_types |=
BIT(NL80211_IFTYPE_AP) |
- BIT(NL80211_IFTYPE_MESH_POINT) |
BIT(NL80211_IFTYPE_P2P_GO);
+
+#ifdef CONFIG_MAC80211_MESH
+ if_comb_types |=
+ BIT(NL80211_IFTYPE_MESH_POINT);
+#endif /* CONFIG_MAC80211_MESH */
}
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH -stable 3.7] carl9170: fix -EINVAL bailout during init with !CONFIG_MAC80211_MESH
[not found] ` <CAFR4Aqa3qVQaLGYDwmAvOm8S5=0DkwtsDXMVGUNuOLuvkeAAeA@mail.gmail.com>
@ 2012-12-22 11:05 ` Christian Lamparter
0 siblings, 0 replies; 2+ messages in thread
From: Christian Lamparter @ 2012-12-22 11:05 UTC (permalink / raw)
To: Sean Patrick Santos, linux-wireless, linville
On Saturday 22 December 2012 05:21:24 Sean Patrick Santos wrote:
> I tested this patch and it solved my problem. The driver now works
> correctly without CONFIG_MAC80211_MESH.
Thank you for testing! I've readded John, so he can add
this tag to the commmit:
Tested-by: Sean Patrick Santos <quantheory@gmail.com>
Regards,
Christian
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-12-22 11:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-22 3:35 [PATCH -stable 3.7] carl9170: fix -EINVAL bailout during init with !CONFIG_MAC80211_MESH Christian Lamparter
[not found] ` <CAFR4Aqa3qVQaLGYDwmAvOm8S5=0DkwtsDXMVGUNuOLuvkeAAeA@mail.gmail.com>
2012-12-22 11:05 ` Christian Lamparter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).