lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 15 Apr 2008 21:54:26 +0200
From:	Pavel Machek <pavel@....cz>
To:	Károly Kasza <kaszak@...il.com>
Cc:	"John W. Linville" <linville@...driver.com>,
	kernel list <linux-kernel@...r.kernel.org>,
	lcostantino@...il.com, someone@...anet.hu
Subject: Re: w35und: add softmac interface

Hi!

> >  Really take a look at those patches. I believe I'm pretty close to
> >  dropping those upper layer code... Then, we'll be able to proceed
> >  incrementally.
> >
> I commited them after some changes, please send patches next time
> against the last revision :)

Sorry, will violate that once again (this is preview, not for
commiting, so perhaps you can forgive me :-).

Which this, I'm able to connect to my access point and ping, without
ifconfig-ing the original interface up. Only softmac interface is
active.

> However I still think we should focus on rewriting the whole thing
> instead of hacking this elder chaos.
> I created /branches/softmac for the new code, You should extend that
> maybe?

I don't believe rewrite like that is a good idea.

My plan is: 

1) remove duplicate 802.11 stack, making sure it still works as I
progress.

(at this point I have pretty small driver -- like 2000 lines -- but it
will be ugly)

2) either clean that one up, or rewrite it; making sure it still works
in the process.

(at this point we have mergeable driver)

								Pavel


diff --git a/drivers/net/wireless/winbond/winbondport/linux/wbusb.c b/drivers/net/wireless/winbond/winbondport/linux/wbusb.c
index de30a56..d128fc1 100644
--- a/drivers/net/wireless/winbond/winbondport/linux/wbusb.c
+++ b/drivers/net/wireless/winbond/winbondport/linux/wbusb.c
@@ -126,6 +126,31 @@ static int wbsoft_start(struct ieee80211
 static int wbsoft_config(struct ieee80211_hw *dev, struct ieee80211_conf *conf)
 {
 	printk("wbsoft_config called\n");
+
+	ChanInfo ch;
+
+	ch.band = 1;
+	ch.ChanNo = 1;	/* Should use channel_num, or something, as that is already pre-translated */
+
+
+	hal_set_current_channel(&my_adapter->sHwData, ch);
+	hal_set_beacon_period(&my_adapter->sHwData, conf->beacon_int);
+//	hal_set_cap_info(&my_adapter->sHwData, ?? );
+// hal_set_ssid(phw_data_t pHwData,  PUCHAR pssid,  u8 ssid_len); ??
+	hal_set_accept_broadcast(&my_adapter->sHwData, 1);
+	hal_set_accept_promiscuous(&my_adapter->sHwData,  1);
+	hal_set_accept_multicast(&my_adapter->sHwData,  1);
+	hal_set_accept_beacon(&my_adapter->sHwData,  1);
+	hal_set_radio_mode(&my_adapter->sHwData,  0);
+	//hal_set_antenna_number(  phw_data_t pHwData, u8 number )
+	//hal_set_rf_power(phw_data_t pHwData, u8 PowerIndex)
+
+
+//	hal_start_bss(&my_adapter->sHwData, WLAN_BSSTYPE_INFRASTRUCTURE);	??
+
+//void hal_set_rates(phw_data_t pHwData, PUCHAR pbss_rates, 
+//		   u8 length, unsigned char basic_rate_set)
+
 	return 0;
 }
 
@@ -155,6 +180,7 @@ static const struct ieee80211_ops wbsoft
 	.get_stats		= wbsoft_nop,
 	.get_tx_stats		= wbsoft_nop,
 	.get_tsf		= wbsoft_get_tsf,
+// conf_tx: hal_set_cwmin()/hal_set_cwmax;
 };
 
 struct wbsoft_priv {
diff --git a/drivers/net/wireless/winbond/winbondport/wbhal.c b/drivers/net/wireless/winbond/winbondport/wbhal.c
index 6599538..0177bc0 100644
--- a/drivers/net/wireless/winbond/winbondport/wbhal.c
+++ b/drivers/net/wireless/winbond/winbondport/wbhal.c
@@ -418,7 +418,7 @@ u8 hal_init_hardware(phw_data_t pHwData,
 }
 
 
-void hal_halt( phw_data_t pHwData, void *ppa_data)
+void hal_halt(phw_data_t pHwData, void *ppa_data)
 {
 	switch( pHwData->InitialResource )
 	{
@@ -500,7 +500,7 @@ void hal_set_slot_time( phw_data_t pHwDa
 }
 //---------------------------------------------------------------------------------------------------
 void hal_set_rates(phw_data_t pHwData, PUCHAR pbss_rates, 
-		   u8 length, unsigned char basic_rate_set )
+		   u8 length, unsigned char basic_rate_set)
 {
 	PWB35REG	pWb35Reg = &pHwData->Wb35Reg;
 	u32		tmp, tmp1;
@@ -765,6 +765,8 @@ void hal_set_current_channel_ex(  phw_da
 	if( pHwData->SurpriseRemove )
 		return;
 
+	printk("Going to channel: %d/%d\n", channel.band, channel.ChanNo);
+
 	RFSynthesizer_SwitchingChannel( pHwData, channel );// Switch channel
 	pHwData->Channel = channel.ChanNo;
 	pHwData->band = channel.band;
diff --git a/drivers/net/wireless/winbond/winbondport/wblinux.c b/drivers/net/wireless/winbond/winbondport/wblinux.c
index 0b0b200..ebe8dbe 100644
--- a/drivers/net/wireless/winbond/winbondport/wblinux.c
+++ b/drivers/net/wireless/winbond/winbondport/wblinux.c
@@ -416,7 +416,7 @@ #endif
 		Adapter->sLocalPara.ShutDowned = FALSE;
 
 		//added by ws for wep key error detection
-		Adapter->sLocalPara.bWepKeyError= FALSE;//added by ws 02/02/04
+		Adapter->sLocalPara.bWepKeyError= FALSE;
 		Adapter->sLocalPara.bToSelfPacketReceived = FALSE;
 		Adapter->sLocalPara.WepKeyDetectTimerCount= 2 * 100; /// 2 seconds
 
@@ -534,7 +534,7 @@ #endif
 }
 
 // 20060802
-void WBLINUX_ConnectStatus(  PADAPTER Adapter,  u32 flag )
+void WBLINUX_ConnectStatus(PADAPTER Adapter, u32 flag)
 {
    PWBLINUX	pWbLinux = &Adapter->WbLinux;
 


-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ