tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Adding ruminit(4)



In article <og2q0s$cur$1%blaine.gmane.org@localhost>,
Pierre Pronchery  <khorben%defora.org@localhost> wrote:
>-=-=-=-=-=-
>
>			Hi tech-kernel@,
>
>as some of you may have noticed, I just added a USB ID to the rum(4) 
>driver [1]. It is for a device called "Windy 31" from Synet Electronics, 
>product name MW-P54SS [2] (yes it's old).
>
>As it happens (and as documented in the manual page) it attaches first 
>as a mass storage device, much like u3g(4) has to deal with:
>
>> umass0 at uhub1 port 2 configuration 1 interface 0
>> umass0: Ralink product 0x2578, rev 2.00/0.01, addr 12
>> umass0: using SCSI over Bulk-Only
>> scsibus0 at umass0: 2 targets, 1 lun per target
>> cd0 at scsibus0 target 0 lun 0: <Ralink, RT73 WirelessLan, > cdrom removable
>
>u3g(4) works around it with an intermediate u3ginit(4) driver. So I went 
>ahead and added ruminit(4) [3]. It works right away now:
>
>> ruminit0 at uhub1 port 1: Switching to Wireless mode
>> ruminit0: detached
>> ruminit0: at uhub1 port 1 (addr 11) disconnected
>> rum0 at uhub1 port 1
>> rum0: Ralink , rev 2.00/0.01, addr 11
>> rum0: MAC/BBP RT2573 (rev 0x2573a), RF RT2528, address 00:0e:2e:fb:d1:86
>> rum0: 11b rates: 1Mbps 2Mbps 5.5Mbps 11Mbps
>> rum0: 11g rates: 1Mbps 2Mbps 5.5Mbps 11Mbps 6Mbps 9Mbps 12Mbps 18Mbps
>24Mbps 36Mbps 48Mbps 54Mbps
>
>but I had to copy and paste code from u3g(4) and I don't like it :(
>
>Any hints, suggestions about how to improve the patch? (attached)
>
>Or is it good enough to commit as it is?
>(I'll remove the remaining #if 0 of course)
>
>[1] http://mail-index.netbsd.org/source-changes/2017/05/23/msg084652.html
>[2] https://www.cnet.com/products/synet-windy31-usb-wireless-router/review/
>[3] 
>https://git.edgebsd.org/gitweb/?p=src.git;a=shortlog;h=refs/heads/khorben/edgebsd-7/ruminit

Why not move the all the code into a single "ubulkdisable" or something driver?

christos



Home | Main Index | Thread Index | Old Index