Skip to contentSkip to conversation

Please pull 'upstream-fixes' branch of wireless-2.6

PATCH John W. Linville 2 participants 5 messages May 17, 2006 – May 18, 2006

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

The following changes since commit 0c056c50a6218e0e577817c16ba8851af593d742:
Linus Torvalds:

        Merge master.kernel.org:/.../gregkh/spi-2.6

are found in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream-fixes

David Woodhouse:
bcm43xx: associate on 'ifconfig up'

 drivers/net/wireless/bcm43xx/bcm43xx_main.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
drivers/net/wireless/bcm43xx/bcm43xx_main.c +3 -3
index e2982a8..7ed18ca 100644
@@ -3271,6 +3271,9 @@ static int bcm43xx_init_board(struct bcm
 	bcm43xx_sysfs_register(bcm);
 	//FIXME: check for bcm43xx_sysfs_register failure. This function is a bit messy regarding unwinding, though...
 
+	/*FIXME: This should be handled by softmac instead. */
+	schedule_work(&bcm->softmac->associnfo.work);
+
 	assert(err == 0);
 out:
 	return err;
@@ -3946,9 +3949,6 @@ static int bcm43xx_resume(struct pci_dev
 
 	netif_device_attach(net_dev);
 	
-	/*FIXME: This should be handled by softmac instead. */
-	schedule_work(&bcm->softmac->associnfo.work);
-
 	dprintk(KERN_INFO PFX "Device resumed.\n");
 
 	return 0;
Signature · 2 lines
John W. Linville
[email protected]
#1 lore raw

Please pull 'upstream' branch of wireless-2.6

The following changes since commit 59d4b684fbe74b25ac8593f39d2aaa86aa485b1f:
John W. Linville:
Merge branch 'upstream-fixes' into upstream

are found in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream

Arjan van de Ven:
unused exports in wireless drivers

Daniel Drake:
set_security implementation inside softmac

 drivers/net/wireless/bcm43xx/bcm43xx_main.c     |   38 +++----------------
 drivers/net/wireless/hostap/hostap_80211_tx.c   |    1 -
 drivers/net/wireless/hostap/hostap_ap.c         |   11 ------
 drivers/net/wireless/hostap/hostap_main.c       |    2 -
 include/net/ieee80211softmac.h                  |    4 ++
 net/ieee80211/softmac/ieee80211softmac_module.c |   46 +++++++++++++++++++++++
 6 files changed, 55 insertions(+), 47 deletions(-)
drivers/net/wireless/bcm43xx/bcm43xx_main.c +5 -33
index c050290..17b59ef 100644
@@ -3547,8 +3547,7 @@ static void bcm43xx_ieee80211_set_chan(s
 }
 
 /* set_security() callback in struct ieee80211_device */
-static void bcm43xx_ieee80211_set_security(struct net_device *net_dev,
-					   struct ieee80211_security *sec)
+static void bcm43xx_ieee80211_set_security(struct net_device *net_dev)
 {
 	struct bcm43xx_private *bcm = bcm43xx_priv(net_dev);
 	struct ieee80211_security *secinfo = &bcm->ieee->sec;
@@ -3559,42 +3558,15 @@ static void bcm43xx_ieee80211_set_securi
 
 	bcm43xx_lock_mmio(bcm, flags);
 
-	for (keyidx = 0; keyidx<WEP_KEYS; keyidx++)
-		if (sec->flags & (1<<keyidx)) {
-			secinfo->encode_alg[keyidx] = sec->encode_alg[keyidx];
-			secinfo->key_sizes[keyidx] = sec->key_sizes[keyidx];
-			memcpy(secinfo->keys[keyidx], sec->keys[keyidx], SCM_KEY_LEN);
-		}
-	
-	if (sec->flags & SEC_ACTIVE_KEY) {
-		secinfo->active_key = sec->active_key;
-		dprintk(KERN_INFO PFX "   .active_key = %d\n", sec->active_key);
-	}
-	if (sec->flags & SEC_UNICAST_GROUP) {
-		secinfo->unicast_uses_group = sec->unicast_uses_group;
-		dprintk(KERN_INFO PFX "   .unicast_uses_group = %d\n", sec->unicast_uses_group);
-	}
-	if (sec->flags & SEC_LEVEL) {
-		secinfo->level = sec->level;
-		dprintk(KERN_INFO PFX "   .level = %d\n", sec->level);
-	}
-	if (sec->flags & SEC_ENABLED) {
-		secinfo->enabled = sec->enabled;
-		dprintk(KERN_INFO PFX "   .enabled = %d\n", sec->enabled);
-	}
-	if (sec->flags & SEC_ENCRYPT) {
-		secinfo->encrypt = sec->encrypt;
-		dprintk(KERN_INFO PFX "   .encrypt = %d\n", sec->encrypt);
-	}
 	if (bcm->initialized && !bcm->ieee->host_encrypt) {
 		if (secinfo->enabled) {
 			/* upload WEP keys to hardware */
 			char null_address[6] = { 0 };
 			u8 algorithm = 0;
 			for (keyidx = 0; keyidx<WEP_KEYS; keyidx++) {
-				if (!(sec->flags & (1<<keyidx)))
+				if (!(secinfo->flags & (1<<keyidx)))
 					continue;
-				switch (sec->encode_alg[keyidx]) {
+				switch (secinfo->encode_alg[keyidx]) {
 					case SEC_ALG_NONE: algorithm = BCM43xx_SEC_ALGO_NONE; break;
 					case SEC_ALG_WEP:
 						algorithm = BCM43xx_SEC_ALGO_WEP;
@@ -3613,7 +3585,7 @@ static void bcm43xx_ieee80211_set_securi
 						assert(0);
 						break;
 				}
-				bcm43xx_key_write(bcm, keyidx, algorithm, sec->keys[keyidx], secinfo->key_sizes[keyidx], &null_address[0]);
+				bcm43xx_key_write(bcm, keyidx, algorithm, secinfo->keys[keyidx], secinfo->key_sizes[keyidx], &null_address[0]);
 				bcm->key[keyidx].enabled = 1;
 				bcm->key[keyidx].algorithm = algorithm;
 			}
@@ -3694,6 +3666,7 @@ static int bcm43xx_init_private(struct b
 	bcm->ieee = netdev_priv(net_dev);
 	bcm->softmac = ieee80211_priv(net_dev);
 	bcm->softmac->set_channel = bcm43xx_ieee80211_set_chan;
+	bcm->softmac->set_security = bcm43xx_ieee80211_set_security;
 
 	bcm->irq_savedstate = BCM43xx_IRQ_INITIAL;
 	bcm->pci_dev = pci_dev;
@@ -3729,7 +3702,6 @@ #endif /* CONFIG_BCM43XX_PIO */
 	
 	bcm->ieee->iw_mode = BCM43xx_INITIAL_IWMODE;
 	bcm->ieee->tx_headroom = sizeof(struct bcm43xx_txhdr);
-	bcm->ieee->set_security = bcm43xx_ieee80211_set_security;
 	bcm->ieee->hard_start_xmit = bcm43xx_ieee80211_hard_start_xmit;
 
 	return 0;
drivers/net/wireless/hostap/hostap_80211_tx.c +0 -1
index 06a5214..4a5be70 100644
@@ -534,5 +534,4 @@ int hostap_master_start_xmit(struct sk_b
 }
 
 
-EXPORT_SYMBOL(hostap_dump_tx_80211);
 EXPORT_SYMBOL(hostap_master_start_xmit);
drivers/net/wireless/hostap/hostap_ap.c +0 -11
index 06c3fa3..ba13125 100644
@@ -3276,17 +3276,6 @@ EXPORT_SYMBOL(hostap_init_data);
 EXPORT_SYMBOL(hostap_init_ap_proc);
 EXPORT_SYMBOL(hostap_free_data);
 EXPORT_SYMBOL(hostap_check_sta_fw_version);
-EXPORT_SYMBOL(hostap_handle_sta_tx);
-EXPORT_SYMBOL(hostap_handle_sta_release);
 EXPORT_SYMBOL(hostap_handle_sta_tx_exc);
-EXPORT_SYMBOL(hostap_update_sta_ps);
-EXPORT_SYMBOL(hostap_handle_sta_rx);
-EXPORT_SYMBOL(hostap_is_sta_assoc);
-EXPORT_SYMBOL(hostap_is_sta_authorized);
-EXPORT_SYMBOL(hostap_add_sta);
-EXPORT_SYMBOL(hostap_update_rates);
-EXPORT_SYMBOL(hostap_add_wds_links);
-EXPORT_SYMBOL(hostap_wds_link_oper);
 #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT
-EXPORT_SYMBOL(hostap_deauth_all_stas);
 #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
drivers/net/wireless/hostap/hostap_main.c +0 -2
index 8dd4c44..93786f4 100644
@@ -1125,11 +1125,9 @@ EXPORT_SYMBOL(hostap_set_auth_algs);
 EXPORT_SYMBOL(hostap_dump_rx_header);
 EXPORT_SYMBOL(hostap_dump_tx_header);
 EXPORT_SYMBOL(hostap_80211_header_parse);
-EXPORT_SYMBOL(hostap_80211_prism_header_parse);
 EXPORT_SYMBOL(hostap_80211_get_hdrlen);
 EXPORT_SYMBOL(hostap_get_stats);
 EXPORT_SYMBOL(hostap_setup_dev);
-EXPORT_SYMBOL(hostap_proc);
 EXPORT_SYMBOL(hostap_set_multicast_list_queue);
 EXPORT_SYMBOL(hostap_set_hostapd);
 EXPORT_SYMBOL(hostap_set_hostapd_sta);
include/net/ieee80211softmac.h +4 -0
index 703463a..1729842 100644
@@ -172,6 +172,10 @@ struct ieee80211softmac_device {
 	void (*set_bssid_filter)(struct net_device *dev, const u8 *bssid);
 	void (*set_channel)(struct net_device *dev, u8 channel);
 
+	/* implement this if you need to configure hardware encryption
+	 * when the user changes security settings */
+	void (*set_security)(struct net_device *dev);
+
 	/* assign if you need it, informational only */
 	void (*link_change)(struct net_device *dev);
 
net/ieee80211/softmac/ieee80211softmac_module.c +46 -0

58 lines not on this page · raw message

Signature · 2 lines
John W. Linville
[email protected]
#2 lore raw

Re: Please pull 'upstream' branch of wireless-2.6

Quoted 2 lines · John W. Linville

Daniel Drake:
set_security implementation inside softmac

If it's not too late, can you drop this one?

I didn't receive any feedback on it, and I decided it's not the right approach. The interface isn't great, but when done at the driver level it allows drivers to reject various security settings that they don't support by not copying them into secinfo.

So, even though this code block will be almost duplicated over bcm43xx, zd1211, and more, I think that level is the right place to put it.

Thanks,
Daniel

#3 lore raw

Re: Please pull 'upstream' branch of wireless-2.6

Quoted 5 lines · Daniel Drake
Quoted 2 lines · John W. Linville

Daniel Drake:
set_security implementation inside softmac

If it's not too late, can you drop this one?

Well, it's your patch. If you want to withdraw it, I'll comply.

---

The following changes since commit 59d4b684fbe74b25ac8593f39d2aaa86aa485b1f:
John W. Linville:
Merge branch 'upstream-fixes' into upstream

are found in the git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6.git upstream

Arjan van de Ven:
unused exports in wireless drivers

 drivers/net/wireless/hostap/hostap_80211_tx.c |    1 -
 drivers/net/wireless/hostap/hostap_ap.c       |   11 -----------
 drivers/net/wireless/hostap/hostap_main.c     |    2 --
 3 files changed, 0 insertions(+), 14 deletions(-)
drivers/net/wireless/hostap/hostap_80211_tx.c +0 -1
index 06a5214..4a5be70 100644
@@ -534,5 +534,4 @@ int hostap_master_start_xmit(struct sk_b
 }
 
 
-EXPORT_SYMBOL(hostap_dump_tx_80211);
 EXPORT_SYMBOL(hostap_master_start_xmit);
drivers/net/wireless/hostap/hostap_ap.c +0 -11
index 06c3fa3..ba13125 100644
@@ -3276,17 +3276,6 @@ EXPORT_SYMBOL(hostap_init_data);
 EXPORT_SYMBOL(hostap_init_ap_proc);
 EXPORT_SYMBOL(hostap_free_data);
 EXPORT_SYMBOL(hostap_check_sta_fw_version);
-EXPORT_SYMBOL(hostap_handle_sta_tx);
-EXPORT_SYMBOL(hostap_handle_sta_release);
 EXPORT_SYMBOL(hostap_handle_sta_tx_exc);
-EXPORT_SYMBOL(hostap_update_sta_ps);
-EXPORT_SYMBOL(hostap_handle_sta_rx);
-EXPORT_SYMBOL(hostap_is_sta_assoc);
-EXPORT_SYMBOL(hostap_is_sta_authorized);
-EXPORT_SYMBOL(hostap_add_sta);
-EXPORT_SYMBOL(hostap_update_rates);
-EXPORT_SYMBOL(hostap_add_wds_links);
-EXPORT_SYMBOL(hostap_wds_link_oper);
 #ifndef PRISM2_NO_KERNEL_IEEE80211_MGMT
-EXPORT_SYMBOL(hostap_deauth_all_stas);
 #endif /* PRISM2_NO_KERNEL_IEEE80211_MGMT */
drivers/net/wireless/hostap/hostap_main.c +0 -2
index 8dd4c44..93786f4 100644
@@ -1125,11 +1125,9 @@ EXPORT_SYMBOL(hostap_set_auth_algs);
 EXPORT_SYMBOL(hostap_dump_rx_header);
 EXPORT_SYMBOL(hostap_dump_tx_header);
 EXPORT_SYMBOL(hostap_80211_header_parse);
-EXPORT_SYMBOL(hostap_80211_prism_header_parse);
 EXPORT_SYMBOL(hostap_80211_get_hdrlen);
 EXPORT_SYMBOL(hostap_get_stats);
 EXPORT_SYMBOL(hostap_setup_dev);
-EXPORT_SYMBOL(hostap_proc);
 EXPORT_SYMBOL(hostap_set_multicast_list_queue);
 EXPORT_SYMBOL(hostap_set_hostapd);
 EXPORT_SYMBOL(hostap_set_hostapd_sta);
Signature · 2 lines
John W. Linville
[email protected]
#4 lore raw

Re: Please pull 'upstream' branch of wireless-2.6

Quoted 7 lines · John W. Linville
Quoted 4 lines · Daniel Drake
Quoted 2 lines · John W. Linville

Daniel Drake:
set_security implementation inside softmac

If it's not too late, can you drop this one?

Well, it's your patch. If you want to withdraw it, I'll comply.

Please do. I didn't sign off or send it to you directly as I wasn't asking for inclusion, but I'll make that clearer next time.

Thanks,
Daniel