• Home
  • Raw
  • Download

Lines Matching refs:wlvif

310 int wl12xx_allocate_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 *hlid)  in wl12xx_allocate_link()  argument
322 __set_bit(link, wlvif->links_map); in wl12xx_allocate_link()
333 wl->links[link].wlvif = wlvif; in wl12xx_allocate_link()
339 if (wlvif->bss_type != BSS_TYPE_AP_BSS) in wl12xx_allocate_link()
340 wl->links[link].total_freed_pkts = wlvif->total_freed_pkts; in wl12xx_allocate_link()
348 void wl12xx_free_link(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 *hlid) in wl12xx_free_link() argument
358 __clear_bit(*hlid, wlvif->links_map); in wl12xx_free_link()
371 wl->links[*hlid].wlvif = NULL; in wl12xx_free_link()
373 if (wlvif->bss_type == BSS_TYPE_AP_BSS && in wl12xx_free_link()
374 *hlid == wlvif->ap.bcast_hlid) { in wl12xx_free_link()
380 wlvif->total_freed_pkts = wl->links[*hlid].total_freed_pkts; in wl12xx_free_link()
386 if (wlvif->encryption_type == KEY_GEM) in wl12xx_free_link()
390 wlvif->total_freed_pkts += sqn_padding; in wl12xx_free_link()
419 struct wl12xx_vif *wlvif, in wl12xx_cmd_role_start_dev() argument
432 wl1271_debug(DEBUG_CMD, "cmd role start dev %d", wlvif->dev_role_id); in wl12xx_cmd_role_start_dev()
434 cmd->role_id = wlvif->dev_role_id; in wl12xx_cmd_role_start_dev()
439 if (wlvif->dev_hlid == WL12XX_INVALID_LINK_ID) { in wl12xx_cmd_role_start_dev()
440 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->dev_hlid); in wl12xx_cmd_role_start_dev()
444 cmd->device.hlid = wlvif->dev_hlid; in wl12xx_cmd_role_start_dev()
445 cmd->device.session = wl->session_ids[wlvif->dev_hlid]; in wl12xx_cmd_role_start_dev()
460 wl12xx_free_link(wl, wlvif, &wlvif->dev_hlid); in wl12xx_cmd_role_start_dev()
470 struct wl12xx_vif *wlvif) in wl12xx_cmd_role_stop_dev() argument
475 if (WARN_ON(wlvif->dev_hlid == WL12XX_INVALID_LINK_ID)) in wl12xx_cmd_role_stop_dev()
486 cmd->role_id = wlvif->dev_role_id; in wl12xx_cmd_role_stop_dev()
496 wl12xx_free_link(wl, wlvif, &wlvif->dev_hlid); in wl12xx_cmd_role_stop_dev()
505 int wl12xx_cmd_role_start_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_cmd_role_start_sta() argument
507 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl12xx_cmd_role_start_sta()
518 wl1271_debug(DEBUG_CMD, "cmd role start sta %d", wlvif->role_id); in wl12xx_cmd_role_start_sta()
520 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_start_sta()
521 if (wlvif->band == NL80211_BAND_5GHZ) in wl12xx_cmd_role_start_sta()
523 cmd->channel = wlvif->channel; in wl12xx_cmd_role_start_sta()
524 cmd->sta.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); in wl12xx_cmd_role_start_sta()
525 cmd->sta.beacon_interval = cpu_to_le16(wlvif->beacon_int); in wl12xx_cmd_role_start_sta()
527 cmd->sta.ssid_len = wlvif->ssid_len; in wl12xx_cmd_role_start_sta()
528 memcpy(cmd->sta.ssid, wlvif->ssid, wlvif->ssid_len); in wl12xx_cmd_role_start_sta()
532 wlcore_hw_sta_get_ap_rate_mask(wl, wlvif); in wl12xx_cmd_role_start_sta()
533 if (wlvif->p2p) in wl12xx_cmd_role_start_sta()
538 cmd->channel_type = wlcore_get_native_channel_type(wlvif->channel_type); in wl12xx_cmd_role_start_sta()
540 if (wlvif->sta.hlid == WL12XX_INVALID_LINK_ID) { in wl12xx_cmd_role_start_sta()
541 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->sta.hlid); in wl12xx_cmd_role_start_sta()
545 cmd->sta.hlid = wlvif->sta.hlid; in wl12xx_cmd_role_start_sta()
546 cmd->sta.session = wl->session_ids[wlvif->sta.hlid]; in wl12xx_cmd_role_start_sta()
557 wlvif->role_id, cmd->sta.hlid, cmd->sta.session, in wl12xx_cmd_role_start_sta()
558 wlvif->basic_rate_set, wlvif->rate_set); in wl12xx_cmd_role_start_sta()
566 wlvif->sta.role_chan_type = wlvif->channel_type; in wl12xx_cmd_role_start_sta()
571 wl12xx_free_link(wl, wlvif, &wlvif->sta.hlid); in wl12xx_cmd_role_start_sta()
581 int wl12xx_cmd_role_stop_sta(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_cmd_role_stop_sta() argument
586 if (WARN_ON(wlvif->sta.hlid == WL12XX_INVALID_LINK_ID)) in wl12xx_cmd_role_stop_sta()
595 wl1271_debug(DEBUG_CMD, "cmd role stop sta %d", wlvif->role_id); in wl12xx_cmd_role_stop_sta()
597 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_stop_sta()
607 wl12xx_free_link(wl, wlvif, &wlvif->sta.hlid); in wl12xx_cmd_role_stop_sta()
616 int wl12xx_cmd_role_start_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_cmd_role_start_ap() argument
619 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl12xx_cmd_role_start_ap()
624 wl1271_debug(DEBUG_CMD, "cmd role start ap %d", wlvif->role_id); in wl12xx_cmd_role_start_ap()
629 if (wlvif->ssid_len == 0 && !bss_conf->hidden_ssid) { in wl12xx_cmd_role_start_ap()
642 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->ap.global_hlid); in wl12xx_cmd_role_start_ap()
646 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->ap.bcast_hlid); in wl12xx_cmd_role_start_ap()
651 wl->links[wlvif->ap.bcast_hlid].total_freed_pkts = in wl12xx_cmd_role_start_ap()
652 wlvif->total_freed_pkts; in wl12xx_cmd_role_start_ap()
654 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_start_ap()
657 cmd->ap.global_hlid = wlvif->ap.global_hlid; in wl12xx_cmd_role_start_ap()
658 cmd->ap.broadcast_hlid = wlvif->ap.bcast_hlid; in wl12xx_cmd_role_start_ap()
659 cmd->ap.global_session_id = wl->session_ids[wlvif->ap.global_hlid]; in wl12xx_cmd_role_start_ap()
660 cmd->ap.bcast_session_id = wl->session_ids[wlvif->ap.bcast_hlid]; in wl12xx_cmd_role_start_ap()
661 cmd->ap.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); in wl12xx_cmd_role_start_ap()
662 cmd->ap.beacon_interval = cpu_to_le16(wlvif->beacon_int); in wl12xx_cmd_role_start_ap()
667 cmd->ap.wmm = wlvif->wmm_enabled; in wl12xx_cmd_role_start_ap()
668 cmd->channel = wlvif->channel; in wl12xx_cmd_role_start_ap()
669 cmd->channel_type = wlcore_get_native_channel_type(wlvif->channel_type); in wl12xx_cmd_role_start_ap()
674 cmd->ap.ssid_len = wlvif->ssid_len; in wl12xx_cmd_role_start_ap()
675 memcpy(cmd->ap.ssid, wlvif->ssid, wlvif->ssid_len); in wl12xx_cmd_role_start_ap()
683 wlcore_hw_ap_get_mimo_wide_rate_mask(wl, wlvif); in wl12xx_cmd_role_start_ap()
684 if (wlvif->p2p) in wl12xx_cmd_role_start_ap()
692 switch (wlvif->band) { in wl12xx_cmd_role_start_ap()
700 wl1271_warning("ap start - unknown band: %d", (int)wlvif->band); in wl12xx_cmd_role_start_ap()
714 wl12xx_free_link(wl, wlvif, &wlvif->ap.bcast_hlid); in wl12xx_cmd_role_start_ap()
717 wl12xx_free_link(wl, wlvif, &wlvif->ap.global_hlid); in wl12xx_cmd_role_start_ap()
726 int wl12xx_cmd_role_stop_ap(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_cmd_role_stop_ap() argument
737 wl1271_debug(DEBUG_CMD, "cmd role stop ap %d", wlvif->role_id); in wl12xx_cmd_role_stop_ap()
739 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_stop_ap()
747 wl12xx_free_link(wl, wlvif, &wlvif->ap.bcast_hlid); in wl12xx_cmd_role_stop_ap()
748 wl12xx_free_link(wl, wlvif, &wlvif->ap.global_hlid); in wl12xx_cmd_role_stop_ap()
757 int wl12xx_cmd_role_start_ibss(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_cmd_role_start_ibss() argument
759 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl12xx_cmd_role_start_ibss()
770 wl1271_debug(DEBUG_CMD, "cmd role start ibss %d", wlvif->role_id); in wl12xx_cmd_role_start_ibss()
772 cmd->role_id = wlvif->role_id; in wl12xx_cmd_role_start_ibss()
773 if (wlvif->band == NL80211_BAND_5GHZ) in wl12xx_cmd_role_start_ibss()
775 cmd->channel = wlvif->channel; in wl12xx_cmd_role_start_ibss()
776 cmd->ibss.basic_rate_set = cpu_to_le32(wlvif->basic_rate_set); in wl12xx_cmd_role_start_ibss()
777 cmd->ibss.beacon_interval = cpu_to_le16(wlvif->beacon_int); in wl12xx_cmd_role_start_ibss()
780 cmd->ibss.ssid_len = wlvif->ssid_len; in wl12xx_cmd_role_start_ibss()
781 memcpy(cmd->ibss.ssid, wlvif->ssid, wlvif->ssid_len); in wl12xx_cmd_role_start_ibss()
783 cmd->sta.local_rates = cpu_to_le32(wlvif->rate_set); in wl12xx_cmd_role_start_ibss()
785 if (wlvif->sta.hlid == WL12XX_INVALID_LINK_ID) { in wl12xx_cmd_role_start_ibss()
786 ret = wl12xx_allocate_link(wl, wlvif, &wlvif->sta.hlid); in wl12xx_cmd_role_start_ibss()
790 cmd->ibss.hlid = wlvif->sta.hlid; in wl12xx_cmd_role_start_ibss()
791 cmd->ibss.remote_rates = cpu_to_le32(wlvif->rate_set); in wl12xx_cmd_role_start_ibss()
795 wlvif->role_id, cmd->sta.hlid, cmd->sta.session, in wl12xx_cmd_role_start_ibss()
796 wlvif->basic_rate_set, wlvif->rate_set); in wl12xx_cmd_role_start_ibss()
811 wl12xx_free_link(wl, wlvif, &wlvif->sta.hlid); in wl12xx_cmd_role_start_ibss()
980 int wl1271_cmd_ps_mode(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl1271_cmd_ps_mode() argument
994 ps_params->role_id = wlvif->role_id; in wl1271_cmd_ps_mode()
1054 int wl12xx_cmd_build_null_data(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_cmd_build_null_data() argument
1062 if (wlvif->bss_type == BSS_TYPE_IBSS) { in wl12xx_cmd_build_null_data()
1067 wl12xx_wlvif_to_vif(wlvif), in wl12xx_cmd_build_null_data()
1075 ret = wl1271_cmd_template_set(wl, wlvif->role_id, in wl12xx_cmd_build_null_data()
1077 wlvif->basic_rate); in wl12xx_cmd_build_null_data()
1089 struct wl12xx_vif *wlvif) in wl12xx_cmd_build_klv_null_data() argument
1091 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl12xx_cmd_build_klv_null_data()
1099 ret = wl1271_cmd_template_set(wl, wlvif->role_id, CMD_TEMPL_KLV, in wl12xx_cmd_build_klv_null_data()
1101 wlvif->sta.klv_template_id, in wl12xx_cmd_build_klv_null_data()
1102 wlvif->basic_rate); in wl12xx_cmd_build_klv_null_data()
1113 int wl1271_cmd_build_ps_poll(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl1271_cmd_build_ps_poll() argument
1116 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl1271_cmd_build_ps_poll()
1124 ret = wl1271_cmd_template_set(wl, wlvif->role_id, in wl1271_cmd_build_ps_poll()
1126 skb->len, 0, wlvif->basic_rate_set); in wl1271_cmd_build_ps_poll()
1133 int wl12xx_cmd_build_probe_req(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_cmd_build_probe_req() argument
1139 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl12xx_cmd_build_probe_req()
1165 rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[band]); in wl12xx_cmd_build_probe_req()
1182 struct wl12xx_vif *wlvif, in wl1271_cmd_build_ap_probe_req() argument
1185 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl1271_cmd_build_ap_probe_req()
1196 rate = wl1271_tx_min_rate_get(wl, wlvif->bitrate_masks[wlvif->band]); in wl1271_cmd_build_ap_probe_req()
1197 if (wlvif->band == NL80211_BAND_2GHZ) in wl1271_cmd_build_ap_probe_req()
1198 ret = wl1271_cmd_template_set(wl, wlvif->role_id, in wl1271_cmd_build_ap_probe_req()
1202 ret = wl1271_cmd_template_set(wl, wlvif->role_id, in wl1271_cmd_build_ap_probe_req()
1213 int wl1271_cmd_build_arp_rsp(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl1271_cmd_build_arp_rsp() argument
1217 struct ieee80211_vif *vif = wl12xx_wlvif_to_vif(wlvif); in wl1271_cmd_build_arp_rsp()
1248 tmpl->sender_ip = wlvif->ip_addr; in wl1271_cmd_build_arp_rsp()
1251 switch (wlvif->encryption_type) { in wl1271_cmd_build_arp_rsp()
1266 wlvif->encryption_type); in wl1271_cmd_build_arp_rsp()
1277 if (wlvif->sta.qos) in wl1271_cmd_build_arp_rsp()
1284 if (wlvif->sta.qos) in wl1271_cmd_build_arp_rsp()
1288 if (wlvif->encryption_type != KEY_NONE) in wl1271_cmd_build_arp_rsp()
1296 ret = wl1271_cmd_template_set(wl, wlvif->role_id, CMD_TEMPL_ARP_RSP, in wl1271_cmd_build_arp_rsp()
1298 wlvif->basic_rate); in wl1271_cmd_build_arp_rsp()
1306 struct wl12xx_vif *wlvif = wl12xx_vif_to_data(vif); in wl1271_build_qos_null_data() local
1322 return wl1271_cmd_template_set(wl, wlvif->role_id, in wl1271_build_qos_null_data()
1325 wlvif->basic_rate); in wl1271_build_qos_null_data()
1359 int wl1271_cmd_set_sta_key(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl1271_cmd_set_sta_key() argument
1368 if (wlvif->sta.hlid == WL12XX_INVALID_LINK_ID) in wl1271_cmd_set_sta_key()
1377 cmd->hlid = wlvif->sta.hlid; in wl1271_cmd_set_sta_key()
1428 int wl1271_cmd_set_ap_key(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl1271_cmd_set_ap_key() argument
1441 if (hlid == wlvif->ap.bcast_hlid) { in wl1271_cmd_set_ap_key()
1492 int wl12xx_cmd_set_peer_state(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_cmd_set_peer_state() argument
1510 if (wlvif->bss_type == BSS_TYPE_STA_BSS) in wl12xx_cmd_set_peer_state()
1511 cmd->wmm = wlvif->wmm_enabled; in wl12xx_cmd_set_peer_state()
1526 int wl12xx_cmd_add_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_cmd_add_peer() argument
1548 cmd->role_id = wlvif->role_id; in wl12xx_cmd_add_peer()
1559 sta_rates = sta->deflink.supp_rates[wlvif->band]; in wl12xx_cmd_add_peer()
1567 wlvif->band)); in wl12xx_cmd_add_peer()
1572 wlvif->basic_rate_set); in wl12xx_cmd_add_peer()
1573 cmd->supported_rates = cpu_to_le32(wlvif->basic_rate_set); in wl12xx_cmd_add_peer()
1592 int wl12xx_cmd_remove_peer(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_cmd_remove_peer() argument
1611 cmd->role_id = wlvif->role_id; in wl12xx_cmd_remove_peer()
1857 static int wl12xx_cmd_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_cmd_roc() argument
1884 wl1271_error("roc - unknown band: %d", (int)wlvif->band); in wl12xx_cmd_roc()
1931 int wl12xx_roc(struct wl1271 *wl, struct wl12xx_vif *wlvif, u8 role_id, in wl12xx_roc() argument
1939 ret = wl12xx_cmd_roc(wl, wlvif, role_id, band, channel); in wl12xx_roc()
1972 int wl12xx_cmd_stop_channel_switch(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_cmd_stop_channel_switch() argument
1985 cmd->role_id = wlvif->role_id; in wl12xx_cmd_stop_channel_switch()
2001 int wl12xx_start_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wl12xx_start_dev() argument
2006 if (WARN_ON(!(wlvif->bss_type == BSS_TYPE_STA_BSS || in wl12xx_start_dev()
2007 wlvif->bss_type == BSS_TYPE_IBSS))) in wl12xx_start_dev()
2011 if (!wlcore_is_p2p_mgmt(wlvif)) { in wl12xx_start_dev()
2013 wl12xx_wlvif_to_vif(wlvif)->addr, in wl12xx_start_dev()
2015 &wlvif->dev_role_id); in wl12xx_start_dev()
2020 ret = wl12xx_cmd_role_start_dev(wl, wlvif, band, channel); in wl12xx_start_dev()
2024 ret = wl12xx_roc(wl, wlvif, wlvif->dev_role_id, band, channel); in wl12xx_start_dev()
2031 wl12xx_cmd_role_stop_dev(wl, wlvif); in wl12xx_start_dev()
2033 if (!wlcore_is_p2p_mgmt(wlvif)) in wl12xx_start_dev()
2034 wl12xx_cmd_role_disable(wl, &wlvif->dev_role_id); in wl12xx_start_dev()
2040 int wl12xx_stop_dev(struct wl1271 *wl, struct wl12xx_vif *wlvif) in wl12xx_stop_dev() argument
2044 if (WARN_ON(!(wlvif->bss_type == BSS_TYPE_STA_BSS || in wl12xx_stop_dev()
2045 wlvif->bss_type == BSS_TYPE_IBSS))) in wl12xx_stop_dev()
2053 if (test_bit(wlvif->dev_role_id, wl->roc_map)) { in wl12xx_stop_dev()
2054 ret = wl12xx_croc(wl, wlvif->dev_role_id); in wl12xx_stop_dev()
2059 ret = wl12xx_cmd_role_stop_dev(wl, wlvif); in wl12xx_stop_dev()
2063 if (!wlcore_is_p2p_mgmt(wlvif)) { in wl12xx_stop_dev()
2064 ret = wl12xx_cmd_role_disable(wl, &wlvif->dev_role_id); in wl12xx_stop_dev()
2073 int wlcore_cmd_generic_cfg(struct wl1271 *wl, struct wl12xx_vif *wlvif, in wlcore_cmd_generic_cfg() argument
2081 wlvif->role_id, feature, enable, value); in wlcore_cmd_generic_cfg()
2087 cmd->role_id = wlvif->role_id; in wlcore_cmd_generic_cfg()