Lines Matching refs:sreq
1441 struct cfg80211_scan_request *sreq = &scan_req->req; in mt76_connac_mcu_hw_scan() local
1443 int ext_channels_num = max_t(int, sreq->n_channels - 32, 0); in mt76_connac_mcu_hw_scan()
1444 struct ieee80211_channel **scan_list = sreq->channels; in mt76_connac_mcu_hw_scan()
1462 req->scan_type = sreq->n_ssids ? 1 : 0; in mt76_connac_mcu_hw_scan()
1463 req->probe_req_num = sreq->n_ssids ? 2 : 0; in mt76_connac_mcu_hw_scan()
1466 for (i = 0; i < sreq->n_ssids; i++) { in mt76_connac_mcu_hw_scan()
1467 if (!sreq->ssids[i].ssid_len) in mt76_connac_mcu_hw_scan()
1470 req->ssids[i].ssid_len = cpu_to_le32(sreq->ssids[i].ssid_len); in mt76_connac_mcu_hw_scan()
1471 memcpy(req->ssids[i].ssid, sreq->ssids[i].ssid, in mt76_connac_mcu_hw_scan()
1472 sreq->ssids[i].ssid_len); in mt76_connac_mcu_hw_scan()
1481 if (!sreq->n_ssids) in mt76_connac_mcu_hw_scan()
1483 req->timeout_value = cpu_to_le16(sreq->n_channels * duration); in mt76_connac_mcu_hw_scan()
1487 req->channels_num = min_t(u8, sreq->n_channels, 32); in mt76_connac_mcu_hw_scan()
1508 req->channel_type = sreq->n_channels ? 4 : 0; in mt76_connac_mcu_hw_scan()
1510 if (sreq->ie_len > 0) { in mt76_connac_mcu_hw_scan()
1511 memcpy(req->ies, sreq->ie, sreq->ie_len); in mt76_connac_mcu_hw_scan()
1512 req->ies_len = cpu_to_le16(sreq->ie_len); in mt76_connac_mcu_hw_scan()
1518 memcpy(req->bssid, sreq->bssid, ETH_ALEN); in mt76_connac_mcu_hw_scan()
1519 if (sreq->flags & NL80211_SCAN_FLAG_RANDOM_ADDR) { in mt76_connac_mcu_hw_scan()
1520 get_random_mask_addr(req->random_mac, sreq->mac_addr, in mt76_connac_mcu_hw_scan()
1521 sreq->mac_addr_mask); in mt76_connac_mcu_hw_scan()
1560 struct cfg80211_sched_scan_request *sreq) in mt76_connac_mcu_sched_scan_req() argument
1563 struct ieee80211_channel **scan_list = sreq->channels; in mt76_connac_mcu_sched_scan_req()
1573 skb = mt76_mcu_msg_alloc(mdev, NULL, sizeof(*req) + sreq->ie_len); in mt76_connac_mcu_sched_scan_req()
1583 if (sreq->flags & NL80211_SCAN_FLAG_RANDOM_ADDR) { in mt76_connac_mcu_sched_scan_req()
1588 get_random_mask_addr(addr, sreq->mac_addr, in mt76_connac_mcu_sched_scan_req()
1589 sreq->mac_addr_mask); in mt76_connac_mcu_sched_scan_req()
1593 req->mt7921.delay = cpu_to_le32(sreq->delay); in mt76_connac_mcu_sched_scan_req()
1596 req->ssids_num = sreq->n_ssids; in mt76_connac_mcu_sched_scan_req()
1598 ssid = &sreq->ssids[i]; in mt76_connac_mcu_sched_scan_req()
1603 req->match_num = sreq->n_match_sets; in mt76_connac_mcu_sched_scan_req()
1605 match = &sreq->match_sets[i]; in mt76_connac_mcu_sched_scan_req()
1612 req->channel_type = sreq->n_channels ? 4 : 0; in mt76_connac_mcu_sched_scan_req()
1613 req->channels_num = min_t(u8, sreq->n_channels, 64); in mt76_connac_mcu_sched_scan_req()
1631 req->intervals_num = sreq->n_scan_plans; in mt76_connac_mcu_sched_scan_req()
1633 req->intervals[i] = cpu_to_le16(sreq->scan_plans[i].interval); in mt76_connac_mcu_sched_scan_req()
1635 if (sreq->ie_len > 0) { in mt76_connac_mcu_sched_scan_req()
1636 req->ie_len = cpu_to_le16(sreq->ie_len); in mt76_connac_mcu_sched_scan_req()
1637 memcpy(skb_put(skb, sreq->ie_len), sreq->ie, sreq->ie_len); in mt76_connac_mcu_sched_scan_req()