kernel - Add sysctl to bypass wifi chipset hardware crypto
authorMatthew Dillon <dillon@laptop1.(none)>
Sun, 14 Nov 2010 16:02:48 +0000 (08:02 -0800)
committerMatthew Dillon <dillon@laptop1.(none)>
Sun, 14 Nov 2010 16:02:48 +0000 (08:02 -0800)
commit1b196a0c3aec7af34c223e2fd5b60693f4de1162
treeff196efccb3b20b778c20f8578c996b04bc8a923
parent5d3c818fef74e8dd1e4642cd82399840329e92f4
kernel - Add sysctl to bypass wifi chipset hardware crypto

* Add sysctl net.wlan.force_swcrypto, default disabled.  If set to 1
  prior to attaching wlan to the underlying wireless interface this
  will force software crypto to be used and bypass the hardware
  crypto implemented by the wireless chipset.

* Currently we know there is at least one serious issue with the
  Atheros 9280 when used with WEP2 (shows up as RSN in list scan) + WPS,
  and possibly other combinations.  The wrong transmit key winds up
  being used for broadcast packets, including ARP.

* This sysctl works around the problem.  If your wpa_supplicant is able
  to connect to a network but you are unable to dhclient / use the
  network you might be hitting this problem and setting the sysctl to
  1 may fix it.

  Note that the sysctl must be set prior to attaching the wlan to the
  underlying wireless driver, so it is typically best to do it at boot
  time or near the top of whatever script you use.

Inspired-by: 2-days of connectivity issues at NYCBSDCON.
sys/netproto/802_11/ieee80211_dragonfly.h
sys/netproto/802_11/wlan/ieee80211_crypto.c
sys/netproto/802_11/wlan/ieee80211_dragonfly.c