Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 051d3b50 authored by John W. Linville's avatar John W. Linville
Browse files

Merge branch 'master' of...

parents ffcb9738 c288ec61
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -1568,7 +1568,6 @@ F: drivers/net/ethernet/broadcom/tg3.*


BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER
BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER
M:	Brett Rudley <brudley@broadcom.com>
M:	Brett Rudley <brudley@broadcom.com>
M:	Henry Ptasinski <henryp@broadcom.com>
M:	Roland Vossen <rvossen@broadcom.com>
M:	Roland Vossen <rvossen@broadcom.com>
M:	Arend van Spriel <arend@broadcom.com>
M:	Arend van Spriel <arend@broadcom.com>
M:	Franky (Zhenhui) Lin <frankyl@broadcom.com>
M:	Franky (Zhenhui) Lin <frankyl@broadcom.com>
+10 −10
Original line number Original line Diff line number Diff line
@@ -140,23 +140,23 @@ static int ath_ahb_probe(struct platform_device *pdev)


	if (bcfg->devid >= AR5K_SREV_AR2315_R6) {
	if (bcfg->devid >= AR5K_SREV_AR2315_R6) {
		/* Enable WMAC AHB arbitration */
		/* Enable WMAC AHB arbitration */
		reg = __raw_readl((void __iomem *) AR5K_AR2315_AHB_ARB_CTL);
		reg = ioread32((void __iomem *) AR5K_AR2315_AHB_ARB_CTL);
		reg |= AR5K_AR2315_AHB_ARB_CTL_WLAN;
		reg |= AR5K_AR2315_AHB_ARB_CTL_WLAN;
		__raw_writel(reg, (void __iomem *) AR5K_AR2315_AHB_ARB_CTL);
		iowrite32(reg, (void __iomem *) AR5K_AR2315_AHB_ARB_CTL);


		/* Enable global WMAC swapping */
		/* Enable global WMAC swapping */
		reg = __raw_readl((void __iomem *) AR5K_AR2315_BYTESWAP);
		reg = ioread32((void __iomem *) AR5K_AR2315_BYTESWAP);
		reg |= AR5K_AR2315_BYTESWAP_WMAC;
		reg |= AR5K_AR2315_BYTESWAP_WMAC;
		__raw_writel(reg, (void __iomem *) AR5K_AR2315_BYTESWAP);
		iowrite32(reg, (void __iomem *) AR5K_AR2315_BYTESWAP);
	} else {
	} else {
		/* Enable WMAC DMA access (assuming 5312 or 231x*/
		/* Enable WMAC DMA access (assuming 5312 or 231x*/
		/* TODO: check other platforms */
		/* TODO: check other platforms */
		reg = __raw_readl((void __iomem *) AR5K_AR5312_ENABLE);
		reg = ioread32((void __iomem *) AR5K_AR5312_ENABLE);
		if (to_platform_device(ah->dev)->id == 0)
		if (to_platform_device(ah->dev)->id == 0)
			reg |= AR5K_AR5312_ENABLE_WLAN0;
			reg |= AR5K_AR5312_ENABLE_WLAN0;
		else
		else
			reg |= AR5K_AR5312_ENABLE_WLAN1;
			reg |= AR5K_AR5312_ENABLE_WLAN1;
		__raw_writel(reg, (void __iomem *) AR5K_AR5312_ENABLE);
		iowrite32(reg, (void __iomem *) AR5K_AR5312_ENABLE);


		/*
		/*
		 * On a dual-band AR5312, the multiband radio is only
		 * On a dual-band AR5312, the multiband radio is only
@@ -203,17 +203,17 @@ static int ath_ahb_remove(struct platform_device *pdev)


	if (bcfg->devid >= AR5K_SREV_AR2315_R6) {
	if (bcfg->devid >= AR5K_SREV_AR2315_R6) {
		/* Disable WMAC AHB arbitration */
		/* Disable WMAC AHB arbitration */
		reg = __raw_readl((void __iomem *) AR5K_AR2315_AHB_ARB_CTL);
		reg = ioread32((void __iomem *) AR5K_AR2315_AHB_ARB_CTL);
		reg &= ~AR5K_AR2315_AHB_ARB_CTL_WLAN;
		reg &= ~AR5K_AR2315_AHB_ARB_CTL_WLAN;
		__raw_writel(reg, (void __iomem *) AR5K_AR2315_AHB_ARB_CTL);
		iowrite32(reg, (void __iomem *) AR5K_AR2315_AHB_ARB_CTL);
	} else {
	} else {
		/*Stop DMA access */
		/*Stop DMA access */
		reg = __raw_readl((void __iomem *) AR5K_AR5312_ENABLE);
		reg = ioread32((void __iomem *) AR5K_AR5312_ENABLE);
		if (to_platform_device(ah->dev)->id == 0)
		if (to_platform_device(ah->dev)->id == 0)
			reg &= ~AR5K_AR5312_ENABLE_WLAN0;
			reg &= ~AR5K_AR5312_ENABLE_WLAN0;
		else
		else
			reg &= ~AR5K_AR5312_ENABLE_WLAN1;
			reg &= ~AR5K_AR5312_ENABLE_WLAN1;
		__raw_writel(reg, (void __iomem *) AR5K_AR5312_ENABLE);
		iowrite32(reg, (void __iomem *) AR5K_AR5312_ENABLE);
	}
	}


	ath5k_deinit_ah(ah);
	ath5k_deinit_ah(ah);
+2 −2
Original line number Original line Diff line number Diff line
@@ -1656,12 +1656,12 @@ static inline void __iomem *ath5k_ahb_reg(struct ath5k_hw *ah, u16 reg)


static inline u32 ath5k_hw_reg_read(struct ath5k_hw *ah, u16 reg)
static inline u32 ath5k_hw_reg_read(struct ath5k_hw *ah, u16 reg)
{
{
	return __raw_readl(ath5k_ahb_reg(ah, reg));
	return ioread32(ath5k_ahb_reg(ah, reg));
}
}


static inline void ath5k_hw_reg_write(struct ath5k_hw *ah, u32 val, u16 reg)
static inline void ath5k_hw_reg_write(struct ath5k_hw *ah, u32 val, u16 reg)
{
{
	__raw_writel(val, ath5k_ahb_reg(ah, reg));
	iowrite32(val, ath5k_ahb_reg(ah, reg));
}
}


#else
#else
+5 −5
Original line number Original line Diff line number Diff line
@@ -473,14 +473,14 @@ ath5k_hw_wisoc_reset(struct ath5k_hw *ah, u32 flags)
	}
	}


	/* Put BB/MAC into reset */
	/* Put BB/MAC into reset */
	regval = __raw_readl(reg);
	regval = ioread32(reg);
	__raw_writel(regval | val, reg);
	iowrite32(regval | val, reg);
	regval = __raw_readl(reg);
	regval = ioread32(reg);
	usleep_range(100, 150);
	usleep_range(100, 150);


	/* Bring BB/MAC out of reset */
	/* Bring BB/MAC out of reset */
	__raw_writel(regval & ~val, reg);
	iowrite32(regval & ~val, reg);
	regval = __raw_readl(reg);
	regval = ioread32(reg);


	/*
	/*
	 * Reset configuration register (for hw byte-swap). Note that this
	 * Reset configuration register (for hw byte-swap). Note that this
+47 −35
Original line number Original line Diff line number Diff line
@@ -2269,25 +2269,11 @@ static int ath6kl_set_ap_probe_resp_ies(struct ath6kl_vif *vif,
	return ret;
	return ret;
}
}


static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev,
static int ath6kl_set_ies(struct ath6kl_vif *vif,
			    struct beacon_parameters *info, bool add)
			  struct cfg80211_beacon_data *info)
{
{
	struct ath6kl *ar = ath6kl_priv(dev);
	struct ath6kl *ar = vif->ar;
	struct ath6kl_vif *vif = netdev_priv(dev);
	struct ieee80211_mgmt *mgmt;
	u8 *ies;
	int ies_len;
	struct wmi_connect_cmd p;
	int res;
	int res;
	int i, ret;

	ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s: add=%d\n", __func__, add);

	if (!ath6kl_cfg80211_ready(vif))
		return -EIO;

	if (vif->next_mode != AP_NETWORK)
		return -EOPNOTSUPP;


	if (info->beacon_ies) {
	if (info->beacon_ies) {
		res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
		res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
@@ -2297,12 +2283,14 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev,
		if (res)
		if (res)
			return res;
			return res;
	}
	}

	if (info->proberesp_ies) {
	if (info->proberesp_ies) {
		res = ath6kl_set_ap_probe_resp_ies(vif, info->proberesp_ies,
		res = ath6kl_set_ap_probe_resp_ies(vif, info->proberesp_ies,
						   info->proberesp_ies_len);
						   info->proberesp_ies_len);
		if (res)
		if (res)
			return res;
			return res;
	}
	}

	if (info->assocresp_ies) {
	if (info->assocresp_ies) {
		res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
		res = ath6kl_wmi_set_appie_cmd(ar->wmi, vif->fw_vif_idx,
					       WMI_FRAME_ASSOC_RESP,
					       WMI_FRAME_ASSOC_RESP,
@@ -2312,8 +2300,30 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev,
			return res;
			return res;
	}
	}


	if (!add)
	return 0;
	return 0;
}

static int ath6kl_start_ap(struct wiphy *wiphy, struct net_device *dev,
			   struct cfg80211_ap_settings *info)
{
	struct ath6kl *ar = ath6kl_priv(dev);
	struct ath6kl_vif *vif = netdev_priv(dev);
	struct ieee80211_mgmt *mgmt;
	u8 *ies;
	int ies_len;
	struct wmi_connect_cmd p;
	int res;
	int i, ret;

	ath6kl_dbg(ATH6KL_DBG_WLAN_CFG, "%s:\n", __func__);

	if (!ath6kl_cfg80211_ready(vif))
		return -EIO;

	if (vif->next_mode != AP_NETWORK)
		return -EOPNOTSUPP;

	res = ath6kl_set_ies(vif, &info->beacon);


	ar->ap_mode_bkey.valid = false;
	ar->ap_mode_bkey.valid = false;


@@ -2322,13 +2332,13 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev,
	 * info->dtim_period
	 * info->dtim_period
	 */
	 */


	if (info->head == NULL)
	if (info->beacon.head == NULL)
		return -EINVAL;
		return -EINVAL;
	mgmt = (struct ieee80211_mgmt *) info->head;
	mgmt = (struct ieee80211_mgmt *) info->beacon.head;
	ies = mgmt->u.beacon.variable;
	ies = mgmt->u.beacon.variable;
	if (ies > info->head + info->head_len)
	if (ies > info->beacon.head + info->beacon.head_len)
		return -EINVAL;
		return -EINVAL;
	ies_len = info->head + info->head_len - ies;
	ies_len = info->beacon.head + info->beacon.head_len - ies;


	if (info->ssid == NULL)
	if (info->ssid == NULL)
		return -EINVAL;
		return -EINVAL;
@@ -2436,19 +2446,21 @@ static int ath6kl_ap_beacon(struct wiphy *wiphy, struct net_device *dev,
	return 0;
	return 0;
}
}


static int ath6kl_add_beacon(struct wiphy *wiphy, struct net_device *dev,
static int ath6kl_change_beacon(struct wiphy *wiphy, struct net_device *dev,
			     struct beacon_parameters *info)
				struct cfg80211_beacon_data *beacon)
{
{
	return ath6kl_ap_beacon(wiphy, dev, info, true);
	struct ath6kl_vif *vif = netdev_priv(dev);
}


static int ath6kl_set_beacon(struct wiphy *wiphy, struct net_device *dev,
	if (!ath6kl_cfg80211_ready(vif))
			     struct beacon_parameters *info)
		return -EIO;
{

	return ath6kl_ap_beacon(wiphy, dev, info, false);
	if (vif->next_mode != AP_NETWORK)
		return -EOPNOTSUPP;

	return ath6kl_set_ies(vif, beacon);
}
}


static int ath6kl_del_beacon(struct wiphy *wiphy, struct net_device *dev)
static int ath6kl_stop_ap(struct wiphy *wiphy, struct net_device *dev)
{
{
	struct ath6kl *ar = ath6kl_priv(dev);
	struct ath6kl *ar = ath6kl_priv(dev);
	struct ath6kl_vif *vif = netdev_priv(dev);
	struct ath6kl_vif *vif = netdev_priv(dev);
@@ -2783,9 +2795,9 @@ static struct cfg80211_ops ath6kl_cfg80211_ops = {
	.resume = __ath6kl_cfg80211_resume,
	.resume = __ath6kl_cfg80211_resume,
#endif
#endif
	.set_channel = ath6kl_set_channel,
	.set_channel = ath6kl_set_channel,
	.add_beacon = ath6kl_add_beacon,
	.start_ap = ath6kl_start_ap,
	.set_beacon = ath6kl_set_beacon,
	.change_beacon = ath6kl_change_beacon,
	.del_beacon = ath6kl_del_beacon,
	.stop_ap = ath6kl_stop_ap,
	.del_station = ath6kl_del_station,
	.del_station = ath6kl_del_station,
	.change_station = ath6kl_change_station,
	.change_station = ath6kl_change_station,
	.remain_on_channel = ath6kl_remain_on_channel,
	.remain_on_channel = ath6kl_remain_on_channel,
Loading