A while back I asked a question about setting my Raspberry Pi up with a bridged network connection - Wired to wireless bridge in Linux - and the answer I got worked well.
Now, I had to start all over again with the Raspberry Pi and used the setup described. But it would not incorporate the wlan0 device in the bridge stating:
can't add wlan0 to br0: Operation not supported
But if I run
Then the wlan0 device is successfully added to the bridge. Could someone explain what is happening here and how I can fully automate the adding of wlan0 to the bridge?
The USB device is using the ath9k_htc driver.
As per request: /etc/network/interfaces and /etc/hostapd/hostapd.conf were based on the answer referred to above (though I had moved on to WPA and stopped using WEP), now look like this (following the answer below):
auto lo iface lo inet loopback iface eth0 inet static address 0.0.0.0 iface wlan0 inet static address 0.0.0.0 auto br0 iface br0 inet dhcp bridge_ports eth0 pre-up ip link set eth0 down pre-up ip link set wlan0 down pre-up brctl addbr br0 pre-up brctl addif br0 eth0 pre-up ip addr flush dev eth0 post-down ip link set eth0 down post-down ip link set wlan0 down post-down ip link set br0 down post-down brctl delif br0 eth0 wlan0 post-down brctl delbr br0
interface=wlan0 bridge=br0 driver=nl80211 auth_algs=1 macaddr_acl=0 ignore_broadcast_ssid=0 logger_syslog=-1 logger_syslog_level=0 hw_mode=g ssid=SSID channel=11 wpa=2 wpa_passphrase=PASSPHRASE wpa_key_mgmt=WPA-PSK wpa_pairwise=TKIP rsn_pairwise=CCMP ctrl_interface=/var/run/hostapd ieee80211n=1