Tizen 2.0 release 2.0alpha master 2.0_alpha submit/master/20120920.150938
authorKyuwook Lim <kyuwook.lim@samsung.com>
Tue, 21 Aug 2012 09:20:17 +0000 (18:20 +0900)
committerKyuwook Lim <kyuwook.lim@samsung.com>
Tue, 21 Aug 2012 09:20:17 +0000 (18:20 +0900)
packaging/wlandrv-plugin-tizen-bcm43xx.spec [new file with mode: 0644]
wlandrv-plugin-bcm43xx/etc/init.d/wifi-module-check [new file with mode: 0755]
wlandrv-plugin-bcm43xx/lib/firmware/nvram_mfg_bcm4330b1_murata_old.txt [new file with mode: 0755]
wlandrv-plugin-bcm43xx/lib/firmware/nvram_mfg_bcm4330b1_semco_old.txt [new file with mode: 0755]
wlandrv-plugin-bcm43xx/lib/firmware/nvram_net_bcm4330b1_cob_old.txt [new file with mode: 0755]
wlandrv-plugin-bcm43xx/lib/firmware/nvram_net_bcm4330b1_murata_5.90.100.270.txt [new file with mode: 0755]
wlandrv-plugin-bcm43xx/lib/firmware/nvram_net_bcm4330b1_semco_5.90.100.270.txt [new file with mode: 0755]
wlandrv-plugin-bcm43xx/lib/firmware/wlan_mfg_bcm4330b1_5.90.100.270.bin [new file with mode: 0755]
wlandrv-plugin-bcm43xx/lib/firmware/wlan_net_bcm4330b1_5.90.100.270.bin [new file with mode: 0755]
wlandrv-plugin-bcm43xx/lib/firmware/wlan_softap_bcm4330b1_5.90.100.270.bin [new file with mode: 0755]
wlandrv-plugin-bcm43xx/usr/bin/wlan.sh [new file with mode: 0755]

diff --git a/packaging/wlandrv-plugin-tizen-bcm43xx.spec b/packaging/wlandrv-plugin-tizen-bcm43xx.spec
new file mode 100644 (file)
index 0000000..ac488e2
--- /dev/null
@@ -0,0 +1,37 @@
+#sbs-git:slp/pkgs/w/wlandrv-plugin wlandrv-plugin 0.0.1 6f86c1ed745b5f30c8e0c80545510458f922be61
+%define debug_package %{nil}
+Name:       wlandrv-plugin-tizen-bcm43xx
+Summary:    Firmware & tools for broadcom
+Version: 1.0.1
+Release:    0
+Group:      TO_BE/FILLED_IN
+License:    TO BE FILLED IN
+Source0:    %{name}-%{version}.tar.gz
+
+%description
+firmware & tools for broadcom
+
+%prep
+%setup -q
+
+%build
+
+%install
+rm -rf %{buildroot}
+
+mkdir -p %{buildroot}/lib/firmware
+mkdir -p %{buildroot}/usr/bin
+mkdir -p %{buildroot}/etc/rc.d/rc3.d
+
+cp -af wlandrv-plugin-bcm43xx/* %{buildroot}/
+
+ln -s ../init.d/wifi-module-check %{buildroot}/etc/rc.d/rc3.d/S01wifi-module-check
+
+find wlandrv-plugin-bcm43xx/lib/firmware/*  -exec basename {} \; | sed 's/^/\/lib\/firmware\//g' >bcm.files
+find wlandrv-plugin-bcm43xx/usr/bin/*  -exec basename {} \; | sed 's/^/\/usr\/bin\//g' >>bcm.files
+find wlandrv-plugin-bcm43xx/etc/init.d/*  -exec basename {} \; | sed 's/^/\/etc\/init.d\//g' >>bcm.files
+
+echo "/etc/rc.d/rc3.d/S01wifi-module-check" >>bcm.files
+
+%files -f bcm.files
+%defattr(-, root, root, -)
diff --git a/wlandrv-plugin-bcm43xx/etc/init.d/wifi-module-check b/wlandrv-plugin-bcm43xx/etc/init.d/wifi-module-check
new file mode 100755 (executable)
index 0000000..02fd59c
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+if     [ ! -f /opt/etc/.cid.info ];then
+       mount -a
+       /usr/bin/wlan.sh check_hw &
+fi
+
+
diff --git a/wlandrv-plugin-bcm43xx/lib/firmware/nvram_mfg_bcm4330b1_murata_old.txt b/wlandrv-plugin-bcm43xx/lib/firmware/nvram_mfg_bcm4330b1_murata_old.txt
new file mode 100755 (executable)
index 0000000..123cd33
--- /dev/null
@@ -0,0 +1,79 @@
+manfid=0x2d0\r
+prodid=0x0532\r
+vendid=0x14e4\r
+devid=0x4360\r
+boardtype=0x0532\r
+boardrev=0x40\r
+boardflags=0x10080a01\r
+nocrc=1\r
+xtalfreq=37400\r
+boardnum=22\r
+macaddr=00:90:4c:c5:12:38\r
+ag0=255\r
+aa2g=1\r
+aa5g=1\r
+ccode=ALL\r
+pa0b0=0x1531\r
+pa0b1=0xfd93\r
+pa0b2=0xff6b\r
+cckPwrOffset=4\r
+# rssi params for 2.4GHz\r
+rssismf2g=0xa\r
+rssismc2g=0x3\r
+rssisav2g=0x7\r
+# rssi params for 5GHz\r
+rssismf5g=0xa\r
+rssismc5g=0x7\r
+rssisav5g=0x1\r
+#PA parameters for lower a-band\r
+pa1lob0=0x150c\r
+pa1lob1=0xfd53\r
+pa1lob2=0xff42\r
+#PA parameters for midband\r
+pa1b0=0x1515\r
+pa1b1=0xfd58\r
+pa1b2=0xff4a\r
+#PA parameters for high band\r
+pa1hib0=0x149b\r
+pa1hib1=0xfd64\r
+pa1hib2=0xff4f\r
+sromrev=3\r
+maxp2ga0=0x48\r
+ofdm2gpo=0x55555555\r
+mcs2gpo0=0x7777\r
+mcs2gpo1=0x7777\r
+maxp5ga0=0x48\r
+maxp5gla0=0x48\r
+maxp5gha0=0x48\r
+ofdm5gpo=0x55555555\r
+ofdm5glpo=0x55555555\r
+ofdm5ghpo=0x55555555\r
+mcs5gpo0=0x7777\r
+mcs5gpo1=0x7777\r
+mcs5glpo0=0x7777\r
+mcs5glpo1=0x7777\r
+mcs5ghpo0=0x7777\r
+mcs5ghpo1=0x7777\r
+extpagain5g=2\r
+rfreg033=0x1f\r
+pacalidx2g=65\r
+dacrate2g=160\r
+swctrlmap_2g=0x04040404,0x02020202,0x04040404,0x010202,0x1ff\r
+swctrlmap_5g=0x50505050,0x28282020,0x20202020,0x010202,0x2f8\r
+triso5g=9\r
+xtalmode=0x20,0x4,0\r
+noise_cal_ref_2g=56\r
+noise_cal_po_bias_2g=-4\r
+pa0itssit=0x20\r
+txiqlopapu5g=1\r
+txiqlopag5g=0x10\r
+\r
+#tssitime=1\r
+txalpfbyp2g=1\r
+cckdigfilttype=21\r
+#ofdmdigfilttype=2\r
+\r
+#for GPIO\r
+sd_gpout=0\r
+sd_oobonly=1\r
+\r
diff --git a/wlandrv-plugin-bcm43xx/lib/firmware/nvram_mfg_bcm4330b1_semco_old.txt b/wlandrv-plugin-bcm43xx/lib/firmware/nvram_mfg_bcm4330b1_semco_old.txt
new file mode 100755 (executable)
index 0000000..0ed9fc5
--- /dev/null
@@ -0,0 +1,94 @@
+manfid=0x2d0\r
+prodid=0x0532\r
+vendid=0x14e4\r
+devid=0x4360\r
+boardtype=0x0532\r
+boardrev=0x20\r
+boardflags=0x10080201\r
+\r
+nocrc=1\r
+xtalfreq=37400\r
+xtalmode=0x20,0x4,0\r
+boardnum=22\r
+macaddr=00:90:4c:c5:12:38\r
+ag0=253\r
+ag1=255\r
+aa2g=1\r
+aa5g=1\r
+ccode=ALL\r
+\r
+sd_gpout=0\r
+sd_oobonly=1\r
+\r
+# 2G PA para_SMST_0502\r
+pa0b0=5477\r
+pa0b1=64918\r
+pa0b2=65396\r
+#pa0itssit=62\r
+rssismf2g=0xa\r
+rssismc2g=0x3\r
+rssisav2g=0x7\r
+\r
+# rssi params for 5GHz\r
+#rssismf5g=0x4\r
+rssismf5g=0xa\r
+rssismc5g=0x7\r
+rssisav5g=0x1\r
+#PA parameters for lower band\r
+pa1lob0=5408\r
+pa1lob1=64851\r
+pa1lob2=65337\r
+#PA parameters for midband\r
+pa1b0=5351\r
+pa1b1=64860\r
+pa1b2=65345\r
+#PA parameters for high band\r
+pa1hib0=4924\r
+pa1hib1=64895\r
+pa1hib2=65329\r
+\r
+# 2G PA offset\r
+maxp2ga0=72\r
+sromrev=3\r
+cckpo=0\r
+ofdm2gpo=0x66666666\r
+mcs2gpo0=0xaaaa\r
+mcs2gpo1=0xaaaa\r
+\r
+# 5G PA offset_0316\r
+maxp5ga0=71\r
+maxp5gla0=72\r
+maxp5gha0=72\r
+ofdm5gpo=0x55555555\r
+ofdm5glpo=0x55555555\r
+ofdm5ghpo=0x55555555\r
+mcs5gpo0=0x9999\r
+mcs5gpo1=0x9999\r
+mcs5glpo0=0x9999\r
+mcs5glpo1=0x9999\r
+mcs5ghpo0=0x9999\r
+mcs5ghpo1=0x9999\r
+\r
+cckPwrOffset=4\r
+cckdigfilttype=20\r
+ofdmdigfilttype=2\r
+#wl0id=0x431b\r
+extpagain5g=2\r
+rfreg033=0x19\r
+rfreg033_cck=0x1f\r
+pacalidx2g=65\r
+dacrate2g=160\r
+txalpfbyp2g=1\r
+bphyscale=17\r
+\r
+#5GHz Carrier\r
+txiqlopapu5g=1\r
+txiqlopag5g=0x10\r
+iqlocalidx5g=64\r
+\r
+\r
+\r
+\r
+swctrlmap_2g=0x84048404, 0x82028202, 0x84048404, 0x010202, 0x1ff\r
+swctrlmap_5g=0xC040C040, 0xB030A020, 0x8000C040, 0x010A02, 0x2F8\r
+\r
diff --git a/wlandrv-plugin-bcm43xx/lib/firmware/nvram_net_bcm4330b1_cob_old.txt b/wlandrv-plugin-bcm43xx/lib/firmware/nvram_net_bcm4330b1_cob_old.txt
new file mode 100755 (executable)
index 0000000..2d79a5d
--- /dev/null
@@ -0,0 +1,87 @@
+manfid=0x2d0\r
+prodid=0x0532\r
+vendid=0x14e4\r
+devid=0x4360\r
+boardtype=0x0532\r
+boardrev=0x20\r
+boardflags=0x10080200\r
+\r
+nocrc=1\r
+xtalfreq=37400\r
+xtalmode=0x20,0x4,0\r
+boardnum=22\r
+macaddr=00:90:4c:c5:12:38\r
+\r
+ag0=255\r
+ag1=255\r
+aa2g=1\r
+ccode=ALL\r
+\r
+# 2G PA para_m_R06\r
+pa0b0=5447\r
+pa0b1=64916\r
+pa0b2=65392\r
+#pa0itssit=62\r
+rssismf2g=0xa\r
+rssismc2g=0x3\r
+rssisav2g=0x7\r
+\r
+# rssi params for 5GHz\r
+#rssismf5g=0x4\r
+rssismf5g=0xa\r
+rssismc5g=0x7\r
+rssisav5g=0x1\r
+#PA parameters for lower band\r
+pa1lob0=5408\r
+pa1lob1=64851\r
+pa1lob2=65337\r
+#PA parameters for midband\r
+pa1b0=5351\r
+pa1b1=64860\r
+pa1b2=65345\r
+#PA parameters for high band\r
+pa1hib0=4924\r
+pa1hib1=64895\r
+pa1hib2=65329\r
+\r
+# 2G PA offset_0117\r
+maxp2ga0=72\r
+sromrev=3\r
+cckpo=0\r
+ofdm2gpo=0x66666666\r
+mcs2gpo0=0xaaaa\r
+mcs2gpo1=0xaaaa\r
+\r
+# 5G PA offset_0117\r
+maxp5ga0=60\r
+maxp5gla0=60\r
+maxp5gha0=60\r
+ofdm5gpo=0x33333333\r
+ofdm5glpo=0x33333333\r
+ofdm5ghpo=0x33333333\r
+mcs5gpo0=0x9999\r
+mcs5gpo1=0x9999\r
+mcs5glpo0=0x9999\r
+mcs5glpo1=0x9999\r
+mcs5ghpo0=0x9999\r
+mcs5ghpo1=0x9999\r
+\r
+cckPwrOffset=4\r
+cckdigfilttype=22\r
+ofdmdigfilttype=2\r
+#wl0id=0x431b\r
+extpagain5g=2\r
+rfreg033=0x19\r
+rfreg033_cck=0x1f\r
+pacalidx2g=65\r
+dacrate=160\r
+txalpfbyp=1\r
+bphyscale=17\r
+\r
+sd_gpout=0\r
+sd_gpval=1\r
+sd_oobonly=1\r
+\r
+swctrlmap_2g=0x84048404, 0x82028202, 0x84048404, 0x010202, 0x1ff\r
+swctrlmap_5g=0xC040C040, 0xB030A020, 0x8000C040, 0x010A02, 0x2F8\r
+\r
diff --git a/wlandrv-plugin-bcm43xx/lib/firmware/nvram_net_bcm4330b1_murata_5.90.100.270.txt b/wlandrv-plugin-bcm43xx/lib/firmware/nvram_net_bcm4330b1_murata_5.90.100.270.txt
new file mode 100755 (executable)
index 0000000..ca12d2d
--- /dev/null
@@ -0,0 +1,88 @@
+# No change from 100.24_modified\r
+manfid=0x2d0\r
+prodid=0x0532\r
+vendid=0x14e4\r
+devid=0x4360\r
+boardtype=0x0532\r
+boardrev=0x40\r
+boardflags=0x10080a01\r
+regrev=3\r
+nocrc=1\r
+xtalfreq=37400\r
+boardnum=22\r
+macaddr=00:90:4c:c5:12:38\r
+# modified\r
+ag0=0\r
+aa2g=1\r
+aa5g=1\r
+ccode=ALL\r
+pa0b0=0x1531\r
+pa0b1=0xfd93\r
+pa0b2=0xff6b\r
+cckPwrOffset=4\r
+rssismf2g=0xa\r
+rssismc2g=0x3\r
+rssisav2g=0x7\r
+rssismf5g=0xa\r
+rssismc5g=0x7\r
+rssisav5g=0x1\r
+pa1lob0=0x150c\r
+pa1lob1=0xfd53\r
+pa1lob2=0xff42\r
+pa1b0=0x1515\r
+pa1b1=0xfd58\r
+pa1b2=0xff4a\r
+pa1hib0=0x149b\r
+pa1hib1=0xfd64\r
+pa1hib2=0xff4f\r
+sromrev=3\r
+maxp2ga0=0x48\r
+ofdm2gpo=0x55555555\r
+mcs2gpo0=0x7777\r
+mcs2gpo1=0x7777\r
+maxp5ga0=0x48\r
+maxp5gla0=0x48\r
+maxp5gha0=0x48\r
+ofdm5gpo=0x55555555\r
+ofdm5glpo=0x55555555\r
+ofdm5ghpo=0x55555555\r
+mcs5gpo0=0x7777\r
+mcs5gpo1=0x7777\r
+mcs5glpo0=0x7777\r
+mcs5glpo1=0x7777\r
+mcs5ghpo0=0x7777\r
+mcs5ghpo1=0x7777\r
+txiqlopapu5g=1\r
+txiqlopag5g=0x10\r
+# change value\r
+iqlocalidx5g=24\r
+extpagain5g=2\r
+rfreg033=0x19\r
+rfreg033_cck=0x1f\r
+pacalidx2g=65\r
+dacrate2g=160\r
+swctrlmap_2g=0x04040404,0x02020202,0x04040404,0x010202,0x1ff\r
+swctrlmap_5g=0x50505050,0x28282020,0x20202020,0x010202,0x2f8\r
+triso5g=9\r
+xtalmode=0x20,0x4,0\r
+noise_cal_po_5g=5\r
+#noise_cal_enable_5g=0\r
+pa0itssit=0x20\r
+txalpfbyp2g=1\r
+cckdigfilttype=21\r
+sd_gpout=0\r
+sd_oobonly=1\r
+btc_params80=0\r
+btc_params6=10\r
+btc_params8=10000\r
+loidacmode5g=1\r
+#tssitime=1\r
+noise_cal_ref_2g=52\r
+#noise_cal_po_bias_2g=-4 \r
+bphyscale=17\r
+txgaintbl5g=1\r
+# added parameters\r
+noise_cal_enable_2g=1\r
+noise_cal_po_2g=-3\r
+tridx5g=0\r
+\r
diff --git a/wlandrv-plugin-bcm43xx/lib/firmware/nvram_net_bcm4330b1_semco_5.90.100.270.txt b/wlandrv-plugin-bcm43xx/lib/firmware/nvram_net_bcm4330b1_semco_5.90.100.270.txt
new file mode 100755 (executable)
index 0000000..73d1f76
--- /dev/null
@@ -0,0 +1,124 @@
+manfid=0x2d0\r
+prodid=0x0532\r
+vendid=0x14e4\r
+devid=0x4360\r
+boardtype=0x0532\r
+boardrev=0x20\r
+boardflags=0x10080201\r
+\r
+nocrc=1\r
+xtalfreq=37400\r
+xtalmode=0x20,0x4,0\r
+boardnum=22\r
+macaddr=00:90:4c:c5:12:38\r
+ag0=252\r
+ag1=252\r
+aa2g=1\r
+ccode=ALL\r
+\r
+btc_params80=0\r
+btc_params6=10\r
+btc_params8=10000\r
+\r
+sd_gpout=0\r
+sd_oobonly=1\r
+\r
+\r
+#B42 17_14_12 14_12 110909\r
+\r
+\r
+# 2G PA param\r
+pa0b0=0x145C\r
+pa0b1=0xFDBF\r
+pa0b2=0xFF79\r
+#pa0itssit=62\r
+rssismf2g=0xa\r
+rssismc2g=0x3\r
+rssisav2g=0x7\r
+\r
+# rssi params for 5GHz\r
+#rssismf5g=0x4\r
+rssismf5g=0xa\r
+rssismc5g=0x7\r
+rssisav5g=0x1\r
+\r
+#PA parameters for lower band\r
+pa1lob0=0x1388\r
+pa1lob1=0xFD7F\r
+pa1lob2=0xFF34\r
+\r
+#PA parameters for midband\r
+pa1b0=0x12D1\r
+pa1b1=0xFD8B\r
+pa1b2=0xFF3C\r
+\r
+#PA parameters for high band\r
+pa1hib0=0x119E\r
+pa1hib1=0xFD9F\r
+pa1hib2=0xFF32\r
+\r
+\r
+# 2G PA offset\r
+maxp2ga0=76\r
+sromrev=3\r
+cckpo=0\r
+ofdm2gpo=0x66666666\r
+mcs2gpo0=0xaaaa\r
+mcs2gpo1=0xaaaa\r
+\r
+# 5G PA offset\r
+maxp5ga0=66\r
+maxp5gla0=66\r
+maxp5gha0=62\r
+ofdm5gpo=0x22222222\r
+ofdm5glpo=0x22222222\r
+ofdm5ghpo=0x22222222\r
+mcs5gpo0=0x6666\r
+mcs5gpo1=0x6666\r
+mcs5glpo0=0x6666\r
+mcs5glpo1=0x6666\r
+mcs5ghpo0=0x6666\r
+mcs5ghpo1=0x6666\r
+\r
+cckPwrOffset=4\r
+cckdigfilttype=21\r
+ofdmdigfilttype=2\r
+extpagain5g=2\r
+#wl0id=0x431b\r
+\r
+# For 2GHz Tx EVM/SM\r
+rfreg033=0x19\r
+rfreg033_cck=0x1f\r
+pacalidx2g=65\r
+dacrate2g=160\r
+txalpfbyp2g=1\r
+bphyscale=17\r
+\r
+#5GHz LOFT and IQ CAL\r
+txgaintbl5g=1\r
+txiqlopapu5g=1\r
+txiqlopag5g=0x10\r
+iqlocalidx5g=24\r
+#iqlocalidx5g=64 to 24\r
+\r
+# 5GHz Noise CAL parameter\r
+noise_cal_po_5g=5\r
+noise_cal_enable_5g=0\r
+\r
+# 2GHz RxPER at low rates\r
+noise_cal_ref_2g=56\r
+noise_cal_po_bias_2g=-4\r
+noise_cal_enable_2g=1\r
+\r
+# Max input level on a-band\r
+triso5g=9\r
+\r
+# Tx power control, especially temp.\r
+#tssitime=1\r
+\r
+#fc+1.7GHz Spur Elimination\r
+loidacmode5g=1\r
+\r
+swctrlmap_2g=0x84048404, 0x82028202, 0x84048404, 0x010202, 0x1ff\r
+swctrlmap_5g=0xC040C040, 0xB030A020, 0xA020C040, 0x010A02, 0x2F8\r
+\r
diff --git a/wlandrv-plugin-bcm43xx/lib/firmware/wlan_mfg_bcm4330b1_5.90.100.270.bin b/wlandrv-plugin-bcm43xx/lib/firmware/wlan_mfg_bcm4330b1_5.90.100.270.bin
new file mode 100755 (executable)
index 0000000..60b51ac
Binary files /dev/null and b/wlandrv-plugin-bcm43xx/lib/firmware/wlan_mfg_bcm4330b1_5.90.100.270.bin differ
diff --git a/wlandrv-plugin-bcm43xx/lib/firmware/wlan_net_bcm4330b1_5.90.100.270.bin b/wlandrv-plugin-bcm43xx/lib/firmware/wlan_net_bcm4330b1_5.90.100.270.bin
new file mode 100755 (executable)
index 0000000..c3ca3bc
Binary files /dev/null and b/wlandrv-plugin-bcm43xx/lib/firmware/wlan_net_bcm4330b1_5.90.100.270.bin differ
diff --git a/wlandrv-plugin-bcm43xx/lib/firmware/wlan_softap_bcm4330b1_5.90.100.270.bin b/wlandrv-plugin-bcm43xx/lib/firmware/wlan_softap_bcm4330b1_5.90.100.270.bin
new file mode 100755 (executable)
index 0000000..2da25c5
Binary files /dev/null and b/wlandrv-plugin-bcm43xx/lib/firmware/wlan_softap_bcm4330b1_5.90.100.270.bin differ
diff --git a/wlandrv-plugin-bcm43xx/usr/bin/wlan.sh b/wlandrv-plugin-bcm43xx/usr/bin/wlan.sh
new file mode 100755 (executable)
index 0000000..c8c5dac
--- /dev/null
@@ -0,0 +1,166 @@
+#!/bin/sh
+
+INSMOD_TOOL=/sbin/modprobe
+MOD_INFO_FILE=/opt/etc/.cid.info
+DRV_PATH=/opt/driver
+FW_PATH=/lib/firmware
+IFACE_NAME=wlan0
+
+# Driver path
+DRIVER=dhd
+
+# firmware : FIRMWARE_[Mode]_[Chip]_[Version]_{Additional Info}
+       # net
+               # bcm4330b1
+                       FIRMWARE_NET_BCM4330B1_270=${FW_PATH}/wlan_net_bcm4330b1_5.90.100.270.bin
+       # softap
+               # bcm4330b1 : BCM4330 use same firmware for net and softap
+                       FIRMWARE_SOFTAP_BCM4330B1_270=${FW_PATH}/wlan_softap_bcm4330b1_5.90.100.270.bin
+       # mft
+               # bcm4330b1
+                       FIRMWARE_MFT_BCM4330B1_270=${FW_PATH}/wlan_mfg_bcm4330b1_5.90.100.270.bin
+
+       # p2p(Wi-Fi Direct)
+                       FIRMWARE_P2P_BCM4330B1_270=${FW_PATH}/wlan_net_bcm4330b1_5.90.100.270.bin
+
+
+# nvram : NVRAM_[Mode]_[Chip]_[Type]_[Version]_{Additional Info}
+       # net
+               # bcm4330b1
+                       # cob
+                               NVRAM_NET_BCM4330B1_COB_OLD=${FW_PATH}/nvram_net_bcm4330b1_cob_old.txt
+                       # semco
+                               NVRAM_NET_BCM4330B1_SEMCO_270=${FW_PATH}/nvram_net_bcm4330b1_semco_5.90.100.270.txt
+                       # murata
+                               NVRAM_NET_BCM4330B1_MURATA_270=${FW_PATH}/nvram_net_bcm4330b1_murata_5.90.100.270.txt
+       # mft
+               # bcm4330b1
+                       # semco
+                               NVRAM_MFT_BCM4330B1_SEMCO_OLD=${FW_PATH}/nvram_mfg_bcm4330b1_semco_old.txt
+                       # murata
+                               NVRAM_MFT_BCM4330B1_MURATA_OLD=${FW_PATH}/nvram_mfg_bcm4330b1_murata_old.txt
+
+run_dhd_to_check_module_type()
+{
+               /usr/sbin/rfkill unblock wlan
+               ${INSMOD_TOOL} ${DRIVER} firmware_path=${FIRMWARE_MFT} nvram_path=${NVRAM_MFT} iface_name=${IFACE_NAME}
+               /bin/usleep 800000
+               /sbin/rmmod dhd
+}
+
+check_module_type()
+{
+       if      [ -s ${MOD_INFO_FILE} ]; then
+               MOD_TYPE=`cat ${MOD_INFO_FILE}`
+       else
+               /bin/echo excute run_dhd_to_check_module_type
+               run_dhd_to_check_module_type
+               MOD_TYPE=`cat ${MOD_INFO_FILE}`
+       fi
+}
+
+check_hw()
+{
+       FIRMWARE_NET=${FIRMWARE_NET_BCM4330B1_270}
+       FIRMWARE_SOFTAP=${FIRMWARE_SOFTAP_BCM4330B1_270}
+       FIRMWARE_MFT=${FIRMWARE_MFT_BCM4330B1_270}
+       FIRMWARE_P2P=${FIRMWARE_P2P_BCM4330B1_270}
+       NVRAM_MFT=${NVRAM_MFT_BCM4330B1_MURATA_OLD}
+       check_module_type       # get module type for nvram selection
+
+       if [ "${MOD_TYPE}" == murata ]; then
+               NVRAM_NET=${NVRAM_NET_BCM4330B1_MURATA_270}
+               NVRAM_MFT=${NVRAM_MFT_BCM4330B1_MURATA_OLD}
+               echo "This is MURATA module type"
+       elif [ "${MOD_TYPE}" == samsung ] || [ "${MOD_TYPE}" == semco ]; then
+               NVRAM_NET=${NVRAM_NET_BCM4330B1_SEMCO_270}
+               NVRAM_MFT=${NVRAM_MFT_BCM4330B1_SEMCO_OLD}
+               echo "This is SEMCO module type"
+       else
+               NVRAM_NET=${NVRAM_NET_BCM4330B1_SEMCO_270}
+               NVRAM_MFT=${NVRAM_MFT_BCM4330B1_SEMCO_OLD}
+               echo "No information. Use default SEMCO module type"
+       fi
+}
+
+__start()
+{
+               /usr/sbin/rfkill unblock wlan
+               /bin/echo ${FIRMWARE}
+               /bin/usleep 500000
+               ${INSMOD_TOOL} ${DRIVER} firmware_path=${FIRMWARE} nvram_path=${NVRAM} iface_name=${IFACE_NAME}
+               /bin/usleep 500000
+               /sbin/ifconfig ${IFACE_NAME} up
+}
+
+start()
+{
+       check_hw
+       if /sbin/ifconfig -a | /bin/grep ${IFACE_NAME} > /dev/null
+       then
+               /bin/echo "wlan.sh start exit 1"
+               exit 1
+       fi
+       # Set default firmware and nvram
+       FIRMWARE=${FIRMWARE_NET}
+       NVRAM=${NVRAM_NET}
+       __start
+}
+
+stop()
+{
+       check_hw
+       /sbin/ifconfig ${IFACE_NAME} down
+       /bin/sleep 1
+       /sbin/rmmod dhd
+       /usr/sbin/rfkill block wlan
+}
+
+softap()
+{
+       check_hw
+       if /sbin/ifconfig -a | /bin/grep ${IFACE_NAME} > /dev/null
+       then
+               /bin/echo "wlan.sh softap exit 1"
+               exit 1
+       fi
+       FIRMWARE=${FIRMWARE_SOFTAP}
+       NVRAM=${NVRAM_NET}
+       __start
+}
+
+p2p()
+{
+       check_hw
+       if /sbin/ifconfig -a | /bin/grep ${IFACE_NAME} > /dev/null
+       then
+               /bin/echo "wlan.sh p2p exit 1"
+               exit 1
+       fi
+       FIRMWARE=${FIRMWARE_P2P}
+       NVRAM=${NVRAM_NET}
+       __start
+}
+
+
+case $1 in
+"start")
+start
+;;
+"stop")
+stop
+;;
+"check_hw")
+check_hw
+;;
+"softap")
+softap
+;;
+"p2p")
+p2p
+;;
+*)
+/bin/echo wlan.sh [start] [stop] [softap] [p2p] [check_hw]
+exit 1
+;;
+esac