# WG111V2_2 needs to be added to upgt how can I patch?



## Anil-G (Sep 24, 2010)

I've just discovered that my Netgear WG111V2_2 is an unusual variant of the WG111 family and uses a different chipset to the rest. It now needs to be added as an additional device to the upgt driver. I believe I can submit a patch but I've never done that before. Can anyone give me some links on

1. how to create a conforming patch
2. where to submit the patch

I also believe upgt(4) is misleading since upgt firmware linked package does not respond to pkg_add as directed but a simple make / make install in /usr/src/sys/modules/usb/upgtfw works  beautifully. I could also submit a patch to upgt(4) man page.

Thanks
Anil-G


----------



## wblock@ (Sep 24, 2010)

Patches are created with diff(1) and applied with patch(1).  The unified (-u) format is preferred.

Copy, for example, file.c to file.c.orig.  Make changes to file.c.  To create a patch,
`% diff -u file.c.orig file.c > patch-file.c.diff`


----------



## Anil-G (Sep 25, 2010)

*Patch files supplied*

I've uploaded patches for:

/sys/dev/usb/wlan/if_upgt.c
/usr/src/share/man/man4/upgt.4

I'm not so sure about the man page, I don't know the rules or the syntax.

I can't see how to generate /usr/share/man/man4/upgt.4.gz from the upgt.4 file either, or how to generate the cat4 page from the man4 page and why they are different and both available.

Anyway, these are the patches, I couldn't see where to submit them. Can anyone supply a link?


----------



## wblock@ (Sep 25, 2010)

Anil-G said:
			
		

> I've uploaded patches for:
> 
> /sys/dev/usb/wlan/if_upgt.c
> /usr/src/share/man/man4/upgt.4
> ...



Just patching the source (upgt.4) should be enough.



> Anyway, these are the patches, I couldn't see where to submit them. Can anyone supply a link?



Submit them in a PR.  Since you have patches, prefix the "One line summary of the problem" with a [patch] tag, like "[patch] Add Netgear WG111V2_2 support to upgt(4)".


----------



## Anil-G (Sep 27, 2010)

Thanks wblock. Patches now submitted.


----------



## Anil-G (Jun 16, 2013)

I just wanted to update this thread since things have changed at least as at 2013 onwards. The upgt driver and proprietary firmware are required to drive the Netgear WG111V2_2. The adapter wasn't recognised in FreeBSD 8.1 so I patched it and my patches were accepted into 8.2.

However, it stopped being recognised again in FreeBSD 9.0. Something about a Cohiba device being accepted incorrectly. I assumed this to be a fault in the driver since the patch had been working, so I gave up and bought a Netcomm NP910N. This uses the ran0 driver which seems more familiar to FreeBSD and worked out of the box.


----------

