Lines Matching refs:mac
150 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_stop() local
171 mac->link_state = MAC80211_NOLINK; in rtl_op_stop()
172 eth_zero_addr(mac->bssid); in rtl_op_stop()
173 mac->vendor = PEER_UNKNOWN; in rtl_op_stop()
214 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_add_interface() local
218 if (mac->vif) { in rtl_op_add_interface()
220 "vif has been set!! mac->vif = 0x%p\n", mac->vif); in rtl_op_add_interface()
231 mac->p2p = P2P_ROLE_CLIENT; in rtl_op_add_interface()
234 if (mac->beacon_enabled == 1) { in rtl_op_add_interface()
237 mac->beacon_enabled = 0; in rtl_op_add_interface()
246 mac->link_state = MAC80211_LINKED; in rtl_op_add_interface()
249 mac->basic_rates = 0xfff; in rtl_op_add_interface()
251 mac->basic_rates = 0xff0; in rtl_op_add_interface()
253 (u8 *)(&mac->basic_rates)); in rtl_op_add_interface()
258 mac->p2p = P2P_ROLE_GO; in rtl_op_add_interface()
264 mac->link_state = MAC80211_LINKED; in rtl_op_add_interface()
267 mac->basic_rates = 0xfff; in rtl_op_add_interface()
269 mac->basic_rates = 0xff0; in rtl_op_add_interface()
271 (u8 *)(&mac->basic_rates)); in rtl_op_add_interface()
279 mac->link_state = MAC80211_LINKED; in rtl_op_add_interface()
282 mac->basic_rates = 0xfff; in rtl_op_add_interface()
284 mac->basic_rates = 0xff0; in rtl_op_add_interface()
286 (u8 *)(&mac->basic_rates)); in rtl_op_add_interface()
297 if (mac->p2p) { in rtl_op_add_interface()
300 mac->basic_rates = 0xff0;/*disable cck rate for p2p*/ in rtl_op_add_interface()
302 (u8 *)(&mac->basic_rates)); in rtl_op_add_interface()
304 mac->vif = vif; in rtl_op_add_interface()
305 mac->opmode = vif->type; in rtl_op_add_interface()
307 memcpy(mac->mac_addr, vif->addr, ETH_ALEN); in rtl_op_add_interface()
308 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_ETHER_ADDR, mac->mac_addr); in rtl_op_add_interface()
310 mac->retry_long = retry_limit; in rtl_op_add_interface()
311 mac->retry_short = retry_limit; in rtl_op_add_interface()
323 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_remove_interface() local
331 if (mac->beacon_enabled == 1) { in rtl_op_remove_interface()
332 mac->beacon_enabled = 0; in rtl_op_remove_interface()
342 mac->p2p = 0; in rtl_op_remove_interface()
343 mac->vif = NULL; in rtl_op_remove_interface()
344 mac->link_state = MAC80211_NOLINK; in rtl_op_remove_interface()
345 eth_zero_addr(mac->bssid); in rtl_op_remove_interface()
346 mac->vendor = PEER_UNKNOWN; in rtl_op_remove_interface()
347 mac->opmode = NL80211_IFTYPE_UNSPECIFIED; in rtl_op_remove_interface()
348 rtlpriv->cfg->ops->set_network_type(hw, mac->opmode); in rtl_op_remove_interface()
423 struct rtl_mac *mac = &rtlpriv->mac80211; in _rtl_add_wowlan_patterns() local
458 else if (memcmp(pattern_os, mac->mac_addr, 6) == 0) in _rtl_add_wowlan_patterns()
559 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_resume() local
574 ieee80211_resume_disconnect(mac->vif); in rtl_op_resume()
584 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_config() local
588 if (mac->skip_scan) in rtl_op_config()
644 mac->retry_long = hw->conf.long_frame_max_tx_count; in rtl_op_config()
645 mac->retry_short = hw->conf.long_frame_max_tx_count; in rtl_op_config()
662 if (mac->act_scanning) in rtl_op_config()
663 mac->n_channels++; in rtl_op_config()
666 mac->link_state < MAC80211_LINKED && in rtl_op_config()
667 !mac->act_scanning) { in rtl_op_config()
690 mac->bw_80 = true; in rtl_op_config()
691 mac->bw_40 = true; in rtl_op_config()
693 mac->cur_80_prime_sc = in rtl_op_config()
696 mac->cur_40_prime_sc = in rtl_op_config()
701 mac->cur_40_prime_sc = in rtl_op_config()
707 mac->cur_80_prime_sc = in rtl_op_config()
710 mac->cur_40_prime_sc = in rtl_op_config()
715 mac->cur_40_prime_sc = in rtl_op_config()
727 mac->cur_40_prime_sc = in rtl_op_config()
731 mac->bw_40 = false; in rtl_op_config()
732 mac->bw_80 = false; in rtl_op_config()
736 mac->cur_40_prime_sc = in rtl_op_config()
740 mac->bw_40 = true; in rtl_op_config()
741 mac->bw_80 = false; in rtl_op_config()
749 mac->cur_40_prime_sc = in rtl_op_config()
753 mac->bw_40 = true; in rtl_op_config()
754 mac->bw_80 = false; in rtl_op_config()
761 mac->bw_40 = false; in rtl_op_config()
762 mac->bw_80 = false; in rtl_op_config()
803 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_configure_filter() local
812 mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AM] | in rtl_op_configure_filter()
817 mac->rx_conf &= ~(rtlpriv->cfg->maps[MAC_RCR_AM] | in rtl_op_configure_filter()
827 mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACRC32]; in rtl_op_configure_filter()
831 mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACRC32]; in rtl_op_configure_filter()
844 mac->link_state >= MAC80211_LINKED) { in rtl_op_configure_filter()
845 if (mac->opmode != NL80211_IFTYPE_AP && in rtl_op_configure_filter()
846 mac->opmode != NL80211_IFTYPE_MESH_POINT) { in rtl_op_configure_filter()
858 mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACF]; in rtl_op_configure_filter()
863 mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACF]; in rtl_op_configure_filter()
873 mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AAP]; in rtl_op_configure_filter()
877 mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_AAP]; in rtl_op_configure_filter()
887 (u8 *)(&mac->rx_conf)); in rtl_op_configure_filter()
896 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_sta_add() local
924 if (mac->p2p) in rtl_op_sta_add()
990 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_conf_tx() local
1000 mac->ac[aci].aifs = param->aifs; in rtl_op_conf_tx()
1001 mac->ac[aci].cw_min = cpu_to_le16(param->cw_min); in rtl_op_conf_tx()
1002 mac->ac[aci].cw_max = cpu_to_le16(param->cw_max); in rtl_op_conf_tx()
1003 mac->ac[aci].tx_op = cpu_to_le16(param->txop); in rtl_op_conf_tx()
1004 memcpy(&mac->edca_param[aci], param, sizeof(*param)); in rtl_op_conf_tx()
1048 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_bss_info_changed() local
1058 if (mac->beacon_enabled == 0) { in rtl_op_bss_info_changed()
1064 mac->beacon_enabled = 1; in rtl_op_bss_info_changed()
1076 if (mac->beacon_enabled == 1) { in rtl_op_bss_info_changed()
1080 mac->beacon_enabled = 0; in rtl_op_bss_info_changed()
1089 mac->beacon_interval = bss_conf->beacon_int; in rtl_op_bss_info_changed()
1113 mac->link_state = MAC80211_LINKED; in rtl_op_bss_info_changed()
1114 mac->cnt_after_linked = 0; in rtl_op_bss_info_changed()
1115 mac->assoc_id = vif->cfg.aid; in rtl_op_bss_info_changed()
1116 memcpy(mac->bssid, bss_conf->bssid, ETH_ALEN); in rtl_op_bss_info_changed()
1136 mac->mode = WIRELESS_MODE_A; in rtl_op_bss_info_changed()
1139 mac->mode = WIRELESS_MODE_B; in rtl_op_bss_info_changed()
1141 mac->mode = WIRELESS_MODE_G; in rtl_op_bss_info_changed()
1146 mac->mode = WIRELESS_MODE_N_24G; in rtl_op_bss_info_changed()
1148 mac->mode = WIRELESS_MODE_N_5G; in rtl_op_bss_info_changed()
1153 mac->mode = WIRELESS_MODE_AC_5G; in rtl_op_bss_info_changed()
1155 mac->mode = WIRELESS_MODE_AC_24G; in rtl_op_bss_info_changed()
1175 if (mac->link_state == MAC80211_LINKED) in rtl_op_bss_info_changed()
1179 mac->link_state = MAC80211_NOLINK; in rtl_op_bss_info_changed()
1182 (u8 *)mac->bssid, NULL, 0, in rtl_op_bss_info_changed()
1187 "bssid = %pMF\n", mac->bssid); in rtl_op_bss_info_changed()
1196 eth_zero_addr(mac->bssid); in rtl_op_bss_info_changed()
1197 mac->vendor = PEER_UNKNOWN; in rtl_op_bss_info_changed()
1198 mac->mode = 0; in rtl_op_bss_info_changed()
1225 mac->use_cts_protect = bss_conf->use_cts_prot; in rtl_op_bss_info_changed()
1233 mac->short_preamble = bss_conf->use_short_preamble; in rtl_op_bss_info_changed()
1235 (u8 *)(&mac->short_preamble)); in rtl_op_bss_info_changed()
1243 mac->slot_time = RTL_SLOT_TIME_9; in rtl_op_bss_info_changed()
1245 mac->slot_time = RTL_SLOT_TIME_20; in rtl_op_bss_info_changed()
1248 (u8 *)(&mac->slot_time)); in rtl_op_bss_info_changed()
1261 mac->current_ampdu_density) in rtl_op_bss_info_changed()
1262 mac->current_ampdu_density = in rtl_op_bss_info_changed()
1265 mac->current_ampdu_factor) in rtl_op_bss_info_changed()
1266 mac->current_ampdu_factor = in rtl_op_bss_info_changed()
1272 (u8 *)(&mac->max_mss_density)); in rtl_op_bss_info_changed()
1274 &mac->current_ampdu_factor); in rtl_op_bss_info_changed()
1276 &mac->current_ampdu_density); in rtl_op_bss_info_changed()
1289 mac->vendor = PEER_UNKNOWN; in rtl_op_bss_info_changed()
1290 memcpy(mac->bssid, bss_conf->bssid, ETH_ALEN); in rtl_op_bss_info_changed()
1300 mac->mode = WIRELESS_MODE_A; in rtl_op_bss_info_changed()
1303 mac->mode = WIRELESS_MODE_B; in rtl_op_bss_info_changed()
1305 mac->mode = WIRELESS_MODE_G; in rtl_op_bss_info_changed()
1310 mac->mode = WIRELESS_MODE_N_24G; in rtl_op_bss_info_changed()
1312 mac->mode = WIRELESS_MODE_N_5G; in rtl_op_bss_info_changed()
1317 mac->mode = WIRELESS_MODE_AC_5G; in rtl_op_bss_info_changed()
1319 mac->mode = WIRELESS_MODE_AC_24G; in rtl_op_bss_info_changed()
1328 sta_entry->wireless_mode = mac->mode; in rtl_op_bss_info_changed()
1332 mac->ht_enable = true; in rtl_op_bss_info_changed()
1343 mac->vht_enable = true; in rtl_op_bss_info_changed()
1353 mac->basic_rates = basic_rates; in rtl_op_bss_info_changed()
1376 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_set_tsf() local
1377 u8 bibss = (mac->opmode == NL80211_IFTYPE_ADHOC) ? 1 : 0; in rtl_op_set_tsf()
1379 mac->tsf = tsf; in rtl_op_set_tsf()
1452 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_sw_scan_start() local
1455 mac->act_scanning = true; in rtl_op_sw_scan_start()
1457 mac->skip_scan = true; in rtl_op_sw_scan_start()
1472 if (mac->link_state == MAC80211_LINKED) { in rtl_op_sw_scan_start()
1474 mac->link_state = MAC80211_LINKED_SCANNING; in rtl_op_sw_scan_start()
1490 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_sw_scan_complete() local
1493 mac->act_scanning = false; in rtl_op_sw_scan_complete()
1494 mac->skip_scan = false; in rtl_op_sw_scan_complete()
1502 if (mac->n_channels == 3) in rtl_op_sw_scan_complete()
1503 mac->p2p_in_use = true; in rtl_op_sw_scan_complete()
1505 mac->p2p_in_use = false; in rtl_op_sw_scan_complete()
1506 mac->n_channels = 0; in rtl_op_sw_scan_complete()
1510 if (mac->link_state == MAC80211_LINKED_SCANNING) { in rtl_op_sw_scan_complete()
1511 mac->link_state = MAC80211_LINKED; in rtl_op_sw_scan_complete()
1512 if (mac->opmode == NL80211_IFTYPE_STATION) { in rtl_op_sw_scan_complete()
1514 rtlpriv->cfg->ops->set_network_type(hw, mac->opmode); in rtl_op_sw_scan_complete()