Lines Matching refs:mac
100 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_stop() local
114 mac->link_state = MAC80211_NOLINK; in rtl_op_stop()
115 memset(mac->bssid, 0, 6); in rtl_op_stop()
116 mac->vendor = PEER_UNKNOWN; in rtl_op_stop()
154 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_add_interface() local
159 if (mac->vif) { in rtl_op_add_interface()
161 "vif has been set!! mac->vif = 0x%p\n", mac->vif); in rtl_op_add_interface()
170 if (mac->beacon_enabled == 1) { in rtl_op_add_interface()
173 mac->beacon_enabled = 0; in rtl_op_add_interface()
178 mac->link_state = MAC80211_LINKED; in rtl_op_add_interface()
184 mac->link_state = MAC80211_LINKED; in rtl_op_add_interface()
187 mac->basic_rates = 0xfff; in rtl_op_add_interface()
189 mac->basic_rates = 0xff0; in rtl_op_add_interface()
191 (u8 *) (&mac->basic_rates)); in rtl_op_add_interface()
198 mac->link_state = MAC80211_LINKED; in rtl_op_add_interface()
201 mac->basic_rates = 0xfff; in rtl_op_add_interface()
203 mac->basic_rates = 0xff0; in rtl_op_add_interface()
205 (u8 *) (&mac->basic_rates)); in rtl_op_add_interface()
214 mac->vif = vif; in rtl_op_add_interface()
215 mac->opmode = vif->type; in rtl_op_add_interface()
217 memcpy(mac->mac_addr, vif->addr, ETH_ALEN); in rtl_op_add_interface()
218 rtlpriv->cfg->ops->set_hw_reg(hw, HW_VAR_ETHER_ADDR, mac->mac_addr); in rtl_op_add_interface()
229 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_remove_interface() local
234 if ((mac->opmode == NL80211_IFTYPE_AP) || in rtl_op_remove_interface()
235 (mac->opmode == NL80211_IFTYPE_ADHOC) || in rtl_op_remove_interface()
236 (mac->opmode == NL80211_IFTYPE_MESH_POINT)) { in rtl_op_remove_interface()
237 if (mac->beacon_enabled == 1) { in rtl_op_remove_interface()
238 mac->beacon_enabled = 0; in rtl_op_remove_interface()
249 mac->vif = NULL; in rtl_op_remove_interface()
250 mac->link_state = MAC80211_NOLINK; in rtl_op_remove_interface()
251 memset(mac->bssid, 0, 6); in rtl_op_remove_interface()
252 mac->vendor = PEER_UNKNOWN; in rtl_op_remove_interface()
253 mac->opmode = NL80211_IFTYPE_UNSPECIFIED; in rtl_op_remove_interface()
254 rtlpriv->cfg->ops->set_network_type(hw, mac->opmode); in rtl_op_remove_interface()
262 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_config() local
314 mac->retry_long = hw->conf.long_frame_max_tx_count; in rtl_op_config()
315 mac->retry_short = hw->conf.long_frame_max_tx_count; in rtl_op_config()
338 mac->cur_40_prime_sc = in rtl_op_config()
341 mac->bw_40 = false; in rtl_op_config()
345 mac->cur_40_prime_sc = PRIME_CHNL_OFFSET_UPPER; in rtl_op_config()
348 mac->bw_40 = true; in rtl_op_config()
356 mac->cur_40_prime_sc = PRIME_CHNL_OFFSET_LOWER; in rtl_op_config()
359 mac->bw_40 = true; in rtl_op_config()
366 mac->bw_40 = false; in rtl_op_config()
405 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_configure_filter() local
414 mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AM] | in rtl_op_configure_filter()
419 mac->rx_conf &= ~(rtlpriv->cfg->maps[MAC_RCR_AM] | in rtl_op_configure_filter()
428 mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACRC32]; in rtl_op_configure_filter()
432 mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACRC32]; in rtl_op_configure_filter()
442 (mac->link_state >= MAC80211_LINKED)) { in rtl_op_configure_filter()
443 if (mac->opmode != NL80211_IFTYPE_AP) { in rtl_op_configure_filter()
454 mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_ACF]; in rtl_op_configure_filter()
459 mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_ACF]; in rtl_op_configure_filter()
467 mac->rx_conf |= rtlpriv->cfg->maps[MAC_RCR_AAP]; in rtl_op_configure_filter()
471 mac->rx_conf &= ~rtlpriv->cfg->maps[MAC_RCR_AAP]; in rtl_op_configure_filter()
557 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_conf_tx() local
567 mac->ac[aci].aifs = param->aifs; in rtl_op_conf_tx()
568 mac->ac[aci].cw_min = cpu_to_le16(param->cw_min); in rtl_op_conf_tx()
569 mac->ac[aci].cw_max = cpu_to_le16(param->cw_max); in rtl_op_conf_tx()
570 mac->ac[aci].tx_op = cpu_to_le16(param->txop); in rtl_op_conf_tx()
571 memcpy(&mac->edca_param[aci], param, sizeof(*param)); in rtl_op_conf_tx()
582 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_bss_info_changed() local
593 if (mac->beacon_enabled == 0) { in rtl_op_bss_info_changed()
599 mac->beacon_enabled = 1; in rtl_op_bss_info_changed()
611 if (mac->beacon_enabled == 1) { in rtl_op_bss_info_changed()
615 mac->beacon_enabled = 0; in rtl_op_bss_info_changed()
624 mac->beacon_interval = bss_conf->beacon_int; in rtl_op_bss_info_changed()
642 mac->link_state = MAC80211_LINKED; in rtl_op_bss_info_changed()
643 mac->cnt_after_linked = 0; in rtl_op_bss_info_changed()
644 mac->assoc_id = bss_conf->aid; in rtl_op_bss_info_changed()
645 memcpy(mac->bssid, bss_conf->bssid, 6); in rtl_op_bss_info_changed()
649 if (mac->opmode == NL80211_IFTYPE_STATION && sta) in rtl_op_bss_info_changed()
654 if (mac->link_state == MAC80211_LINKED) in rtl_op_bss_info_changed()
657 mac->link_state = MAC80211_NOLINK; in rtl_op_bss_info_changed()
658 memset(mac->bssid, 0, 6); in rtl_op_bss_info_changed()
664 mac->vendor = PEER_UNKNOWN; in rtl_op_bss_info_changed()
674 mac->use_cts_protect = bss_conf->use_cts_prot; in rtl_op_bss_info_changed()
682 mac->short_preamble = bss_conf->use_short_preamble; in rtl_op_bss_info_changed()
684 (u8 *) (&mac->short_preamble)); in rtl_op_bss_info_changed()
692 mac->slot_time = RTL_SLOT_TIME_9; in rtl_op_bss_info_changed()
694 mac->slot_time = RTL_SLOT_TIME_20; in rtl_op_bss_info_changed()
697 (u8 *) (&mac->slot_time)); in rtl_op_bss_info_changed()
706 mac->current_ampdu_density) in rtl_op_bss_info_changed()
707 mac->current_ampdu_density = in rtl_op_bss_info_changed()
710 mac->current_ampdu_factor) in rtl_op_bss_info_changed()
711 mac->current_ampdu_factor = in rtl_op_bss_info_changed()
717 (u8 *) (&mac->max_mss_density)); in rtl_op_bss_info_changed()
719 &mac->current_ampdu_factor); in rtl_op_bss_info_changed()
721 &mac->current_ampdu_density); in rtl_op_bss_info_changed()
733 mac->vendor = PEER_UNKNOWN; in rtl_op_bss_info_changed()
734 memcpy(mac->bssid, bss_conf->bssid, 6); in rtl_op_bss_info_changed()
745 mac->mode = WIRELESS_MODE_A; in rtl_op_bss_info_changed()
748 mac->mode = WIRELESS_MODE_B; in rtl_op_bss_info_changed()
750 mac->mode = WIRELESS_MODE_G; in rtl_op_bss_info_changed()
755 mac->mode = WIRELESS_MODE_N_24G; in rtl_op_bss_info_changed()
757 mac->mode = WIRELESS_MODE_N_5G; in rtl_op_bss_info_changed()
762 if (mac->opmode == NL80211_IFTYPE_STATION) { in rtl_op_bss_info_changed()
765 sta_entry->wireless_mode = mac->mode; in rtl_op_bss_info_changed()
769 mac->ht_enable = true; in rtl_op_bss_info_changed()
787 mac->basic_rates = basic_rates; in rtl_op_bss_info_changed()
836 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_set_tsf() local
837 u8 bibss = (mac->opmode == NL80211_IFTYPE_ADHOC) ? 1 : 0; in rtl_op_set_tsf()
839 mac->tsf = tsf; in rtl_op_set_tsf()
910 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_sw_scan_start() local
912 mac->act_scanning = true; in rtl_op_sw_scan_start()
916 if (mac->link_state == MAC80211_LINKED) { in rtl_op_sw_scan_start()
918 mac->link_state = MAC80211_LINKED_SCANNING; in rtl_op_sw_scan_start()
933 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_sw_scan_complete() local
936 mac->act_scanning = false; in rtl_op_sw_scan_complete()
940 if (mac->link_state == MAC80211_LINKED_SCANNING) { in rtl_op_sw_scan_complete()
941 mac->link_state = MAC80211_LINKED; in rtl_op_sw_scan_complete()
942 if (mac->opmode == NL80211_IFTYPE_STATION) { in rtl_op_sw_scan_complete()
944 rtlpriv->cfg->ops->set_network_type(hw, mac->opmode); in rtl_op_sw_scan_complete()
956 struct rtl_mac *mac = rtl_mac(rtl_priv(hw)); in rtl_op_set_key() local
1004 mac->opmode == NL80211_IFTYPE_ADHOC) in rtl_op_set_key()
1024 if (mac->opmode == NL80211_IFTYPE_AP) { in rtl_op_set_key()
1032 if ((!group_key) || (mac->opmode == NL80211_IFTYPE_ADHOC) || in rtl_op_set_key()
1104 if (mac->opmode == NL80211_IFTYPE_AP) { in rtl_op_set_key()