summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorFlorian Fainelli <florian@openwrt.org>2007-03-18 12:59:44 +0000
committerFlorian Fainelli <florian@openwrt.org>2007-03-18 12:59:44 +0000
commit677b02a25042312cc9d67524ebe9cac95f9cd7ee (patch)
treebc32620867c7e16740b2bea8a1bb5a233f8e9f6b /package
parent6eb218b9c979ddb0f078c733bffacd92e1da8c01 (diff)
downloadmtk-20170518-677b02a25042312cc9d67524ebe9cac95f9cd7ee.zip
mtk-20170518-677b02a25042312cc9d67524ebe9cac95f9cd7ee.tar.gz
mtk-20170518-677b02a25042312cc9d67524ebe9cac95f9cd7ee.tar.bz2
Add bssid fix from #1281
SVN-Revision: 6601
Diffstat (limited to 'package')
-rwxr-xr-xpackage/madwifi/files/lib/wifi/madwifi.sh6
-rw-r--r--package/madwifi/patches/112-fixed_ibss_bssid.patch36
2 files changed, 42 insertions, 0 deletions
diff --git a/package/madwifi/files/lib/wifi/madwifi.sh b/package/madwifi/files/lib/wifi/madwifi.sh
index 1af4ce3..2fd839a 100755
--- a/package/madwifi/files/lib/wifi/madwifi.sh
+++ b/package/madwifi/files/lib/wifi/madwifi.sh
@@ -140,6 +140,12 @@ enable_atheros() {
*)
config_get ssid "$vif" ssid
;;
+ adhoc)
+ config_get addr "$vif" bssid
+ [ -z "$addr" ] || {
+ iwconfig "$ifname" ap "$addr"
+ }
+ ;;
esac
[ "$mode" = "sta" ] && {
diff --git a/package/madwifi/patches/112-fixed_ibss_bssid.patch b/package/madwifi/patches/112-fixed_ibss_bssid.patch
new file mode 100644
index 0000000..aa23e88
--- /dev/null
+++ b/package/madwifi/patches/112-fixed_ibss_bssid.patch
@@ -0,0 +1,36 @@
+This patch fixes a bug in net80211/ieee80211_wireless.c preventing
+the user from setting a certain BSSID by
+"iwconfig athX ap XX:XX:XX:XX:XX:XX".
+It furthermore prevents merging to another IBSS in ad-hoc mode
+if a BSSID was set previously by the above command.
+It was tested with the snapshot madwifi-ng-r1696-20060730.
+
+Signed-off-by: Joerg Albert <jal2@gmx.de>
+
+diff -ru madwifi-ng-r1696-20060730/ath/if_ath.c madwifi-ng-r1696-20060730.work/ath/if_ath.c
+--- madwifi-ng-r1696-20060730/ath/if_ath.c 2006-07-08 08:47:19.000000000 +0200
++++ madwifi-ng-r1696-20060730.work/ath/if_ath.c 2006-08-03 20:38:12.000000000 +0200
+@@ -5316,7 +5316,10 @@
+ * ath_newstate as the state machine will go from
+ * RUN -> RUN when this happens.
+ */
+- if (le64_to_cpu(ni->ni_tstamp.tsf) >= tsf) {
++ /* jal: added: don't merge if we have a desired
++ BSSID */
++ if (!(vap->iv_flags & IEEE80211_F_DESBSSID) &&
++ le64_to_cpu(ni->ni_tstamp.tsf) >= tsf) {
+ DPRINTF(sc, ATH_DEBUG_STATE,
+ "ibss merge, rstamp %u tsf %llu "
+ "tstamp %llu\n", rstamp, (long long) tsf,
+diff -ru madwifi-ng-r1696-20060730/net80211/ieee80211_wireless.c madwifi-ng-r1696-20060730.work/net80211/ieee80211_wireless.c
+--- madwifi-ng-r1696-20060730/net80211/ieee80211_wireless.c 2006-07-29 03:31:11.000000000 +0200
++++ madwifi-ng-r1696-20060730.work/net80211/ieee80211_wireless.c 2006-08-03 21:23:30.000000000 +0200
+@@ -539,7 +539,7 @@
+ *
+ * anything else specifies a particular AP.
+ */
+- if (IEEE80211_ADDR_EQ(vap->iv_des_bssid, zero_bssid))
++ if (IEEE80211_ADDR_EQ(&ap_addr->sa_data, zero_bssid))
+ vap->iv_flags &= ~IEEE80211_F_DESBSSID;
+ else {
+ IEEE80211_ADDR_COPY(vap->iv_des_bssid, &ap_addr->sa_data);