[PATCH 09/10] libbsd.txt: Describe current state of WLAN.

Chris Johns chrisj at rtems.org
Sat Nov 11 21:23:12 UTC 2017



On 12/11/17 3:23 am, Christian Mauderer wrote:
> Am 11.11.2017 um 05:14 schrieb Chris Johns:
>> On 10/11/2017 17:59, Christian Mauderer wrote:
>>>
>>> I took a quick glance to find out the behaviour on FreeBSD: It supports
>>> hot-plugging. If I for example add a
>>>
>>>   wlans_rtwn0="wlan7"
>>>   ifconfig_wlan7="DHCP"
>>>
>>> to rc.conf a RTL8188 USB WiFi dongle is created as wlan7. I'll add that
>>> pice of information to the ticket. I think further investigation is
>>> necessary which services are involved into that.
>>
>> This makes sense and thank you.
>>
>>> But that will have to wait till there is time for that part.
>>
>> Yes.
>>
>>>
>>> I meant that we could parse the rc.conf on the first pass and then put
>>> the relevant information (rtwn0 as wlan7) into for example a linked
>>> list. That list can then be used in the hot-plug-events. With that, it
>>> wouldn't be necessary to do a lot of string parsing on every device
>>> detection.
>>
>> I think the overhead of parsing will be small compared to the act of the device
>> being added to a system. This sort of code is not time critical. It would be
>> nice to be able to edit rc.conf reinsert the device and see what happens.
> 
> The problem with "edit rc.conf" is that (as far as I understood that
> interface) we have two possible sources:
> 
> 1. from a string: rtems_bsd_run_rc_conf_script
> 2. from a file: rtems_bsd_run_rc_conf and rtems_bsd_run_etc_rc_conf
> 
> So we would have to remember the last source and parse that. Can we be
> sure that the string is always there or would it be necessary to
> duplicate it? The "const char* text" should in theory guarantee that it
> won't change, right?
> 

Yes, I see what you are saying. On FreeBSD the path is set.

>>
>>>
>>> But that is something that would have to be discussed as soon as someone
>>> want's to start an implementation.
>>>
>>
>> Yes I agree. Do you think hot-plug support is a suitable GSoC project for next year?
> 
> I would expect that it is quite a lot of initial investigation to find
> out how to do that (for example: finding out how to get events for new
> devices). But if a student is interested in it, I would say it should be
> OK as a project.
> 
> But note that I would see the two tickets quite separate in that case
> and could even be separate projects.
> 
> The first one would be to find some events from newly created devices
> and do something depending on that events (rc.conf parsing and creating
> wlanX interfaces).
> 
> The second one would be to make dhcpcd hooks useable for RTEMS and then
> do something with them like calling wpa_supplicant.
> 
> I think both shouldn't be too hard in regard to the coding. But they
> might need some deeper understanding of the libbsd or dhcpcd which could
> be hard for someone who isn't used to read bigger amounts of source code
> - especially if it has that many layers of abstraction like FreeBSD code.
> 

This all makes sense and I agree. It is a good next stage.

Again thank you for doing this now.

Chris



More information about the devel mailing list