>> >Err, you failed to explain *why* this is a problem. I'm not even convinced you're right anyway. >> To know match set count, nl80211 should count only NL80211_SCHED_*_ATTR_SSID. >> Some cases, wpa_supplicant would pass NL80211_SCHED_*_ATTR_RSSI also >> alone with NL80211_SCHED_*_ATTR_SSID. For example, assume one >> NL80211_SCHED_*_ATTR_SSID and one NL80211_SCHED_*_ATTR_RSSI passed >> from wpa_supplicant. In this case, nl80211 count >> NL80211_SCHED_*_ATTR_RSSI also one of the profile , Finally match set >> count will be come >> 2 in this case. (Ideally, match set count should be 1). The same >> count value is passed to driver, and driver also would assume there are two SSID available in match set array (request->match_sets). >> But only one SSID is valid in request->match_sets array in this case. > >You still haven't explained *why* you think that a match set should only be considered to be one when it includes an SSID. That doesn't seem to be the definition of the API. > >Johannes Driver iterates match set array (request->match_sets) based on match set count (request->n_match_sets). In above example, only request->n_match_sets[0] will have valid SSID and request->n_match_sets[1]) will have ZERO in its element always. By having count being 2 and having invalid SSID in request->n_match_sets[1] is the problem. Memory for request->match_sets is allocated based on match set count in nl80211. By reducing the count , nl80211 don't have To allocate memory for request->n_match_sets[1] and also driver can exactly know valid SSID count available in match set array with my change. ��.n��������+%������w��{.n�����{���zW����ܨ}���Ơz�j:+v�����w����ޙ��&�)ߡ�a����z�ޗ���ݢj��w�f