Re: wireless coordination and who's working on what?

2019-01-08 Thread Ashish Gupta
Hi,

I'm trying to add USB glue to the ath driver in order to support Atheros
USB cards (I'm working with the AR9271 chip specifically).

The code for downloading firmware to the card, similar to uathload, is
ready but untested. I'm trying to wrap my head around the existing driver
(thanks Adrian!) and will add register read / write methods next to
initialize the chip.

On Mon, 7 Jan 2019, 10:04 Shawn Webb  On Mon, Jan 07, 2019 at 08:57:40AM -0600, Kyle Evans wrote:
> > On Mon, Jan 7, 2019 at 8:47 AM Bjoern A. Zeeb  wrote:
> > >
> > > Hi,
> > >
> > > I???ve been and am involved in two projects over the last 6 months
> > > related to FreeBSD wireless.
> > > I know there are some out there like me working on this or that;  some
> > > known better some less.
> > >
> > > I???d love to start coordinating efforts and get an overview on who???s
> > > got his hands dirty in what and who has plans for other ???todos???.
> > >
> >
> > I've got "try fixing up mesh" on my TODO list. I have four Carambola 2
> > nodes imaged for it so that I can do testing under a couple of more
> > interesting topologies, it's mostly a matter of finding time and
> > putting together a couple of 'console servers' for them.
>
> I would absolutely love working mesh support. That would drastically
> help some of the human rights efforts I'm watching and helping.
>
> If you need someone to help test experimental code, please ping me. I
> have a lab specifically for this work.
>
> Thanks,
>
> --
> Shawn Webb
> Cofounder and Security Engineer
> HardenedBSD
>
> Tor-ified Signal:+1 443-546-8752
> Tor+XMPP+OTR:latt...@is.a.hacker.sx
> GPG Key ID:  0x6A84658F52456EEE
> GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89  3D9E 6A84 658F 5245 6EEE
>
___
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"


run(4) driver: 802.11n support for RT3593

2019-11-30 Thread Ashish Gupta
Hi!

I've been messing around with the run driver and the net80211
implementation for a bit with the aim of enabling 802.11ng support (worry
about 11ac later) using monitor mode captures when running my ASUS USB N66
Ralink RT3593 on both linux and freebsd.

The run(4) driver was not sending out HT capability tags with the probe
requests (while the linux driver does). This seemed like a (logical?) first
step on the road to having full 802.11n support in the run driver. The
following patch accomplishes it, although the capabilities need some tuning
in the run driver setup code to be identical with the linux driver.

I don't know why the existing ieee80211 code only does this for IBSS mode,
and not STA mode.

What do you think about this?
And... what would be a good next step to further this mission?

Index: sys/dev/usb/wlan/if_run.c
===
--- sys/dev/usb/wlan/if_run.c (revision 354552)
+++ sys/dev/usb/wlan/if_run.c (working copy)
@@ -808,6 +808,28 @@
 IEEE80211_C_WME | /* WME */
 IEEE80211_C_WPA; /* WPA1|WPA2(RSN) */

+ /* set device HT capabilities */
+ /* HT Capabilities strictly for 11ng (we dont support 11ac yet..) */
+ ic->ic_htcaps = IEEE80211_HTC_HT | IEEE80211_HTC_AMPDU |
+
+/* IEEE80211_HTCAP_LDPC | */
+IEEE80211_HTCAP_CHWIDTH40 |
+IEEE80211_HTCAP_GREENFIELD |
+IEEE80211_HTCAP_SMPS_OFF |
+IEEE80211_HTCAP_SHORTGI20 |
+IEEE80211_HTCAP_SHORTGI40 |
+IEEE80211_HTCAP_TXSTBC |
+IEEE80211_HTCAP_RXSTBC_3STREAM |
+/* IEEE80211_HTCAP_DSSSCCK40 | */
+
+IEEE80211_HTCAP_MAXRXAMPDU |
+IEEE80211_HTCAP_MPDUDENSITY_4;
+
+  /* TODO: Remaining Rx supported mcs, ht extended cap, transmit beam
forming,
+ antenna selection caps. Later.. */
+
+ device_printf(sc->sc_dev, "ic_htcaps = 0x%x\n", ic->ic_htcaps);
+
  ic->ic_cryptocaps =
 IEEE80211_CRYPTO_WEP |
 IEEE80211_CRYPTO_AES_CCM |
@@ -4851,6 +4873,12 @@
  memset(bands, 0, sizeof(bands));
  setbit(bands, IEEE80211_MODE_11B);
  setbit(bands, IEEE80211_MODE_11G);
+
+ if(sc->rf_rev == RT3593_RF_3053) {
+  device_printf(sc->sc_dev, "Adding mode 11ng to RT3593 channels.\n");
+  setbit(bands, IEEE80211_MODE_11NG);
+ }
+
  ieee80211_add_channels_default_2ghz(chans, maxchans, nchans, bands, 0);

  if (sc->rf_rev == RT2860_RF_2750 || sc->rf_rev == RT2860_RF_2850 ||
Index: sys/net80211/ieee80211_output.c
===
--- sys/net80211/ieee80211_output.c (revision 354552)
+++ sys/net80211/ieee80211_output.c (working copy)
@@ -2415,7 +2415,19 @@
  frm = ieee80211_add_htcap_ch(frm, vap, c);
  }

+ if ((vap->iv_opmode == IEEE80211_M_STA) && (vap->iv_flags_ht &
IEEE80211_FHT_HT)) {
+ struct ieee80211_channel *c;
+
  /*
+ * Get the HT channel that we should try upgrading to.
+ * If we can do 40MHz then this'll upgrade it appropriately.
+ */
+ c = ieee80211_ht_adjust_channel(ic, ic->ic_curchan,
+vap->iv_flags_ht);
+ frm = ieee80211_add_htcap_ch(frm, vap, c);
+ }
+
+ /*
  * XXX TODO: need to figure out what/how to update the
  * VHT channel.
  */

Thanks!
Ashish Gupta
___
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"