• Home
  • Raw
  • Download

Lines Matching refs:wlvif

311 int wl12xx_allocate_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 *hlid)  in wl12xx_allocate_link()  argument
323 __set_bit(link, wlvif->links_map); in wl12xx_allocate_link()
329 wl->links[link].wlvif = wlvif; in wl12xx_allocate_link()
335 if (wlvif->bss_type != BSS_TYPE_AP_BSS) in wl12xx_allocate_link()
336 wl->links[link].total_freed_pkts = wlvif->total_freed_pkts; in wl12xx_allocate_link()
344 void wl12xx_free_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 *hlid) in wl12xx_free_link() argument
354 __clear_bit(*hlid, wlvif->links_map); in wl12xx_free_link()
367 wl->links[*hlid].wlvif = NULL; in wl12xx_free_link()
369 if (wlvif->bss_type == BSS_TYPE_STA_BSS || in wl12xx_free_link()
370 (wlvif->bss_type == BSS_TYPE_AP_BSS && in wl12xx_free_link()
371 *hlid == wlvif->ap.bcast_hlid)) { in wl12xx_free_link()
376 wlvif->total_freed_pkts = wl->links[*hlid].total_freed_pkts; in wl12xx_free_link()
383 wlvif->total_freed_pkts += in wl12xx_free_link()
412 struct wl12xx_vif *wlvif, in wl12xx_cmd_role_start_dev() argument
425 wl1271_debug(DEBUG_CMD, "cmd role start dev %d", wlvif->dev_role_id); in wl12xx_cmd_role_start_dev()
427 cmd->role_id = wlvif->dev_role_id; in wl12xx_cmd_role_start_dev()
432 if (wlvif->dev_hlid == WL12XX_INVALID_LINK_ID) { in wl12xx_cmd_role_start_dev()
433 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->dev_hlid); in wl12xx_cmd_role_start_dev()
437 cmd->device.hlid = wlvif->dev_hlid; in wl12xx_cmd_role_start_dev()
438 cmd->device.session = wl->session_ids[wlvif->dev_hlid]; in wl12xx_cmd_role_start_dev()
453 wl12xx_free_link(wl, wlvif, &wlvif->dev_hlid); in wl12xx_cmd_role_start_dev()
463 struct wl12xx_vif *wlvif) in wl12xx_cmd_role_stop_dev() argument
468 if (WARN_ON(wlvif->dev_hlid == WL12XX_INVALID_LINK_ID)) in wl12xx_cmd_role_stop_dev()
479 cmd->role_id = wlvif->dev_role_id; in wl12xx_cmd_role_stop_dev()
489 wl12xx_free_link(wl, wlvif, &wlvif->dev_hlid); in wl12xx_cmd_role_stop_dev()
498 int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_cmd_role_start_sta() argument
500 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl12xx_cmd_role_start_sta()
511 wl1271_debug(DEBUG_CMD, "cmd role start sta %d", wlvif->role_id); in wl12xx_cmd_role_start_sta()
513 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_start_sta()
514 if (wlvif->band == IEEE80211_BAND_5GHZ) in wl12xx_cmd_role_start_sta()
516 cmd->channel = wlvif->channel; in wl12xx_cmd_role_start_sta()
517 cmd->sta.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); in wl12xx_cmd_role_start_sta()
518 cmd->sta.beacon_interval = cpu_to_le16(wlvif->beacon_int); in wl12xx_cmd_role_start_sta()
520 cmd->sta.ssid_len = wlvif->ssid_len; in wl12xx_cmd_role_start_sta()
521 memcpy(cmd->sta.ssid, wlvif->ssid, wlvif->ssid_len); in wl12xx_cmd_role_start_sta()
525 wlcore_hw_sta_get_ap_rate_mask(wl, wlvif); in wl12xx_cmd_role_start_sta()
526 if (wlvif->p2p) in wl12xx_cmd_role_start_sta()
531 cmd->channel_type = wlcore_get_native_channel_type(wlvif->channel_type); in wl12xx_cmd_role_start_sta()
533 if (wlvif->sta.hlid == WL12XX_INVALID_LINK_ID) { in wl12xx_cmd_role_start_sta()
534 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->sta.hlid); in wl12xx_cmd_role_start_sta()
538 cmd->sta.hlid = wlvif->sta.hlid; in wl12xx_cmd_role_start_sta()
539 cmd->sta.session = wl->session_ids[wlvif->sta.hlid]; in wl12xx_cmd_role_start_sta()
550 wlvif->role_id, cmd->sta.hlid, cmd->sta.session, in wl12xx_cmd_role_start_sta()
551 wlvif->basic_rate_set, wlvif->rate_set); in wl12xx_cmd_role_start_sta()
559 wlvif->sta.role_chan_type = wlvif->channel_type; in wl12xx_cmd_role_start_sta()
564 wl12xx_free_link(wl, wlvif, &wlvif->sta.hlid); in wl12xx_cmd_role_start_sta()
574 int wl12xx_cmd_role_stop_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_cmd_role_stop_sta() argument
579 if (WARN_ON(wlvif->sta.hlid == WL12XX_INVALID_LINK_ID)) in wl12xx_cmd_role_stop_sta()
588 wl1271_debug(DEBUG_CMD, "cmd role stop sta %d", wlvif->role_id); in wl12xx_cmd_role_stop_sta()
590 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_stop_sta()
600 wl12xx_free_link(wl, wlvif, &wlvif->sta.hlid); in wl12xx_cmd_role_stop_sta()
609 int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_cmd_role_start_ap() argument
612 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl12xx_cmd_role_start_ap()
617 wl1271_debug(DEBUG_CMD, "cmd role start ap %d", wlvif->role_id); in wl12xx_cmd_role_start_ap()
620 if (wlvif->ssid_len == 0 && !bss_conf->hidden_ssid) { in wl12xx_cmd_role_start_ap()
632 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->ap.global_hlid); in wl12xx_cmd_role_start_ap()
636 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->ap.bcast_hlid); in wl12xx_cmd_role_start_ap()
641 wl->links[wlvif->ap.bcast_hlid].total_freed_pkts = in wl12xx_cmd_role_start_ap()
642 wlvif->total_freed_pkts; in wl12xx_cmd_role_start_ap()
644 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_start_ap()
647 cmd->ap.global_hlid = wlvif->ap.global_hlid; in wl12xx_cmd_role_start_ap()
648 cmd->ap.broadcast_hlid = wlvif->ap.bcast_hlid; in wl12xx_cmd_role_start_ap()
649 cmd->ap.global_session_id = wl->session_ids[wlvif->ap.global_hlid]; in wl12xx_cmd_role_start_ap()
650 cmd->ap.bcast_session_id = wl->session_ids[wlvif->ap.bcast_hlid]; in wl12xx_cmd_role_start_ap()
651 cmd->ap.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); in wl12xx_cmd_role_start_ap()
652 cmd->ap.beacon_interval = cpu_to_le16(wlvif->beacon_int); in wl12xx_cmd_role_start_ap()
657 cmd->ap.wmm = wlvif->wmm_enabled; in wl12xx_cmd_role_start_ap()
658 cmd->channel = wlvif->channel; in wl12xx_cmd_role_start_ap()
659 cmd->channel_type = wlcore_get_native_channel_type(wlvif->channel_type); in wl12xx_cmd_role_start_ap()
664 cmd->ap.ssid_len = wlvif->ssid_len; in wl12xx_cmd_role_start_ap()
665 memcpy(cmd->ap.ssid, wlvif->ssid, wlvif->ssid_len); in wl12xx_cmd_role_start_ap()
673 wlcore_hw_ap_get_mimo_wide_rate_mask(wl, wlvif); in wl12xx_cmd_role_start_ap()
674 if (wlvif->p2p) in wl12xx_cmd_role_start_ap()
682 switch (wlvif->band) { in wl12xx_cmd_role_start_ap()
690 wl1271_warning("ap start - unknown band: %d", (int)wlvif->band); in wl12xx_cmd_role_start_ap()
704 wl12xx_free_link(wl, wlvif, &wlvif->ap.bcast_hlid); in wl12xx_cmd_role_start_ap()
707 wl12xx_free_link(wl, wlvif, &wlvif->ap.global_hlid); in wl12xx_cmd_role_start_ap()
716 int wl12xx_cmd_role_stop_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_cmd_role_stop_ap() argument
727 wl1271_debug(DEBUG_CMD, "cmd role stop ap %d", wlvif->role_id); in wl12xx_cmd_role_stop_ap()
729 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_stop_ap()
737 wl12xx_free_link(wl, wlvif, &wlvif->ap.bcast_hlid); in wl12xx_cmd_role_stop_ap()
738 wl12xx_free_link(wl, wlvif, &wlvif->ap.global_hlid); in wl12xx_cmd_role_stop_ap()
747 int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_cmd_role_start_ibss() argument
749 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl12xx_cmd_role_start_ibss()
760 wl1271_debug(DEBUG_CMD, "cmd role start ibss %d", wlvif->role_id); in wl12xx_cmd_role_start_ibss()
762 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_start_ibss()
763 if (wlvif->band == IEEE80211_BAND_5GHZ) in wl12xx_cmd_role_start_ibss()
765 cmd->channel = wlvif->channel; in wl12xx_cmd_role_start_ibss()
766 cmd->ibss.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); in wl12xx_cmd_role_start_ibss()
767 cmd->ibss.beacon_interval = cpu_to_le16(wlvif->beacon_int); in wl12xx_cmd_role_start_ibss()
770 cmd->ibss.ssid_len = wlvif->ssid_len; in wl12xx_cmd_role_start_ibss()
771 memcpy(cmd->ibss.ssid, wlvif->ssid, wlvif->ssid_len); in wl12xx_cmd_role_start_ibss()
773 cmd->sta.local_rates = cpu_to_le32(wlvif->rate_set); in wl12xx_cmd_role_start_ibss()
775 if (wlvif->sta.hlid == WL12XX_INVALID_LINK_ID) { in wl12xx_cmd_role_start_ibss()
776 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->sta.hlid); in wl12xx_cmd_role_start_ibss()
780 cmd->ibss.hlid = wlvif->sta.hlid; in wl12xx_cmd_role_start_ibss()
781 cmd->ibss.remote_rates = cpu_to_le32(wlvif->rate_set); in wl12xx_cmd_role_start_ibss()
785 wlvif->role_id, cmd->sta.hlid, cmd->sta.session, in wl12xx_cmd_role_start_ibss()
786 wlvif->basic_rate_set, wlvif->rate_set); in wl12xx_cmd_role_start_ibss()
801 wl12xx_free_link(wl, wlvif, &wlvif->sta.hlid); in wl12xx_cmd_role_start_ibss()
965 int wl1271_cmd_ps_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl1271_cmd_ps_mode() argument
979 ps_params->role_id = wlvif->role_id; in wl1271_cmd_ps_mode()
1039 int wl12xx_cmd_build_null_data(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_cmd_build_null_data() argument
1047 if (wlvif->bss_type == BSS_TYPE_IBSS) { in wl12xx_cmd_build_null_data()
1052 wl12xx_wlvif_to_vif(wlvif)); in wl12xx_cmd_build_null_data()
1059 ret = wl1271_cmd_template_set(wl, wlvif->role_id, in wl12xx_cmd_build_null_data()
1061 wlvif->basic_rate); in wl12xx_cmd_build_null_data()
1073 struct wl12xx_vif *wlvif) in wl12xx_cmd_build_klv_null_data() argument
1075 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl12xx_cmd_build_klv_null_data()
1083 ret = wl1271_cmd_template_set(wl, wlvif->role_id, CMD_TEMPL_KLV, in wl12xx_cmd_build_klv_null_data()
1085 wlvif->sta.klv_template_id, in wl12xx_cmd_build_klv_null_data()
1086 wlvif->basic_rate); in wl12xx_cmd_build_klv_null_data()
1097 int wl1271_cmd_build_ps_poll(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl1271_cmd_build_ps_poll() argument
1100 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl1271_cmd_build_ps_poll()
1108 ret = wl1271_cmd_template_set(wl, wlvif->role_id, in wl1271_cmd_build_ps_poll()
1110 skb->len, 0, wlvif->basic_rate_set); in wl1271_cmd_build_ps_poll()
1117 int wl12xx_cmd_build_probe_req(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_cmd_build_probe_req() argument
1122 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl12xx_cmd_build_probe_req()
1146 rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); in wl12xx_cmd_build_probe_req()
1163 struct wl12xx_vif *wlvif, in wl1271_cmd_build_ap_probe_req() argument
1166 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl1271_cmd_build_ap_probe_req()
1177 rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[wlvif->band]); in wl1271_cmd_build_ap_probe_req()
1178 if (wlvif->band == IEEE80211_BAND_2GHZ) in wl1271_cmd_build_ap_probe_req()
1179 ret = wl1271_cmd_template_set(wl, wlvif->role_id, in wl1271_cmd_build_ap_probe_req()
1183 ret = wl1271_cmd_template_set(wl, wlvif->role_id, in wl1271_cmd_build_ap_probe_req()
1194 int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl1271_cmd_build_arp_rsp() argument
1198 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl1271_cmd_build_arp_rsp()
1230 tmpl->sender_ip = wlvif->ip_addr; in wl1271_cmd_build_arp_rsp()
1233 switch (wlvif->encryption_type) { in wl1271_cmd_build_arp_rsp()
1248 wlvif->encryption_type); in wl1271_cmd_build_arp_rsp()
1259 if (wlvif->sta.qos) in wl1271_cmd_build_arp_rsp()
1266 if (wlvif->sta.qos) in wl1271_cmd_build_arp_rsp()
1270 if (wlvif->encryption_type != KEY_NONE) in wl1271_cmd_build_arp_rsp()
1278 ret = wl1271_cmd_template_set(wl, wlvif->role_id, CMD_TEMPL_ARP_RSP, in wl1271_cmd_build_arp_rsp()
1280 wlvif->basic_rate); in wl1271_cmd_build_arp_rsp()
1288 struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); in wl1271_build_qos_null_data() local
1304 return wl1271_cmd_template_set(wl, wlvif->role_id, in wl1271_build_qos_null_data()
1307 wlvif->basic_rate); in wl1271_build_qos_null_data()
1341 int wl1271_cmd_set_sta_key(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl1271_cmd_set_sta_key() argument
1350 if (wlvif->sta.hlid == WL12XX_INVALID_LINK_ID) in wl1271_cmd_set_sta_key()
1359 cmd->hlid = wlvif->sta.hlid; in wl1271_cmd_set_sta_key()
1410 int wl1271_cmd_set_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl1271_cmd_set_ap_key() argument
1423 if (hlid == wlvif->ap.bcast_hlid) { in wl1271_cmd_set_ap_key()
1472 int wl12xx_cmd_set_peer_state(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_cmd_set_peer_state() argument
1490 if (wlvif->bss_type == BSS_TYPE_STA_BSS) in wl12xx_cmd_set_peer_state()
1491 cmd->wmm = wlvif->wmm_enabled; in wl12xx_cmd_set_peer_state()
1506 int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_cmd_add_peer() argument
1538 sta_rates = sta->supp_rates[wlvif->band]; in wl12xx_cmd_add_peer()
1546 wlvif->band)); in wl12xx_cmd_add_peer()
1817 static int wl12xx_cmd_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_cmd_roc() argument
1844 wl1271_error("roc - unknown band: %d", (int)wlvif->band); in wl12xx_cmd_roc()
1891 int wl12xx_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 role_id, in wl12xx_roc() argument
1899 ret = wl12xx_cmd_roc(wl, wlvif, role_id, band, channel); in wl12xx_roc()
1932 int wl12xx_cmd_stop_channel_switch(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_cmd_stop_channel_switch() argument
1945 cmd->role_id = wlvif->role_id; in wl12xx_cmd_stop_channel_switch()
1961 int wl12xx_start_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_start_dev() argument
1966 if (WARN_ON(!(wlvif->bss_type == BSS_TYPE_STA_BSS || in wl12xx_start_dev()
1967 wlvif->bss_type == BSS_TYPE_IBSS))) in wl12xx_start_dev()
1971 wl12xx_wlvif_to_vif(wlvif)->addr, in wl12xx_start_dev()
1973 &wlvif->dev_role_id); in wl12xx_start_dev()
1977 ret = wl12xx_cmd_role_start_dev(wl, wlvif, band, channel); in wl12xx_start_dev()
1981 ret = wl12xx_roc(wl, wlvif, wlvif->dev_role_id, band, channel); in wl12xx_start_dev()
1988 wl12xx_cmd_role_stop_dev(wl, wlvif); in wl12xx_start_dev()
1990 wl12xx_cmd_role_disable(wl, &wlvif->dev_role_id); in wl12xx_start_dev()
1996 int wl12xx_stop_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_stop_dev() argument
2000 if (WARN_ON(!(wlvif->bss_type == BSS_TYPE_STA_BSS || in wl12xx_stop_dev()
2001 wlvif->bss_type == BSS_TYPE_IBSS))) in wl12xx_stop_dev()
2009 if (test_bit(wlvif->dev_role_id, wl->roc_map)) { in wl12xx_stop_dev()
2010 ret = wl12xx_croc(wl, wlvif->dev_role_id); in wl12xx_stop_dev()
2015 ret = wl12xx_cmd_role_stop_dev(wl, wlvif); in wl12xx_stop_dev()
2019 ret = wl12xx_cmd_role_disable(wl, &wlvif->dev_role_id); in wl12xx_stop_dev()