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

Commit f8f2109d authored by David S. Miller's avatar David S. Miller
Browse files
parents bb81b2dd a2c3f656
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3272,6 +3272,12 @@ S: Supported
F:	drivers/net/mv643xx_eth.*
F:	include/linux/mv643xx.h

MARVELL MWL8K WIRELESS DRIVER
M:	Lennert Buytenhek <buytenh@marvell.com>
L:	linux-wireless@vger.kernel.org
S:	Supported
F:	drivers/net/wireless/mwl8k.c

MARVELL SOC MMC/SD/SDIO CONTROLLER DRIVER
M:	Nicolas Pitre <nico@cam.org>
S:	Maintained
+28 −14
Original line number Diff line number Diff line
@@ -1328,16 +1328,39 @@ static void adm8211_bss_info_changed(struct ieee80211_hw *dev,
	}
}

static u64 adm8211_prepare_multicast(struct ieee80211_hw *hw,
				     int mc_count, struct dev_addr_list *mclist)
{
	unsigned int bit_nr, i;
	u32 mc_filter[2];

	mc_filter[1] = mc_filter[0] = 0;

	for (i = 0; i < mc_count; i++) {
		if (!mclist)
			break;
		bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;

		bit_nr &= 0x3F;
		mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31);
		mclist = mclist->next;
	}

	return mc_filter[0] | ((u64)(mc_filter[1]) << 32);
}

static void adm8211_configure_filter(struct ieee80211_hw *dev,
				     unsigned int changed_flags,
				     unsigned int *total_flags,
				     int mc_count, struct dev_mc_list *mclist)
				     u64 multicast)
{
	static const u8 bcast[ETH_ALEN] = { 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF };
	struct adm8211_priv *priv = dev->priv;
	unsigned int bit_nr, new_flags;
	unsigned int new_flags;
	u32 mc_filter[2];
	int i;

	mc_filter[0] = multicast;
	mc_filter[1] = multicast >> 32;

	new_flags = 0;

@@ -1346,23 +1369,13 @@ static void adm8211_configure_filter(struct ieee80211_hw *dev,
		priv->nar |= ADM8211_NAR_PR;
		priv->nar &= ~ADM8211_NAR_MM;
		mc_filter[1] = mc_filter[0] = ~0;
	} else if ((*total_flags & FIF_ALLMULTI) || (mc_count > 32)) {
	} else if (*total_flags & FIF_ALLMULTI || multicast == ~(0ULL)) {
		new_flags |= FIF_ALLMULTI;
		priv->nar &= ~ADM8211_NAR_PR;
		priv->nar |= ADM8211_NAR_MM;
		mc_filter[1] = mc_filter[0] = ~0;
	} else {
		priv->nar &= ~(ADM8211_NAR_MM | ADM8211_NAR_PR);
		mc_filter[1] = mc_filter[0] = 0;
		for (i = 0; i < mc_count; i++) {
			if (!mclist)
				break;
			bit_nr = ether_crc(ETH_ALEN, mclist->dmi_addr) >> 26;

			bit_nr &= 0x3F;
			mc_filter[bit_nr >> 5] |= 1 << (bit_nr & 31);
			mclist = mclist->next;
		}
	}

	ADM8211_IDLE_RX();
@@ -1757,6 +1770,7 @@ static const struct ieee80211_ops adm8211_ops = {
	.remove_interface	= adm8211_remove_interface,
	.config			= adm8211_config,
	.bss_info_changed	= adm8211_bss_info_changed,
	.prepare_multicast	= adm8211_prepare_multicast,
	.configure_filter	= adm8211_configure_filter,
	.get_stats		= adm8211_get_stats,
	.get_tx_stats		= adm8211_get_tx_stats,
+5 −7
Original line number Diff line number Diff line
@@ -1950,9 +1950,8 @@ static int at76_config(struct ieee80211_hw *hw, u32 changed)
{
	struct at76_priv *priv = hw->priv;

	at76_dbg(DBG_MAC80211, "%s(): channel %d radio %d",
		 __func__, hw->conf.channel->hw_value,
		 hw->conf.radio_enabled);
	at76_dbg(DBG_MAC80211, "%s(): channel %d",
		 __func__, hw->conf.channel->hw_value);
	at76_dbg_dump(DBG_MAC80211, priv->bssid, ETH_ALEN, "bssid:");

	mutex_lock(&priv->mtx);
@@ -1997,15 +1996,14 @@ static void at76_bss_info_changed(struct ieee80211_hw *hw,
/* must be atomic */
static void at76_configure_filter(struct ieee80211_hw *hw,
				  unsigned int changed_flags,
				  unsigned int *total_flags, int mc_count,
				  struct dev_addr_list *mc_list)
				  unsigned int *total_flags, u64 multicast)
{
	struct at76_priv *priv = hw->priv;
	int flags;

	at76_dbg(DBG_MAC80211, "%s(): changed_flags=0x%08x "
		 "total_flags=0x%08x mc_count=%d",
		 __func__, changed_flags, *total_flags, mc_count);
		 "total_flags=0x%08x",
		 __func__, changed_flags, *total_flags);

	flags = changed_flags & AT76_SUPPORTED_FILTERS;
	*total_flags = AT76_SUPPORTED_FILTERS;
+5 −11
Original line number Diff line number Diff line
@@ -157,6 +157,7 @@ struct ar9170_sta_tid {

struct ar9170 {
	struct ieee80211_hw *hw;
	struct ath_common common;
	struct mutex mutex;
	enum ar9170_device_state state;
	unsigned long bad_hw_nagger;
@@ -184,10 +185,8 @@ struct ar9170 {
	bool disable_offload;

	/* filter settings */
	struct work_struct filter_config_work;
	u64 cur_mc_hash, want_mc_hash;
	u32 cur_filter, want_filter;
	unsigned long filter_changed;
	u64 cur_mc_hash;
	u32 cur_filter;
	unsigned int filter_state;
	bool sniffer_enabled;

@@ -222,7 +221,6 @@ struct ar9170 {

	/* EEPROM */
	struct ar9170_eeprom eeprom;
	struct ath_regulatory regulatory;

	/* tx queues - as seen by hw - */
	struct sk_buff_head tx_pending[__AR9170_NUM_TXQ];
@@ -261,10 +259,6 @@ struct ar9170_tx_info {
#define IS_STARTED(a)		(((struct ar9170 *)a)->state >= AR9170_STARTED)
#define IS_ACCEPTING_CMD(a)	(((struct ar9170 *)a)->state >= AR9170_IDLE)

#define AR9170_FILTER_CHANGED_MODE		BIT(0)
#define AR9170_FILTER_CHANGED_MULTICAST		BIT(1)
#define AR9170_FILTER_CHANGED_FRAMEFILTER	BIT(2)

/* exported interface */
void *ar9170_alloc(size_t priv_size);
int ar9170_register(struct ar9170 *ar, struct device *pdev);
@@ -278,8 +272,8 @@ int ar9170_nag_limiter(struct ar9170 *ar);
int ar9170_op_tx(struct ieee80211_hw *hw, struct sk_buff *skb);
int ar9170_init_mac(struct ar9170 *ar);
int ar9170_set_qos(struct ar9170 *ar);
int ar9170_update_multicast(struct ar9170 *ar);
int ar9170_update_frame_filter(struct ar9170 *ar);
int ar9170_update_multicast(struct ar9170 *ar, const u64 mc_hast);
int ar9170_update_frame_filter(struct ar9170 *ar, const u32 filter);
int ar9170_set_operating_mode(struct ar9170 *ar);
int ar9170_set_beacon_timers(struct ar9170 *ar);
int ar9170_set_dyn_sifs_ack(struct ar9170 *ar);
+7 −15
Original line number Diff line number Diff line
@@ -238,39 +238,31 @@ static int ar9170_set_mac_reg(struct ar9170 *ar, const u32 reg, const u8 *mac)
	return ar9170_regwrite_result();
}

int ar9170_update_multicast(struct ar9170 *ar)
int ar9170_update_multicast(struct ar9170 *ar, const u64 mc_hash)
{
	int err;

	ar9170_regwrite_begin(ar);
	ar9170_regwrite(AR9170_MAC_REG_GROUP_HASH_TBL_H,
		ar->want_mc_hash >> 32);
	ar9170_regwrite(AR9170_MAC_REG_GROUP_HASH_TBL_L,
		ar->want_mc_hash);

	ar9170_regwrite(AR9170_MAC_REG_GROUP_HASH_TBL_H, mc_hash >> 32);
	ar9170_regwrite(AR9170_MAC_REG_GROUP_HASH_TBL_L, mc_hash);
	ar9170_regwrite_finish();
	err = ar9170_regwrite_result();

	if (err)
		return err;

	ar->cur_mc_hash = ar->want_mc_hash;

	ar->cur_mc_hash = mc_hash;
	return 0;
}

int ar9170_update_frame_filter(struct ar9170 *ar)
int ar9170_update_frame_filter(struct ar9170 *ar, const u32 filter)
{
	int err;

	err = ar9170_write_reg(ar, AR9170_MAC_REG_FRAMETYPE_FILTER,
			       ar->want_filter);

	err = ar9170_write_reg(ar, AR9170_MAC_REG_FRAMETYPE_FILTER, filter);
	if (err)
		return err;

	ar->cur_filter = ar->want_filter;

	ar->cur_filter = filter;
	return 0;
}

Loading