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

Commit aa21c004 authored by David Woodhouse's avatar David Woodhouse Committed by David S. Miller
Browse files

libertas: kill struct lbs_adapter



There seems to be no reason for a separate structure; move it all
into struct lbs_private.

Signed-off-by: default avatarDavid Woodhouse <dwmw2@infradead.org>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent f86a93e1
Loading
Loading
Loading
Loading
+32 −36
Original line number Diff line number Diff line
@@ -432,8 +432,8 @@ u8 lbs_get_scan_type_11d(u8 chan,

void lbs_init_11d(struct lbs_private *priv)
{
	priv->adapter->enable11d = 0;
	memset(&(priv->adapter->parsed_region_chan), 0,
	priv->enable11d = 0;
	memset(&(priv->parsed_region_chan), 0,
	       sizeof(struct parsed_region_chan_11d));
	return;
}
@@ -447,7 +447,7 @@ static int set_domain_info_11d(struct lbs_private *priv)
{
	int ret;

	if (!priv->adapter->enable11d) {
	if (!priv->enable11d) {
		lbs_deb_11d("dnld domain Info with 11d disabled\n");
		return 0;
	}
@@ -469,22 +469,21 @@ static int set_domain_info_11d(struct lbs_private *priv)
*/
int lbs_set_universaltable(struct lbs_private *priv, u8 band)
{
	struct lbs_adapter *adapter = priv->adapter;
	u16 size = sizeof(struct chan_freq_power);
	u16 i = 0;

	memset(adapter->universal_channel, 0,
	       sizeof(adapter->universal_channel));
	memset(priv->universal_channel, 0,
	       sizeof(priv->universal_channel));

	adapter->universal_channel[i].nrcfp =
	priv->universal_channel[i].nrcfp =
	    sizeof(channel_freq_power_UN_BG) / size;
	lbs_deb_11d("BG-band nrcfp %d\n",
	       adapter->universal_channel[i].nrcfp);
	       priv->universal_channel[i].nrcfp);

	adapter->universal_channel[i].CFP = channel_freq_power_UN_BG;
	adapter->universal_channel[i].valid = 1;
	adapter->universal_channel[i].region = UNIVERSAL_REGION_CODE;
	adapter->universal_channel[i].band = band;
	priv->universal_channel[i].CFP = channel_freq_power_UN_BG;
	priv->universal_channel[i].valid = 1;
	priv->universal_channel[i].region = UNIVERSAL_REGION_CODE;
	priv->universal_channel[i].band = band;
	i++;

	return 0;
@@ -505,8 +504,7 @@ int lbs_cmd_802_11d_domain_info(struct lbs_private *priv,
	struct cmd_ds_802_11d_domain_info *pdomaininfo =
	    &cmd->params.domaininfo;
	struct mrvlietypes_domainparamset *domain = &pdomaininfo->domain;
	struct lbs_adapter *adapter = priv->adapter;
	u8 nr_subband = adapter->domainreg.nr_subband;
	u8 nr_subband = priv->domainreg.nr_subband;

	lbs_deb_enter(LBS_DEB_11D);

@@ -523,7 +521,7 @@ int lbs_cmd_802_11d_domain_info(struct lbs_private *priv,
	}

	domain->header.type = cpu_to_le16(TLV_TYPE_DOMAIN);
	memcpy(domain->countrycode, adapter->domainreg.countrycode,
	memcpy(domain->countrycode, priv->domainreg.countrycode,
	       sizeof(domain->countrycode));

	domain->header.len =
@@ -531,7 +529,7 @@ int lbs_cmd_802_11d_domain_info(struct lbs_private *priv,
			     sizeof(domain->countrycode));

	if (nr_subband) {
		memcpy(domain->subband, adapter->domainreg.subband,
		memcpy(domain->subband, priv->domainreg.subband,
		       nr_subband * sizeof(struct ieeetypes_subbandset));

		cmd->size = cpu_to_le16(sizeof(pdomaininfo->action) +
@@ -605,24 +603,23 @@ int lbs_parse_dnld_countryinfo_11d(struct lbs_private *priv,
                                        struct bss_descriptor * bss)
{
	int ret;
	struct lbs_adapter *adapter = priv->adapter;

	lbs_deb_enter(LBS_DEB_11D);
	if (priv->adapter->enable11d) {
		memset(&adapter->parsed_region_chan, 0,
	if (priv->enable11d) {
		memset(&priv->parsed_region_chan, 0,
		       sizeof(struct parsed_region_chan_11d));
		ret = parse_domain_info_11d(&bss->countryinfo, 0,
					       &adapter->parsed_region_chan);
					       &priv->parsed_region_chan);

		if (ret == -1) {
			lbs_deb_11d("error parsing domain_info from AP\n");
			goto done;
		}

		memset(&adapter->domainreg, 0,
		memset(&priv->domainreg, 0,
		       sizeof(struct lbs_802_11d_domain_reg));
		generate_domain_info_11d(&adapter->parsed_region_chan,
				      &adapter->domainreg);
		generate_domain_info_11d(&priv->parsed_region_chan,
				      &priv->domainreg);

		ret = set_domain_info_11d(priv);

@@ -646,18 +643,17 @@ int lbs_parse_dnld_countryinfo_11d(struct lbs_private *priv,
int lbs_create_dnld_countryinfo_11d(struct lbs_private *priv)
{
	int ret;
	struct lbs_adapter *adapter = priv->adapter;
	struct region_channel *region_chan;
	u8 j;

	lbs_deb_enter(LBS_DEB_11D);
	lbs_deb_11d("curbssparams.band %d\n", adapter->curbssparams.band);
	lbs_deb_11d("curbssparams.band %d\n", priv->curbssparams.band);

	if (priv->adapter->enable11d) {
	if (priv->enable11d) {
		/* update parsed_region_chan_11; dnld domaininf to FW */

		for (j = 0; j < ARRAY_SIZE(adapter->region_channel); j++) {
			region_chan = &adapter->region_channel[j];
		for (j = 0; j < ARRAY_SIZE(priv->region_channel); j++) {
			region_chan = &priv->region_channel[j];

			lbs_deb_11d("%d region_chan->band %d\n", j,
			       region_chan->band);
@@ -665,28 +661,28 @@ int lbs_create_dnld_countryinfo_11d(struct lbs_private *priv)
			if (!region_chan || !region_chan->valid
			    || !region_chan->CFP)
				continue;
			if (region_chan->band != adapter->curbssparams.band)
			if (region_chan->band != priv->curbssparams.band)
				continue;
			break;
		}

		if (j >= ARRAY_SIZE(adapter->region_channel)) {
		if (j >= ARRAY_SIZE(priv->region_channel)) {
			lbs_deb_11d("region_chan not found, band %d\n",
			       adapter->curbssparams.band);
			       priv->curbssparams.band);
			ret = -1;
			goto done;
		}

		memset(&adapter->parsed_region_chan, 0,
		memset(&priv->parsed_region_chan, 0,
		       sizeof(struct parsed_region_chan_11d));
		lbs_generate_parsed_region_chan_11d(region_chan,
						     &adapter->
						     &priv->
						     parsed_region_chan);

		memset(&adapter->domainreg, 0,
		memset(&priv->domainreg, 0,
		       sizeof(struct lbs_802_11d_domain_reg));
		generate_domain_info_11d(&adapter->parsed_region_chan,
					 &adapter->domainreg);
		generate_domain_info_11d(&priv->parsed_region_chan,
					 &priv->domainreg);

		ret = set_domain_info_11d(priv);

+64 −72
Original line number Diff line number Diff line
@@ -18,7 +18,6 @@ static const u8 bssid_off[ETH_ALEN] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
static int assoc_helper_essid(struct lbs_private *priv,
                              struct assoc_request * assoc_req)
{
	struct lbs_adapter *adapter = priv->adapter;
	int ret = 0;
	struct bss_descriptor * bss;
	int channel = -1;
@@ -38,7 +37,7 @@ static int assoc_helper_essid(struct lbs_private *priv,
		lbs_send_specific_ssid_scan(priv, assoc_req->ssid,
			assoc_req->ssid_len, 0);

		bss = lbs_find_ssid_in_list(adapter, assoc_req->ssid,
		bss = lbs_find_ssid_in_list(priv, assoc_req->ssid,
				assoc_req->ssid_len, NULL, IW_MODE_INFRA, channel);
		if (bss != NULL) {
			memcpy(&assoc_req->bss, bss, sizeof(struct bss_descriptor));
@@ -54,7 +53,7 @@ static int assoc_helper_essid(struct lbs_private *priv,
			assoc_req->ssid_len, 1);

		/* Search for the requested SSID in the scan table */
		bss = lbs_find_ssid_in_list(adapter, assoc_req->ssid,
		bss = lbs_find_ssid_in_list(priv, assoc_req->ssid,
				assoc_req->ssid_len, NULL, IW_MODE_ADHOC, channel);
		if (bss != NULL) {
			lbs_deb_assoc("SSID found, will join\n");
@@ -78,7 +77,6 @@ static int assoc_helper_essid(struct lbs_private *priv,
static int assoc_helper_bssid(struct lbs_private *priv,
                              struct assoc_request * assoc_req)
{
	struct lbs_adapter *adapter = priv->adapter;
	int ret = 0;
	struct bss_descriptor * bss;
	DECLARE_MAC_BUF(mac);
@@ -87,7 +85,7 @@ static int assoc_helper_bssid(struct lbs_private *priv,
		print_mac(mac, assoc_req->bssid));

	/* Search for index position in list for requested MAC */
	bss = lbs_find_bssid_in_list(adapter, assoc_req->bssid,
	bss = lbs_find_bssid_in_list(priv, assoc_req->bssid,
			    assoc_req->mode);
	if (bss == NULL) {
		lbs_deb_assoc("ASSOC: WAP: BSSID %s not found, "
@@ -138,21 +136,20 @@ static int assoc_helper_associate(struct lbs_private *priv,
static int assoc_helper_mode(struct lbs_private *priv,
                             struct assoc_request * assoc_req)
{
	struct lbs_adapter *adapter = priv->adapter;
	int ret = 0;

	lbs_deb_enter(LBS_DEB_ASSOC);

	if (assoc_req->mode == adapter->mode)
	if (assoc_req->mode == priv->mode)
		goto done;

	if (assoc_req->mode == IW_MODE_INFRA) {
		if (adapter->psstate != PS_STATE_FULL_POWER)
		if (priv->psstate != PS_STATE_FULL_POWER)
			lbs_ps_wakeup(priv, CMD_OPTION_WAITFORRSP);
		adapter->psmode = LBS802_11POWERMODECAM;
		priv->psmode = LBS802_11POWERMODECAM;
	}

	adapter->mode = assoc_req->mode;
	priv->mode = assoc_req->mode;
	ret = lbs_prepare_and_send_command(priv,
				    CMD_802_11_SNMP_MIB,
				    0, CMD_OPTION_WAITFORRSP,
@@ -191,7 +188,6 @@ void lbs_sync_channel(struct work_struct *work)
static int assoc_helper_channel(struct lbs_private *priv,
                                struct assoc_request * assoc_req)
{
	struct lbs_adapter *adapter = priv->adapter;
	int ret = 0;

	lbs_deb_enter(LBS_DEB_ASSOC);
@@ -201,11 +197,11 @@ static int assoc_helper_channel(struct lbs_private *priv,
		lbs_deb_assoc("ASSOC: channel: error getting channel.");
	}

	if (assoc_req->channel == adapter->curbssparams.channel)
	if (assoc_req->channel == priv->curbssparams.channel)
		goto done;

	lbs_deb_assoc("ASSOC: channel: %d -> %d\n",
	       adapter->curbssparams.channel, assoc_req->channel);
	       priv->curbssparams.channel, assoc_req->channel);

	ret = lbs_prepare_and_send_command(priv, CMD_802_11_RF_CHANNEL,
				CMD_OPT_802_11_RF_CHANNEL_SET,
@@ -219,7 +215,7 @@ static int assoc_helper_channel(struct lbs_private *priv,
		lbs_deb_assoc("ASSOC: channel: error getting channel.");
	}

	if (assoc_req->channel != adapter->curbssparams.channel) {
	if (assoc_req->channel != priv->curbssparams.channel) {
		lbs_deb_assoc("ASSOC: channel: failed to update channel to %d",
		              assoc_req->channel);
		goto done;
@@ -246,7 +242,6 @@ static int assoc_helper_channel(struct lbs_private *priv,
static int assoc_helper_wep_keys(struct lbs_private *priv,
                                 struct assoc_request * assoc_req)
{
	struct lbs_adapter *adapter = priv->adapter;
	int i;
	int ret = 0;

@@ -275,23 +270,23 @@ static int assoc_helper_wep_keys(struct lbs_private *priv,

	/* enable/disable the MAC's WEP packet filter */
	if (assoc_req->secinfo.wep_enabled)
		adapter->currentpacketfilter |= CMD_ACT_MAC_WEP_ENABLE;
		priv->currentpacketfilter |= CMD_ACT_MAC_WEP_ENABLE;
	else
		adapter->currentpacketfilter &= ~CMD_ACT_MAC_WEP_ENABLE;
		priv->currentpacketfilter &= ~CMD_ACT_MAC_WEP_ENABLE;
	ret = lbs_set_mac_packet_filter(priv);
	if (ret)
		goto out;

	mutex_lock(&adapter->lock);
	mutex_lock(&priv->lock);

	/* Copy WEP keys into adapter wep key fields */
	/* Copy WEP keys into priv wep key fields */
	for (i = 0; i < 4; i++) {
		memcpy(&adapter->wep_keys[i], &assoc_req->wep_keys[i],
		memcpy(&priv->wep_keys[i], &assoc_req->wep_keys[i],
			sizeof(struct enc_key));
	}
	adapter->wep_tx_keyidx = assoc_req->wep_tx_keyidx;
	priv->wep_tx_keyidx = assoc_req->wep_tx_keyidx;

	mutex_unlock(&adapter->lock);
	mutex_unlock(&priv->lock);

out:
	lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret);
@@ -301,14 +296,13 @@ static int assoc_helper_wep_keys(struct lbs_private *priv,
static int assoc_helper_secinfo(struct lbs_private *priv,
                                struct assoc_request * assoc_req)
{
	struct lbs_adapter *adapter = priv->adapter;
	int ret = 0;
	u32 do_wpa;
	u32 rsn = 0;

	lbs_deb_enter(LBS_DEB_ASSOC);

	memcpy(&adapter->secinfo, &assoc_req->secinfo,
	memcpy(&priv->secinfo, &assoc_req->secinfo,
		sizeof(struct lbs_802_11_security));

	ret = lbs_set_mac_packet_filter(priv);
@@ -396,17 +390,16 @@ static int assoc_helper_wpa_keys(struct lbs_private *priv,
static int assoc_helper_wpa_ie(struct lbs_private *priv,
                               struct assoc_request * assoc_req)
{
	struct lbs_adapter *adapter = priv->adapter;
	int ret = 0;

	lbs_deb_enter(LBS_DEB_ASSOC);

	if (assoc_req->secinfo.WPAenabled || assoc_req->secinfo.WPA2enabled) {
		memcpy(&adapter->wpa_ie, &assoc_req->wpa_ie, assoc_req->wpa_ie_len);
		adapter->wpa_ie_len = assoc_req->wpa_ie_len;
		memcpy(&priv->wpa_ie, &assoc_req->wpa_ie, assoc_req->wpa_ie_len);
		priv->wpa_ie_len = assoc_req->wpa_ie_len;
	} else {
		memset(&adapter->wpa_ie, 0, MAX_WPA_IE_LEN);
		adapter->wpa_ie_len = 0;
		memset(&priv->wpa_ie, 0, MAX_WPA_IE_LEN);
		priv->wpa_ie_len = 0;
	}

	lbs_deb_leave_args(LBS_DEB_ASSOC, "ret %d", ret);
@@ -414,14 +407,14 @@ static int assoc_helper_wpa_ie(struct lbs_private *priv,
}


static int should_deauth_infrastructure(struct lbs_adapter *adapter,
static int should_deauth_infrastructure(struct lbs_private *priv,
                                        struct assoc_request * assoc_req)
{
	int ret = 0;

	lbs_deb_enter(LBS_DEB_ASSOC);

	if (adapter->connect_status != LBS_CONNECTED)
	if (priv->connect_status != LBS_CONNECTED)
		return 0;

	if (test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) {
@@ -431,7 +424,7 @@ static int should_deauth_infrastructure(struct lbs_adapter *adapter,
	}

	if (test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) {
		if (adapter->secinfo.auth_mode != assoc_req->secinfo.auth_mode) {
		if (priv->secinfo.auth_mode != assoc_req->secinfo.auth_mode) {
			lbs_deb_assoc("Deauthenticating due to new security\n");
			ret = 1;
			goto out;
@@ -466,16 +459,16 @@ static int should_deauth_infrastructure(struct lbs_adapter *adapter,
}


static int should_stop_adhoc(struct lbs_adapter *adapter,
static int should_stop_adhoc(struct lbs_private *priv,
                             struct assoc_request * assoc_req)
{
	lbs_deb_enter(LBS_DEB_ASSOC);

	if (adapter->connect_status != LBS_CONNECTED)
	if (priv->connect_status != LBS_CONNECTED)
		return 0;

	if (lbs_ssid_cmp(adapter->curbssparams.ssid,
	                      adapter->curbssparams.ssid_len,
	if (lbs_ssid_cmp(priv->curbssparams.ssid,
	                      priv->curbssparams.ssid_len,
	                      assoc_req->ssid, assoc_req->ssid_len) != 0)
		return 1;

@@ -486,7 +479,7 @@ static int should_stop_adhoc(struct lbs_adapter *adapter,
	}

	if (test_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags)) {
		if (assoc_req->channel != adapter->curbssparams.channel)
		if (assoc_req->channel != priv->curbssparams.channel)
			return 1;
	}

@@ -499,7 +492,6 @@ void lbs_association_worker(struct work_struct *work)
{
	struct lbs_private *priv = container_of(work, struct lbs_private,
		assoc_work.work);
	struct lbs_adapter *adapter = priv->adapter;
	struct assoc_request * assoc_req = NULL;
	int ret = 0;
	int find_any_ssid = 0;
@@ -507,11 +499,11 @@ void lbs_association_worker(struct work_struct *work)

	lbs_deb_enter(LBS_DEB_ASSOC);

	mutex_lock(&adapter->lock);
	assoc_req = adapter->pending_assoc_req;
	adapter->pending_assoc_req = NULL;
	adapter->in_progress_assoc_req = assoc_req;
	mutex_unlock(&adapter->lock);
	mutex_lock(&priv->lock);
	assoc_req = priv->pending_assoc_req;
	priv->pending_assoc_req = NULL;
	priv->in_progress_assoc_req = assoc_req;
	mutex_unlock(&priv->lock);

	if (!assoc_req)
		goto done;
@@ -569,8 +561,8 @@ void lbs_association_worker(struct work_struct *work)
	 * Check if the attributes being changing require deauthentication
	 * from the currently associated infrastructure access point.
	 */
	if (adapter->mode == IW_MODE_INFRA) {
		if (should_deauth_infrastructure(adapter, assoc_req)) {
	if (priv->mode == IW_MODE_INFRA) {
		if (should_deauth_infrastructure(priv, assoc_req)) {
			ret = lbs_send_deauthentication(priv);
			if (ret) {
				lbs_deb_assoc("Deauthentication due to new "
@@ -578,8 +570,8 @@ void lbs_association_worker(struct work_struct *work)
					ret);
			}
		}
	} else if (adapter->mode == IW_MODE_ADHOC) {
		if (should_stop_adhoc(adapter, assoc_req)) {
	} else if (priv->mode == IW_MODE_ADHOC) {
		if (should_stop_adhoc(priv, assoc_req)) {
			ret = lbs_stop_adhoc_network(priv);
			if (ret) {
				lbs_deb_assoc("Teardown of AdHoc network due to "
@@ -643,7 +635,7 @@ void lbs_association_worker(struct work_struct *work)
			success = 0;
		}

		if (adapter->connect_status != LBS_CONNECTED) {
		if (priv->connect_status != LBS_CONNECTED) {
			lbs_deb_assoc("ASSOC: association unsuccessful, "
				"not connected\n");
			success = 0;
@@ -651,9 +643,9 @@ void lbs_association_worker(struct work_struct *work)

		if (success) {
			lbs_deb_assoc("ASSOC: associated to '%s', %s\n",
				escape_essid(adapter->curbssparams.ssid,
				             adapter->curbssparams.ssid_len),
				print_mac(mac, adapter->curbssparams.bssid));
				escape_essid(priv->curbssparams.ssid,
				             priv->curbssparams.ssid_len),
				print_mac(mac, priv->curbssparams.bssid));
			lbs_prepare_and_send_command(priv,
				CMD_802_11_RSSI,
				0, CMD_OPTION_WAITFORRSP, 0, NULL);
@@ -672,9 +664,9 @@ void lbs_association_worker(struct work_struct *work)
			ret);
	}

	mutex_lock(&adapter->lock);
	adapter->in_progress_assoc_req = NULL;
	mutex_unlock(&adapter->lock);
	mutex_lock(&priv->lock);
	priv->in_progress_assoc_req = NULL;
	mutex_unlock(&priv->lock);
	kfree(assoc_req);

done:
@@ -685,15 +677,15 @@ void lbs_association_worker(struct work_struct *work)
/*
 * Caller MUST hold any necessary locks
 */
struct assoc_request *lbs_get_association_request(struct lbs_adapter *adapter)
struct assoc_request *lbs_get_association_request(struct lbs_private *priv)
{
	struct assoc_request * assoc_req;

	lbs_deb_enter(LBS_DEB_ASSOC);
	if (!adapter->pending_assoc_req) {
		adapter->pending_assoc_req = kzalloc(sizeof(struct assoc_request),
	if (!priv->pending_assoc_req) {
		priv->pending_assoc_req = kzalloc(sizeof(struct assoc_request),
		                                     GFP_KERNEL);
		if (!adapter->pending_assoc_req) {
		if (!priv->pending_assoc_req) {
			lbs_pr_info("Not enough memory to allocate association"
				" request!\n");
			return NULL;
@@ -703,57 +695,57 @@ struct assoc_request *lbs_get_association_request(struct lbs_adapter *adapter)
	/* Copy current configuration attributes to the association request,
	 * but don't overwrite any that are already set.
	 */
	assoc_req = adapter->pending_assoc_req;
	assoc_req = priv->pending_assoc_req;
	if (!test_bit(ASSOC_FLAG_SSID, &assoc_req->flags)) {
		memcpy(&assoc_req->ssid, &adapter->curbssparams.ssid,
		memcpy(&assoc_req->ssid, &priv->curbssparams.ssid,
		       IW_ESSID_MAX_SIZE);
		assoc_req->ssid_len = adapter->curbssparams.ssid_len;
		assoc_req->ssid_len = priv->curbssparams.ssid_len;
	}

	if (!test_bit(ASSOC_FLAG_CHANNEL, &assoc_req->flags))
		assoc_req->channel = adapter->curbssparams.channel;
		assoc_req->channel = priv->curbssparams.channel;

	if (!test_bit(ASSOC_FLAG_BAND, &assoc_req->flags))
		assoc_req->band = adapter->curbssparams.band;
		assoc_req->band = priv->curbssparams.band;

	if (!test_bit(ASSOC_FLAG_MODE, &assoc_req->flags))
		assoc_req->mode = adapter->mode;
		assoc_req->mode = priv->mode;

	if (!test_bit(ASSOC_FLAG_BSSID, &assoc_req->flags)) {
		memcpy(&assoc_req->bssid, adapter->curbssparams.bssid,
		memcpy(&assoc_req->bssid, priv->curbssparams.bssid,
			ETH_ALEN);
	}

	if (!test_bit(ASSOC_FLAG_WEP_KEYS, &assoc_req->flags)) {
		int i;
		for (i = 0; i < 4; i++) {
			memcpy(&assoc_req->wep_keys[i], &adapter->wep_keys[i],
			memcpy(&assoc_req->wep_keys[i], &priv->wep_keys[i],
				sizeof(struct enc_key));
		}
	}

	if (!test_bit(ASSOC_FLAG_WEP_TX_KEYIDX, &assoc_req->flags))
		assoc_req->wep_tx_keyidx = adapter->wep_tx_keyidx;
		assoc_req->wep_tx_keyidx = priv->wep_tx_keyidx;

	if (!test_bit(ASSOC_FLAG_WPA_MCAST_KEY, &assoc_req->flags)) {
		memcpy(&assoc_req->wpa_mcast_key, &adapter->wpa_mcast_key,
		memcpy(&assoc_req->wpa_mcast_key, &priv->wpa_mcast_key,
			sizeof(struct enc_key));
	}

	if (!test_bit(ASSOC_FLAG_WPA_UCAST_KEY, &assoc_req->flags)) {
		memcpy(&assoc_req->wpa_unicast_key, &adapter->wpa_unicast_key,
		memcpy(&assoc_req->wpa_unicast_key, &priv->wpa_unicast_key,
			sizeof(struct enc_key));
	}

	if (!test_bit(ASSOC_FLAG_SECINFO, &assoc_req->flags)) {
		memcpy(&assoc_req->secinfo, &adapter->secinfo,
		memcpy(&assoc_req->secinfo, &priv->secinfo,
			sizeof(struct lbs_802_11_security));
	}

	if (!test_bit(ASSOC_FLAG_WPA_IE, &assoc_req->flags)) {
		memcpy(&assoc_req->wpa_ie, &adapter->wpa_ie,
		memcpy(&assoc_req->wpa_ie, &priv->wpa_ie,
			MAX_WPA_IE_LEN);
		assoc_req->wpa_ie_len = adapter->wpa_ie_len;
		assoc_req->wpa_ie_len = priv->wpa_ie_len;
	}

	lbs_deb_leave(LBS_DEB_ASSOC);
+1 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
#include "dev.h"

void lbs_association_worker(struct work_struct *work);
struct assoc_request *lbs_get_association_request(struct lbs_adapter *adapter);
struct assoc_request *lbs_get_association_request(struct lbs_private *priv);
void lbs_sync_channel(struct work_struct *work);

#endif /* _LBS_ASSOC_H */
+129 −149

File changed.

Preview size limit exceeded, changes collapsed.

+158 −178

File changed.

Preview size limit exceeded, changes collapsed.

Loading