Skip to content

Commit

Permalink
carl9170: fix -EINVAL bailout during init with !CONFIG_MAC80211_MESH
Browse files Browse the repository at this point in the history
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: <[email protected]>
Reported-by: Sean Patrick Santos <[email protected]>
Signed-off-by: Christian Lamparter <[email protected]>
Tested-by: Sean Patrick Santos <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
  • Loading branch information
chunkeey authored and linvjw committed Jan 2, 2013
1 parent 4c3de59 commit 6c653f6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion drivers/net/wireless/ath/carl9170/fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
}
}

Expand Down

0 comments on commit 6c653f6

Please sign in to comment.