]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
nl80211: Handle multiple interface combinations for P2P
authorFelix Fietkau <nbd@openwrt.org>
Sun, 6 Apr 2014 11:11:53 +0000 (13:11 +0200)
committerJouni Malinen <j@w1.fi>
Fri, 11 Apr 2014 16:22:00 +0000 (19:22 +0300)
The first combination may allow single-channel concurrency for
P2P + managed, but there may be others that allow multi-channel
concurrency. Parse all of them to find the maximum number of channels.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
src/drivers/driver_nl80211.c

index c1405075918112f72a3445178e200afeeb0a5990..e531e22fbc33cd156e753a96225970796f20179f 100644 (file)
@@ -3444,10 +3444,12 @@ static int wiphy_info_iface_comb_process(struct wiphy_info_data *info,
        }
 
        if (combination_has_p2p && combination_has_mgd) {
-               info->p2p_concurrent = 1;
-               info->num_multichan_concurrent =
+               unsigned int num_channels =
                        nla_get_u32(tb_comb[NL80211_IFACE_COMB_NUM_CHANNELS]);
-               return 1;
+
+               info->p2p_concurrent = 1;
+               if (info->num_multichan_concurrent < num_channels)
+                       info->num_multichan_concurrent = num_channels;
        }
 
        return 0;