aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/rtl818x/rtl8180_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/rtl818x/rtl8180_dev.c')
-rw-r--r--drivers/net/wireless/rtl818x/rtl8180_dev.c33
1 files changed, 14 insertions, 19 deletions
diff --git a/drivers/net/wireless/rtl818x/rtl8180_dev.c b/drivers/net/wireless/rtl818x/rtl8180_dev.c
index 387c133ec0f2..7e65d7c31802 100644
--- a/drivers/net/wireless/rtl818x/rtl8180_dev.c
+++ b/drivers/net/wireless/rtl818x/rtl8180_dev.c
@@ -702,30 +702,26 @@ static int rtl8180_config(struct ieee80211_hw *dev, u32 changed)
702 return 0; 702 return 0;
703} 703}
704 704
705static int rtl8180_config_interface(struct ieee80211_hw *dev,
706 struct ieee80211_vif *vif,
707 struct ieee80211_if_conf *conf)
708{
709 struct rtl8180_priv *priv = dev->priv;
710 int i;
711
712 for (i = 0; i < ETH_ALEN; i++)
713 rtl818x_iowrite8(priv, &priv->map->BSSID[i], conf->bssid[i]);
714
715 if (is_valid_ether_addr(conf->bssid))
716 rtl818x_iowrite8(priv, &priv->map->MSR, RTL818X_MSR_INFRA);
717 else
718 rtl818x_iowrite8(priv, &priv->map->MSR, RTL818X_MSR_NO_LINK);
719
720 return 0;
721}
722
723static void rtl8180_bss_info_changed(struct ieee80211_hw *dev, 705static void rtl8180_bss_info_changed(struct ieee80211_hw *dev,
724 struct ieee80211_vif *vif, 706 struct ieee80211_vif *vif,
725 struct ieee80211_bss_conf *info, 707 struct ieee80211_bss_conf *info,
726 u32 changed) 708 u32 changed)
727{ 709{
728 struct rtl8180_priv *priv = dev->priv; 710 struct rtl8180_priv *priv = dev->priv;
711 int i;
712
713 if (changed & BSS_CHANGED_BSSID) {
714 for (i = 0; i < ETH_ALEN; i++)
715 rtl818x_iowrite8(priv, &priv->map->BSSID[i],
716 info->bssid[i]);
717
718 if (is_valid_ether_addr(info->bssid))
719 rtl818x_iowrite8(priv, &priv->map->MSR,
720 RTL818X_MSR_INFRA);
721 else
722 rtl818x_iowrite8(priv, &priv->map->MSR,
723 RTL818X_MSR_NO_LINK);
724 }
729 725
730 if (changed & BSS_CHANGED_ERP_SLOT && priv->rf->conf_erp) 726 if (changed & BSS_CHANGED_ERP_SLOT && priv->rf->conf_erp)
731 priv->rf->conf_erp(dev, info); 727 priv->rf->conf_erp(dev, info);
@@ -770,7 +766,6 @@ static const struct ieee80211_ops rtl8180_ops = {
770 .add_interface = rtl8180_add_interface, 766 .add_interface = rtl8180_add_interface,
771 .remove_interface = rtl8180_remove_interface, 767 .remove_interface = rtl8180_remove_interface,
772 .config = rtl8180_config, 768 .config = rtl8180_config,
773 .config_interface = rtl8180_config_interface,
774 .bss_info_changed = rtl8180_bss_info_changed, 769 .bss_info_changed = rtl8180_bss_info_changed,
775 .configure_filter = rtl8180_configure_filter, 770 .configure_filter = rtl8180_configure_filter,
776}; 771};