Lines Matching refs:wrole
21 struct rtw_wifi_role_t *wrole, u8 hw_band) in _phl_alloc_hw_resource() argument
36 ridx = wrole->id; in _phl_alloc_hw_resource()
51 wrole->hw_port = port_num; in _phl_alloc_hw_resource()
62 wrole->hw_wmm = 0; in _phl_alloc_hw_resource()
64 wrole->hw_wmm = wmm_num; in _phl_alloc_hw_resource()
67 if (wrole->hw_wmm == 0) in _phl_alloc_hw_resource()
68 _os_atomic_inc(phl_to_drvpriv(phl), &wrole->hw_wmm0_ref_cnt); in _phl_alloc_hw_resource()
73 wrole->hw_band = hw_band; in _phl_alloc_hw_resource()
80 PHL_DUMP_ROLE_EX(phl, wrole); in _phl_alloc_hw_resource()
87 struct rtw_wifi_role_t *wrole) in _phl_free_hw_resource() argument
94 int ridx = wrole->id; in _phl_free_hw_resource()
95 u8 hw_band = wrole->hw_band; in _phl_free_hw_resource()
98 PHL_DUMP_ROLE_EX(phl, wrole); in _phl_free_hw_resource()
102 band_ctrl->port_map &= ~BIT(wrole->hw_port); in _phl_free_hw_resource()
106 if (wrole->hw_wmm == 0) { in _phl_free_hw_resource()
107 _os_atomic_dec(phl_to_drvpriv(phl), &wrole->hw_wmm0_ref_cnt); in _phl_free_hw_resource()
108 if (_os_atomic_read(phl_to_drvpriv(phl), &wrole->hw_wmm0_ref_cnt) == 0) in _phl_free_hw_resource()
109 band_ctrl->wmm_map &= ~BIT(wrole->hw_wmm); in _phl_free_hw_resource()
113 band_ctrl->wmm_map &= ~BIT(wrole->hw_wmm); in _phl_free_hw_resource()
127 struct rtw_wifi_role_t *wrole, u8 new_band)
131 if (new_band == wrole->hw_band) {
132 PHL_ERR("%s widx:%d at the same band(%d)\n", __func__, wrole->id, new_band);
136 _phl_free_hw_resource(phl, wrole);
137 _phl_alloc_hw_resource(phl, wrole, new_band);
170 struct rtw_wifi_role_t *wrole = NULL; in phl_get_wrole_by_addr() local
175 wrole = &(phl_com->wifi_roles[ridx]); in phl_get_wrole_by_addr()
177 wrole->mac_addr, mac_addr, MAC_ALEN) == 0) { in phl_get_wrole_by_addr()
185 wrole = NULL; in phl_get_wrole_by_addr()
187 return wrole; in phl_get_wrole_by_addr()
223 struct rtw_wifi_role_t *wrole, enum role_state rstate) in _phl_send_role_notify_cmd() argument
236 rcmd->wrole = wrole; in _phl_send_role_notify_cmd()
263 struct rtw_wifi_role_t *wrole, in _phl_role_notify() argument
272 _phl_send_role_notify_cmd(phl_info, wrole, rstate); in _phl_role_notify()
275 rtw_phl_btc_role_notify(phl_info, wrole->id, rstate); in _phl_role_notify()
352 struct rtw_wifi_role_t *wrole, in _phl_wifi_role_start() argument
371 hsts = rtw_hal_role_cfg(phl_info->hal, wrole); in _phl_wifi_role_start()
377 wrole->active = true; in _phl_wifi_role_start()
378 _phl_role_notify(phl_info, wrole, PHL_ROLE_START); in _phl_wifi_role_start()
387 _phl_wifi_role_free_sw(struct phl_info_t *phl_info, struct rtw_wifi_role_t *wrole) in _phl_wifi_role_free_sw() argument
392 _phl_free_hw_resource(phl_info, wrole); in _phl_wifi_role_free_sw()
393 _os_mem_set(phl_to_drvpriv(phl_info), wrole->mac_addr, 0, MAC_ALEN); in _phl_wifi_role_free_sw()
395 mr_ctl->role_map &= ~BIT(wrole->id); in _phl_wifi_role_free_sw()
397 wrole->active = false; in _phl_wifi_role_free_sw()
398 wrole->mstate = MLME_NO_LINK; in _phl_wifi_role_free_sw()
399 wrole->type = PHL_RTYPE_NONE; in _phl_wifi_role_free_sw()
405 struct rtw_wifi_role_t *wrole; member
414 return _phl_wifi_role_start(phl_info, cmd_wr->wrole, cmd_wr->sta); in phl_wifi_role_start_hdl()
429 struct rtw_wifi_role_t *wrole, in phl_wifi_role_start() argument
444 wr_start->wrole = wrole; in phl_wifi_role_start()
448 wrole->hw_band, in phl_wifi_role_start()
459 PHL_INFO("%s wr-id:%d failure\n", __func__, wrole->id); in phl_wifi_role_start()
464 PHL_INFO("%s wr-id:%d failure\n", __func__, wrole->id); in phl_wifi_role_start()
466 PHL_INFO("%s wr-id:%d success\n", __func__, wrole->id); in phl_wifi_role_start()
475 struct rtw_wifi_role_t *wrole, in phl_wifi_role_start() argument
478 return _phl_wifi_role_start(phl_info, wrole, sta); in phl_wifi_role_start()
545 phl_role_noa_notify(struct phl_info_t *phl_info, struct rtw_wifi_role_t *wrole) in phl_role_noa_notify() argument
547 _phl_role_notify(phl_info, wrole, PHL_ROLE_UPDATE_NOA); in phl_role_noa_notify()
554 struct rtw_wifi_role_t *wrole, u8 link_sts) in phl_role_ap_client_notify() argument
565 _phl_role_notify(phl_info, wrole, rstate); in phl_role_ap_client_notify()
567 phl_mcc_client_link_notify_for_ap(phl_info, wrole, rstate); in phl_role_ap_client_notify()
573 phl_role_notify(struct phl_info_t *phl_info, struct rtw_wifi_role_t *wrole) in phl_role_notify() argument
577 switch (wrole->type) { in phl_role_notify()
581 if (wrole->mstate == MLME_LINKING) in phl_role_notify()
583 else if (wrole->mstate == MLME_LINKED) in phl_role_notify()
595 rstate = (wrole->mstate == MLME_NO_LINK) in phl_role_notify()
610 __func__, wrole->type); in phl_role_notify()
615 __func__, wrole->type); in phl_role_notify()
619 _phl_role_notify(phl_info, wrole, rstate); in phl_role_notify()
634 struct rtw_wifi_role_t *wrole, in phl_wifi_role_change() argument
649 if (wrole->type == type) { in phl_wifi_role_change()
650 PHL_WARN("wrole type(%d) not change\n", wrole->type); in phl_wifi_role_change()
655 wrole->type, type); in phl_wifi_role_change()
657 sta = rtw_phl_get_stainfo_self(phl_info, wrole); in phl_wifi_role_change()
659 if (type == PHL_RTYPE_TDLS || wrole->type == PHL_RTYPE_TDLS) { in phl_wifi_role_change()
660 wrole->type = type; in phl_wifi_role_change()
664 wrole->type = type; in phl_wifi_role_change()
665 wrole->mstate = MLME_NO_LINK; in phl_wifi_role_change()
669 if (wrole->type == PHL_RTYPE_AP) { in phl_wifi_role_change()
670 wrole->bcn_cmn.bcn_interval = 100; in phl_wifi_role_change()
671 wrole->mstate = MLME_LINKED; in phl_wifi_role_change()
672 wrole->hiq_win = 16; /* unit: ms */ in phl_wifi_role_change()
676 phl_init_role_cap(phl_info, wrole); in phl_wifi_role_change()
677 phl_init_protocol_cap(phl_info, wrole); in phl_wifi_role_change()
679 rtw_hal_role_cfg(phl_info->hal, wrole); in phl_wifi_role_change()
682 _os_mem_cpy(drv, sta->mac_addr, wrole->mac_addr, MAC_ALEN); in phl_wifi_role_change()
685 _phl_role_notify(phl_info, wrole, PHL_ROLE_CHG_TYPE); in phl_wifi_role_change()
698 if(_os_mem_cmp(drv, wrole->mac_addr, maddr, MAC_ALEN) == 0) { in phl_wifi_role_change()
705 wrole->mac_addr[0], wrole->mac_addr[1], in phl_wifi_role_change()
706 wrole->mac_addr[2], wrole->mac_addr[3], in phl_wifi_role_change()
707 wrole->mac_addr[4], wrole->mac_addr[5], in phl_wifi_role_change()
711 _os_mem_cpy(drv, wrole->mac_addr, maddr, MAC_ALEN); in phl_wifi_role_change()
712 sta = rtw_phl_get_stainfo_self(phl_info, wrole); in phl_wifi_role_change()
715 _os_mem_cpy(drv, sta->mac_addr, wrole->mac_addr, MAC_ALEN); in phl_wifi_role_change()
725 if (wrole->type != PHL_RTYPE_AP) in phl_wifi_role_change()
731 wrole->proto_role_cap.bsscolor = (u8)bsscolor; in phl_wifi_role_change()
732 rtw_hal_role_cfg_ex(phl_info->hal, wrole, PCFG_BSS_CLR, &bsscolor); in phl_wifi_role_change()
736 PHL_INFO("wrole->type(%d) WR_CHG_AP_PARAM todo.....\n", wrole->type); in phl_wifi_role_change()
746 hstate = rtw_hal_set_edca(phl_info->hal, wrole, param->ac, in phl_wifi_role_change()
755 hstate = rtw_hal_set_mu_edca(phl_info->hal, wrole->hw_band, param->ac, in phl_wifi_role_change()
766 wrole->hw_band, wrole->hw_wmm, val); in phl_wifi_role_change()
774 hstate = rtw_hal_role_cfg_ex(phl_info->hal, wrole, PCFG_BSS_CLR, &val); in phl_wifi_role_change()
785 wrole->hw_band, in phl_wifi_role_change()
817 phl_init_proto_stbc_cap(wrole, phl_info, &wrole->proto_role_cap); in phl_wifi_role_change()
836 struct rtw_wifi_role_t *wrole; member
847 return phl_wifi_role_change(phl_info, wr_chg->wrole, wr_chg->id, wr_chg->info); in phl_wifi_role_chg_hdl()
873 struct rtw_wifi_role_t *wrole, in rtw_phl_cmd_wrole_change() argument
888 psts = phl_wifi_role_change(phl_info, wrole, chg_id, chg_info); in rtw_phl_cmd_wrole_change()
900 wr_chg->wrole = wrole; in rtw_phl_cmd_wrole_change()
914 wrole->hw_band, in rtw_phl_cmd_wrole_change()
925 PHL_INFO("%s wr-id:%d failure\n", __func__, wrole->id); in rtw_phl_cmd_wrole_change()
929 PHL_INFO("%s wr-id:%d failure\n", __func__, wrole->id); in rtw_phl_cmd_wrole_change()
932 PHL_INFO("%s wr-id:%d success\n", __func__, wrole->id); in rtw_phl_cmd_wrole_change()
950 struct rtw_wifi_role_t *wrole, in rtw_phl_cmd_wrole_change() argument
954 return phl_wifi_role_change((struct phl_info_t *)phl, wrole, chg_id, chg_info); in rtw_phl_cmd_wrole_change()
959 _phl_wifi_role_stop(struct phl_info_t *phl_info, struct rtw_wifi_role_t *wrole) in _phl_wifi_role_stop() argument
963 wrole->active = false; in _phl_wifi_role_stop()
964 _phl_role_notify(phl_info, wrole, PHL_ROLE_STOP); in _phl_wifi_role_stop()
965 psts = phl_wifi_role_free_stainfo_hw(phl_info, wrole); in _phl_wifi_role_stop()
978 struct rtw_wifi_role_t *wrole = (struct rtw_wifi_role_t *)param; in phl_wifi_role_stop_hdl() local
980 return _phl_wifi_role_stop(phl_info, wrole); in phl_wifi_role_stop_hdl()
986 struct rtw_wifi_role_t *wrole = NULL; in phl_wifi_role_stop_done() local
988 wrole = (struct rtw_wifi_role_t *)cmd; in phl_wifi_role_stop_done()
991 __func__, wrole->id, status); in phl_wifi_role_stop_done()
994 __func__, wrole->id); in phl_wifi_role_stop_done()
999 phl_wifi_role_stop(struct phl_info_t *phl_info, struct rtw_wifi_role_t *wrole) in phl_wifi_role_stop() argument
1004 wrole->hw_band, in phl_wifi_role_stop()
1006 (u8 *)wrole, in phl_wifi_role_stop()
1014 PHL_INFO("%s wr-id:%d failure\n", __func__, wrole->id); in phl_wifi_role_stop()
1018 PHL_INFO("%s wr-id:%d failure\n", __func__, wrole->id); in phl_wifi_role_stop()
1020 PHL_INFO("%s wr-id:%d success\n", __func__, wrole->id); in phl_wifi_role_stop()
1027 phl_wifi_role_stop(struct phl_info_t *phl_info, struct rtw_wifi_role_t *wrole) in phl_wifi_role_stop() argument
1029 return _phl_wifi_role_stop(phl_info, wrole); in phl_wifi_role_stop()
1036 struct rtw_wifi_role_t *wrole = NULL; in rtw_phl_wifi_role_free() local
1043 wrole = &phl_com->wifi_roles[role_idx]; in rtw_phl_wifi_role_free()
1045 if (phl_wifi_role_stop(phl_info, wrole) != RTW_PHL_STATUS_SUCCESS) { in rtw_phl_wifi_role_free()
1050 if (phl_wifi_role_free_stainfo_sw(phl_info, wrole) != RTW_PHL_STATUS_SUCCESS) { in rtw_phl_wifi_role_free()
1054 _phl_wifi_role_free_sw(phl_info, wrole); in rtw_phl_wifi_role_free()
1097 struct rtw_wifi_role_t *wrole; in phl_role_recover() local
1102 wrole = rtw_phl_get_wrole_by_ridx(phl_info->phl_com, role_idx); in phl_role_recover()
1103 if(wrole == NULL) in phl_role_recover()
1108 sta = rtw_phl_get_stainfo_self(phl_info, wrole); in phl_role_recover()
1112 pstatus = _phl_wifi_role_start(phl_info, wrole, sta); in phl_role_recover()
1118 if (wrole->target_type != PHL_RTYPE_NONE) { in phl_role_recover()
1119 PHL_INFO("%s with role_idx %d change to role type %d\n", __func__, role_idx, wrole->target_type); in phl_role_recover()
1120 phl_wifi_role_change(phl_info, wrole, WR_CHG_TYPE, (u8 *)&wrole->target_type); in phl_role_recover()
1121 wrole->target_type = PHL_RTYPE_NONE; in phl_role_recover()
1152 struct rtw_wifi_role_t *wrole; in phl_role_suspend() local
1156 wrole = rtw_phl_get_wrole_by_ridx(phl_info->phl_com, role_idx); in phl_role_suspend()
1157 if (wrole == NULL) in phl_role_suspend()
1160 if (wrole->active == false) in phl_role_suspend()
1165 pstatus = _phl_wifi_role_stop(phl_info, wrole); in phl_role_suspend()
1194 u16 phl_role_get_bcn_intvl(struct phl_info_t *phl, struct rtw_wifi_role_t *wrole) in phl_role_get_bcn_intvl() argument
1196 struct rtw_phl_stainfo_t *sta = rtw_phl_get_stainfo_self(phl, wrole); in phl_role_get_bcn_intvl()
1199 if (phl_role_is_client_category(wrole)) { in phl_role_get_bcn_intvl()
1202 } else if (phl_role_is_ap_category(wrole)) { in phl_role_get_bcn_intvl()
1203 bcn_intvl = (u16)wrole->bcn_cmn.bcn_interval; in phl_role_get_bcn_intvl()
1207 wrole->id, wrole->type); in phl_role_get_bcn_intvl()
1213 phl_wifi_role_macid_all_pause(struct phl_info_t *phl_info, struct rtw_wifi_role_t *wrole, bool paus… in phl_wifi_role_macid_all_pause() argument
1219 switch (wrole->type) { in phl_wifi_role_macid_all_pause()
1238 _os_mem_cpy(drv, macid_pause, &mctrl->wifi_role_usedmap[wrole->id][0], PHL_MACID_MAX_ARRAY_NUM); in phl_wifi_role_macid_all_pause()
1246 struct rtw_phl_stainfo_t * self_sta = rtw_phl_get_stainfo_self((void *)phl_info, wrole); in phl_wifi_role_macid_all_pause()