On Thu, 2014-01-23 at 17:04 +0530, Raja Mani wrote: > Match set count is calculated in nl80211_start_sched_scan() by counting > each attr available in NL80211_ATTR_SCHED_SCAN_MATCH. Some cases, RSSI > threshold limit NL80211_SCHED_SCAN_MATCH_ATTR_RSSI attr also can come > from user space along with NL80211_SCHED_SCAN_MATCH_ATTR_SSID attr. > In such cases, exiting code counts NL80211_SCHED_SCAN_MATCH_ATTR_RSSI > attr also as one of SSID and leads extra memory allocation for match set > array (request->match_sets). > > Counting only NL80211_SCHED_SCAN_MATCH_ATTR_RSSI attr will help nl80211 to > allocate exact memory needed for match set array and also driver can know > the exact valid SSID available in match set array. Much better now. I still think you should explain *why* this is a problem. It's not obvious at first glance that the sched scan match thing is actually completely stupid, allowing the RSSI attribute in the nested thing but then only using a single one of it ... Luca, any ideas about that part? Was something else intended? johannes -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html