Re: Adding wifi source code

2017-09-02 Thread Michael Zhilin
Hi,

May be it not best material, but blog of adrian@ is really helpful:
http://adrianchadd.blogspot.com.tr/?m=1

Best regards,
Michael

2 сент. 2017 г. 11:11 ДП пользователь "Thomas Mueller" 
написал:

> > Here's a pdf giving a decent overview:
> > https://www.bsdcan.org/2006/papers/freebsd.device.driver.slides.pdf
>
> > But, the FreeBSD handbook also goes over the process as well.
>
> > https://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-
> handbook/driverbasics.html
>
> > For the guy that took Linux drivers, you might want to look into the
> Linux
> > Emulator, that would be the easiest path especially if those Linux
> drivers
> > includes a lot of Linux specific headers.
>
> > The NetBSD drivers should be a bit easier to port.
>
> > Best,
> > Owen
>
> I downloaded it but haven't read yet.
>
> Actually, it's the arch-handbook, not in the regular FreeBSD handbook.
>
> Thanks for the leads!
>
> > I was planning on also porting over the Atheros AR9271 driver from NetBSD
> > (athn(4) /usr/src/sys/dev/usb/if_athn_usb.c), but not until I finish the
> > current device I am working on. It might not be for a while though. There
> > is likely a lot of shared code with ath(4) on FreeBSD
> > (/usr/src/sys/dev/athn). NetBSD seems to separate all code between USB
> and
> > PCI, whereas FreeBSD combines drivers. Let me know if I can help out, as
> I
> > already own this device and would be willing to test out code or
> > troubleshoot with you.
>
> > I am currently working on another driver from Linux to FreeBSD. The core
> > concepts are the same, but a lot of code is in different order. FreeBSD
> > drivers have an attach function that assign function pointers to the
> softc
> > struct. The Linux equivalent is in DRIVERNAME_ops. In my case, this:
> > http://src.illumos.org/source/xref/linux-master/drivers/net/
> wireless/realtek/rtlwifi/rtl8188ee/sw.c#224
>
> > Hope this helps. But yes, would love to work on AR9271!
>
> What is the rtl8188ee?  Maybe I'd recognize the brand and model.
>
> I have Hiro H50191, which uses rsu driver.
>
> That last URL looks like something related to Illumos and OpenIndiana.
>
> My Atheros AR9271 is (quasi-)USB, an inseparable part of the motherboard
> in contrast to the Hiro H50191 which is a USB-stick wireless adapter.
>
> It has sometimes worked on NetBSD, but more often would fail to load
> firmware.
>
> On latest NetBSD-current, it stops the kernel from booting unless I
> disable it or comment out in kernel config.  GENERIC kernel reboots
> immediately without showing any messages.
>
> OpenBSD also has AR9271 driver and Realtek re.  I have NetBSD
> installations but no OpenBSD.
>
> I would like, at first, if possible, when I have a driver to build, to
> build the module rather than the whole kernel every time.
>
> I am familiar with C and C++ but think I need to brush up.  Any online
> leads/references?
>
> Tom
>
> ___
> freebsd-wireless@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org
> "
>
___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"

Re: Adding wifi source code

2017-09-02 Thread Thomas Mueller
> Here's a pdf giving a decent overview:
> https://www.bsdcan.org/2006/papers/freebsd.device.driver.slides.pdf

> But, the FreeBSD handbook also goes over the process as well.

> https://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/driverbasics.html

> For the guy that took Linux drivers, you might want to look into the Linux
> Emulator, that would be the easiest path especially if those Linux drivers
> includes a lot of Linux specific headers.

> The NetBSD drivers should be a bit easier to port.

> Best,
> Owen

I downloaded it but haven't read yet.

Actually, it's the arch-handbook, not in the regular FreeBSD handbook.

Thanks for the leads!

> I was planning on also porting over the Atheros AR9271 driver from NetBSD
> (athn(4) /usr/src/sys/dev/usb/if_athn_usb.c), but not until I finish the
> current device I am working on. It might not be for a while though. There
> is likely a lot of shared code with ath(4) on FreeBSD
> (/usr/src/sys/dev/athn). NetBSD seems to separate all code between USB and
> PCI, whereas FreeBSD combines drivers. Let me know if I can help out, as I
> already own this device and would be willing to test out code or
> troubleshoot with you.

> I am currently working on another driver from Linux to FreeBSD. The core
> concepts are the same, but a lot of code is in different order. FreeBSD
> drivers have an attach function that assign function pointers to the softc
> struct. The Linux equivalent is in DRIVERNAME_ops. In my case, this:
> http://src.illumos.org/source/xref/linux-master/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c#224

> Hope this helps. But yes, would love to work on AR9271!

What is the rtl8188ee?  Maybe I'd recognize the brand and model.

I have Hiro H50191, which uses rsu driver.

That last URL looks like something related to Illumos and OpenIndiana.

My Atheros AR9271 is (quasi-)USB, an inseparable part of the motherboard in 
contrast to the Hiro H50191 which is a USB-stick wireless adapter.

It has sometimes worked on NetBSD, but more often would fail to load firmware.

On latest NetBSD-current, it stops the kernel from booting unless I disable it 
or comment out in kernel config.  GENERIC kernel reboots immediately without 
showing any messages.

OpenBSD also has AR9271 driver and Realtek re.  I have NetBSD installations but 
no OpenBSD.

I would like, at first, if possible, when I have a driver to build, to build 
the module rather than the whole kernel every time.

I am familiar with C and C++ but think I need to brush up.  Any online 
leads/references?

Tom

___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: Adding wifi source code

2017-09-01 Thread Farhan Khan
Thomas,

I was planning on also porting over the Atheros AR9271 driver from NetBSD
(athn(4) /usr/src/sys/dev/usb/if_athn_usb.c), but not until I finish the
current device I am working on. It might not be for a while though. There
is likely a lot of shared code with ath(4) on FreeBSD
(/usr/src/sys/dev/athn). NetBSD seems to separate all code between USB and
PCI, whereas FreeBSD combines drivers. Let me know if I can help out, as I
already own this device and would be willing to test out code or
troubleshoot with you.

I am currently working on another driver from Linux to FreeBSD. The core
concepts are the same, but a lot of code is in different order. FreeBSD
drivers have an attach function that assign function pointers to the softc
struct. The Linux equivalent is in DRIVERNAME_ops. In my case, this:
http://src.illumos.org/source/xref/linux-master/drivers/net/wireless/realtek/rtlwifi/rtl8188ee/sw.c#224
.

Hope this helps. But yes, would love to work on AR9271!


--
Farhan Khan
PGP Fingerprint: 782F 342B 5B08 0D2F F4E8 82C3 FFA1 CAE1 6536 51CA

On Fri, Sep 1, 2017 at 5:25 PM, Thomas Mueller  wrote:

> from Tecno Linux:
>
> > Hello, I have the source code of my wireless driver i extract it from the
> > linux kernel how can i compile that source code or i have another option
> my
> > wireless driver is a realtek rtl8723be wifi
>
> I have similar question, but the source code is from NetBSD and the
> wireless chip is Atheros AR9271.
>
> I also have similar question regarding Ethernet Realtek 8111E re driver,
> works in NetBSD but not FreeBSD (11.1-STABLE and HEAD) on computer in
> question.
>
> Is there online handbook/documentation on writing device drivers or
> porting from Linux or NetBSD?
>
> Tom
>
> ___
> freebsd-wireless@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org
> "
>
___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: Adding wifi source code

2017-09-01 Thread blubee blubeeme
Here's a pdf giving a decent overview:
https://www.bsdcan.org/2006/papers/freebsd.device.driver.slides.pdf

But, the FreeBSD handbook also goes over the process as well.

https://www.freebsd.org/doc/en_US.ISO8859-1/books/arch-handbook/driverbasics.html

For the guy that took Linux drivers, you might want to look into the Linux
Emulator, that would be the easiest path especially if those Linux drivers
includes a lot of Linux specific headers.

The NetBSD drivers should be a bit easier to port.

Best,
Owen

On Sat, Sep 2, 2017, 05:25 Thomas Mueller  wrote:

> from Tecno Linux:
>
> > Hello, I have the source code of my wireless driver i extract it from the
> > linux kernel how can i compile that source code or i have another option
> my
> > wireless driver is a realtek rtl8723be wifi
>
> I have similar question, but the source code is from NetBSD and the
> wireless chip is Atheros AR9271.
>
> I also have similar question regarding Ethernet Realtek 8111E re driver,
> works in NetBSD but not FreeBSD (11.1-STABLE and HEAD) on computer in
> question.
>
> Is there online handbook/documentation on writing device drivers or
> porting from Linux or NetBSD?
>
> Tom
>
> ___
> freebsd-wireless@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
> To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org
> "
>
___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"


Re: Adding wifi source code

2017-09-01 Thread Thomas Mueller
from Tecno Linux:

> Hello, I have the source code of my wireless driver i extract it from the
> linux kernel how can i compile that source code or i have another option my
> wireless driver is a realtek rtl8723be wifi

I have similar question, but the source code is from NetBSD and the wireless 
chip is Atheros AR9271.

I also have similar question regarding Ethernet Realtek 8111E re driver, works 
in NetBSD but not FreeBSD (11.1-STABLE and HEAD) on computer in question.

Is there online handbook/documentation on writing device drivers or porting 
from Linux or NetBSD?

Tom

___
freebsd-wireless@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-wireless
To unsubscribe, send any mail to "freebsd-wireless-unsubscr...@freebsd.org"