BigW Consortium Gitlab

Commit 1e512007 by Zahid Chowdhury

Change wlan2 to wlan1 - Cypress & Mediatek are on different boards yellow vs.…

Change wlan2 to wlan1 - Cypress & Mediatek are on different boards yellow vs. red, so reuse a lower numbered interface
parent 713ce860
......@@ -15,9 +15,9 @@
modified the top-level Makefile to build the driver before building the target.
* We have had to make a few changes to the backport code to deal with incorrect
semantic patching for the different kernels on the WP85 & WP76.
* We have selected wlan2 for the Cypress chip. We cannot use the lowest numbered interface
as the system reference code has assumed the TI on Wifi on the IOT card is wlan0
and the Mediatek (MangOH Red) code assumes wlan1. Thus, we picked the next interface.
* We have selected wlan1 for the Cypress chip. We cannot use the lowest numbered interface
as the system reference code has assumed the TI Wifi on the IOT card is wlan0
Thus, we picked the next interface.
* Currently, the Cypress chip cannot operate in low-power mode on the WP85. It seems
to be some sort of SDIO timing issue that Cypress will be looking at on the
......@@ -43,7 +43,7 @@
* Testing was done simply with the following commands:
* /legato/systems/current/modules/files/brcmutil/etc/init.d/cywifi.sh start
* wpa_supplicant -B -Dnl80211 -iwlan2 -c /etc/wpa_supplicant.conf
* /sbin/udhcpc -R -b -i wlan2
* wpa_supplicant -B -Dnl80211 -iwlan1 -c /etc/wpa_supplicant.conf
* /sbin/udhcpc -R -b -i wlan1
* ping www.google.com
......@@ -987,10 +987,10 @@ int brcmf_bus_started(struct device *dev)
/* add primary networking interface */
/* SWI - we cannot pick the lowest numbered i/f as that's
* usually 0 (i.e. wlan0) and the existing codebase has a
* a different driver using wlan0 and another using wlan1.
* Thus, let's hard-code to wlan2. TODO Fix to wlan%d.
* a different driver using wlan0. Thus, let's hard-code to wlan1.
* TODO Fix to wlan%d and have enumeration being done by the hotplug daemon
*/
ifp = brcmf_add_if(drvr, 0, 0, false, "wlan2", NULL);
ifp = brcmf_add_if(drvr, 0, 0, false, "wlan1", NULL);
if (IS_ERR(ifp))
return PTR_ERR(ifp);
......
......@@ -44,13 +44,15 @@ cy_wifi_start() {
fi
# Let's make sure the Cypress chip got attached by the Kernel's MMC framework
# Bug here if dmesg has overflowed
sleep 3
dmesg | grep "new high speed SDIO card"
if [ $? -ne 0 ] ; then
echo "Cypress chip not recognized across MMC/SDIO bus"
exit 2
fi
# Bug here if dmesg has overflowed - for now we are removing the code below
# as we will assume MMC enumeration happened. Need a better way to error check
# as the driver on the WP76 continuously polls CIS tuples ad-infintum and messes up the log
#sleep 3
#dmesg | grep "new high speed SDIO card"
#if [ $? -ne 0 ] ; then
#echo "Cypress chip not recognized across MMC/SDIO bus"
#exit 2
#fi
# We need to get this into the reference software or the product branch ASAP
# and remove this temp. workaround, should be /lib/firmware - TODO
......@@ -79,13 +81,13 @@ cy_wifi_start() {
# firmware loads and reboots the Cypress device
sleep 5
ifconfig -a | grep wlan2 >/dev/null
ifconfig -a | grep wlan1 >/dev/null
if [ $? -ne 0 ] ; then
echo "wlan2 interface was not created by Cypress drivers"; exit 127
echo "wlan1 interface was not created by Cypress drivers"; exit 127
fi
ifconfig wlan2 up >/dev/null
ifconfig wlan1 up >/dev/null
if [ $? -ne 0 ] ; then
echo "wlan2 interface UP not working; exit 127"
echo "wlan1 interface UP not working; exit 127"
fi
# In case you have access to the Broadcom wl tool
#./wlarmv7a mpc 0
......@@ -93,9 +95,9 @@ cy_wifi_start() {
}
cy_wifi_stop() {
ifconfig | grep wlan2 >/dev/null
ifconfig | grep wlan1 >/dev/null
if [ $? -eq 0 ]; then
ifconfig wlan2 down
ifconfig wlan1 down
fi
rmmod `find /legato/systems/current/modules/ -name "*brcmfmac.ko"` || exit 127
rmmod `find /legato/systems/current/modules/ -name "*brcmutil.ko"` || exit 127
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment