public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: "Károly Kasza" <kaszak@gmail.com>
Cc: "John W. Linville" <linville@tuxdriver.com>,
	kernel list <linux-kernel@vger.kernel.org>,
	lcostantino@gmail.com, someone@dunanet.hu
Subject: Re: w35und: add softmac interface
Date: Tue, 15 Apr 2008 21:54:26 +0200	[thread overview]
Message-ID: <20080415195426.GD4994@elf.ucw.cz> (raw)
In-Reply-To: <544ab8580804150317k637118cp2cab91bfa1e37875@mail.gmail.com>

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

  reply	other threads:[~2008-04-15 19:54 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-14 22:47 w35und: add softmac interface Pavel Machek
2008-04-15  0:28 ` John W. Linville
2008-04-15  7:22   ` Pavel Machek
2008-04-15  8:10     ` Károly Kasza
2008-04-15  9:14       ` Pavel Machek
2008-04-15 10:17         ` Károly Kasza
2008-04-15 19:54           ` Pavel Machek [this message]
2008-04-15 13:28     ` John W. Linville
2008-04-15 19:56       ` Pavel Machek
2008-04-25 11:12         ` w35und: good news about licensing Pavel Machek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080415195426.GD4994@elf.ucw.cz \
    --to=pavel@ucw.cz \
    --cc=kaszak@gmail.com \
    --cc=lcostantino@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linville@tuxdriver.com \
    --cc=someone@dunanet.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox