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

Commit 06f40a41 authored by John W. Linville's avatar John W. Linville
Browse files

Merge branch 'master' of...

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless into for-davem
parents db0fe0b2 290eddc4
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -158,9 +158,10 @@ static int bcma_register_cores(struct bcma_bus *bus)


static void bcma_unregister_cores(struct bcma_bus *bus)
static void bcma_unregister_cores(struct bcma_bus *bus)
{
{
	struct bcma_device *core;
	struct bcma_device *core, *tmp;


	list_for_each_entry(core, &bus->cores, list) {
	list_for_each_entry_safe(core, tmp, &bus->cores, list) {
		list_del(&core->list);
		if (core->dev_registered)
		if (core->dev_registered)
			device_unregister(&core->dev);
			device_unregister(&core->dev);
	}
	}
+1 −1
Original line number Original line Diff line number Diff line
@@ -1339,7 +1339,7 @@ static int brcmf_usb_probe_cb(struct brcmf_usbdev_info *devinfo,
	}
	}


	ret = brcmf_bus_start(dev);
	ret = brcmf_bus_start(dev);
	if (ret == -ENOLINK) {
	if (ret) {
		brcmf_dbg(ERROR, "dongle is not responding\n");
		brcmf_dbg(ERROR, "dongle is not responding\n");
		brcmf_detach(dev);
		brcmf_detach(dev);
		goto fail;
		goto fail;
+24 −44
Original line number Original line Diff line number Diff line
@@ -3972,7 +3972,7 @@ brcmf_set_management_ie(struct brcmf_cfg80211_info *cfg,
	u8  *iovar_ie_buf;
	u8  *iovar_ie_buf;
	u8  *curr_ie_buf;
	u8  *curr_ie_buf;
	u8  *mgmt_ie_buf = NULL;
	u8  *mgmt_ie_buf = NULL;
	u32 mgmt_ie_buf_len = 0;
	int mgmt_ie_buf_len;
	u32 *mgmt_ie_len = 0;
	u32 *mgmt_ie_len = 0;
	u32 del_add_ie_buf_len = 0;
	u32 del_add_ie_buf_len = 0;
	u32 total_ie_buf_len = 0;
	u32 total_ie_buf_len = 0;
@@ -3982,7 +3982,7 @@ brcmf_set_management_ie(struct brcmf_cfg80211_info *cfg,
	struct parsed_vndr_ie_info *vndrie_info;
	struct parsed_vndr_ie_info *vndrie_info;
	s32 i;
	s32 i;
	u8 *ptr;
	u8 *ptr;
	u32 remained_buf_len;
	int remained_buf_len;


	WL_TRACE("bssidx %d, pktflag : 0x%02X\n", bssidx, pktflag);
	WL_TRACE("bssidx %d, pktflag : 0x%02X\n", bssidx, pktflag);
	iovar_ie_buf = kzalloc(WL_EXTRA_BUF_MAX, GFP_KERNEL);
	iovar_ie_buf = kzalloc(WL_EXTRA_BUF_MAX, GFP_KERNEL);
@@ -4606,12 +4606,13 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg,
	struct brcmf_cfg80211_profile *profile = cfg->profile;
	struct brcmf_cfg80211_profile *profile = cfg->profile;
	struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
	struct brcmf_cfg80211_connect_info *conn_info = cfg_to_conn(cfg);
	struct wiphy *wiphy = cfg_to_wiphy(cfg);
	struct wiphy *wiphy = cfg_to_wiphy(cfg);
	struct brcmf_channel_info_le channel_le;
	struct ieee80211_channel *notify_channel = NULL;
	struct ieee80211_channel *notify_channel;
	struct ieee80211_supported_band *band;
	struct ieee80211_supported_band *band;
	struct brcmf_bss_info_le *bi;
	u32 freq;
	u32 freq;
	s32 err = 0;
	s32 err = 0;
	u32 target_channel;
	u32 target_channel;
	u8 *buf;


	WL_TRACE("Enter\n");
	WL_TRACE("Enter\n");


@@ -4619,11 +4620,22 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg,
	memcpy(profile->bssid, e->addr, ETH_ALEN);
	memcpy(profile->bssid, e->addr, ETH_ALEN);
	brcmf_update_bss_info(cfg);
	brcmf_update_bss_info(cfg);


	brcmf_exec_dcmd(ndev, BRCMF_C_GET_CHANNEL, &channel_le,
	buf = kzalloc(WL_BSS_INFO_MAX, GFP_KERNEL);
			sizeof(channel_le));
	if (buf == NULL) {
		err = -ENOMEM;
		goto done;
	}

	/* data sent to dongle has to be little endian */
	*(__le32 *)buf = cpu_to_le32(WL_BSS_INFO_MAX);
	err = brcmf_exec_dcmd(ndev, BRCMF_C_GET_BSS_INFO, buf, WL_BSS_INFO_MAX);

	if (err)
		goto done;


	target_channel = le32_to_cpu(channel_le.target_channel);
	bi = (struct brcmf_bss_info_le *)(buf + 4);
	WL_CONN("Roamed to channel %d\n", target_channel);
	target_channel = bi->ctl_ch ? bi->ctl_ch :
				      CHSPEC_CHANNEL(le16_to_cpu(bi->chanspec));


	if (target_channel <= CH_MAX_2G_CHANNEL)
	if (target_channel <= CH_MAX_2G_CHANNEL)
		band = wiphy->bands[IEEE80211_BAND_2GHZ];
		band = wiphy->bands[IEEE80211_BAND_2GHZ];
@@ -4633,6 +4645,8 @@ brcmf_bss_roaming_done(struct brcmf_cfg80211_info *cfg,
	freq = ieee80211_channel_to_frequency(target_channel, band->band);
	freq = ieee80211_channel_to_frequency(target_channel, band->band);
	notify_channel = ieee80211_get_channel(wiphy, freq);
	notify_channel = ieee80211_get_channel(wiphy, freq);


done:
	kfree(buf);
	cfg80211_roamed(ndev, notify_channel, (u8 *)profile->bssid,
	cfg80211_roamed(ndev, notify_channel, (u8 *)profile->bssid,
			conn_info->req_ie, conn_info->req_ie_len,
			conn_info->req_ie, conn_info->req_ie_len,
			conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
			conn_info->resp_ie, conn_info->resp_ie_len, GFP_KERNEL);
@@ -5186,41 +5200,6 @@ brcmf_cfg80211_event(struct net_device *ndev,
		schedule_work(&cfg->event_work);
		schedule_work(&cfg->event_work);
}
}


static s32 brcmf_dongle_mode(struct net_device *ndev, s32 iftype)
{
	s32 infra = 0;
	s32 err = 0;

	switch (iftype) {
	case NL80211_IFTYPE_MONITOR:
	case NL80211_IFTYPE_WDS:
		WL_ERR("type (%d) : currently we do not support this mode\n",
		       iftype);
		err = -EINVAL;
		return err;
	case NL80211_IFTYPE_ADHOC:
		infra = 0;
		break;
	case NL80211_IFTYPE_STATION:
		infra = 1;
		break;
	case NL80211_IFTYPE_AP:
		infra = 1;
		break;
	default:
		err = -EINVAL;
		WL_ERR("invalid type (%d)\n", iftype);
		return err;
	}
	err = brcmf_exec_dcmd_u32(ndev, BRCMF_C_SET_INFRA, &infra);
	if (err) {
		WL_ERR("WLC_SET_INFRA error (%d)\n", err);
		return err;
	}

	return 0;
}

static s32 brcmf_dongle_eventmsg(struct net_device *ndev)
static s32 brcmf_dongle_eventmsg(struct net_device *ndev)
{
{
	/* Room for "event_msgs" + '\0' + bitvec */
	/* Room for "event_msgs" + '\0' + bitvec */
@@ -5439,7 +5418,8 @@ static s32 brcmf_config_dongle(struct brcmf_cfg80211_info *cfg)
				WL_BEACON_TIMEOUT);
				WL_BEACON_TIMEOUT);
	if (err)
	if (err)
		goto default_conf_out;
		goto default_conf_out;
	err = brcmf_dongle_mode(ndev, wdev->iftype);
	err = brcmf_cfg80211_change_iface(wdev->wiphy, ndev, wdev->iftype,
					  NULL, NULL);
	if (err && err != -EINPROGRESS)
	if (err && err != -EINPROGRESS)
		goto default_conf_out;
		goto default_conf_out;
	err = brcmf_dongle_probecap(cfg);
	err = brcmf_dongle_probecap(cfg);
+1 −1
Original line number Original line Diff line number Diff line
@@ -10472,7 +10472,7 @@ static void ipw_handle_promiscuous_tx(struct ipw_priv *priv,
		} else
		} else
			len = src->len;
			len = src->len;


		dst = alloc_skb(len + sizeof(*rt_hdr), GFP_ATOMIC);
		dst = alloc_skb(len + sizeof(*rt_hdr) + sizeof(u16)*2, GFP_ATOMIC);
		if (!dst)
		if (!dst)
			continue;
			continue;


+24 −15
Original line number Original line Diff line number Diff line
@@ -518,7 +518,7 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
	 * See iwlagn_mac_channel_switch.
	 * See iwlagn_mac_channel_switch.
	 */
	 */
	struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
	struct iwl_rxon_context *ctx = &priv->contexts[IWL_RXON_CTX_BSS];
	struct iwl6000_channel_switch_cmd cmd;
	struct iwl6000_channel_switch_cmd *cmd;
	u32 switch_time_in_usec, ucode_switch_time;
	u32 switch_time_in_usec, ucode_switch_time;
	u16 ch;
	u16 ch;
	u32 tsf_low;
	u32 tsf_low;
@@ -527,18 +527,25 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
	struct ieee80211_vif *vif = ctx->vif;
	struct ieee80211_vif *vif = ctx->vif;
	struct iwl_host_cmd hcmd = {
	struct iwl_host_cmd hcmd = {
		.id = REPLY_CHANNEL_SWITCH,
		.id = REPLY_CHANNEL_SWITCH,
		.len = { sizeof(cmd), },
		.len = { sizeof(*cmd), },
		.flags = CMD_SYNC,
		.flags = CMD_SYNC,
		.data = { &cmd, },
		.dataflags[0] = IWL_HCMD_DFL_NOCOPY,
	};
	};
	int err;


	cmd.band = priv->band == IEEE80211_BAND_2GHZ;
	cmd = kzalloc(sizeof(*cmd), GFP_KERNEL);
	if (!cmd)
		return -ENOMEM;

	hcmd.data[0] = cmd;

	cmd->band = priv->band == IEEE80211_BAND_2GHZ;
	ch = ch_switch->channel->hw_value;
	ch = ch_switch->channel->hw_value;
	IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
	IWL_DEBUG_11H(priv, "channel switch from %u to %u\n",
		      ctx->active.channel, ch);
		      ctx->active.channel, ch);
	cmd.channel = cpu_to_le16(ch);
	cmd->channel = cpu_to_le16(ch);
	cmd.rxon_flags = ctx->staging.flags;
	cmd->rxon_flags = ctx->staging.flags;
	cmd.rxon_filter_flags = ctx->staging.filter_flags;
	cmd->rxon_filter_flags = ctx->staging.filter_flags;
	switch_count = ch_switch->count;
	switch_count = ch_switch->count;
	tsf_low = ch_switch->timestamp & 0x0ffffffff;
	tsf_low = ch_switch->timestamp & 0x0ffffffff;
	/*
	/*
@@ -554,23 +561,25 @@ static int iwl6000_hw_channel_switch(struct iwl_priv *priv,
			switch_count = 0;
			switch_count = 0;
	}
	}
	if (switch_count <= 1)
	if (switch_count <= 1)
		cmd.switch_time = cpu_to_le32(priv->ucode_beacon_time);
		cmd->switch_time = cpu_to_le32(priv->ucode_beacon_time);
	else {
	else {
		switch_time_in_usec =
		switch_time_in_usec =
			vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
			vif->bss_conf.beacon_int * switch_count * TIME_UNIT;
		ucode_switch_time = iwl_usecs_to_beacons(priv,
		ucode_switch_time = iwl_usecs_to_beacons(priv,
							 switch_time_in_usec,
							 switch_time_in_usec,
							 beacon_interval);
							 beacon_interval);
		cmd.switch_time = iwl_add_beacon_time(priv,
		cmd->switch_time = iwl_add_beacon_time(priv,
						       priv->ucode_beacon_time,
						       priv->ucode_beacon_time,
						       ucode_switch_time,
						       ucode_switch_time,
						       beacon_interval);
						       beacon_interval);
	}
	}
	IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
	IWL_DEBUG_11H(priv, "uCode time for the switch is 0x%x\n",
		      cmd.switch_time);
		      cmd->switch_time);
	cmd.expect_beacon = ch_switch->channel->flags & IEEE80211_CHAN_RADAR;
	cmd->expect_beacon = ch_switch->channel->flags & IEEE80211_CHAN_RADAR;


	return iwl_dvm_send_cmd(priv, &hcmd);
	err = iwl_dvm_send_cmd(priv, &hcmd);
	kfree(cmd);
	return err;
}
}


struct iwl_lib_ops iwl6000_lib = {
struct iwl_lib_ops iwl6000_lib = {
Loading