diff options
author | Sergey Matyukevich <sergey.matyukevich.os@quantenna.com> | 2018-01-22 15:46:29 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2018-01-24 19:00:40 +0300 |
commit | 537faf269d76eb6f6d325874c573e45e5b55edce (patch) | |
tree | 96bcd6e6871b87ef1ff8a5c919a9809697289d4f /drivers/net/wireless/quantenna/qtnfmac/core.c | |
parent | 0b419d0182bc31afc1840b3caee3ae61f2eda601 (diff) | |
download | linux-537faf269d76eb6f6d325874c573e45e5b55edce.tar.xz |
qtnfmac: modify supported interface combinations
Update existing code handling configuration of supported interface
combinations. Current implementation is not complete since it does
not report multiple interface combinations which are incompatible
with each other. Instead current implementation packs all the
supported combinations into single entry.
In fact currently qsr10g wireless card supports the following
two distinct interface combinations:
1. STA/repeater: 1 STA and/or 1 AP
{
{ .max = 1, .types = NL80211_IFTYPE_AP},
{ .max = 1, .types = NL80211_IFTYPE_STA},
}
2. AP/mBSS
{
{ .max = 8, .types = NL80211_IFTYPE_AP},
}
The list of supported configuration is reported by firmware during
wireless card bring-up. Communication protocol between firmware
and host has been updated accordingly in order to accommodate passing
multiple interface combination entries.
Signed-off-by: Sergey Matyukevich <sergey.matyukevich.os@quantenna.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/quantenna/qtnfmac/core.c')
-rw-r--r-- | drivers/net/wireless/quantenna/qtnfmac/core.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/net/wireless/quantenna/qtnfmac/core.c b/drivers/net/wireless/quantenna/qtnfmac/core.c index 1acbe30dfc66..b1344d0731d7 100644 --- a/drivers/net/wireless/quantenna/qtnfmac/core.c +++ b/drivers/net/wireless/quantenna/qtnfmac/core.c @@ -262,6 +262,23 @@ struct qtnf_vif *qtnf_mac_get_base_vif(struct qtnf_wmac *mac) return vif; } +void qtnf_mac_iface_comb_free(struct qtnf_wmac *mac) +{ + struct ieee80211_iface_combination *comb; + int i; + + if (mac->macinfo.if_comb) { + for (i = 0; i < mac->macinfo.n_if_comb; i++) { + comb = &mac->macinfo.if_comb[i]; + kfree(comb->limits); + comb->limits = NULL; + } + + kfree(mac->macinfo.if_comb); + mac->macinfo.if_comb = NULL; + } +} + static void qtnf_vif_reset_handler(struct work_struct *work) { struct qtnf_vif *vif = container_of(work, struct qtnf_vif, reset_work); @@ -420,10 +437,9 @@ static void qtnf_core_mac_detach(struct qtnf_bus *bus, unsigned int macid) wiphy->bands[band] = NULL; } - kfree(mac->macinfo.limits); + qtnf_mac_iface_comb_free(mac); kfree(mac->macinfo.extended_capabilities); kfree(mac->macinfo.extended_capabilities_mask); - kfree(wiphy->iface_combinations); wiphy_free(wiphy); bus->mac[macid] = NULL; } |