Wifi AP Mode not working with L4T 28.2.1

In my application I have the Jetson TX1 broadcasting a wireless network for
clients to connect to. On previous releases of L4T, this was accomplised by
doing the following:

  1. Adding the file /etc/modprobe.d/bcmdhd-opmode.conf with content options bcmdhd op_mode=2

  2. Using the create_ap utility to manage
    creation of the network (configuration posted below).

After upgrading my Jetson TX1 to the most recent firmware, after enabling the
create_ap service, I get the following errors in my kernel messages:

[   96.378333] Dongle Host Driver, version 1.201.82 (r)
    [   96.378333] Compiled in drivers/net/wireless/bcmdhd on Jul 19 2018 at 09:29:04
    [   96.398369] wl_android_wifi_on in
    [   96.402789] wifi_platform_set_power = 1
    [   96.697465] mmc1: queuing unknown CIS tuple 0x80 (5 bytes)
    [   96.831627] sdhci-tegra sdhci-tegra.1: Tuning already done, restoring the best tap value : 44
    [   96.881388] F1 signature read @0x18000000=0x17214354
    [   96.901597] F1 signature OK, socitype:0x1 chip:0x4354 rev:0x1 pkg:0x2
    [   96.910398] DHD: dongle ram size is set to 786432(orig 786432) at 0x180000
    [   96.965248] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
    [   97.037241] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
    [   97.045855] wifi_platform_get_mac_addr
    [   97.052465] Firmware up: op_mode=0x0002, MAC=00:04:4b:66:26:ba
    [   97.066284] dhd_preinit_ioctls pspretend_threshold for HostAPD failed  -23
    [   97.079038] Firmware version = wl0: Dec 12 2017 15:09:35 version 7.35.221.34 (r679642) FWID 01-8f1f4763
    [   97.094428] dhd_interworking_enable: failed to set WNM info, ret=-23
    [   97.102569] tegra_sysfs_on
    [   97.160742] dhd_ndo_add_ip: ndo ip addr add failed, retcode = -23
    [   97.169068] dhd_inet6_work_handler: Adding host ip for NDO failed -23
    [  102.677909] wl_android_wifi_off in
    [  102.686347] tegra_sysfs_off
    [  102.693770] tegra_sysfs_rf_test_disable
    [  102.703806] dhd_wlfc_deinit():3438, maintain HOST RXRERODER flag in tvl
    [  102.712412] sdhci-tegra sdhci-tegra.1: Tuning already done, restoring the best tap value : 44
    [  102.725253] wifi_platform_set_power = 0

This stream of messages cycles continuously until the create_ap service is
halted.

My create_ap.conf file is as follows:

CHANNEL=default
  GATEWAY=192.168.12.1
  WPA_VERSION=1+2
  ETC_HOSTS=0
  DHCP_DNS=gateway
  NO_DNS=0
  HIDDEN=0
  MAC_FILTER=0
  MAC_FILTER_ACCEPT=/etc/hostapd/hostapd.accept
  ISOLATE_CLIENTS=0
  SHARE_METHOD=nat
  IEEE80211N=0
  IEEE80211AC=0
  HT_CAPAB=[HT40+]
  VHT_CAPAB=
  DRIVER=nl80211
  NO_VIRT=1
  COUNTRY=
  FREQ_BAND=2.4
  NEW_MACADDR=
  DAEMONIZE=0
  NO_HAVEGED=0
  WIFI_IFACE=wlan0
  INTERNET_IFACE=ens0
  SSID=lmr-01-001
  PASSPHRASE=
  USE_PSK=0

Does anyone have any insight as to what these error messages mean?

A quick update: Even just trying to set the interface up with ip link set wlan0 up fails with the same dmesg errors:

[   30.933942] 
               Dongle Host Driver, version 1.201.82 (r)
               Compiled in drivers/net/wireless/bcmdhd on Jul 27 2018 at 11:51:06
[   30.950721] wl_android_wifi_on in
[   30.954184] wifi_platform_set_power = 1
[   31.254131] mmc1: queuing unknown CIS tuple 0x80 (5 bytes)
[   31.375788] sdhci-tegra sdhci-tegra.1: Tuning already done, restoring the best tap value : 46
[   31.390064] F1 signature read @0x18000000=0x17214354
[   31.410178] F1 signature OK, socitype:0x1 chip:0x4354 rev:0x1 pkg:0x2
[   31.418539] DHD: dongle ram size is set to 786432(orig 786432) at 0x180000
[   31.508414] dhdsdio_write_vars: Download, Upload and compare of NVRAM succeeded.
[   31.577740] dhd_bus_init: enable 0x06, ready 0x06 (waited 0us)
[   31.584365] wifi_platform_get_mac_addr
[   31.589068] Firmware up: op_mode=0x0002, MAC=00:04:4b:66:61:f2
[   31.601409] dhd_preinit_ioctls pspretend_threshold for HostAPD failed  -23
[   31.612805] Firmware version = wl0: Dec 12 2017 15:09:35 version 7.35.221.34 (r679642) FWID 01-8f1f4763
[   31.625241] dhd_interworking_enable: failed to set WNM info, ret=-23
[   31.631799] tegra_sysfs_on
[   31.695769] dhd_ndo_add_ip: ndo ip addr add failed, retcode = -23
[   31.703430] dhd_inet6_work_handler: Adding host ip for NDO failed -23

This is the case both with and without “options bcmdhd op_mode=2” in the module options.

Further results:

I have downgraded to the r24.2.3 kernel with the same rootfs, and the wifi appears to work without issue.

So this is definitely a regression from 24.2.3 → 28.2.

Hi pbelanger,

The WiFi AP mode is working on r28.2/TX1.
Please following below steps to try again:

1. Turn OFF Wi-Fi (Pre-requisite)
2. Connect ethernet cable to DUT to give it internet source
3. Turn ON wireless hotspot on DUT using GUI interface
(i) To allow SSID broadcasts, the following bcmdhd module paramter should be set: op_mode=2. 
set the parameter automatically on boot, add a bcmdhd.conf (module conf fine, the name may change) file to /etc/modprobe.d with this line:
options bcmdhd op_mode=2
(ii) Create a new connection in "Network Connection" settings using GUI
a) Click Network icon on GUI -> Edit-connections -> click "Add" button
b) Choose Wi-Fi from dropdown
c) In Edit window enter custom "Connection name", SSID, select device MAC address (primarliy of wla0)
d) Under WiFi-Security select WPA and WPA2 Personal and give a passcode
e) Under IPv4 Setting select "Shared to other computers"
(iii) Turn ON Wi-Fi, to enable hotspot
(iv) Your hotspot is ready to use now
4. Connect other (client) device to this hotspot and access network using it