mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-01-26 08:21:06 +02:00
Merge commit 'nbd/master' into xburst
This commit is contained in:
commit
fd4aac8085
2
README
2
README
@ -3,7 +3,7 @@ This is the buildsystem for the OpenWrt Linux distribution
|
||||
Please use "make menuconfig" to configure your appreciated
|
||||
configuration for the toolchain and firmware.
|
||||
|
||||
You need to have installed gcc, binutils, patch, bzip2, flex, bison,
|
||||
You need to have installed gcc, binutils, patch, bzip2, flex,
|
||||
make, gettext, pkg-config, unzip, libz-dev and libc headers.
|
||||
|
||||
Simply running 'make' will build your firmware.
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2006-2009 OpenWrt.org
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@ -80,7 +80,7 @@ define Host/Compile
|
||||
endef
|
||||
|
||||
define Host/Install/Default
|
||||
$(MAKE) -C $(HOST_BUILD_DIR) install
|
||||
$(_SINGLE)$(MAKE) -C $(HOST_BUILD_DIR) install
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
|
@ -91,7 +91,8 @@ ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
|
||||
$(CP) ./ubinize.cfg $(KDIR)
|
||||
$(STAGING_DIR_HOST)/bin/mkfs.ubifs $(UBIFS_OPTS) -o $(KDIR)/root.ubifs -d $(TARGET_DIR)
|
||||
(cd $(KDIR); \
|
||||
$(STAGING_DIR_HOST)/bin/ubinize $(UBINIZE_OPTS) -o $(BIN_DIR)/openwrt-$(BOARD)-rootfs.ubi ubinize.cfg)
|
||||
$(STAGING_DIR_HOST)/bin/ubinize $(UBINIZE_OPTS) -o $(KDIR)/root.ubi ubinize.cfg)
|
||||
$(call Image/Build,ubi)
|
||||
endef
|
||||
endif
|
||||
else
|
||||
@ -103,7 +104,7 @@ endif
|
||||
|
||||
define Image/Checksum
|
||||
( cd ${BIN_DIR} ; \
|
||||
$(FIND) -maxdepth 1 -type f \! -name 'md5sums' -printf "%P\n" | xargs \
|
||||
$(FIND) -maxdepth 1 -type f \! -name 'md5sums' -printf "%P\n" | sort | xargs \
|
||||
md5sum --binary > md5sums \
|
||||
)
|
||||
endef
|
||||
|
@ -17,8 +17,11 @@ endif
|
||||
ifeq ($(LINUX_VERSION),2.6.31.12)
|
||||
LINUX_KERNEL_MD5SUM:=517be354b81b780e2f4b2ad614d030de
|
||||
endif
|
||||
ifeq ($(LINUX_VERSION),2.6.32.8)
|
||||
LINUX_KERNEL_MD5SUM:=82023ede52f067fcc55c5e70b02e48ae
|
||||
ifeq ($(LINUX_VERSION),2.6.32.9)
|
||||
LINUX_KERNEL_MD5SUM:=0771a9c70503c92f40d815ef76eb62fe
|
||||
endif
|
||||
ifeq ($(LINUX_VERSION),2.6.33)
|
||||
LINUX_KERNEL_MD5SUM:=c3883760b18d50e8d78819c54d579b00
|
||||
endif
|
||||
|
||||
# disable the md5sum check for unknown kernel versions
|
||||
|
@ -70,6 +70,9 @@ define ModuleAutoLoad
|
||||
add_module() { \
|
||||
mkdir -p $(2)/etc/modules.d; \
|
||||
( \
|
||||
[ "$$$$$$$$3" = "1" ] && { \
|
||||
echo '# May be required for rootfs' ; \
|
||||
} ; \
|
||||
for mod in $$$$$$$$2; do \
|
||||
getvar mod; \
|
||||
done \
|
||||
@ -154,7 +157,7 @@ $(call KernelPackage/$(1)/config)
|
||||
endef
|
||||
|
||||
define AutoLoad
|
||||
add_module $(1) "$(2)";
|
||||
add_module $(1) "$(2)" $(3);
|
||||
endef
|
||||
|
||||
ifdef DUMP
|
||||
|
@ -73,6 +73,8 @@ $(eval $(call nf_add,IPT_CORE,CONFIG_IP_NF_MATCH_MAC, $(P_V4)ipt_mac))
|
||||
$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_MAC, $(P_XT)xt_mac))
|
||||
$(eval $(call nf_add,IPT_CORE,CONFIG_IP_NF_MATCH_MULTIPORT, $(P_V4)ipt_multiport))
|
||||
$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_MULTIPORT, $(P_XT)xt_multiport))
|
||||
$(eval $(call nf_add,IPT_CORE,CONFIG_IP_NF_MATCH_COMMENT, $(P_V4)ipt_comment))
|
||||
$(eval $(call nf_add,IPT_CORE,CONFIG_NETFILTER_XT_MATCH_COMMENT, $(P_XT)xt_comment))
|
||||
|
||||
$(eval $(call nf_add,IPT_CORE,CONFIG_IP_NF_TARGET_LOG, $(P_V4)ipt_LOG))
|
||||
$(eval $(call nf_add,IPT_CORE,CONFIG_IP_NF_TARGET_TCPMSS, $(P_V4)ipt_TCPMSS))
|
||||
|
@ -122,7 +122,7 @@ define Build/Install/Default
|
||||
$(MAKE_VARS) \
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/$(MAKE_PATH) \
|
||||
$(MAKE_INSTALL_FLAGS) \
|
||||
$(1) install;
|
||||
$(if $(1), $(1), install);
|
||||
endef
|
||||
|
||||
define Build/Dist/Default
|
||||
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2006-2008 OpenWrt.org
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@ -23,6 +23,7 @@ endif
|
||||
$(curdir)/install:=$(curdir)/install-cleanup
|
||||
|
||||
$(curdir)/cleanup: $(TMP_DIR)/.build
|
||||
- find $(STAGING_DIR_ROOT) -type d | $(XARGS) chmod 0755
|
||||
rm -rf $(TARGET_DIR) $(STAGING_DIR_ROOT)
|
||||
|
||||
ifdef CONFIG_USE_MKLIBS
|
||||
@ -42,8 +43,9 @@ ifdef CONFIG_USE_MKLIBS
|
||||
--sysroot $(STAGING_DIR_ROOT) \
|
||||
-L /lib \
|
||||
-L /usr/lib \
|
||||
-L /usr/lib/ebtables \
|
||||
--ldlib $(patsubst $(STAGING_DIR_ROOT)/%,/%,$(firstword $(wildcard \
|
||||
$(foreach name,ld-uClibc.so.* ld-linux.so.*, \
|
||||
$(foreach name,ld-uClibc.so.* ld-linux.so.* ld-*.so, \
|
||||
$(STAGING_DIR_ROOT)/lib/$(name) \
|
||||
)))) \
|
||||
--target $(REAL_GNU_TARGET_NAME) \
|
||||
|
@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=acx-mac80211
|
||||
PKG_REV:=11edba2
|
||||
PKG_VERSION:=20080805
|
||||
PKG_REV:=e7a55711
|
||||
PKG_VERSION:=20100302
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=git://gitorious.org/acx-mac80211/mainline.git
|
||||
PKG_SOURCE_URL:=git://gitorious.org/~oli1417/acx-mac80211/oli1417-clone.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=$(PKG_REV)
|
||||
@ -68,6 +68,7 @@ define Build/Compile
|
||||
$(PKG_EXTRA_KCONFIG) \
|
||||
EXTRA_CFLAGS="$(PKG_EXTRA_CFLAGS)" \
|
||||
LINUXINCLUDE="-I$(STAGING_DIR)/usr/include/mac80211 -I$(LINUX_DIR)/include \
|
||||
-Iarch/$(LINUX_KARCH)/include \
|
||||
-include linux/autoconf.h" \
|
||||
V="$(V)" \
|
||||
modules
|
||||
|
@ -1,11 +0,0 @@
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -28,7 +28,7 @@ ifneq ($(KERNELRELEASE),)
|
||||
obj-$(CONFIG_ACX_MAC80211) += acx-mac80211.o
|
||||
acx-mac80211-obj-$(CONFIG_ACX_MAC80211_PCI) += pci.o
|
||||
acx-mac80211-obj-$(CONFIG_ACX_MAC80211_USB) += usb.o
|
||||
- acx-mac80211-objs := common.o $(acx-mac80211-obj-y)
|
||||
+ acx-mac80211-objs := common.o $(acx-mac80211-obj-m)
|
||||
else
|
||||
# Otherwise we were called directly from the command line: the the kernel build
|
||||
# system must be explicitly invoked.
|
95
package/acx-mac80211/patches/001-if_init_conf_removal.patch
Normal file
95
package/acx-mac80211/patches/001-if_init_conf_removal.patch
Normal file
@ -0,0 +1,95 @@
|
||||
Index: acx-mac80211-20100302/acx_func.h
|
||||
===================================================================
|
||||
--- acx-mac80211-20100302.orig/acx_func.h 2010-03-06 12:57:25.000000000 +0100
|
||||
+++ acx-mac80211-20100302/acx_func.h 2010-03-06 12:58:10.000000000 +0100
|
||||
@@ -704,9 +704,9 @@
|
||||
void acx_free_modes(acx_device_t *adev);
|
||||
int acx_i_op_tx(struct ieee80211_hw *ieee, struct sk_buff *skb);
|
||||
int acx_e_op_add_interface(struct ieee80211_hw* ieee,
|
||||
- struct ieee80211_if_init_conf *conf);
|
||||
+ struct ieee80211_vif *vif);
|
||||
void acx_e_op_remove_interface(struct ieee80211_hw* ieee,
|
||||
- struct ieee80211_if_init_conf *conf);
|
||||
+ struct ieee80211_vif *vif);
|
||||
int acx_net_reset(struct ieee80211_hw *ieee);
|
||||
int acx_e_op_set_key(struct ieee80211_hw *hw, enum set_key_cmd cmd,
|
||||
struct ieee80211_vif *vif, struct ieee80211_sta *sta,
|
||||
Index: acx-mac80211-20100302/common.c
|
||||
===================================================================
|
||||
--- acx-mac80211-20100302.orig/common.c 2010-03-06 12:57:31.000000000 +0100
|
||||
+++ acx-mac80211-20100302/common.c 2010-03-06 12:59:51.000000000 +0100
|
||||
@@ -4402,7 +4402,7 @@
|
||||
}
|
||||
|
||||
int acx_e_op_add_interface(struct ieee80211_hw *ieee,
|
||||
- struct ieee80211_if_init_conf *conf)
|
||||
+ struct ieee80211_vif *vif)
|
||||
{
|
||||
acx_device_t *adev = ieee2adev(ieee);
|
||||
unsigned long flags;
|
||||
@@ -4414,14 +4414,14 @@
|
||||
acx_sem_lock(adev);
|
||||
acx_lock(adev, flags);
|
||||
|
||||
- if (conf->type == NL80211_IFTYPE_MONITOR) {
|
||||
+ if (vif->type == NL80211_IFTYPE_MONITOR) {
|
||||
adev->interface.monitor++;
|
||||
} else {
|
||||
if (adev->interface.operating)
|
||||
goto out_unlock;
|
||||
adev->interface.operating = 1;
|
||||
- adev->interface.mac_addr = conf->mac_addr;
|
||||
- adev->interface.type = conf->type;
|
||||
+ adev->interface.mac_addr = vif->addr;
|
||||
+ adev->interface.type = vif->type;
|
||||
}
|
||||
// adev->mode = conf->type;
|
||||
|
||||
@@ -4436,8 +4436,8 @@
|
||||
|
||||
printk(KERN_INFO "acx: Virtual interface added "
|
||||
"(type: 0x%08X, MAC: %s)\n",
|
||||
- conf->type,
|
||||
- acx_print_mac(mac, conf->mac_addr));
|
||||
+ vif->type,
|
||||
+ acx_print_mac(mac, vif->addr));
|
||||
|
||||
out_unlock:
|
||||
acx_unlock(adev, flags);
|
||||
@@ -4448,7 +4448,7 @@
|
||||
}
|
||||
|
||||
void acx_e_op_remove_interface(struct ieee80211_hw *hw,
|
||||
- struct ieee80211_if_init_conf *conf)
|
||||
+ struct ieee80211_vif *vif)
|
||||
{
|
||||
acx_device_t *adev = ieee2adev(hw);
|
||||
|
||||
@@ -4457,23 +4457,23 @@
|
||||
FN_ENTER;
|
||||
acx_sem_lock(adev);
|
||||
|
||||
- if (conf->type == NL80211_IFTYPE_MONITOR) {
|
||||
+ if (vif->type == NL80211_IFTYPE_MONITOR) {
|
||||
adev->interface.monitor--;
|
||||
// assert(bcm->interface.monitor >= 0);
|
||||
} else {
|
||||
adev->interface.operating = 0;
|
||||
}
|
||||
|
||||
- log(L_DEBUG, "acx: %s: interface.operating=%d, conf->type=%d\n",
|
||||
+ log(L_DEBUG, "acx: %s: interface.operating=%d, vif->type=%d\n",
|
||||
__func__,
|
||||
- adev->interface.operating, conf->type);
|
||||
+ adev->interface.operating, vif->type);
|
||||
|
||||
if (adev->initialized)
|
||||
acx_s_select_opmode(adev);
|
||||
|
||||
log(L_ANY, "acx: Virtual interface removed: "
|
||||
"type=%d, MAC=%s\n",
|
||||
- conf->type, acx_print_mac(mac, conf->mac_addr));
|
||||
+ vif->type, acx_print_mac(mac, vif->addr));
|
||||
|
||||
acx_sem_unlock(adev);
|
||||
|
@ -1,105 +0,0 @@
|
||||
--- a/common.c
|
||||
+++ b/common.c
|
||||
@@ -1452,60 +1452,66 @@ void acx_free_modes(acx_device_t * adev)
|
||||
// adev->modes = NULL;
|
||||
}
|
||||
|
||||
-/*
|
||||
-#define RATETAB_ENT(_rate, _rateid, _flags) \
|
||||
- { \
|
||||
- .rate = (_rate), \
|
||||
- .val = (_rateid), \
|
||||
- .val2 = (_rateid), \
|
||||
- .flags = (_flags), \
|
||||
- }
|
||||
-*/
|
||||
-
|
||||
static struct ieee80211_rate acx_rates[] = {
|
||||
{ .bitrate = 10, .hw_value = 0, .flags = IEEE80211_RATE_SHORT_PREAMBLE },
|
||||
{ .bitrate = 20, .hw_value = 1, .flags = IEEE80211_RATE_SHORT_PREAMBLE },
|
||||
{ .bitrate = 55, .hw_value = 2, .flags = IEEE80211_RATE_SHORT_PREAMBLE },
|
||||
{ .bitrate = 110, .hw_value = 3, .flags = IEEE80211_RATE_SHORT_PREAMBLE },
|
||||
- { .bitrate = 60, .hw_value = 4, },
|
||||
- { .bitrate = 90, .hw_value = 5, },
|
||||
- { .bitrate = 120, .hw_value = 6, },
|
||||
- { .bitrate = 180, .hw_value = 7, },
|
||||
- { .bitrate = 240, .hw_value = 8, },
|
||||
- { .bitrate = 360, .hw_value = 9, },
|
||||
- { .bitrate = 480, .hw_value = 10, },
|
||||
- { .bitrate = 540, .hw_value = 11, },
|
||||
+ { .bitrate = 60, .hw_value = 4, .flags = 0 },
|
||||
+ { .bitrate = 90, .hw_value = 5, .flags = 0 },
|
||||
+ { .bitrate = 120, .hw_value = 6, .flags = 0 },
|
||||
+ { .bitrate = 180, .hw_value = 7, .flags = 0 },
|
||||
+ { .bitrate = 240, .hw_value = 8, .flags = 0 },
|
||||
+ { .bitrate = 360, .hw_value = 9, .flags = 0 },
|
||||
+ { .bitrate = 480, .hw_value = 10, .flags = 0 },
|
||||
+ { .bitrate = 540, .hw_value = 11, .flags = 0 },
|
||||
};
|
||||
|
||||
+#define CHAN4G(_channel, _freq, _flags) { \
|
||||
+ .band = IEEE80211_BAND_2GHZ, \
|
||||
+ .center_freq = (_freq), \
|
||||
+ .hw_value = (_channel), \
|
||||
+ .flags = (_flags), \
|
||||
+ .max_antenna_gain = 0, \
|
||||
+ .max_power = 30, \
|
||||
+}
|
||||
static struct ieee80211_channel channels[] = {
|
||||
- { .center_freq = 2412, .hw_value = 1, },
|
||||
- { .center_freq = 2417, .hw_value = 2, },
|
||||
- { .center_freq = 2422, .hw_value = 3, },
|
||||
- { .center_freq = 2427, .hw_value = 4, },
|
||||
- { .center_freq = 2432, .hw_value = 5, },
|
||||
- { .center_freq = 2437, .hw_value = 6, },
|
||||
- { .center_freq = 2442, .hw_value = 7, },
|
||||
- { .center_freq = 2447, .hw_value = 8, },
|
||||
- { .center_freq = 2452, .hw_value = 9, },
|
||||
- { .center_freq = 2457, .hw_value = 10, },
|
||||
- { .center_freq = 2462, .hw_value = 11, },
|
||||
- { .center_freq = 2467, .hw_value = 12, },
|
||||
- { .center_freq = 2472, .hw_value = 13, },
|
||||
- { .center_freq = 2484, .hw_value = 14, },
|
||||
+ CHAN4G(1, 2412, 0),
|
||||
+ CHAN4G(2, 2417, 0),
|
||||
+ CHAN4G(3, 2422, 0),
|
||||
+ CHAN4G(4, 2427, 0),
|
||||
+ CHAN4G(5, 2432, 0),
|
||||
+ CHAN4G(6, 2437, 0),
|
||||
+ CHAN4G(7, 2442, 0),
|
||||
+ CHAN4G(8, 2447, 0),
|
||||
+ CHAN4G(9, 2452, 0),
|
||||
+ CHAN4G(10, 2457, 0),
|
||||
+ CHAN4G(11, 2462, 0),
|
||||
+ CHAN4G(12, 2467, 0),
|
||||
+ CHAN4G(13, 2472, 0),
|
||||
+ CHAN4G(14, 2484, 0),
|
||||
};
|
||||
+#undef CHAN4G
|
||||
+
|
||||
+#define acx_b_ratetable (acx_rates + 0)
|
||||
+#define acx_b_ratetable_size 4
|
||||
+#define acx_g_ratetable (acx_rates + 0)
|
||||
+#define acx_g_ratetable_size 12
|
||||
|
||||
static struct ieee80211_supported_band g_band_2GHz = {
|
||||
+ .band = IEEE80211_BAND_2GHZ,
|
||||
.channels = channels,
|
||||
.n_channels = ARRAY_SIZE(channels),
|
||||
- .bitrates = acx_rates,
|
||||
- .n_bitrates = 12,
|
||||
+ .bitrates = acx_b_ratetable,
|
||||
+ .n_bitrates = acx_g_ratetable_size,
|
||||
};
|
||||
|
||||
static struct ieee80211_supported_band b_band_2GHz = {
|
||||
+ .band = IEEE80211_BAND_2GHZ,
|
||||
.channels = channels,
|
||||
.n_channels = ARRAY_SIZE(channels),
|
||||
- .bitrates = acx_rates,
|
||||
- .n_bitrates = 4,
|
||||
+ .bitrates = acx_g_ratetable,
|
||||
+ .n_bitrates = acx_b_ratetable_size,
|
||||
};
|
||||
|
||||
int acx_setup_modes(acx_device_t * adev)
|
@ -0,0 +1,77 @@
|
||||
Index: acx-mac80211-20100302/acx_func.h
|
||||
===================================================================
|
||||
--- acx-mac80211-20100302.orig/acx_func.h 2010-03-06 13:01:36.000000000 +0100
|
||||
+++ acx-mac80211-20100302/acx_func.h 2010-03-06 13:01:56.000000000 +0100
|
||||
@@ -714,7 +714,6 @@
|
||||
int acx_e_op_config(struct ieee80211_hw *hw, u32 changed);
|
||||
void acx_e_op_bss_info_changed(struct ieee80211_hw *hw,
|
||||
struct ieee80211_vif *vif, struct ieee80211_bss_conf *info, u32 changed);
|
||||
-int acx_e_op_get_tx_stats(struct ieee80211_hw* ieee, struct ieee80211_tx_queue_stats *stats);
|
||||
int acx_e_conf_tx(struct ieee80211_hw* ieee, u16 queue,
|
||||
const struct ieee80211_tx_queue_params *params);
|
||||
//int acx_passive_scan(struct net_device *net_dev, int state, struct ieee80211_scan_conf *conf);
|
||||
Index: acx-mac80211-20100302/common.c
|
||||
===================================================================
|
||||
--- acx-mac80211-20100302.orig/common.c 2010-03-06 13:01:38.000000000 +0100
|
||||
+++ acx-mac80211-20100302/common.c 2010-03-06 13:02:37.000000000 +0100
|
||||
@@ -4662,24 +4662,6 @@
|
||||
return;
|
||||
}
|
||||
|
||||
-int acx_e_op_get_tx_stats(struct ieee80211_hw *hw,
|
||||
- struct ieee80211_tx_queue_stats *stats)
|
||||
-{
|
||||
- acx_device_t *adev = ieee2adev(hw);
|
||||
- int err = -ENODEV;
|
||||
-
|
||||
- FN_ENTER;
|
||||
- acx_sem_lock(adev);
|
||||
-
|
||||
- stats->len = 0;
|
||||
- stats->limit = TX_CNT;
|
||||
- stats->count = 0;
|
||||
-
|
||||
- acx_sem_unlock(adev);
|
||||
- FN_EXIT0;
|
||||
- return err;
|
||||
-}
|
||||
-
|
||||
int acx_e_conf_tx(struct ieee80211_hw *hw,
|
||||
u16 queue, const struct ieee80211_tx_queue_params *params)
|
||||
{
|
||||
Index: acx-mac80211-20100302/mem.c
|
||||
===================================================================
|
||||
--- acx-mac80211-20100302.orig/mem.c 2010-03-06 13:01:46.000000000 +0100
|
||||
+++ acx-mac80211-20100302/mem.c 2010-03-06 13:02:28.000000000 +0100
|
||||
@@ -2321,7 +2321,6 @@
|
||||
.bss_info_changed = acx_e_op_bss_info_changed,
|
||||
.set_key = acx_e_op_set_key,
|
||||
.get_stats = acx_e_op_get_stats,
|
||||
- .get_tx_stats = acx_e_op_get_tx_stats,
|
||||
};
|
||||
|
||||
|
||||
Index: acx-mac80211-20100302/pci.c
|
||||
===================================================================
|
||||
--- acx-mac80211-20100302.orig/pci.c 2010-03-06 13:01:40.000000000 +0100
|
||||
+++ acx-mac80211-20100302/pci.c 2010-03-06 13:02:18.000000000 +0100
|
||||
@@ -1482,7 +1482,6 @@
|
||||
.bss_info_changed = acx_e_op_bss_info_changed,
|
||||
.set_key = acx_e_op_set_key,
|
||||
.get_stats = acx_e_op_get_stats,
|
||||
- .get_tx_stats = acx_e_op_get_tx_stats,
|
||||
};
|
||||
|
||||
|
||||
Index: acx-mac80211-20100302/usb.c
|
||||
===================================================================
|
||||
--- acx-mac80211-20100302.orig/usb.c 2010-03-06 13:01:44.000000000 +0100
|
||||
+++ acx-mac80211-20100302/usb.c 2010-03-06 13:02:22.000000000 +0100
|
||||
@@ -757,7 +757,6 @@
|
||||
.bss_info_changed = acx_e_op_bss_info_changed,
|
||||
.set_key = acx_e_op_set_key,
|
||||
.get_stats = acx_e_op_get_stats,
|
||||
- .get_tx_stats = acx_e_op_get_tx_stats,
|
||||
};
|
||||
|
||||
/***********************************************************************
|
13
package/acx-mac80211/patches/003-build_as_modules.patch
Normal file
13
package/acx-mac80211/patches/003-build_as_modules.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Index: acx-mac80211-20100302/Makefile
|
||||
===================================================================
|
||||
--- acx-mac80211-20100302.orig/Makefile 2010-03-06 22:13:23.000000000 +0100
|
||||
+++ acx-mac80211-20100302/Makefile 2010-03-06 22:13:28.000000000 +0100
|
||||
@@ -29,7 +29,7 @@
|
||||
acx-mac80211-obj-$(CONFIG_ACX_MAC80211_PCI) += pci.o
|
||||
acx-mac80211-obj-$(CONFIG_ACX_MAC80211_USB) += usb.o
|
||||
acx-mac80211-obj-$(CONFIG_ACX_MAC80211_MEM) += mem.o
|
||||
- acx-mac80211-objs := common.o $(acx-mac80211-obj-y)
|
||||
+ acx-mac80211-objs := common.o $(acx-mac80211-obj-m)
|
||||
|
||||
else
|
||||
# Otherwise we were called directly from the command line: the kernel build
|
@ -1,91 +0,0 @@
|
||||
--- a/acx_mac80211.h
|
||||
+++ b/acx_mac80211.h
|
||||
@@ -36,7 +36,7 @@ struct acx_interface {
|
||||
/* Current BSSID (if any). */
|
||||
u8 *bssid;
|
||||
|
||||
- /* Interface type. (IEEE80211_IF_TYPE_XXX) */
|
||||
+ /* Interface type. (NL80211_IFTYPE_XXX) */
|
||||
int type;
|
||||
/* Counter of active monitor interfaces. */
|
||||
int monitor;
|
||||
--- a/common.c
|
||||
+++ b/common.c
|
||||
@@ -4111,28 +4111,28 @@ static void acx_s_select_opmode(acx_devi
|
||||
|
||||
if (adev->interface.operating) {
|
||||
switch (adev->interface.type) {
|
||||
- case IEEE80211_IF_TYPE_AP:
|
||||
+ case NL80211_IFTYPE_AP:
|
||||
if (adev->mode != ACX_MODE_3_AP)
|
||||
{
|
||||
adev->mode = ACX_MODE_3_AP;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
- case IEEE80211_IF_TYPE_IBSS:
|
||||
+ case NL80211_IFTYPE_ADHOC:
|
||||
if (adev->mode != ACX_MODE_0_ADHOC)
|
||||
{
|
||||
adev->mode = ACX_MODE_0_ADHOC;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
- case IEEE80211_IF_TYPE_STA:
|
||||
+ case NL80211_IFTYPE_STATION:
|
||||
if (adev->mode != ACX_MODE_2_STA)
|
||||
{
|
||||
adev->mode = ACX_MODE_2_STA;
|
||||
changed = 1;
|
||||
}
|
||||
break;
|
||||
- case IEEE80211_IF_TYPE_WDS:
|
||||
+ case NL80211_IFTYPE_WDS:
|
||||
default:
|
||||
if (adev->mode != ACX_MODE_OFF)
|
||||
{
|
||||
@@ -4142,7 +4142,7 @@ static void acx_s_select_opmode(acx_devi
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
- if (adev->interface.type == IEEE80211_IF_TYPE_MNTR)
|
||||
+ if (adev->interface.type == NL80211_IFTYPE_MONITOR)
|
||||
{
|
||||
if (adev->mode != ACX_MODE_MONITOR)
|
||||
{
|
||||
@@ -4186,7 +4186,7 @@ int acx_add_interface(struct ieee80211_h
|
||||
FN_ENTER;
|
||||
acx_lock(adev, flags);
|
||||
|
||||
- if (conf->type == IEEE80211_IF_TYPE_MNTR) {
|
||||
+ if (conf->type == NL80211_IFTYPE_MONITOR) {
|
||||
adev->interface.monitor++;
|
||||
} else {
|
||||
if (adev->interface.operating)
|
||||
@@ -4232,7 +4232,7 @@ void acx_remove_interface(struct ieee802
|
||||
FN_ENTER;
|
||||
|
||||
acx_sem_lock(adev);
|
||||
- if (conf->type == IEEE80211_IF_TYPE_MNTR) {
|
||||
+ if (conf->type == NL80211_IFTYPE_MONITOR) {
|
||||
adev->interface.monitor--;
|
||||
// assert(bcm->interface.monitor >= 0);
|
||||
} else {
|
||||
@@ -4386,7 +4386,7 @@ extern int acx_config_interface(struct i
|
||||
|
||||
acx_lock(adev, flags);
|
||||
|
||||
- if ((vif->type != IEEE80211_IF_TYPE_MNTR)
|
||||
+ if ((vif->type != NL80211_IFTYPE_MONITOR)
|
||||
&& (adev->vif == vif)) {
|
||||
if (conf->bssid)
|
||||
{
|
||||
@@ -4394,7 +4394,7 @@ extern int acx_config_interface(struct i
|
||||
MAC_COPY(adev->bssid,conf->bssid);
|
||||
}
|
||||
}
|
||||
- if ((vif->type == IEEE80211_IF_TYPE_AP)
|
||||
+ if ((vif->type == NL80211_IFTYPE_AP)
|
||||
&& (adev->vif == vif)) {
|
||||
if ((conf->ssid_len > 0) && conf->ssid)
|
||||
{
|
@ -1,91 +0,0 @@
|
||||
--- a/acx_func.h
|
||||
+++ b/acx_func.h
|
||||
@@ -619,9 +619,10 @@ int acx_net_set_key(struct ieee80211_hw
|
||||
enum set_key_cmd cmd,
|
||||
const u8 *local_addr, const u8 *addr,
|
||||
struct ieee80211_key_conf *key);
|
||||
-extern int acx_config_interface(struct ieee80211_hw* ieee,
|
||||
+void acx_config_interface(struct ieee80211_hw* ieee,
|
||||
struct ieee80211_vif *vif,
|
||||
- struct ieee80211_if_conf *conf);
|
||||
+ struct ieee80211_bss_conf *info,
|
||||
+ u32 changes);
|
||||
int acx_net_config(struct ieee80211_hw* ieee, struct ieee80211_conf *conf);
|
||||
int acx_net_get_tx_stats(struct ieee80211_hw* ieee, struct ieee80211_tx_queue_stats *stats);
|
||||
int acx_net_conf_tx(struct ieee80211_hw* ieee, u16 queue,
|
||||
--- a/common.c
|
||||
+++ b/common.c
|
||||
@@ -4370,9 +4370,10 @@ int acx_net_config(struct ieee80211_hw *
|
||||
**
|
||||
*/
|
||||
|
||||
-extern int acx_config_interface(struct ieee80211_hw* ieee,
|
||||
+void acx_config_interface(struct ieee80211_hw* ieee,
|
||||
struct ieee80211_vif *vif,
|
||||
- struct ieee80211_if_conf *conf)
|
||||
+ struct ieee80211_bss_conf *info,
|
||||
+ u32 changes)
|
||||
{
|
||||
acx_device_t *adev = ieee2adev(ieee);
|
||||
unsigned long flags;
|
||||
@@ -4388,22 +4389,22 @@ extern int acx_config_interface(struct i
|
||||
|
||||
if ((vif->type != NL80211_IFTYPE_MONITOR)
|
||||
&& (adev->vif == vif)) {
|
||||
- if (conf->bssid)
|
||||
+ if (info->bssid)
|
||||
{
|
||||
- adev->interface.bssid = conf->bssid;
|
||||
- MAC_COPY(adev->bssid,conf->bssid);
|
||||
+ adev->interface.bssid = info->bssid;
|
||||
+ MAC_COPY(adev->bssid, info->bssid);
|
||||
}
|
||||
}
|
||||
if ((vif->type == NL80211_IFTYPE_AP)
|
||||
&& (adev->vif == vif)) {
|
||||
- if ((conf->ssid_len > 0) && conf->ssid)
|
||||
+ if (info->bssid)
|
||||
{
|
||||
- adev->essid_len = conf->ssid_len;
|
||||
- memcpy(adev->essid, conf->ssid, conf->ssid_len);
|
||||
+ adev->essid_len = ETH_ALEN;
|
||||
+ memcpy(adev->essid, info->bssid, ETH_ALEN);
|
||||
SET_BIT(adev->set_mask, SET_TEMPLATES);
|
||||
}
|
||||
}
|
||||
- if (conf->changed & IEEE80211_IFCC_BEACON)
|
||||
+ if (changes & BSS_CHANGED_BSSID)
|
||||
{
|
||||
adev->beacon_interval = DEFAULT_BEACON_INTERVAL;
|
||||
adev->beacon_cache = ieee80211_beacon_get(ieee, vif);
|
||||
@@ -4418,7 +4419,7 @@ extern int acx_config_interface(struct i
|
||||
err = 0;
|
||||
err_out:
|
||||
FN_EXIT1(err);
|
||||
- return err;
|
||||
+ return;
|
||||
}
|
||||
|
||||
/**
|
||||
--- a/pci.c
|
||||
+++ b/pci.c
|
||||
@@ -1469,7 +1469,7 @@ static const struct ieee80211_ops acxpci
|
||||
.configure_filter = acx_i_set_multicast_list,
|
||||
.stop = acxpci_e_close,
|
||||
.config = acx_net_config,
|
||||
- .config_interface = acx_config_interface,
|
||||
+ .bss_info_changed = acx_config_interface,
|
||||
.set_key = acx_net_set_key,
|
||||
.get_stats = acx_e_get_stats,
|
||||
.get_tx_stats = acx_net_get_tx_stats,
|
||||
--- a/usb.c
|
||||
+++ b/usb.c
|
||||
@@ -741,7 +741,7 @@ static const struct ieee80211_ops acxusb
|
||||
.configure_filter = acx_i_set_multicast_list,
|
||||
.stop = acxusb_e_close,
|
||||
.config = acx_net_config,
|
||||
- .config_interface = acx_config_interface,
|
||||
+ .bss_info_changed = acx_config_interface,
|
||||
.set_key = acx_net_set_key,
|
||||
.get_stats = acx_e_get_stats,
|
||||
.get_tx_stats = acx_net_get_tx_stats,
|
49
package/acx-mac80211/patches/004-vlynq_fixes.patch
Normal file
49
package/acx-mac80211/patches/004-vlynq_fixes.patch
Normal file
@ -0,0 +1,49 @@
|
||||
Index: acx-mac80211-20100302/pci.c
|
||||
===================================================================
|
||||
--- acx-mac80211-20100302.orig/pci.c 2010-03-06 22:22:02.000000000 +0100
|
||||
+++ acx-mac80211-20100302/pci.c 2010-03-06 22:22:29.000000000 +0100
|
||||
@@ -4309,7 +4309,7 @@
|
||||
addr = (u32)ioremap(vdev->mem_start, 0x1000);
|
||||
if (!addr) {
|
||||
printk(KERN_ERR "acx: %s: failed to remap io memory\n",
|
||||
- vdev->dev.bus_id);
|
||||
+ dev_name(&vdev->dev));
|
||||
result = -ENXIO;
|
||||
goto fail;
|
||||
}
|
||||
@@ -4323,7 +4323,7 @@
|
||||
ieee = ieee80211_alloc_hw(sizeof(struct acx_device), &acxpci_hw_ops);
|
||||
if (!ieee) {
|
||||
printk("acx: could not allocate ieee80211 structure %s\n",
|
||||
- vdev->dev.bus_id);
|
||||
+ dev_name(&vdev->dev));
|
||||
goto fail_alloc_netdev;
|
||||
}
|
||||
ieee->flags &= ~IEEE80211_HW_RX_INCLUDES_FCS;
|
||||
@@ -4365,7 +4365,7 @@
|
||||
|
||||
printk("acx: found %s-based wireless network card at %s, irq:%d, "
|
||||
"phymem:0x%x, mem:0x%p\n",
|
||||
- match->name, vdev->dev.bus_id, adev->irq,
|
||||
+ match->name, dev_name(&vdev->dev), adev->irq,
|
||||
vdev->mem_start, adev->iobase);
|
||||
log(L_ANY, "acx: the initial debug setting is 0x%04X\n", acx_debug);
|
||||
|
||||
@@ -4416,7 +4416,7 @@
|
||||
* firmware operations happening in parallel or uninitialized data */
|
||||
|
||||
|
||||
- acx_proc_register_entries(ieee);
|
||||
+ acx_proc_register_entries(ieee, 0);
|
||||
|
||||
/* Now we have our device, so make sure the kernel doesn't try
|
||||
* to send packets even though we're not associated to a network yet */
|
||||
@@ -4536,7 +4536,7 @@
|
||||
CLEAR_BIT(adev->dev_state_mask, ACX_STATE_IFACE_UP);
|
||||
}
|
||||
|
||||
- acx_proc_unregister_entries(adev->ieee);
|
||||
+ acx_proc_unregister_entries(adev->ieee, 0);
|
||||
|
||||
/* finally, clean up PCI bus state */
|
||||
acxpci_s_delete_dma_regions(adev);
|
13
package/acx-mac80211/patches/005-do_not_override_pci.patch
Normal file
13
package/acx-mac80211/patches/005-do_not_override_pci.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Index: acx-mac80211-20100302/pci.c
|
||||
===================================================================
|
||||
--- acx-mac80211-20100302.orig/pci.c 2010-03-07 12:39:38.000000000 +0100
|
||||
+++ acx-mac80211-20100302/pci.c 2010-03-07 12:40:02.000000000 +0100
|
||||
@@ -17,8 +17,6 @@
|
||||
*/
|
||||
#define ACX_MAC80211_PCI 1
|
||||
|
||||
-#define CONFIG_PCI 1
|
||||
-
|
||||
#include <linux/version.h>
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 33)
|
@ -1,70 +0,0 @@
|
||||
Index: acx-mac80211-20080805/acx_func.h
|
||||
===================================================================
|
||||
--- acx-mac80211-20080805.orig/acx_func.h 2009-05-26 20:58:10.000000000 +0200
|
||||
+++ acx-mac80211-20080805/acx_func.h 2009-05-26 20:58:11.000000000 +0200
|
||||
@@ -623,7 +623,7 @@
|
||||
struct ieee80211_vif *vif,
|
||||
struct ieee80211_bss_conf *info,
|
||||
u32 changes);
|
||||
-int acx_net_config(struct ieee80211_hw* ieee, struct ieee80211_conf *conf);
|
||||
+int acx_net_config(struct ieee80211_hw* ieee, u32 changed);
|
||||
int acx_net_get_tx_stats(struct ieee80211_hw* ieee, struct ieee80211_tx_queue_stats *stats);
|
||||
int acx_net_conf_tx(struct ieee80211_hw* ieee, u16 queue,
|
||||
const struct ieee80211_tx_queue_params *params);
|
||||
Index: acx-mac80211-20080805/common.c
|
||||
===================================================================
|
||||
--- acx-mac80211-20080805.orig/common.c 2009-05-26 20:58:10.000000000 +0200
|
||||
+++ acx-mac80211-20080805/common.c 2009-05-26 20:58:11.000000000 +0200
|
||||
@@ -4300,9 +4300,10 @@
|
||||
** Derived from mac80211 code, p54, bcm43xx_mac80211
|
||||
**
|
||||
*/
|
||||
-int acx_net_config(struct ieee80211_hw *hw, struct ieee80211_conf *conf)
|
||||
+int acx_net_config(struct ieee80211_hw *hw, u32 changed)
|
||||
{
|
||||
acx_device_t *adev = ieee2adev(hw);
|
||||
+ struct ieee80211_conf *conf = &hw->conf;
|
||||
unsigned long flags;
|
||||
|
||||
FN_ENTER;
|
||||
Index: acx-mac80211-20080805/pci.c
|
||||
===================================================================
|
||||
--- acx-mac80211-20080805.orig/pci.c 2009-05-26 20:58:10.000000000 +0200
|
||||
+++ acx-mac80211-20080805/pci.c 2009-05-30 20:44:29.000000000 +0200
|
||||
@@ -3105,7 +3105,7 @@
|
||||
|
||||
/* let chip do RTS/CTS handshaking before sending
|
||||
* in case packet size exceeds threshold */
|
||||
- if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS)
|
||||
+ if (info->flags & IEEE80211_TX_RC_USE_RTS_CTS)
|
||||
SET_BIT(Ctl2_8, DESC_CTL2_RTS);
|
||||
else
|
||||
CLEAR_BIT(Ctl2_8, DESC_CTL2_RTS);
|
||||
@@ -3120,7 +3120,7 @@
|
||||
/* put_txcr(adev, txdesc, clt, rate_cur); deprecated by mac80211 */
|
||||
|
||||
txdesc->total_length = cpu_to_le16(len);
|
||||
- wlhdr_len = ieee80211_get_hdrlen(le16_to_cpu(wireless_header->frame_control));
|
||||
+ wlhdr_len = ieee80211_hdrlen(le16_to_cpu(wireless_header->frame_control));
|
||||
hostdesc2->length = cpu_to_le16(len - wlhdr_len);
|
||||
/*
|
||||
if (!ieeectl->do_not_encrypt && ieeectl->key_idx>= 0)
|
||||
@@ -3444,8 +3444,8 @@
|
||||
/* And finally report upstream */
|
||||
if (hostdesc)
|
||||
{
|
||||
- info->status.excessive_retries = rts_failures;
|
||||
- info->status.retry_count = ack_failures;
|
||||
+ //info->status.excessive_retries = rts_failures;
|
||||
+ //info->status.retry_count = ack_failures;
|
||||
ieee80211_tx_status(adev->ieee, hostdesc->skb);
|
||||
}
|
||||
/* update pointer for descr to be cleaned next */
|
||||
@@ -4303,6 +4303,7 @@
|
||||
}
|
||||
|
||||
acx_init_task_scheduler(adev);
|
||||
+ adev->ieee->wiphy->interface_modes = BIT(NL80211_IFTYPE_STATION);
|
||||
result = ieee80211_register_hw(adev->ieee);
|
||||
if (OK != result) {
|
||||
printk("acx: ieee80211_register_hw() FAILED: %d\n", result);
|
@ -25,7 +25,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define KernelPackage/acx
|
||||
TITLE:=Driver for TI ACX1xx chipset
|
||||
DEPENDS:=@LINUX_2_6 @CONFIG_PCI||TARGET_ar7 +wireless-tools
|
||||
DEPENDS:=@LINUX_2_6 @TARGET_ar7 +wireless-tools
|
||||
URL:=http://acx100.sourceforge.net/
|
||||
SUBMENU:=Wireless Drivers
|
||||
FILES:= $(PKG_BUILD_DIR)/acx.$(LINUX_KMOD_SUFFIX)
|
||||
|
51
package/acx/patches/006-netdev_ops.patch
Normal file
51
package/acx/patches/006-netdev_ops.patch
Normal file
@ -0,0 +1,51 @@
|
||||
Index: acx-20080210/pci.c
|
||||
===================================================================
|
||||
--- acx-20080210.orig/pci.c 2010-03-06 13:43:06.000000000 +0100
|
||||
+++ acx-20080210/pci.c 2010-03-06 13:46:38.000000000 +0100
|
||||
@@ -4135,6 +4135,18 @@
|
||||
{ 0, 0, 0 },
|
||||
};
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,31)
|
||||
+static const struct net_device_ops acx_netdev_ops = {
|
||||
+ .ndo_open = &acxpci_e_open,
|
||||
+ .ndo_stop = &acxpci_e_close,
|
||||
+ .ndo_start_xmit = &acx_i_start_xmit,
|
||||
+ .ndo_get_stats = &acx_e_get_stats,
|
||||
+ .ndo_set_multicast_list = &acxpci_i_set_multicast_list,
|
||||
+ .ndo_tx_timeout = &acxpci_i_tx_timeout,
|
||||
+ .ndo_change_mtu = &acx_e_change_mtu,
|
||||
+};
|
||||
+#endif
|
||||
+
|
||||
static __devinit int vlynq_probe(struct vlynq_device *vdev,
|
||||
struct vlynq_device_id *id)
|
||||
{
|
||||
@@ -4191,17 +4203,24 @@
|
||||
goto fail_alloc_netdev;
|
||||
}
|
||||
ether_setup(ndev);
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
|
||||
ndev->open = &acxpci_e_open;
|
||||
ndev->stop = &acxpci_e_close;
|
||||
ndev->hard_start_xmit = &acx_i_start_xmit;
|
||||
ndev->get_stats = &acx_e_get_stats;
|
||||
+ ndev->set_multicast_list = &acxpci_i_set_multicast_list;
|
||||
+ ndev->tx_timeout = &acxpci_i_tx_timeout;
|
||||
+ ndev->change_mtu = &acx_e_change_mtu;
|
||||
+ ndev->set_multicast_list = &acxpci_i_set_multicast_list;
|
||||
+ ndev->tx_timeout = &acxpci_i_tx_timeout;
|
||||
+ ndev->change_mtu = &acx_e_change_mtu;
|
||||
+#else
|
||||
+ ndev->netdev_ops = &acx_netdev_ops;
|
||||
+#endif
|
||||
#if IW_HANDLER_VERSION <= 5
|
||||
ndev->get_wireless_stats = &acx_e_get_wireless_stats;
|
||||
#endif
|
||||
ndev->wireless_handlers = (struct iw_handler_def *)&acx_ioctl_handler_def;
|
||||
- ndev->set_multicast_list = &acxpci_i_set_multicast_list;
|
||||
- ndev->tx_timeout = &acxpci_i_tx_timeout;
|
||||
- ndev->change_mtu = &acx_e_change_mtu;
|
||||
ndev->watchdog_timeo = 4 * HZ;
|
||||
|
||||
adev = ndev2adev(ndev);
|
@ -6,6 +6,9 @@ choice
|
||||
This option allows you to switch between firmware/driver versions which
|
||||
might improve the DSL line speed.
|
||||
|
||||
config AR7_ATM_FW_VERSION_705
|
||||
bool "D7.05.01.00"
|
||||
|
||||
config AR7_ATM_FW_VERSION_704
|
||||
bool "D7.04.03.00"
|
||||
|
||||
|
@ -10,16 +10,25 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=sangam_atm
|
||||
|
||||
ifeq ($(CONFIG_AR7_ATM_FW_VERSION_705),y)
|
||||
PKG_VERSION:=D7.05.01.00
|
||||
PKG_MD5SUM:=42ee465be5cfbe9476fc25deb260d450
|
||||
PKG_RELEASE:=R1
|
||||
PATCH_DIR:=patches-$(PKG_VERSION)
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_AR7_ATM_FW_VERSION_704),y)
|
||||
PKG_VERSION:=D7.04.03.00
|
||||
PKG_MD5SUM:=3d76004e46f09e88931f91670cb420ad
|
||||
PKG_RELEASE:=R1
|
||||
PATCH_DIR:=patches-$(PKG_VERSION)
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_AR7_ATM_FW_VERSION_703),y)
|
||||
PKG_VERSION:=D7.03.01.00
|
||||
PKG_MD5SUM:=bc6e9c6adb1be25820c7ee661de8ca7d
|
||||
PKG_RELEASE:=R2
|
||||
PATCH_DIR:=patches-D7.04.03.00
|
||||
endif
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE).tar.bz2
|
||||
|
826
package/ar7-atm/patches-D7.05.01.00/100-compile_fix.patch
Normal file
826
package/ar7-atm/patches-D7.05.01.00/100-compile_fix.patch
Normal file
@ -0,0 +1,826 @@
|
||||
Index: sangam_atm-D7.05.01.00/cppi_cpaal5.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/cppi_cpaal5.c 2007-09-25 15:55:14.000000000 +0200
|
||||
+++ sangam_atm-D7.05.01.00/cppi_cpaal5.c 2010-03-07 19:03:28.000000000 +0100
|
||||
@@ -360,7 +360,7 @@
|
||||
{
|
||||
/* malloc failed, add this RCB to Needs Buffer List */
|
||||
TempRcb->FragCount = 1; /*MJH+030417*/
|
||||
- (HAL_RCB *)TempRcb->Eop = TempRcb; /* GSG +030430 */
|
||||
+ TempRcb->Eop = TempRcb; /* GSG +030430 */
|
||||
|
||||
if(HalDev->NeedsCount < MAX_NEEDS) /* +MJH 030410 */
|
||||
{ /* +MJH 030410 */
|
||||
Index: sangam_atm-D7.05.01.00/dsl_hal_api.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/dsl_hal_api.c 2007-09-27 10:35:44.000000000 +0200
|
||||
+++ sangam_atm-D7.05.01.00/dsl_hal_api.c 2010-03-07 19:03:28.000000000 +0100
|
||||
@@ -273,15 +273,15 @@
|
||||
* 09/15/07 CPH CQ11466 Added EFM support
|
||||
* 09/27/07 EYin CQ11929: Added NFEC/INP/Lp/Rp reporting for only ADSL2/2+ mode.
|
||||
******************************************************************************/
|
||||
-#include <dev_host_interface.h>
|
||||
-#include <dsl_hal_register.h>
|
||||
-#include <dsl_hal_support.h>
|
||||
+#include "dev_host_interface.h"
|
||||
+#include "dsl_hal_register.h"
|
||||
+#include "dsl_hal_support.h"
|
||||
|
||||
#ifndef NO_ADV_STATS
|
||||
-#include <dsl_hal_logtable.h>
|
||||
+#include "dsl_hal_logtable.h"
|
||||
#endif
|
||||
|
||||
-#include <dsl_hal_version.h>
|
||||
+#include "dsl_hal_version.h"
|
||||
|
||||
// UR8_MERGE_START CQ11054 Jack Zhang
|
||||
static unsigned int highprecision_selected = 0; //By default we use low precision for backward compt.
|
||||
Index: sangam_atm-D7.05.01.00/dsl_hal_support.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/dsl_hal_support.c 2007-09-25 11:19:50.000000000 +0200
|
||||
+++ sangam_atm-D7.05.01.00/dsl_hal_support.c 2010-03-07 19:03:28.000000000 +0100
|
||||
@@ -142,9 +142,9 @@
|
||||
* UR8_MERGE_START_END CQ11922 Tim
|
||||
* 04Sep07 0.14.00 Tim CQ11922: Added support for new scratchram for INP NDR tables
|
||||
*******************************************************************************/
|
||||
-#include <dev_host_interface.h>
|
||||
-#include <dsl_hal_register.h>
|
||||
-#include <dsl_hal_support.h>
|
||||
+#include "dev_host_interface.h"
|
||||
+#include "dsl_hal_register.h"
|
||||
+#include "dsl_hal_support.h"
|
||||
|
||||
#define NUM_READ_RETRIES 3
|
||||
static unsigned int dslhal_support_adsl2ByteSwap32(unsigned int in32Bits);
|
||||
Index: sangam_atm-D7.05.01.00/dsl_hal_support.h
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/dsl_hal_support.h 2005-11-11 09:07:04.000000000 +0100
|
||||
+++ sangam_atm-D7.05.01.00/dsl_hal_support.h 2010-03-07 19:03:28.000000000 +0100
|
||||
@@ -49,7 +49,7 @@
|
||||
* 04Nov05 0.11.00 CPH Fixed T1413 mode got Zero DS/US rate when DSL_BIT_TMODE is set.
|
||||
*******************************************************************************/
|
||||
|
||||
-#include <dsl_hal_api.h>
|
||||
+#include "dsl_hal_api.h"
|
||||
|
||||
#define virtual2Physical(a) (((int)a)&~0xe0000000)
|
||||
/* External Function Prototype Declarations */
|
||||
Index: sangam_atm-D7.05.01.00/Makefile
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/Makefile 2005-06-01 04:46:28.000000000 +0200
|
||||
+++ sangam_atm-D7.05.01.00/Makefile 2010-03-07 19:03:45.000000000 +0100
|
||||
@@ -1,18 +1,9 @@
|
||||
-# File: drivers/atm/ti_evm3/Makefile
|
||||
#
|
||||
-# Makefile for the Texas Instruments EVM3 ADSL/ATM driver.
|
||||
+# Makefile for the TIATM device driver.
|
||||
#
|
||||
-#
|
||||
-# Copyright (c) 2000 Texas Instruments Incorporated.
|
||||
-# Jeff Harrell (jharrell@telogy.com)
|
||||
-# Viren Balar (vbalar@ti.com)
|
||||
-# Victor Wells (vwells@telogy.com)
|
||||
-#
|
||||
-include $(TOPDIR)/Rules.make
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
-
|
||||
|
||||
+CONFIG_SANGAM_ATM=m
|
||||
+#EXTRA_CFLAGS += -DEL -I. -DPOST_SILICON -DCOMMON_NSP -DCONFIG_LED_MODULE -DDEREGISTER_LED -DNO_ACT
|
||||
+EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -DNO_ACT -D__NO__VOICE_PATCH__ -DEL
|
||||
+obj-$(CONFIG_SANGAM_ATM) := tiatm.o
|
||||
+tiatm-objs += cpsar.o aal5sar.o tn7sar.o tn7atm.o tn7dsl.o dsl_hal_api.o dsl_hal_support.o
|
||||
Index: sangam_atm-D7.05.01.00/tn7atm.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7atm.c 2008-08-28 17:15:22.000000000 +0200
|
||||
+++ sangam_atm-D7.05.01.00/tn7atm.c 2010-03-07 19:03:48.000000000 +0100
|
||||
@@ -66,7 +66,6 @@
|
||||
* 09/18/07 CPH CQ11466 Added EFM Support
|
||||
*********************************************************************************************/
|
||||
|
||||
-#include <linux/config.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
@@ -74,11 +73,14 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/smp_lock.h>
|
||||
-#include <asm/io.h>
|
||||
-#include <asm/mips-boards/prom.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/ctype.h>
|
||||
+
|
||||
+#include <asm/io.h>
|
||||
+#include <asm/ar7/ar7.h>
|
||||
+#include <asm/ar7/prom.h>
|
||||
+
|
||||
#include "dsl_hal_api.h"
|
||||
#ifdef AR7_EFM
|
||||
#include "tn7efm.h"
|
||||
@@ -90,6 +92,7 @@
|
||||
#include "dsl_hal_register.h"
|
||||
|
||||
#ifdef MODULE
|
||||
+MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION ("Tnetd73xx ATM Device Driver");
|
||||
MODULE_AUTHOR ("Zhicheng Tang");
|
||||
#endif
|
||||
@@ -108,9 +111,9 @@
|
||||
|
||||
/*end of externs */
|
||||
|
||||
-#ifndef TI_STATIC_ALLOCATIONS
|
||||
-#define TI_STATIC_ALLOCATIONS
|
||||
-#endif
|
||||
+//#ifndef TI_STATIC_ALLOCATIONS
|
||||
+//#define TI_STATIC_ALLOCATIONS
|
||||
+//#endif
|
||||
|
||||
#define tn7atm_kfree_skb(x) dev_kfree_skb(x)
|
||||
|
||||
@@ -135,7 +138,7 @@
|
||||
/* prototypes */
|
||||
static int tn7atm_set_can_support_adsl2 (int can);
|
||||
|
||||
-static int tn7atm_open (struct atm_vcc *vcc, short vpi, int vci);
|
||||
+static int tn7atm_open (struct atm_vcc *vcc);
|
||||
|
||||
void tn7atm_close (struct atm_vcc *vcc);
|
||||
|
||||
@@ -298,13 +301,12 @@
|
||||
getsockopt: NULL,
|
||||
setsockopt: NULL,
|
||||
send: tn7atm_send,
|
||||
- sg_send: NULL,
|
||||
phy_put: NULL,
|
||||
phy_get: NULL,
|
||||
change_qos: tn7atm_change_qos,
|
||||
};
|
||||
|
||||
-const char drv_proc_root_folder[] = "avalanche/";
|
||||
+const char drv_proc_root_folder[] = "avalanche";
|
||||
static struct proc_dir_entry *root_proc_dir_entry = NULL;
|
||||
#define DRV_PROC_MODE 0644
|
||||
static int proc_root_already_exists = TRUE;
|
||||
@@ -626,56 +628,6 @@
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
*
|
||||
- * Function: int tn7atm_walk_vccs(struct atm_dev *dev, short *vcc, int *vci)
|
||||
- *
|
||||
- * Description: retrieve VPI/VCI for connection
|
||||
- *
|
||||
- *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
-static int tn7atm_walk_vccs (struct atm_vcc *vcc, short *vpi, int *vci)
|
||||
-{
|
||||
- struct atm_vcc *walk;
|
||||
-
|
||||
- /*
|
||||
- * find a free VPI
|
||||
- */
|
||||
- if (*vpi == ATM_VPI_ANY)
|
||||
- {
|
||||
-
|
||||
- for (*vpi = 0, walk = vcc->dev->vccs; walk; walk = walk->next)
|
||||
- {
|
||||
-
|
||||
- if ((walk->vci == *vci) && (walk->vpi == *vpi))
|
||||
- {
|
||||
- (*vpi)++;
|
||||
- walk = vcc->dev->vccs;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- /*
|
||||
- * find a free VCI
|
||||
- */
|
||||
- if (*vci == ATM_VCI_ANY)
|
||||
- {
|
||||
-
|
||||
- for (*vci = ATM_NOT_RSV_VCI, walk = vcc->dev->vccs; walk;
|
||||
- walk = walk->next)
|
||||
- {
|
||||
-
|
||||
- if ((walk->vpi = *vpi) && (walk->vci == *vci))
|
||||
- {
|
||||
- *vci = walk->vci + 1;
|
||||
- walk = vcc->dev->vccs;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
-
|
||||
-/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
- *
|
||||
* Function: int tn7atm_sar_irq(void)
|
||||
*
|
||||
* Description: tnetd73xx SAR interrupt.
|
||||
@@ -766,7 +718,7 @@
|
||||
|
||||
priv->sar_irq = LNXINTNUM (ATM_SAR_INT); /* Interrupt line # */
|
||||
|
||||
- if (request_irq (priv->sar_irq, tn7atm_sar_irq, SA_INTERRUPT, "SAR ", dev))
|
||||
+ if (request_irq (priv->sar_irq, tn7atm_sar_irq, IRQF_DISABLED, "SAR ", dev))
|
||||
printk ("Could not register tn7atm_sar_irq\n");
|
||||
|
||||
/*
|
||||
@@ -777,8 +729,8 @@
|
||||
{
|
||||
def_sar_inter_pace = os_atoi (ptr);
|
||||
}
|
||||
- avalanche_request_pacing (priv->sar_irq, ATM_SAR_INT_PACING_BLOCK_NUM,
|
||||
- def_sar_inter_pace);
|
||||
+ /* avalanche_request_pacing (priv->sar_irq, ATM_SAR_INT_PACING_BLOCK_NUM,
|
||||
+ def_sar_inter_pace); */
|
||||
|
||||
|
||||
#ifdef AR7_EFM
|
||||
@@ -790,7 +742,7 @@
|
||||
* Reigster Receive interrupt A
|
||||
*/
|
||||
priv->dsl_irq = LNXINTNUM (ATM_DSL_INT); /* Interrupt line # */
|
||||
- if (request_irq (priv->dsl_irq, tn7atm_dsl_irq, SA_INTERRUPT, "DSL ", dev))
|
||||
+ if (request_irq (priv->dsl_irq, tn7atm_dsl_irq, IRQF_DISABLED, "DSL ", dev))
|
||||
printk ("Could not register tn7atm_dsl_irq\n");
|
||||
|
||||
/***** VRB Tasklet Mode ****/
|
||||
@@ -958,11 +910,15 @@
|
||||
#define ATM_VBR_RT 5
|
||||
#endif
|
||||
|
||||
-int tn7atm_open (struct atm_vcc *vcc, short vpi, int vci)
|
||||
+int tn7atm_open (struct atm_vcc *vcc)
|
||||
{
|
||||
tn7atm_activate_vc_parm_t tn7atm_activate_vc_parm;
|
||||
int rc;
|
||||
//int flags;
|
||||
+ tn7atm_activate_vc_parm.pcr = 0x20000;
|
||||
+ tn7atm_activate_vc_parm.scr = 0x20000;
|
||||
+ tn7atm_activate_vc_parm.mbs = 0x20000;
|
||||
+ tn7atm_activate_vc_parm.cdvt = 10000;
|
||||
|
||||
dgprintf(1, "tn7atm_open()\n");
|
||||
|
||||
@@ -974,24 +930,18 @@
|
||||
return -1;
|
||||
}
|
||||
|
||||
- MOD_INC_USE_COUNT;
|
||||
+// MOD_INC_USE_COUNT;
|
||||
|
||||
- /* find a free VPI/VCI */
|
||||
- tn7atm_walk_vccs(vcc, &vpi, &vci);
|
||||
-
|
||||
- vcc->vpi = vpi;
|
||||
- vcc->vci = vci;
|
||||
-
|
||||
- if ((vci == ATM_VCI_UNSPEC) || (vpi == ATM_VCI_UNSPEC))
|
||||
+ if ((vcc->vci == ATM_VCI_UNSPEC) || (vcc->vpi == ATM_VCI_UNSPEC))
|
||||
{
|
||||
- MOD_DEC_USE_COUNT;
|
||||
+// MOD_DEC_USE_COUNT;
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
- tn7atm_activate_vc_parm.vpi = vpi;
|
||||
- tn7atm_activate_vc_parm.vci = vci;
|
||||
+ tn7atm_activate_vc_parm.vpi = vcc->vpi;
|
||||
+ tn7atm_activate_vc_parm.vci = vcc->vci;
|
||||
|
||||
- if ((vpi == CLEAR_EOC_VPI) && (vci == CLEAR_EOC_VCI))
|
||||
+ if ((vcc->vpi == CLEAR_EOC_VPI) && (vcc->vci == CLEAR_EOC_VCI))
|
||||
{
|
||||
/* always use (max_dma_chan+1) for clear eoc */
|
||||
tn7atm_activate_vc_parm.chan = EOC_DMA_CHAN;
|
||||
@@ -999,7 +949,7 @@
|
||||
/* check to see whether clear eoc is opened or not */
|
||||
if (tn7atm_activate_vc_parm.priv->lut[tn7atm_activate_vc_parm.chan].inuse)
|
||||
{
|
||||
- MOD_DEC_USE_COUNT;
|
||||
+// MOD_DEC_USE_COUNT;
|
||||
printk("tn7atm_open: Clear EOC channel (dmachan=%d) already in use.\n", tn7atm_activate_vc_parm.chan);
|
||||
return -EBUSY;
|
||||
}
|
||||
@@ -1008,7 +958,7 @@
|
||||
if (rc)
|
||||
{
|
||||
printk("tn7atm_open: failed to setup clear_eoc\n");
|
||||
- MOD_DEC_USE_COUNT;
|
||||
+// MOD_DEC_USE_COUNT;
|
||||
return -EBUSY;
|
||||
}
|
||||
tn7atm_set_lut(tn7atm_activate_vc_parm.priv,vcc, tn7atm_activate_vc_parm.chan);
|
||||
@@ -1017,17 +967,17 @@
|
||||
}
|
||||
else /* PVC channel setup */
|
||||
{
|
||||
- if ((vpi==REMOTE_MGMT_VPI) && (vci==REMOTE_MGMT_VCI))
|
||||
+ if ((vcc->vpi==REMOTE_MGMT_VPI) && (vcc->vci==REMOTE_MGMT_VCI))
|
||||
{
|
||||
tn7atm_activate_vc_parm.chan = 14; /* always use chan 14 for MII PVC-base romote mgmt */
|
||||
}
|
||||
else
|
||||
{
|
||||
- rc = tn7atm_lut_find(vpi, vci);
|
||||
+ rc = tn7atm_lut_find(vcc->vpi, vcc->vci);
|
||||
/* check to see whether PVC is opened or not */
|
||||
if(ATM_NO_DMA_CHAN != rc)
|
||||
{
|
||||
- MOD_DEC_USE_COUNT;
|
||||
+// MOD_DEC_USE_COUNT;
|
||||
printk("PVC already opened. dmachan = %d\n", rc);
|
||||
return -EBUSY;
|
||||
}
|
||||
@@ -1059,6 +1009,7 @@
|
||||
tn7atm_activate_vc_parm.priority = 2;
|
||||
break;
|
||||
|
||||
+#if 0
|
||||
case ATM_VBR: /* Variable Bit Rate-Non RealTime*/
|
||||
tn7atm_activate_vc_parm.qos = 1;
|
||||
tn7atm_activate_vc_parm.priority = 1;
|
||||
@@ -1080,6 +1031,7 @@
|
||||
tn7atm_activate_vc_parm.mbs = vcc->qos.txtp.max_pcr;
|
||||
tn7atm_activate_vc_parm.cdvt = vcc->qos.txtp.max_cdv;
|
||||
break;
|
||||
+#endif
|
||||
|
||||
default:
|
||||
tn7atm_activate_vc_parm.qos = 2;
|
||||
@@ -1107,7 +1059,7 @@
|
||||
if (rc < 0)
|
||||
{
|
||||
printk("failed to activate hw channel\n");
|
||||
- MOD_DEC_USE_COUNT;
|
||||
+// MOD_DEC_USE_COUNT;
|
||||
tn7atm_lut_clear(vcc, tn7atm_activate_vc_parm.chan);
|
||||
//spin_unlock_irqrestore(&chan_init_lock, flags);
|
||||
return -EBUSY;
|
||||
@@ -1197,7 +1149,7 @@
|
||||
tn7atm_lut_clear (vcc, dmachan);
|
||||
//spin_unlock_irqrestore (&closeLock, closeFlag);
|
||||
|
||||
- MOD_DEC_USE_COUNT;
|
||||
+// MOD_DEC_USE_COUNT;
|
||||
|
||||
dgprintf (1, "Leave tn7atm_close\n");
|
||||
}
|
||||
@@ -1630,8 +1582,7 @@
|
||||
* firewall is on */
|
||||
|
||||
dgprintf (3, "pushing the skb...\n");
|
||||
-
|
||||
- skb->stamp = vcc->timestamp = xtime;
|
||||
+ __net_timestamp(skb);
|
||||
|
||||
xdump ((unsigned char *) skb->data, skb->len, 5);
|
||||
|
||||
@@ -1854,8 +1805,7 @@
|
||||
|
||||
kfree (dev->dev_data);
|
||||
|
||||
- // atm_dev_deregister (dev);
|
||||
- shutdown_atm_dev (dev);
|
||||
+ atm_dev_deregister (dev);
|
||||
|
||||
/*
|
||||
* remove proc entries
|
||||
@@ -2086,9 +2036,6 @@
|
||||
* Set up proc entry for atm stats
|
||||
*/
|
||||
|
||||
- if (tn7atm_xlate_proc_name
|
||||
- (drv_proc_root_folder, &root_proc_dir_entry, &residual))
|
||||
- {
|
||||
printk ("Creating new root folder %s in the proc for the driver stats \n",
|
||||
drv_proc_root_folder);
|
||||
root_proc_dir_entry = proc_mkdir (drv_proc_root_folder, NULL);
|
||||
@@ -2098,7 +2045,6 @@
|
||||
return -ENOMEM;
|
||||
}
|
||||
proc_root_already_exists = FALSE;
|
||||
- }
|
||||
|
||||
|
||||
/*
|
||||
@@ -2731,7 +2677,5 @@
|
||||
return count;
|
||||
}
|
||||
|
||||
-#ifdef MODULE
|
||||
module_init (tn7atm_detect);
|
||||
module_exit (tn7atm_exit);
|
||||
-#endif /* MODULE */
|
||||
Index: sangam_atm-D7.05.01.00/tn7atm.h
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7atm.h 2007-09-25 15:49:34.000000000 +0200
|
||||
+++ sangam_atm-D7.05.01.00/tn7atm.h 2010-03-07 19:03:28.000000000 +0100
|
||||
@@ -20,7 +20,8 @@
|
||||
//#include "mips_support.h"
|
||||
#include <linux/list.h>
|
||||
|
||||
-#include <linux/config.h>
|
||||
+#define MIPS_EXCEPTION_OFFSET 8
|
||||
+#define LNXINTNUM(x)((x) + MIPS_EXCEPTION_OFFSET)
|
||||
|
||||
#ifdef CONFIG_MODVERSIONS
|
||||
#include <linux/modversions.h>
|
||||
Index: sangam_atm-D7.05.01.00/tn7dsl.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7dsl.c 2009-07-08 13:02:06.000000000 +0200
|
||||
+++ sangam_atm-D7.05.01.00/tn7dsl.c 2010-03-07 19:04:27.000000000 +0100
|
||||
@@ -102,7 +102,6 @@
|
||||
* UR8_MERGE_END CQ11813
|
||||
* 09/18/07 CPH CQ11466: Added EFM support.
|
||||
*********************************************************************************************/
|
||||
-#include <linux/config.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
@@ -110,8 +109,6 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/smp_lock.h>
|
||||
-#include <asm/io.h>
|
||||
-#include <asm/mips-boards/prom.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/ctype.h>
|
||||
@@ -119,6 +116,12 @@
|
||||
#include <linux/timer.h>
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/file.h>
|
||||
+#include <linux/firmware.h>
|
||||
+
|
||||
+#include <asm/io.h>
|
||||
+#include <asm/ar7/ar7.h>
|
||||
+#include <asm/ar7/prom.h>
|
||||
+
|
||||
/* Modules specific header files */
|
||||
#ifdef AR7_EFM
|
||||
#include "tn7efm.h"
|
||||
@@ -185,7 +188,7 @@
|
||||
static struct led_funcs ledreg[2];
|
||||
#endif
|
||||
|
||||
-#define DEV_DSLMOD 1
|
||||
+#define DEV_DSLMOD CTL_UNNUMBERED
|
||||
#define MAX_STR_SIZE 256
|
||||
#define DSL_MOD_SIZE 256
|
||||
|
||||
@@ -316,7 +319,7 @@
|
||||
static volatile int bshutdown;
|
||||
static char info[MAX_STR_SIZE];
|
||||
/* Used for DSL Polling enable */
|
||||
-static DECLARE_MUTEX_LOCKED (adsl_sem_overlay);
|
||||
+static struct semaphore adsl_sem_overlay;
|
||||
|
||||
//kthread_t overlay_thread;
|
||||
/* end of module wide declars */
|
||||
@@ -369,6 +372,14 @@
|
||||
return val;
|
||||
}
|
||||
|
||||
+int avalanche_request_intr_pacing(int irq_nr, unsigned int blk_num,
|
||||
+ unsigned int pace_value)
|
||||
+{
|
||||
+ printk("avalanche_request_pacing(%d, %u, %u); // not implemented\n", irq_nr, blk_num, pace_value);
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
int os_atoi(const char *pStr)
|
||||
{
|
||||
int MulNeg = (*pStr == '-' ? -1 : 1);
|
||||
@@ -405,39 +416,6 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
-int strcmp(const char *s1, const char *s2)
|
||||
-{
|
||||
-
|
||||
- int size = strlen(s1);
|
||||
-
|
||||
- return(strncmp(s1, s2, size));
|
||||
-}
|
||||
-
|
||||
-int strncmp(const char *s1, const char *s2, size_t size)
|
||||
-{
|
||||
- int i = 0;
|
||||
- int max_size = (int)size;
|
||||
-
|
||||
- while((s1[i] != 0) && i < max_size)
|
||||
- {
|
||||
- if(s2[i] == 0)
|
||||
- {
|
||||
- return -1;
|
||||
- }
|
||||
- if(s1[i] != s2[i])
|
||||
- {
|
||||
- return 1;
|
||||
- }
|
||||
- i++;
|
||||
- }
|
||||
- if(s2[i] != 0)
|
||||
- {
|
||||
- return 1;
|
||||
- }
|
||||
-
|
||||
- return 0;
|
||||
-}
|
||||
-
|
||||
// * UR8_MERGE_START CQ10640 Jack Zhang
|
||||
int tn7dsl_dump_dsp_memory(char *input_str) //cph99
|
||||
{
|
||||
@@ -487,144 +465,78 @@
|
||||
return CpuFrequency;
|
||||
}
|
||||
|
||||
-int shim_osLoadFWImage(unsigned char *ptr)
|
||||
+static void avsar_release(struct device *dev)
|
||||
{
|
||||
- unsigned int bytesRead;
|
||||
- mm_segment_t oldfs;
|
||||
- static struct file *filp;
|
||||
- unsigned int imageLength=0x5ffff;
|
||||
-
|
||||
-#ifdef AR7_EFM
|
||||
- int dp_alt=0;
|
||||
- char *ptr1=NULL;
|
||||
-#ifdef EFM_DEBUG
|
||||
- char *ptr2=NULL;
|
||||
- char *ptr3=NULL;
|
||||
-#endif
|
||||
-
|
||||
- if ((ptr1 = prom_getenv("DSL_DP_ALT")) != NULL)
|
||||
- {
|
||||
- dp_alt=os_atoi(ptr1);
|
||||
- if (dp_alt==1)
|
||||
- {
|
||||
- filp = filp_open(DSP_DEBUG_FIRMWARE_PATH,00,O_RDONLY);
|
||||
- if (!IS_ERR(filp))
|
||||
- {
|
||||
- strcpy (DSP_FIRMWARE_PATH, DSP_DEBUG_FIRMWARE_PATH);
|
||||
- }
|
||||
- }
|
||||
-#ifdef EFM_DEBUG
|
||||
- else if (dp_alt==2)
|
||||
- {
|
||||
- if ((ptr2 = prom_getenv("DSL_DP")) != NULL)
|
||||
- {
|
||||
- if (!strncmp(ptr2, "DSL_DP", 6))
|
||||
- { // indirect naming
|
||||
- if ((ptr3 = prom_getenv(ptr2)) != NULL)
|
||||
- filp = filp_open(ptr3,00,O_RDONLY);
|
||||
- ptr2 = ptr3; // redirect ptr2 to ptr3
|
||||
- }
|
||||
-
|
||||
- filp = filp_open(ptr2,00,O_RDONLY);
|
||||
- if (!IS_ERR(filp))
|
||||
- {
|
||||
- strcpy (DSP_FIRMWARE_PATH, ptr2);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
- printk("dp_path=%s\n", DSP_FIRMWARE_PATH);
|
||||
-#endif
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
- dgprintf(4, "tn7dsl_read_dsp()\n");
|
||||
-
|
||||
- dgprintf(4,"open file %s\n", DSP_FIRMWARE_PATH);
|
||||
-
|
||||
- filp=filp_open(DSP_FIRMWARE_PATH,00,O_RDONLY);
|
||||
- if(IS_ERR(filp))
|
||||
- {
|
||||
- printk("Failed: Could not open DSP binary file\n");
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
- if (filp->f_dentry != NULL)
|
||||
- {
|
||||
- if (filp->f_dentry->d_inode != NULL)
|
||||
- {
|
||||
- printk ("DSP binary filesize = %d bytes\n",
|
||||
- (int) filp->f_dentry->d_inode->i_size);
|
||||
- imageLength = (unsigned int)filp->f_dentry->d_inode->i_size + 0x200;
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- if (filp->f_op->read==NULL)
|
||||
- return -1; /* File(system) doesn't allow reads */
|
||||
-
|
||||
- /*
|
||||
- * Disable parameter checking
|
||||
- */
|
||||
- oldfs = get_fs();
|
||||
- set_fs(KERNEL_DS);
|
||||
-
|
||||
- /*
|
||||
- * Now read bytes from postion "StartPos"
|
||||
- */
|
||||
- filp->f_pos = 0;
|
||||
-
|
||||
- bytesRead = filp->f_op->read(filp,ptr,imageLength,&filp->f_pos);
|
||||
-
|
||||
- dgprintf(4,"file length = %d\n", bytesRead);
|
||||
-
|
||||
- set_fs(oldfs);
|
||||
-
|
||||
- /*
|
||||
- * Close the file
|
||||
- */
|
||||
- fput(filp);
|
||||
-
|
||||
- return bytesRead;
|
||||
+ printk(KERN_DEBUG "avsar firmware released\n");
|
||||
}
|
||||
|
||||
+static struct device avsar = {
|
||||
+ .bus_id = "vlynq",
|
||||
+ .release = avsar_release,
|
||||
+};
|
||||
|
||||
-unsigned int shim_read_overlay_page (void *ptr, unsigned int secOffset,
|
||||
- unsigned int secLength)
|
||||
+int shim_osLoadFWImage(unsigned char *ptr)
|
||||
{
|
||||
- unsigned int bytesRead;
|
||||
- mm_segment_t oldfs;
|
||||
- struct file *filp;
|
||||
-
|
||||
- dgprintf(4,"shim_read_overlay_page\n");
|
||||
- //dgprintf(4,"sec offset=%d, sec length =%d\n", secOffset, secLength);
|
||||
+ const struct firmware *fw_entry;
|
||||
+ size_t size;
|
||||
|
||||
- filp=filp_open(DSP_FIRMWARE_PATH,00,O_RDONLY);
|
||||
- if(filp ==NULL)
|
||||
- {
|
||||
- printk("Failed: Could not open DSP binary file\n");
|
||||
- return -1;
|
||||
- }
|
||||
-
|
||||
- if (filp->f_op->read==NULL)
|
||||
- return -1; /* File(system) doesn't allow reads */
|
||||
-
|
||||
- /*
|
||||
- * Now read bytes from postion "StartPos"
|
||||
- */
|
||||
+ printk("requesting firmware image \"ar0700xx.bin\"\n");
|
||||
+ if(device_register(&avsar) < 0) {
|
||||
+ printk(KERN_ERR
|
||||
+ "avsar: device_register fails\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (request_firmware(&fw_entry, "ar0700xx.bin", &avsar)) {
|
||||
+ printk(KERN_ERR
|
||||
+ "avsar: Firmware not available\n");
|
||||
+ device_unregister(&avsar);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ size = fw_entry->size;
|
||||
+ device_unregister(&avsar);
|
||||
+ if (size > 0x6ffff) {
|
||||
+ printk(KERN_ERR
|
||||
+ "avsar: Firmware too big (%d bytes)\n", size);
|
||||
+ release_firmware(fw_entry);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ memcpy(ptr, fw_entry->data, size);
|
||||
+ release_firmware(fw_entry);
|
||||
+ return size;
|
||||
+}
|
||||
+
|
||||
+unsigned int shim_read_overlay_page(void *ptr, unsigned int secOffset, unsigned int secLength)
|
||||
+{
|
||||
+ const struct firmware *fw_entry;
|
||||
+
|
||||
+ printk("requesting firmware image \"ar0700xx.bin\"\n");
|
||||
+ if (device_register(&avsar) < 0) {
|
||||
+ printk(KERN_ERR
|
||||
+ "avsar: device_register fails\n");
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ if (request_firmware(&fw_entry, "ar0700xx.bin", &avsar)) {
|
||||
+ printk(KERN_ERR
|
||||
+ "avsar: Firmware not available\n");
|
||||
+ device_unregister(&avsar);
|
||||
+ return -1;
|
||||
+ }
|
||||
+
|
||||
+ device_unregister(&avsar);
|
||||
+ if (fw_entry->size > secLength) {
|
||||
+ printk(KERN_ERR
|
||||
+ "avsar: Firmware too big (%d bytes)\n", fw_entry->size);
|
||||
+ release_firmware(fw_entry);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ memcpy(ptr + secOffset, fw_entry->data, secLength);
|
||||
+ release_firmware(fw_entry);
|
||||
+ return secLength;
|
||||
+}
|
||||
|
||||
- if(filp->f_op->llseek)
|
||||
- filp->f_op->llseek(filp,secOffset, 0);
|
||||
- oldfs = get_fs();
|
||||
- set_fs(KERNEL_DS);
|
||||
- filp->f_pos = secOffset;
|
||||
- bytesRead = filp->f_op->read(filp,ptr,secLength,&filp->f_pos);
|
||||
|
||||
- set_fs(oldfs);
|
||||
- /*
|
||||
- * Close the file
|
||||
- */
|
||||
- fput(filp);
|
||||
- return bytesRead;
|
||||
-}
|
||||
|
||||
int shim_osLoadDebugFWImage(unsigned char *ptr)
|
||||
{
|
||||
@@ -3287,6 +3199,7 @@
|
||||
int high_precision_selected = 0;
|
||||
// UR8_MERGE_END CQ11054*
|
||||
|
||||
+ sema_init(&adsl_sem_overlay, 0);
|
||||
/*
|
||||
* start dsl
|
||||
*/
|
||||
@@ -3665,7 +3578,7 @@
|
||||
*/
|
||||
if(write)
|
||||
{
|
||||
- ret = proc_dostring(ctl, write, filp, buffer, lenp);
|
||||
+ ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
|
||||
|
||||
switch (ctl->ctl_name)
|
||||
{
|
||||
@@ -3751,14 +3664,14 @@
|
||||
else
|
||||
{
|
||||
len += sprintf(info+len, mod_req);
|
||||
- ret = proc_dostring(ctl, write, filp, buffer, lenp);
|
||||
+ ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
ctl_table dslmod_table[] = {
|
||||
- {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, &dslmod_sysctl}
|
||||
+ {DEV_DSLMOD, "dslmod", info, DSL_MOD_SIZE, 0644, NULL, NULL, &dslmod_sysctl, &sysctl_string}
|
||||
,
|
||||
{0}
|
||||
};
|
||||
@@ -3781,8 +3694,7 @@
|
||||
if (initialized == 1)
|
||||
return;
|
||||
|
||||
- dslmod_sysctl_header = register_sysctl_table(dslmod_root_table, 1);
|
||||
- dslmod_root_table->child->de->owner = THIS_MODULE;
|
||||
+ dslmod_sysctl_header = register_sysctl_table(dslmod_root_table);
|
||||
|
||||
/*
|
||||
* set the defaults
|
||||
Index: sangam_atm-D7.05.01.00/tn7sar.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7sar.c 2007-09-25 15:49:22.000000000 +0200
|
||||
+++ sangam_atm-D7.05.01.00/tn7sar.c 2010-03-07 19:03:44.000000000 +0100
|
||||
@@ -43,7 +43,6 @@
|
||||
* 09/18/07 CPH CQ11466: Added EFM support.
|
||||
*******************************************************************************/
|
||||
|
||||
-#include <linux/config.h>
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/init.h>
|
||||
@@ -51,12 +50,13 @@
|
||||
#include <linux/delay.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/smp_lock.h>
|
||||
-#include <asm/io.h>
|
||||
-#include <asm/mips-boards/prom.h>
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/ctype.h>
|
||||
|
||||
+#include <asm/io.h>
|
||||
+#include <asm/ar7/ar7.h>
|
||||
+#include <asm/ar7/prom.h>
|
||||
|
||||
#define _CPHAL_AAL5
|
||||
#define _CPHAL_SAR
|
39
package/ar7-atm/patches-D7.05.01.00/110-interrupt_fix.patch
Normal file
39
package/ar7-atm/patches-D7.05.01.00/110-interrupt_fix.patch
Normal file
@ -0,0 +1,39 @@
|
||||
Index: sangam_atm-D7.05.01.00/tn7atm.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7atm.c 2010-03-07 18:09:13.000000000 +0100
|
||||
+++ sangam_atm-D7.05.01.00/tn7atm.c 2010-03-07 18:09:21.000000000 +0100
|
||||
@@ -633,7 +633,7 @@
|
||||
* Description: tnetd73xx SAR interrupt.
|
||||
*
|
||||
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
-static void tn7atm_sar_irq (int irq, void *voiddev, struct pt_regs *regs)
|
||||
+static irqreturn_t tn7atm_sar_irq (int irq, void *voiddev)
|
||||
{
|
||||
struct atm_dev *atmdev;
|
||||
Tn7AtmPrivate *priv;
|
||||
@@ -660,6 +660,7 @@
|
||||
#ifdef TIATM_INST_SUPP
|
||||
psp_trace_par (ATM_DRV_SAR_ISR_EXIT, retval);
|
||||
#endif
|
||||
+ return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
@@ -669,7 +670,7 @@
|
||||
* Description: tnetd73xx DSL interrupt.
|
||||
*
|
||||
*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
|
||||
-static void tn7atm_dsl_irq (int irq, void *voiddev, struct pt_regs *regs)
|
||||
+static irqreturn_t tn7atm_dsl_irq (int irq, void *voiddev)
|
||||
{
|
||||
struct atm_dev *atmdev;
|
||||
Tn7AtmPrivate *priv;
|
||||
@@ -691,6 +692,8 @@
|
||||
#ifdef TIATM_INST_SUPP
|
||||
psp_trace_par (ATM_DRV_DSL_ISR_EXIT, retval);
|
||||
#endif
|
||||
+
|
||||
+ return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
13
package/ar7-atm/patches-D7.05.01.00/120-no_dumb_inline.patch
Normal file
13
package/ar7-atm/patches-D7.05.01.00/120-no_dumb_inline.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Index: sangam_atm-D7.05.01.00/tn7api.h
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7api.h 2007-09-25 15:49:10.000000000 +0200
|
||||
+++ sangam_atm-D7.05.01.00/tn7api.h 2010-03-07 18:09:52.000000000 +0100
|
||||
@@ -118,7 +118,7 @@
|
||||
int tn7dsl_proc_dbgmsg_read(char* buf, char **start, off_t offset, int count,int *eof, void *data);
|
||||
#endif
|
||||
//UR8_MERGE_END CQ11813
|
||||
-inline int tn7dsl_handle_interrupt(void);
|
||||
+int tn7dsl_handle_interrupt(void);
|
||||
|
||||
void tn7dsl_dslmod_sysctl_register(void);
|
||||
void tn7dsl_dslmod_sysctl_unregister(void);
|
50
package/ar7-atm/patches-D7.05.01.00/130-powercutback.patch
Normal file
50
package/ar7-atm/patches-D7.05.01.00/130-powercutback.patch
Normal file
@ -0,0 +1,50 @@
|
||||
Index: sangam_atm-D7.05.01.00/dsl_hal_advcfg.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/dsl_hal_advcfg.c 2005-08-09 08:20:46.000000000 +0200
|
||||
+++ sangam_atm-D7.05.01.00/dsl_hal_advcfg.c 2010-03-07 18:09:59.000000000 +0100
|
||||
@@ -36,9 +36,9 @@
|
||||
* 05Jul05 0.00.09 CPH CQ9775: Change dslhal_advcfg_configDsTones input parameters & support for ADSL2+
|
||||
* 24Jul05 0.00.10 CPH Fixed comments in dslhal_advcfg_configDsTones function header
|
||||
*******************************************************************************/
|
||||
-#include <dev_host_interface.h>
|
||||
-#include <dsl_hal_register.h>
|
||||
-#include <dsl_hal_support.h>
|
||||
+#include "dev_host_interface.h"
|
||||
+#include "dsl_hal_register.h"
|
||||
+#include "dsl_hal_support.h"
|
||||
|
||||
/*****************************************************************************/
|
||||
/* ACT API functions -- To be moved into their own independent module --RamP */
|
||||
Index: sangam_atm-D7.05.01.00/Makefile
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/Makefile 2010-03-07 18:01:20.000000000 +0100
|
||||
+++ sangam_atm-D7.05.01.00/Makefile 2010-03-07 18:09:59.000000000 +0100
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
CONFIG_SANGAM_ATM=m
|
||||
#EXTRA_CFLAGS += -DEL -I. -DPOST_SILICON -DCOMMON_NSP -DCONFIG_LED_MODULE -DDEREGISTER_LED -DNO_ACT
|
||||
-EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -DNO_ACT -D__NO__VOICE_PATCH__ -DEL
|
||||
+#EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -DNO_ACT -D__NO__VOICE_PATCH__ -DEL
|
||||
+EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -D__NO__VOICE_PATCH__ -DEL
|
||||
obj-$(CONFIG_SANGAM_ATM) := tiatm.o
|
||||
-tiatm-objs += cpsar.o aal5sar.o tn7sar.o tn7atm.o tn7dsl.o dsl_hal_api.o dsl_hal_support.o
|
||||
+tiatm-objs += cpsar.o aal5sar.o tn7sar.o tn7atm.o tn7dsl.o dsl_hal_api.o dsl_hal_support.o dsl_hal_advcfg.o
|
||||
Index: sangam_atm-D7.05.01.00/tn7dsl.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7dsl.c 2010-03-07 18:07:28.000000000 +0100
|
||||
+++ sangam_atm-D7.05.01.00/tn7dsl.c 2010-03-07 18:09:59.000000000 +0100
|
||||
@@ -3053,6 +3053,14 @@
|
||||
dslhal_api_setRateAdaptFlag(pIhw, os_atoi(ptr));
|
||||
}
|
||||
|
||||
+ // set powercutback
|
||||
+ ptr = NULL;
|
||||
+ ptr = prom_getenv("powercutback");
|
||||
+ if(ptr)
|
||||
+ {
|
||||
+ dslhal_advcfg_onOffPcb(pIhw, os_atoi(ptr));
|
||||
+ }
|
||||
+
|
||||
// trellis
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("trellis");
|
18
package/ar7-atm/patches-D7.05.01.00/140-debug_mode.patch
Normal file
18
package/ar7-atm/patches-D7.05.01.00/140-debug_mode.patch
Normal file
@ -0,0 +1,18 @@
|
||||
Index: sangam_atm-D7.05.01.00/tn7sar.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7sar.c 2010-03-07 18:01:20.000000000 +0100
|
||||
+++ sangam_atm-D7.05.01.00/tn7sar.c 2010-03-07 18:10:03.000000000 +0100
|
||||
@@ -125,10 +125,10 @@
|
||||
//09/05/07: cph, move to tn7atm.h
|
||||
// #define RESERVED_OAM_CHANNEL 15
|
||||
|
||||
-#define AAL5_PARM "id=aal5, base = 0x03000000, offset = 0, int_line=15, ch0=[RxBufSize=1522; RxNumBuffers = 32; RxServiceMax = 50; TxServiceMax=50; TxNumBuffers=32; CpcsUU=0x5aa5; TxVc_CellRate=0x3000; TxVc_AtmHeader=0x00000640]"
|
||||
-#define SAR_PARM "id=sar,base = 0x03000000, reset_bit = 9, offset = 0; UniNni = 0, PdspEnable = 1"
|
||||
+#define CH0_PARM "RxBufSize=1522, RxNumBuffers=32, RxServiceMax=50, TxServiceMax=50, TxNumBuffers=32, CpcsUU=0x5aa5, TxVc_CellRate=0x3000, TxVc_AtmHeader=0x00000640"
|
||||
+#define AAL5_PARM "id=aal5, base=0x03000000, offset=0, int_line=15, ch0=[" CH0_PARM "]"
|
||||
+#define SAR_PARM "id=sar, base=0x03000000, reset_bit=9, offset=0; UniNni=0, PdspEnable=1, Debug=0xFFFFFFFF"
|
||||
#define RESET_PARM "id=ResetControl, base=0xA8611600"
|
||||
-#define CH0_PARM "RxBufSize=1522, RxNumBuffers = 32, RxServiceMax = 50, TxServiceMax=50, TxNumBuffers=32, CpcsUU=0x5aa5, TxVc_CellRate=0x3000, TxVc_AtmHeader=0x00000640"
|
||||
|
||||
#define MAX_PVC_TABLE_ENTRY 16
|
||||
|
13
package/ar7-atm/patches-D7.05.01.00/150-tasklet_mode.patch
Normal file
13
package/ar7-atm/patches-D7.05.01.00/150-tasklet_mode.patch
Normal file
@ -0,0 +1,13 @@
|
||||
Index: sangam_atm-D7.05.01.00/Makefile
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/Makefile 2010-03-07 18:09:59.000000000 +0100
|
||||
+++ sangam_atm-D7.05.01.00/Makefile 2010-03-07 18:10:06.000000000 +0100
|
||||
@@ -5,6 +5,7 @@
|
||||
CONFIG_SANGAM_ATM=m
|
||||
#EXTRA_CFLAGS += -DEL -I. -DPOST_SILICON -DCOMMON_NSP -DCONFIG_LED_MODULE -DDEREGISTER_LED -DNO_ACT
|
||||
#EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -DNO_ACT -D__NO__VOICE_PATCH__ -DEL
|
||||
-EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -D__NO__VOICE_PATCH__ -DEL
|
||||
+#EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -D__NO__VOICE_PATCH__ -DEL
|
||||
+EXTRA_CFLAGS += -DEL -I$(PWD) -DPOST_SILICON -DCOMMON_NSP -D__NO__VOICE_PATCH__ -DEL -DCPATM_TASKLET_MODE
|
||||
obj-$(CONFIG_SANGAM_ATM) := tiatm.o
|
||||
tiatm-objs += cpsar.o aal5sar.o tn7sar.o tn7atm.o tn7dsl.o dsl_hal_api.o dsl_hal_support.o dsl_hal_advcfg.o
|
669
package/ar7-atm/patches-D7.05.01.00/160-module-params.patch
Normal file
669
package/ar7-atm/patches-D7.05.01.00/160-module-params.patch
Normal file
@ -0,0 +1,669 @@
|
||||
Index: sangam_atm-D7.05.01.00/tn7atm.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7atm.c 2010-03-07 18:27:11.000000000 +0100
|
||||
+++ sangam_atm-D7.05.01.00/tn7atm.c 2010-03-07 18:27:34.000000000 +0100
|
||||
@@ -95,6 +95,146 @@
|
||||
MODULE_LICENSE("GPL");
|
||||
MODULE_DESCRIPTION ("Tnetd73xx ATM Device Driver");
|
||||
MODULE_AUTHOR ("Zhicheng Tang");
|
||||
+
|
||||
+int mp_sar_ipacemax = -1;
|
||||
+module_param_named(ipacemax, mp_sar_ipacemax, int, 0);
|
||||
+MODULE_PARM_DESC(ipacemax, "Interrupt pacing");
|
||||
+
|
||||
+char *mp_macc = NULL;
|
||||
+module_param_named(macc, mp_macc, charp, 0);
|
||||
+MODULE_PARM_DESC(macc, "MAC address");
|
||||
+
|
||||
+int mp_dsp_noboost = -1;
|
||||
+module_param_named(dsp_noboost, mp_dsp_noboost, int, 0);
|
||||
+MODULE_PARM_DESC(dsp_noboost, "Suppress DSP frequency boost");
|
||||
+
|
||||
+int mp_dsp_freq = -1;
|
||||
+module_param_named(dsp_freq, mp_dsp_freq, int, 0);
|
||||
+MODULE_PARM_DESC(dsp_freq, "Frequency to boost the DSP to");
|
||||
+
|
||||
+char *mp_featctl0 = NULL;
|
||||
+module_param_named(featctl0, mp_featctl0, charp, 0);
|
||||
+MODULE_PARM_DESC(featctl0, "DSL feature control 0");
|
||||
+
|
||||
+char *mp_featctl1 = NULL;
|
||||
+module_param_named(featctl1, mp_featctl1, charp, 0);
|
||||
+MODULE_PARM_DESC(featctl1, "DSL feature control 1");
|
||||
+
|
||||
+char *mp_phyctl0 = NULL;
|
||||
+module_param_named(phyctl0, mp_phyctl0, charp, 0);
|
||||
+MODULE_PARM_DESC(phyctl0, "DSL PHY control 0");
|
||||
+
|
||||
+char *mp_phyctl1 = NULL;
|
||||
+module_param_named(phyctl1, mp_phyctl1, charp, 0);
|
||||
+MODULE_PARM_DESC(phyctl1, "DSL PHY control 1");
|
||||
+
|
||||
+int mp_turbodsl = -1;
|
||||
+module_param_named(turbodsl, mp_turbodsl, int, 0);
|
||||
+MODULE_PARM_DESC(turbodsl, "Enable TurboDSL");
|
||||
+
|
||||
+int mp_sar_rxbuf = -1;
|
||||
+module_param_named(sar_rxbuf, mp_sar_rxbuf, int, 0);
|
||||
+MODULE_PARM_DESC(sar_rxbuf, "SAR RxBuf size");
|
||||
+
|
||||
+int mp_sar_rxmax = -1;
|
||||
+module_param_named(sar_rxmax, mp_sar_rxmax, int, 0);
|
||||
+MODULE_PARM_DESC(sar_rxmax, "SAR RxMax size");
|
||||
+
|
||||
+int mp_sar_txbuf = -1;
|
||||
+module_param_named(sar_txbuf, mp_sar_txbuf, int, 0);
|
||||
+MODULE_PARM_DESC(sar_txbuf, "SAR TxBuf size");
|
||||
+
|
||||
+int mp_sar_txmax = -1;
|
||||
+module_param_named(sar_txmax, mp_sar_txmax, int, 0);
|
||||
+MODULE_PARM_DESC(sar_txmax, "SAR TxMax size");
|
||||
+
|
||||
+char *mp_modulation = NULL;
|
||||
+module_param_named(modulation, mp_modulation, charp, 0);
|
||||
+MODULE_PARM_DESC(modulation, "Modulation");
|
||||
+
|
||||
+int mp_fine_gain_control = -1;
|
||||
+module_param_named(fine_gain_control, mp_fine_gain_control, int, 0);
|
||||
+MODULE_PARM_DESC(fine_gain_control, "Fine gain control");
|
||||
+
|
||||
+int mp_fine_gain_value = -1;
|
||||
+module_param_named(fine_gain_value, mp_fine_gain_value, int, 0);
|
||||
+MODULE_PARM_DESC(fine_gain_value, "Fine gain value");
|
||||
+
|
||||
+int mp_enable_margin_retrain = -1;
|
||||
+module_param_named(enable_margin_retrain, mp_enable_margin_retrain, int, 0);
|
||||
+MODULE_PARM_DESC(enable_margin_retrain, "Enable margin retrain");
|
||||
+
|
||||
+int mp_margin_threshold = -1;
|
||||
+module_param_named(margin_threshold, mp_margin_threshold, int, 0);
|
||||
+MODULE_PARM_DESC(margin_threshold, "Margin retrain treshold");
|
||||
+
|
||||
+int mp_enable_rate_adapt = -1;
|
||||
+module_param_named(enable_rate_adapt, mp_enable_rate_adapt, int, 0);
|
||||
+MODULE_PARM_DESC(enable_rate_adapt, "Enable rate adaption");
|
||||
+
|
||||
+int mp_powercutback = -1;
|
||||
+module_param_named(powercutback, mp_powercutback, int, 0);
|
||||
+MODULE_PARM_DESC(powercutback, "Enable / disable powercutback");
|
||||
+
|
||||
+int mp_trellis = -1;
|
||||
+module_param_named(trellis, mp_trellis, int, 0);
|
||||
+MODULE_PARM_DESC(trellis, "Enable / disable trellis coding");
|
||||
+
|
||||
+int mp_bitswap = -1;
|
||||
+module_param_named(bitswap, mp_bitswap, int, 0);
|
||||
+MODULE_PARM_DESC(bitswap, "Enable / disable bitswap");
|
||||
+
|
||||
+int mp_maximum_bits_per_carrier = -1;
|
||||
+module_param_named(maximum_bits_per_carrier, mp_maximum_bits_per_carrier, int, 0);
|
||||
+MODULE_PARM_DESC(maximum_bits_per_carrier, "Maximum bits per carrier");
|
||||
+
|
||||
+int mp_maximum_interleave_depth = -1;
|
||||
+module_param_named(maximum_interleave_depth, mp_maximum_interleave_depth, int, 0);
|
||||
+MODULE_PARM_DESC(maximum_interleave_depth, "Maximum interleave depth");
|
||||
+
|
||||
+int mp_pair_selection = -1;
|
||||
+module_param_named(pair_selection, mp_pair_selection, int, 0);
|
||||
+MODULE_PARM_DESC(pair_selection, "Pair selection");
|
||||
+
|
||||
+int mp_dgas_polarity = -1;
|
||||
+module_param_named(dgas_polarity, mp_dgas_polarity, int, 0);
|
||||
+MODULE_PARM_DESC(dgas_polarity, "DGAS polarity");
|
||||
+
|
||||
+int mp_los_alarm = -1;
|
||||
+module_param_named(los_alarm, mp_los_alarm, int, 0);
|
||||
+MODULE_PARM_DESC(los_alarm, "LOS alarm");
|
||||
+
|
||||
+char *mp_eoc_vendor_id = NULL;
|
||||
+module_param_named(eoc_vendor_id, mp_eoc_vendor_id, charp, 0);
|
||||
+MODULE_PARM_DESC(eoc_vendor_id, "EOC vendor id");
|
||||
+
|
||||
+int mp_eoc_vendor_revision = -1;
|
||||
+module_param_named(eoc_vendor_revision, mp_eoc_vendor_revision, int, 0);
|
||||
+MODULE_PARM_DESC(eoc_vendor_revision, "EOC vendor revision");
|
||||
+
|
||||
+char *mp_eoc_vendor_serialnum = NULL;
|
||||
+module_param_named(eoc_vendor_serialnum, mp_eoc_vendor_serialnum, charp, 0);
|
||||
+MODULE_PARM_DESC(eoc_vendor_serialnum, "EOC vendor serial number");
|
||||
+
|
||||
+char *mp_invntry_vernum = NULL;
|
||||
+module_param_named(invntry_vernum, mp_invntry_vernum, charp, 0);
|
||||
+MODULE_PARM_DESC(invntry_vernum, "Inventory revision number");
|
||||
+
|
||||
+int mp_dsl_bit_tmode = -1;
|
||||
+module_param_named(dsl_bit_tmode, mp_dsl_bit_tmode, int, 0);
|
||||
+MODULE_PARM_DESC(dsl_bit_tmode, "DSL bit training mode");
|
||||
+
|
||||
+int mp_high_precision = -1;
|
||||
+module_param_named(high_precision, mp_high_precision, int, 0);
|
||||
+MODULE_PARM_DESC(high_precision, "High precision");
|
||||
+
|
||||
+int mp_autopvc_enable = -1;
|
||||
+module_param_named(autopvc_enable, mp_autopvc_enable, int, 0);
|
||||
+MODULE_PARM_DESC(autopvc_enable, "Enable / disable automatic PVC");
|
||||
+
|
||||
+int mp_oam_lb_timeout = -1;
|
||||
+module_param_named(oam_lb_timeout, mp_oam_lb_timeout, int, 0);
|
||||
+MODULE_PARM_DESC(oam_lb_timeout, "OAM LB timeout");
|
||||
#endif
|
||||
|
||||
#ifndef TRUE
|
||||
@@ -728,9 +868,9 @@
|
||||
* interrupt pacing
|
||||
*/
|
||||
ptr = prom_getenv ("sar_ipacemax");
|
||||
- if (ptr)
|
||||
+ if (ptr || mp_sar_ipacemax != -1)
|
||||
{
|
||||
- def_sar_inter_pace = os_atoi (ptr);
|
||||
+ def_sar_inter_pace = mp_sar_ipacemax == -1 ? os_atoi (ptr) : mp_sar_ipacemax;
|
||||
}
|
||||
/* avalanche_request_pacing (priv->sar_irq, ATM_SAR_INT_PACING_BLOCK_NUM,
|
||||
def_sar_inter_pace); */
|
||||
@@ -880,7 +1020,7 @@
|
||||
char esi_addr[ESI_LEN] = { 0x00, 0x00, 0x11, 0x22, 0x33, 0x44 };
|
||||
char *esiaddr_str = NULL;
|
||||
|
||||
- esiaddr_str = prom_getenv ("macc");
|
||||
+ esiaddr_str = mp_macc ? mp_macc : prom_getenv ("maca");
|
||||
|
||||
if (!esiaddr_str)
|
||||
{
|
||||
@@ -2139,15 +2279,15 @@
|
||||
//UR8_MERGE_END CQ10450*
|
||||
|
||||
cp = prom_getenv ("dsp_noboost");
|
||||
- if (cp)
|
||||
+ if (cp || mp_dsp_noboost != -1)
|
||||
{
|
||||
- dsp_noboost = os_atoi (cp);
|
||||
+ dsp_noboost = mp_dsp_noboost == -1 ? os_atoi (cp) : mp_dsp_noboost;
|
||||
}
|
||||
|
||||
cp = (char *) prom_getenv ("dsp_freq");
|
||||
- if (cp)
|
||||
+ if (cp || mp_dsp_freq != -1)
|
||||
{
|
||||
- dspfreq = os_atoi (cp);
|
||||
+ dspfreq = mp_dsp_freq == -1 ? os_atoi (cp) : mp_dsp_freq;
|
||||
if (dspfreq == 250)
|
||||
{
|
||||
boostDsp = 1;
|
||||
@@ -2396,15 +2536,17 @@
|
||||
// Inter-Op DSL phy Control
|
||||
// Note the setting of _dsl_Feature_0 and _dsl_Feature_1 must before
|
||||
// dslhal_api_dslStartup (in tn7dsl_init()).
|
||||
- if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_0")) != NULL)
|
||||
+ if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_0")) != NULL || mp_featctl0 != NULL)
|
||||
{
|
||||
- _dsl_Feature_0 = os_atoih (ptr);
|
||||
+ if (mp_featctl0 != NULL) ptr = mp_featctl0;
|
||||
+ _dsl_Feature_0 = os_atoh (ptr);
|
||||
_dsl_Feature_0_defined = 1;
|
||||
}
|
||||
|
||||
- if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_1")) != NULL)
|
||||
+ if ((ptr = prom_getenv ("DSL_FEATURE_CNTL_1")) != NULL || mp_featctl1 != NULL)
|
||||
{
|
||||
- _dsl_Feature_1 = os_atoih (ptr);
|
||||
+ if (mp_featctl1 != NULL) ptr = mp_featctl1;
|
||||
+ _dsl_Feature_1 = os_atoh (ptr);
|
||||
_dsl_Feature_1_defined = 1;
|
||||
}
|
||||
|
||||
@@ -2412,15 +2554,17 @@
|
||||
// DSL phy Feature Control
|
||||
// Note the setting of _dsl_PhyControl_0 and _dsl_PhyControl_1 must before
|
||||
// dslhal_api_dslStartup (in tn7dsl_init()).
|
||||
- if ((ptr = prom_getenv ("DSL_PHY_CNTL_0")) != NULL)
|
||||
+ if ((ptr = prom_getenv ("DSL_PHY_CNTL_0")) != NULL || mp_phyctl0 != NULL)
|
||||
{
|
||||
- _dsl_PhyControl_0 = os_atoih (ptr);
|
||||
+ if (mp_phyctl0 != NULL) ptr = mp_phyctl0;
|
||||
+ _dsl_PhyControl_0 = os_atoh (ptr);
|
||||
_dsl_PhyControl_0_defined = 1;
|
||||
}
|
||||
|
||||
- if ((ptr = prom_getenv ("DSL_PHY_CNTL_1")) != NULL)
|
||||
+ if ((ptr = prom_getenv ("DSL_PHY_CNTL_1")) != NULL || mp_phyctl1 != NULL)
|
||||
{
|
||||
- _dsl_PhyControl_1 = os_atoih (ptr);
|
||||
+ if (mp_phyctl1 != NULL) ptr = mp_phyctl1;
|
||||
+ _dsl_PhyControl_1 = os_atoh (ptr);
|
||||
_dsl_PhyControl_1_defined = 1;
|
||||
}
|
||||
|
||||
@@ -2440,12 +2584,12 @@
|
||||
// read config for turbo dsl
|
||||
|
||||
ptr = prom_getenv ("TurboDSL");
|
||||
- if (ptr)
|
||||
+ if (ptr || mp_turbodsl != -1)
|
||||
{
|
||||
#if 1 //[KT]
|
||||
bTurboDsl = os_atoi (ptr);
|
||||
#else
|
||||
- priv->bTurboDsl = os_atoi (ptr);
|
||||
+ priv->bTurboDsl = mp_turbodsl == -1 ? os_atoi (ptr) : mp_turbodsl;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
@@ -2459,33 +2603,33 @@
|
||||
priv->sarRxBuf = RX_BUFFER_NUM;
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv ("SarRxBuf");
|
||||
- if (ptr)
|
||||
+ if (ptr || mp_sar_rxbuf != -1)
|
||||
{
|
||||
- priv->sarRxBuf = os_atoi (ptr);
|
||||
+ priv->sarRxBuf = mp_sar_rxbuf == -1 ? os_atoi (ptr) : mp_sar_rxbuf;
|
||||
}
|
||||
|
||||
priv->sarRxMax = RX_SERVICE_MAX;
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv ("SarRxMax");
|
||||
- if (ptr)
|
||||
+ if (ptr || mp_sar_rxmax != -1)
|
||||
{
|
||||
- priv->sarRxMax = os_atoi (ptr);
|
||||
+ priv->sarRxMax = mp_sar_rxmax == -1 ? os_atoi (ptr) : mp_sar_rxmax;
|
||||
}
|
||||
|
||||
priv->sarTxBuf = TX_BUFFER_NUM;
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv ("SarTxBuf");
|
||||
- if (ptr)
|
||||
+ if (ptr || mp_sar_txbuf != -1)
|
||||
{
|
||||
- priv->sarTxBuf = os_atoi (ptr);
|
||||
+ priv->sarTxBuf = mp_sar_txbuf == -1 ? os_atoi (ptr) : mp_sar_txbuf;
|
||||
}
|
||||
|
||||
priv->sarTxMax = TX_SERVICE_MAX;
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv ("SarTxMax");
|
||||
- if (ptr)
|
||||
+ if (ptr || mp_sar_txmax != -1)
|
||||
{
|
||||
- priv->sarTxMax = os_atoi (ptr);
|
||||
+ priv->sarTxMax = mp_sar_txmax == -1 ? os_atoi (ptr) : mp_sar_txmax;
|
||||
}
|
||||
|
||||
#ifdef AR7_EFM
|
||||
Index: sangam_atm-D7.05.01.00/tn7dsl.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7dsl.c 2010-03-07 18:27:11.000000000 +0100
|
||||
+++ sangam_atm-D7.05.01.00/tn7dsl.c 2010-03-07 18:28:15.000000000 +0100
|
||||
@@ -148,6 +148,27 @@
|
||||
#define NEW_TRAINING_VAL_T1413 128
|
||||
#define NEW_TRAINING_VAL_MMODE 255
|
||||
|
||||
+extern char *mp_modulation;
|
||||
+extern int mp_fine_gain_control;
|
||||
+extern int mp_fine_gain_value;
|
||||
+extern int mp_enable_margin_retrain;
|
||||
+extern int mp_margin_threshold;
|
||||
+extern int mp_enable_rate_adapt;
|
||||
+extern int mp_powercutback;
|
||||
+extern int mp_trellis;
|
||||
+extern int mp_bitswap;
|
||||
+extern int mp_maximum_bits_per_carrier;
|
||||
+extern int mp_maximum_interleave_depth;
|
||||
+extern int mp_pair_selection;
|
||||
+extern int mp_dgas_polarity;
|
||||
+extern int mp_los_alarm;
|
||||
+extern char *mp_eoc_vendor_id;
|
||||
+extern int mp_eoc_vendor_revision;
|
||||
+extern char *mp_eoc_vendor_serialnum;
|
||||
+extern char *mp_invntry_vernum;
|
||||
+extern int mp_dsl_bit_tmode;
|
||||
+extern int mp_high_precision;
|
||||
+
|
||||
int testflag1 = 0;
|
||||
extern int __guDbgLevel;
|
||||
extern sar_stat_t sarStat;
|
||||
@@ -2933,24 +2954,24 @@
|
||||
(unsigned char *) &oamFeature, 4);
|
||||
|
||||
ptr = prom_getenv("DSL_FEATURE_CNTL_0");
|
||||
- if(!ptr)
|
||||
- prom_setenv("DSL_FEATURE_CNTL_0", "0x00004000");
|
||||
+ //if(!ptr)
|
||||
+ //prom_setenv("DSL_FEATURE_CNTL_0", "0x00004000");
|
||||
|
||||
ptr = prom_getenv("DSL_FEATURE_CNTL_1");
|
||||
- if(!ptr)
|
||||
- prom_setenv("DSL_FEATURE_CNTL_1", "0x00000000");
|
||||
+ //if(!ptr)
|
||||
+ //prom_setenv("DSL_FEATURE_CNTL_1", "0x00000000");
|
||||
|
||||
ptr = prom_getenv("DSL_PHY_CNTL_0");
|
||||
- if(!ptr)
|
||||
- prom_setenv("DSL_PHY_CNTL_0", "0x00000400");
|
||||
+ //if(!ptr)
|
||||
+ //prom_setenv("DSL_PHY_CNTL_0", "0x00000400");
|
||||
|
||||
ptr = prom_getenv("enable_margin_retrain");
|
||||
- if(!ptr)
|
||||
- prom_setenv("enable_margin_retrain", "0");
|
||||
+ //if(!ptr)
|
||||
+ //prom_setenv("enable_margin_retrain", "0");
|
||||
|
||||
ptr = prom_getenv("modulation");
|
||||
- if(!ptr)
|
||||
- prom_setenv("modulation", "0xbf");
|
||||
+ //if(!ptr)
|
||||
+ //prom_setenv("modulation", "0xbf");
|
||||
|
||||
#define EOC_VENDOR_ID "4200534153000000"
|
||||
#define EOC_VENDOR_REVISION "FW370090708b1_55"
|
||||
@@ -2959,25 +2980,25 @@
|
||||
ptr = prom_getenv("eoc_vendor_id");
|
||||
if(!ptr || strcmp(ptr,EOC_VENDOR_ID) != 0 || strlen(ptr) != strlen(EOC_VENDOR_ID))
|
||||
{
|
||||
- if(ptr)
|
||||
- prom_unsetenv("eoc_vendor_id");
|
||||
- prom_setenv("eoc_vendor_id",EOC_VENDOR_ID);
|
||||
+ //if(ptr)
|
||||
+ //prom_unsetenv("eoc_vendor_id");
|
||||
+ //prom_setenv("eoc_vendor_id",EOC_VENDOR_ID);
|
||||
}
|
||||
|
||||
ptr = prom_getenv("eoc_vendor_revision");
|
||||
if(!ptr || strcmp(ptr,EOC_VENDOR_REVISION) != 0 || strlen(ptr) != strlen(EOC_VENDOR_REVISION))
|
||||
{
|
||||
- if(ptr)
|
||||
- prom_unsetenv("eoc_vendor_revision");
|
||||
- prom_setenv("eoc_vendor_revision",EOC_VENDOR_REVISION);
|
||||
+ //if(ptr)
|
||||
+ //prom_unsetenv("eoc_vendor_revision");
|
||||
+ //prom_setenv("eoc_vendor_revision",EOC_VENDOR_REVISION);
|
||||
}
|
||||
|
||||
ptr = prom_getenv("eoc_vendor_serialnum");
|
||||
if(!ptr || strcmp(ptr,EOC_VENDOR_SERIALNUM) != 0 || strlen(ptr) != strlen(EOC_VENDOR_SERIALNUM))
|
||||
{
|
||||
- if(ptr)
|
||||
- prom_unsetenv("eoc_vendor_serialnum");
|
||||
- prom_setenv("eoc_vendor_serialnum",EOC_VENDOR_SERIALNUM);
|
||||
+ //if(ptr)
|
||||
+ // prom_unsetenv("eoc_vendor_serialnum");
|
||||
+ //prom_setenv("eoc_vendor_serialnum",EOC_VENDOR_SERIALNUM);
|
||||
}
|
||||
|
||||
/* Do only if we are in the new Base PSP 7.4.*/
|
||||
@@ -2994,92 +3015,88 @@
|
||||
we clear the modulation environment variable, as this could potentially
|
||||
not have the same meaning in the new mode.
|
||||
*/
|
||||
- prom_unsetenv("modulation");
|
||||
- prom_setenv("DSL_UPG_DONE", "1");
|
||||
+ //prom_unsetenv("modulation");
|
||||
+ //prom_setenv("DSL_UPG_DONE", "1");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// modulation
|
||||
ptr = prom_getenv("modulation");
|
||||
- if (ptr)
|
||||
+ if (ptr || mp_modulation != NULL)
|
||||
{
|
||||
- tn7dsl_set_modulation(ptr, FALSE);
|
||||
+ tn7dsl_set_modulation(mp_modulation == NULL ? ptr : mp_modulation, FALSE);
|
||||
}
|
||||
|
||||
// Fine Gains
|
||||
ptr = prom_getenv("fine_gain_control");
|
||||
- if (ptr)
|
||||
+ if (ptr || mp_fine_gain_control != -1)
|
||||
{
|
||||
- value = os_atoi(ptr);
|
||||
+ value = mp_fine_gain_control == -1 ? os_atoi(ptr) : mp_fine_gain_control;
|
||||
tn7dsl_ctrl_fineGain(value);
|
||||
}
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("fine_gain_value");
|
||||
- if(ptr)
|
||||
- tn7dsl_set_fineGainValue(os_atoh(ptr));
|
||||
+ if(ptr || mp_fine_gain_value != -1)
|
||||
+ tn7dsl_set_fineGainValue(mp_fine_gain_value == -1 ? os_atoh(ptr) : mp_fine_gain_value);
|
||||
|
||||
// margin retrain
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("enable_margin_retrain");
|
||||
- if(ptr)
|
||||
+ value = mp_enable_margin_retrain == -1 ? (ptr ? os_atoi(ptr) : 0) : mp_enable_margin_retrain;
|
||||
+
|
||||
+ if (value == 1)
|
||||
{
|
||||
- value = os_atoi(ptr);
|
||||
- if(value == 1)
|
||||
+ dslhal_api_setMarginMonitorFlags(pIhw, 0, 1);
|
||||
+ bMarginRetrainEnable = 1;
|
||||
+ //printk("enable showtime margin monitor.\n");
|
||||
+
|
||||
+ ptr = NULL;
|
||||
+ ptr = prom_getenv("margin_threshold");
|
||||
+ value = mp_margin_threshold == -1 ? (ptr ? os_atoi(ptr) : 0) : mp_margin_threshold;
|
||||
+
|
||||
+ if(value >= 0)
|
||||
{
|
||||
- dslhal_api_setMarginMonitorFlags(pIhw, 0, 1);
|
||||
- bMarginRetrainEnable = 1;
|
||||
- //printk("enable showtime margin monitor.\n");
|
||||
- ptr = NULL;
|
||||
- ptr = prom_getenv("margin_threshold");
|
||||
- if(ptr)
|
||||
- {
|
||||
- value = os_atoi(ptr);
|
||||
- //printk("Set margin threshold to %d x 0.5 db\n",value);
|
||||
- if(value >= 0)
|
||||
- {
|
||||
- dslhal_api_setMarginThreshold(pIhw, value);
|
||||
- bMarginThConfig=1;
|
||||
- }
|
||||
- }
|
||||
+ dslhal_api_setMarginThreshold(pIhw, value);
|
||||
+ bMarginThConfig=1;
|
||||
}
|
||||
}
|
||||
|
||||
// rate adapt
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("enable_rate_adapt");
|
||||
- if(ptr)
|
||||
+ if(ptr || mp_enable_rate_adapt != -1)
|
||||
{
|
||||
- dslhal_api_setRateAdaptFlag(pIhw, os_atoi(ptr));
|
||||
+ dslhal_api_setRateAdaptFlag(pIhw, mp_enable_rate_adapt == -1 ? os_atoi(ptr) : mp_enable_rate_adapt);
|
||||
}
|
||||
|
||||
// set powercutback
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("powercutback");
|
||||
- if(ptr)
|
||||
+ if(ptr || mp_powercutback != -1)
|
||||
{
|
||||
- dslhal_advcfg_onOffPcb(pIhw, os_atoi(ptr));
|
||||
+ dslhal_advcfg_onOffPcb(pIhw, mp_powercutback == -1 ? os_atoi(ptr) : mp_powercutback);
|
||||
}
|
||||
|
||||
// trellis
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("trellis");
|
||||
- if(ptr)
|
||||
+ if(ptr || mp_trellis != -1)
|
||||
{
|
||||
- dslhal_api_setTrellisFlag(pIhw, os_atoi(ptr));
|
||||
- trellis = os_atoi(ptr);
|
||||
+ trellis = mp_trellis == -1 ? os_atoi(ptr) : mp_trellis;
|
||||
+ dslhal_api_setTrellisFlag(pIhw, trellis);
|
||||
//printk("trellis=%d\n");
|
||||
}
|
||||
|
||||
// bitswap
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("bitswap");
|
||||
- if(ptr)
|
||||
+ if(ptr || mp_bitswap != -1)
|
||||
{
|
||||
int offset[2] = {33, 0};
|
||||
unsigned int bitswap;
|
||||
|
||||
- bitswap = os_atoi(ptr);
|
||||
+ bitswap = mp_bitswap == -1 ? os_atoi(ptr) : mp_bitswap;
|
||||
|
||||
tn7dsl_generic_read(2, offset);
|
||||
dslReg &= dslhal_support_byteSwap32(0xFFFFFF00);
|
||||
@@ -3097,46 +3114,47 @@
|
||||
// maximum bits per carrier
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("maximum_bits_per_carrier");
|
||||
- if(ptr)
|
||||
+ if(ptr || mp_maximum_bits_per_carrier != -1)
|
||||
{
|
||||
- dslhal_api_setMaxBitsPerCarrierUpstream(pIhw, os_atoi(ptr));
|
||||
+ dslhal_api_setMaxBitsPerCarrierUpstream(pIhw, mp_maximum_bits_per_carrier == -1 ? os_atoi(ptr) : mp_maximum_bits_per_carrier);
|
||||
}
|
||||
|
||||
// maximum interleave depth
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("maximum_interleave_depth");
|
||||
- if(ptr)
|
||||
+ if(ptr || mp_maximum_interleave_depth != -1)
|
||||
{
|
||||
- dslhal_api_setMaxInterleaverDepth(pIhw, os_atoi(ptr));
|
||||
+ dslhal_api_setMaxInterleaverDepth(pIhw, mp_maximum_interleave_depth == -1 ? os_atoi(ptr) : mp_maximum_interleave_depth);
|
||||
}
|
||||
|
||||
// inner and outer pairs
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("pair_selection");
|
||||
- if(ptr)
|
||||
+ if(ptr || mp_pair_selection != -1)
|
||||
{
|
||||
- dslhal_api_selectInnerOuterPair(pIhw, os_atoi(ptr));
|
||||
+ dslhal_api_selectInnerOuterPair(pIhw, mp_pair_selection == -1 ? os_atoi(ptr) : mp_pair_selection);
|
||||
}
|
||||
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("dgas_polarity");
|
||||
- if(ptr)
|
||||
+ if(ptr || mp_dgas_polarity != -1)
|
||||
{
|
||||
dslhal_api_configureDgaspLpr(pIhw, 1, 1);
|
||||
- dslhal_api_configureDgaspLpr(pIhw, 0, os_atoi(ptr));
|
||||
+ dslhal_api_configureDgaspLpr(pIhw, 0, mp_dgas_polarity == -1 ? os_atoi(ptr) : mp_dgas_polarity);
|
||||
}
|
||||
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("los_alarm");
|
||||
- if(ptr)
|
||||
+ if(ptr || mp_los_alarm != -1)
|
||||
{
|
||||
- dslhal_api_disableLosAlarm(pIhw, os_atoi(ptr));
|
||||
+ dslhal_api_disableLosAlarm(pIhw, mp_los_alarm == -1 ? os_atoi(ptr) : mp_los_alarm);
|
||||
}
|
||||
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("eoc_vendor_id");
|
||||
- if(ptr)
|
||||
+ if(ptr || mp_eoc_vendor_id != NULL)
|
||||
{
|
||||
+ ptr = mp_eoc_vendor_id == NULL ? ptr : mp_eoc_vendor_id;
|
||||
for(i=0;i<8;i++)
|
||||
{
|
||||
tmp[0]=ptr[i*2];
|
||||
@@ -3161,26 +3179,26 @@
|
||||
}
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("eoc_vendor_revision");
|
||||
- if(ptr)
|
||||
+ if(ptr || mp_eoc_vendor_revision != -1)
|
||||
{
|
||||
- value = os_atoi(ptr);
|
||||
+ value = mp_eoc_vendor_revision == -1 ? os_atoi(ptr) : mp_eoc_vendor_revision;
|
||||
//printk("eoc rev=%d\n", os_atoi(ptr));
|
||||
dslhal_api_setEocRevisionNumber(pIhw, (char *)&value);
|
||||
|
||||
}
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("eoc_vendor_serialnum");
|
||||
- if(ptr)
|
||||
+ if(ptr || mp_eoc_vendor_serialnum != NULL)
|
||||
{
|
||||
- dslhal_api_setEocSerialNumber(pIhw, ptr);
|
||||
+ dslhal_api_setEocSerialNumber(pIhw, mp_eoc_vendor_serialnum == NULL ? ptr : mp_eoc_vendor_serialnum);
|
||||
}
|
||||
|
||||
// CQ10037 Added invntry_vernum environment variable to be able to set version number in ADSL2, ADSL2+ modes.
|
||||
ptr = NULL;
|
||||
ptr = prom_getenv("invntry_vernum");
|
||||
- if(ptr)
|
||||
+ if(ptr || mp_invntry_vernum != NULL)
|
||||
{
|
||||
- dslhal_api_setEocRevisionNumber(pIhw, ptr);
|
||||
+ dslhal_api_setEocRevisionNumber(pIhw, mp_invntry_vernum == NULL ? ptr : mp_invntry_vernum);
|
||||
}
|
||||
|
||||
return 0;
|
||||
@@ -3225,7 +3243,7 @@
|
||||
* backward compatibility.
|
||||
*/
|
||||
cp = prom_getenv("DSL_BIT_TMODE");
|
||||
- if (cp)
|
||||
+ if (cp || mp_dsl_bit_tmode != -1)
|
||||
{
|
||||
printk("%s : env var DSL_BIT_TMODE is set\n", __FUNCTION__);
|
||||
/*
|
||||
@@ -3254,9 +3272,9 @@
|
||||
|
||||
// UR8_MERGE_START CQ11054 Jack Zhang
|
||||
cp = prom_getenv("high_precision");
|
||||
- if (cp)
|
||||
+ if (cp || mp_high_precision != -1)
|
||||
{
|
||||
- high_precision_selected = os_atoi(cp);
|
||||
+ high_precision_selected = mp_high_precision == -1 ? os_atoi(cp) : mp_high_precision;
|
||||
}
|
||||
if ( high_precision_selected)
|
||||
{
|
||||
Index: sangam_atm-D7.05.01.00/tn7sar.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7sar.c 2010-03-07 18:27:11.000000000 +0100
|
||||
+++ sangam_atm-D7.05.01.00/tn7sar.c 2010-03-07 18:27:34.000000000 +0100
|
||||
@@ -76,6 +76,8 @@
|
||||
#include "tn7atm.h"
|
||||
#include "tn7api.h"
|
||||
|
||||
+extern int mp_oam_lb_timeout;
|
||||
+extern int mp_autopvc_enable;
|
||||
|
||||
/* PDSP Firmware files */
|
||||
#include "tnetd7300_sar_firm.h"
|
||||
@@ -932,9 +934,9 @@
|
||||
pHalDev = (HAL_DEVICE *)priv->pSarHalDev;
|
||||
|
||||
pauto_pvc = prom_getenv("autopvc_enable");
|
||||
- if(pauto_pvc) //CQ10273
|
||||
+ if(pauto_pvc || mp_autopvc_enable != -1) //CQ10273
|
||||
{
|
||||
- auto_pvc =tn7sar_strtoul(pauto_pvc, NULL, 10);
|
||||
+ auto_pvc = mp_autopvc_enable == -1 ? tn7sar_strtoul(pauto_pvc, NULL, 10) : mp_autopvc_enable;
|
||||
}
|
||||
|
||||
memset(&chInfo, 0xff, sizeof(chInfo));
|
||||
@@ -1133,9 +1135,9 @@
|
||||
|
||||
/* read in oam lb timeout value */
|
||||
pLbTimeout = prom_getenv("oam_lb_timeout");
|
||||
- if(pLbTimeout)
|
||||
+ if(pLbTimeout || mp_oam_lb_timeout != -1)
|
||||
{
|
||||
- lbTimeout =tn7sar_strtoul(pLbTimeout, NULL, 10);
|
||||
+ lbTimeout = mp_oam_lb_timeout == -1 ? tn7sar_strtoul(pLbTimeout, NULL, 10) : mp_oam_lb_timeout;
|
||||
oamLbTimeout = lbTimeout;
|
||||
pHalFunc->Control(pHalDev,"OamLbTimeout", "Set", &lbTimeout);
|
||||
}
|
32
package/ar7-atm/patches-D7.05.01.00/170-bus_id_removal.patch
Normal file
32
package/ar7-atm/patches-D7.05.01.00/170-bus_id_removal.patch
Normal file
@ -0,0 +1,32 @@
|
||||
Index: sangam_atm-D7.05.01.00/tn7dsl.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7dsl.c 2010-03-07 18:18:39.000000000 +0100
|
||||
+++ sangam_atm-D7.05.01.00/tn7dsl.c 2010-03-07 18:19:04.000000000 +0100
|
||||
@@ -117,6 +117,7 @@
|
||||
#include <linux/vmalloc.h>
|
||||
#include <linux/file.h>
|
||||
#include <linux/firmware.h>
|
||||
+#include <linux/version.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
#include <asm/ar7/ar7.h>
|
||||
@@ -492,7 +493,9 @@
|
||||
}
|
||||
|
||||
static struct device avsar = {
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,30)
|
||||
.bus_id = "vlynq",
|
||||
+#endif
|
||||
.release = avsar_release,
|
||||
};
|
||||
|
||||
@@ -501,6 +504,9 @@
|
||||
const struct firmware *fw_entry;
|
||||
size_t size;
|
||||
|
||||
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30)
|
||||
+ dev_set_name(&avsar, "avsar");
|
||||
+#endif
|
||||
printk("requesting firmware image \"ar0700xx.bin\"\n");
|
||||
if(device_register(&avsar) < 0) {
|
||||
printk(KERN_ERR
|
@ -0,0 +1,60 @@
|
||||
Index: sangam_atm-D7.05.01.00/tn7atm.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7atm.c 2010-03-07 18:16:20.000000000 +0100
|
||||
+++ sangam_atm-D7.05.01.00/tn7atm.c 2010-03-07 18:19:09.000000000 +0100
|
||||
@@ -76,10 +76,16 @@
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/ctype.h>
|
||||
+#include <linux/version.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
|
||||
#include <asm/ar7/ar7.h>
|
||||
#include <asm/ar7/prom.h>
|
||||
+#else
|
||||
+#include <asm/mach-ar7/ar7.h>
|
||||
+#include <asm/mach-ar7/prom.h>
|
||||
+#endif
|
||||
|
||||
#include "dsl_hal_api.h"
|
||||
#ifdef AR7_EFM
|
||||
Index: sangam_atm-D7.05.01.00/tn7dsl.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7dsl.c 2010-03-07 18:19:04.000000000 +0100
|
||||
+++ sangam_atm-D7.05.01.00/tn7dsl.c 2010-03-07 18:19:09.000000000 +0100
|
||||
@@ -120,8 +120,13 @@
|
||||
#include <linux/version.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
|
||||
#include <asm/ar7/ar7.h>
|
||||
#include <asm/ar7/prom.h>
|
||||
+#else
|
||||
+#include <asm/mach-ar7/ar7.h>
|
||||
+#include <asm/mach-ar7/prom.h>
|
||||
+#endif
|
||||
|
||||
/* Modules specific header files */
|
||||
#ifdef AR7_EFM
|
||||
Index: sangam_atm-D7.05.01.00/tn7sar.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7sar.c 2010-03-07 18:10:13.000000000 +0100
|
||||
+++ sangam_atm-D7.05.01.00/tn7sar.c 2010-03-07 18:19:09.000000000 +0100
|
||||
@@ -53,10 +53,16 @@
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/ctype.h>
|
||||
+#include <linux/version.h>
|
||||
|
||||
#include <asm/io.h>
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
|
||||
#include <asm/ar7/ar7.h>
|
||||
#include <asm/ar7/prom.h>
|
||||
+#else
|
||||
+#include <asm/mach-ar7/ar7.h>
|
||||
+#include <asm/mach-ar7/prom.h>
|
||||
+#endif
|
||||
|
||||
#define _CPHAL_AAL5
|
||||
#define _CPHAL_SAR
|
@ -0,0 +1,29 @@
|
||||
Index: sangam_atm-D7.05.01.00/tn7dsl.c
|
||||
===================================================================
|
||||
--- sangam_atm-D7.05.01.00.orig/tn7dsl.c 2010-03-07 18:19:09.000000000 +0100
|
||||
+++ sangam_atm-D7.05.01.00/tn7dsl.c 2010-03-07 18:19:12.000000000 +0100
|
||||
@@ -3615,8 +3615,11 @@
|
||||
*/
|
||||
if(write)
|
||||
{
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
|
||||
ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
|
||||
-
|
||||
+#else
|
||||
+ ret = proc_dostring(ctl, write, buffer, lenp, 0);
|
||||
+#endif
|
||||
switch (ctl->ctl_name)
|
||||
{
|
||||
case DEV_DSLMOD:
|
||||
@@ -3701,7 +3704,11 @@
|
||||
else
|
||||
{
|
||||
len += sprintf(info+len, mod_req);
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
|
||||
ret = proc_dostring(ctl, write, filp, buffer, lenp, 0);
|
||||
+#else
|
||||
+ ret = proc_dostring(ctl, write, buffer, lenp, 0);
|
||||
+#endif
|
||||
}
|
||||
return ret;
|
||||
}
|
@ -1,20 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2009-2010 OpenWrt.org
|
||||
|
||||
blkdev=`dirname $DEVPATH`
|
||||
if [ `basename $blkdev` != "block" ]; then
|
||||
|
||||
device=`basename $DEVPATH`
|
||||
case "$ACTION" in
|
||||
add)
|
||||
swapon /dev/$device >/dev/null 2>/dev/null || (
|
||||
mkdir -p /mnt/$device
|
||||
mount /dev/$device /mnt/$device
|
||||
)
|
||||
;;
|
||||
remove)
|
||||
umount /dev/$device
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
@ -6,7 +6,7 @@
|
||||
with_fo_cleanup() {
|
||||
# try to get rid of /tmp/root
|
||||
# this will almost always fail
|
||||
mount /tmp/root 2>&-
|
||||
umount /tmp/root 2>&-
|
||||
exit 0
|
||||
}
|
||||
|
||||
|
@ -66,6 +66,7 @@ pivot() { # <new_root> <old_root>
|
||||
mount -o move $2/tmp /tmp
|
||||
mount -o move $2/sys /sys 2>&-
|
||||
mount -o move $2/jffs /jffs 2>&-
|
||||
mount -o move $2/overlay /overlay 2>&-
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
@ -78,7 +78,6 @@ failsafe_wait() {
|
||||
pi_failsafe_net_message=true
|
||||
preinit_net_echo "Please press button now to enter failsafe"
|
||||
pi_failsafe_net_message=false
|
||||
echo -n "Press "
|
||||
fs_wait_for_key f 'to enter failsafe mode' $fs_failsafe_wait_timeout && FAILSAFE=true && export FAILSAFE
|
||||
}
|
||||
|
||||
|
@ -12,11 +12,15 @@ for fb_source_file in /lib/firstboot/*; do
|
||||
. $fb_source_file
|
||||
done
|
||||
|
||||
set_mtd_part
|
||||
set_rom_part
|
||||
set_jffs_part
|
||||
|
||||
# invoked as an executable
|
||||
if [ "${0##*/}" = "firstboot" ]; then
|
||||
if [ "$1" = "switch2jffs" ]; then
|
||||
boot_run_hook switch2jffs
|
||||
elif [ -z "$jffs" ]; then
|
||||
elif [ -n "$jffs" ]; then
|
||||
reset_has_fo=true
|
||||
echo "firstboot has already been run"
|
||||
echo "jffs2 partition is mounted, only resetting files"
|
||||
@ -26,9 +30,5 @@ if [ "${0##*/}" = "firstboot" ]; then
|
||||
mount "$mtdpart" /jffs -t jffs2
|
||||
fopivot /jffs /rom 1
|
||||
fi
|
||||
else
|
||||
set_mtd_part
|
||||
set_rom_part
|
||||
set_jffs_part
|
||||
fi
|
||||
|
||||
|
17
package/block-extroot/Config.in
Normal file
17
package/block-extroot/Config.in
Normal file
@ -0,0 +1,17 @@
|
||||
#
|
||||
# Copyright (C) 2010 Vertical Communications
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
config EXTROOT_SETTLETIME
|
||||
int
|
||||
prompt "Settle time for root block device (s)" if PACKAGE_block-extroot
|
||||
default 20
|
||||
help
|
||||
This is the amount of time, in seconds, to wait for the block device
|
||||
the root filesystem is on to become available, after the kernel that
|
||||
modules for the rootfs and device are loaded.
|
||||
|
||||
|
64
package/block-extroot/Makefile
Normal file
64
package/block-extroot/Makefile
Normal file
@ -0,0 +1,64 @@
|
||||
#
|
||||
# Copyright (C) 2009 OpenWrt.org
|
||||
# Copyright (C) 2010 Vertical Communications
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=block-extroot
|
||||
PKG_VERSION:=0.0.1
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/block-extroot/Default
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=root filesystem on secondary storage
|
||||
SUBMENU:=disc
|
||||
endef
|
||||
|
||||
define Package/block-extroot
|
||||
$(call Package/block-extroot/Default)
|
||||
MENU:=1
|
||||
DEPENDS:=+block-mount @PACKAGE_kmod-ide-core||PACKAGE_kmod-usb-storage||PACKAGE_kmod-mmc
|
||||
endef
|
||||
|
||||
define Package/block-extroot/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/block-extroot/description
|
||||
Based on the moduluarized preinit and firstboot, adds the option to have
|
||||
the root filesystem on storage other than the jffs or the boot root device.
|
||||
For a squashfs image this package must be installed into the image, not as
|
||||
a package to add later.
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/block-extroot/install
|
||||
$(INSTALL_DIR) $(1)/lib/functions
|
||||
$(INSTALL_DATA) ./files/extmount.sh $(1)/lib/functions/
|
||||
$(INSTALL_DIR) $(1)/lib/preinit
|
||||
$(INSTALL_DATA) ./files/50_determine_usb_root $(1)/lib/preinit/
|
||||
$(INSTALL_DATA) ./files/60_pivot_usb_root $(1)/lib/preinit/
|
||||
$(INSTALL_DIR) $(1)/lib/preinit
|
||||
echo "extroot_settle_time=\"$(CONFIG_EXTROOT_SETTLETIME)\"" >$(1)/lib/preinit/00_extroot.conf
|
||||
$(INSTALL_DIR) $(1)/overlay
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,block-extroot))
|
||||
|
50
package/block-extroot/files/50_determine_usb_root
Normal file
50
package/block-extroot/files/50_determine_usb_root
Normal file
@ -0,0 +1,50 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2010 Vertical Communications
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
|
||||
|
||||
. /etc/functions.sh
|
||||
. /lib/functions/extmount.sh
|
||||
. /lib/functions/mount.sh
|
||||
|
||||
determine_external_root() {
|
||||
local OLD_UCI_CONFIG_DIR="$UCI_CONFIG_DIR"
|
||||
set_jffs_mp
|
||||
determine_root_device
|
||||
|
||||
# extroot requires extroot and fstab config files, therefore
|
||||
# we assume configuration is incomplete and not to be used if either of them
|
||||
# is missing (for jffs versions of these files on squashfs image)
|
||||
if [ "$jffs" = "/jffs" ] && [ -r "/jffs/etc/config/fstab" ]; then
|
||||
UCI_CONFIG_DIR="/jffs/etc/config"
|
||||
ER_IS_SQUASHFS=true
|
||||
fi
|
||||
|
||||
# For squashfs on firstboot root_device will be tmpfs for the ramoverlay,
|
||||
# unless there is a saved config, in which case it will be /dev/root,
|
||||
# however in the case of a saved config, it won't be restored until after
|
||||
# this script, so there won't be a config on the first boot after
|
||||
# flashing a squashfs-based filesystem
|
||||
# For ext2, ramdisk, or jffs2 root filesystems root_device is /dev/root
|
||||
# For squashfs after firstboot, root filesystem is /dev/root
|
||||
# We only use the config from the root or jffs if the root_device is
|
||||
# /dev/root
|
||||
[ "$root_device" = "/dev/root" ] && {
|
||||
er_load_modules
|
||||
[ -n "$extroot_settle_time" ] && [ "$extroot_settle_time" -gt 0 ] && {
|
||||
sleep $extroot_settle_time
|
||||
}
|
||||
config_load fstab
|
||||
config_foreach config_mount_by_section mount 1
|
||||
|
||||
[ "$rootfs_found" = "1" ] && grep -q /overlay /proc/mounts && {
|
||||
pi_extroot_mount_success=true
|
||||
pi_mount_skip_next=false
|
||||
}
|
||||
}
|
||||
UCI_CONFIG_DIR="$OLD_UCI_CONFIG_DIR"
|
||||
}
|
||||
|
||||
boot_hook_add preinit_mount_root determine_external_root
|
||||
|
20
package/block-extroot/files/60_pivot_usb_root
Normal file
20
package/block-extroot/files/60_pivot_usb_root
Normal file
@ -0,0 +1,20 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2010 Vertical Communications
|
||||
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
|
||||
# Determine if we are requested to mount external root
|
||||
|
||||
external_root_pivot() {
|
||||
check_skip || [ "$pi_extroot_mount_success" != "true" ] || {
|
||||
echo "switching to external rootfs"
|
||||
if [ "$ER_IS_SQUASHFS" = "true" ]; then
|
||||
umount /jffs
|
||||
fi
|
||||
mount -o remount,ro / && fopivot /overlay /rom && pi_mount_skip_next=true
|
||||
}
|
||||
}
|
||||
|
||||
boot_hook_add preinit_mount_root external_root_pivot
|
||||
|
24
package/block-extroot/files/extmount.sh
Normal file
24
package/block-extroot/files/extmount.sh
Normal file
@ -0,0 +1,24 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2010 Vertical Communications
|
||||
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
|
||||
determine_root_device() {
|
||||
root_device="$(mount | grep ' / ' | cut -f1 -d\ | grep -v rootfs )"
|
||||
}
|
||||
|
||||
set_jffs_mp() {
|
||||
jffs="$(awk '/jffs2/ {print $2}' /proc/mounts)"
|
||||
}
|
||||
|
||||
er_load_modules() {
|
||||
[ -d $ER_ROOT/etc/modules.d ] && {
|
||||
cd $ER_ROOT/etc/modules.d && {
|
||||
local modules="$(grep -l '# May be required for rootfs' *)"
|
||||
cat $modules | sed 's/^\([^#]\)/insmod \1/' | sh 2>&- || :
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
86
package/block-mount/Makefile
Normal file
86
package/block-mount/Makefile
Normal file
@ -0,0 +1,86 @@
|
||||
#
|
||||
# Copyright (C) 2006-2009 OpenWrt.org
|
||||
# Copyright 2010 Vertical Communications
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=block-mount
|
||||
PKG_VERSION:=0.1.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/block-mount/Default
|
||||
SECTION:=base
|
||||
CATEGORY:=Base system
|
||||
endef
|
||||
|
||||
define Package/block-mount
|
||||
$(call Package/block-mount/Default)
|
||||
TITLE:=Block device mounting and checking
|
||||
endef
|
||||
|
||||
define Package/block-mount/config
|
||||
select BUSYBOX_CONFIG_MKSWAP
|
||||
select BUSYBOX_CONFIG_FEATURE_MKSWAP_UUID
|
||||
select BUSYBOX_CONFIG_SWAPONOFF
|
||||
select BUSYBOX_CONFIG_BLKID
|
||||
select BUSYBOX_CONFIG_FEATURE_VOLUMEID_EXT
|
||||
select BUSYBOX_CONFIG_FEATURE_VOLUMEID_REISERFS
|
||||
select BUSYBOX_CONFIG_FEATURE_VOLUMEID_FAT
|
||||
select BUSYBOX_CONFIG_FEATURE_VOLUMEID_HFS
|
||||
select BUSYBOX_CONFIG_FEATURE_VOLUMEID_JFS
|
||||
select BUSYBOX_CONFIG_FEATURE_VOLUMEID_XFS
|
||||
select BUSYBOX_CONFIG_FEATURE_VOLUMEID_NTFS
|
||||
select BUSYBOX_CONFIG_FEATURE_VOLUMEID_SYSV
|
||||
select BUSYBOX_CONFIG_FEATURE_VOLUMEID_OCFS2
|
||||
select BUSYBOX_CONFIG_FEATURE_VOLUMEID_ISO9660
|
||||
select BUSYBOX_CONFIG_FEATURE_VOLUMEID_UDF
|
||||
select BUSYBOX_CONFIG_FEATURE_VOLUMEID_LINUXSWAP
|
||||
select BUSYBOX_CONFIG_FEATURE_VOLUMEID_CRAMFS
|
||||
select BUSYBOX_CONFIG_FEATURE_VOLUMEID_ROMFS
|
||||
endef
|
||||
|
||||
define Package/block-mount/description
|
||||
Scripts used to mount and check block devices (filesystems and swap)
|
||||
endef
|
||||
|
||||
define Package/block-hotplug
|
||||
$(call Package/block-mount/Default)
|
||||
TITLE:=Automount and autocheck block devices
|
||||
DEPENDS:=block-mount hotplug2
|
||||
endef
|
||||
|
||||
define Package/block-hotplug/description
|
||||
Scripts used to automatically check and mount filesystem and/or swap
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Package/block-mount/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/fstab.init $(1)/etc/init.d/fstab
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DATA) ./files/fstab.config $(1)/etc/config/fstab
|
||||
$(INSTALL_DIR) $(1)/lib/functions
|
||||
$(INSTALL_DATA) ./files/mount.sh $(1)/lib/functions/
|
||||
$(INSTALL_DATA) ./files/fsck.sh $(1)/lib/functions/
|
||||
$(INSTALL_DATA) ./files/block.sh $(1)/lib/functions/
|
||||
endef
|
||||
|
||||
define Package/block-hotplug/install
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/block
|
||||
$(INSTALL_DATA) ./files/10-swap $(1)/etc/hotplug.d/block/
|
||||
$(INSTALL_DATA) ./files/20-fsck $(1)/etc/hotplug.d/block/
|
||||
$(INSTALL_DATA) ./files/40-mount $(1)/etc/hotplug.d/block/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,block-mount))
|
||||
$(eval $(call BuildPackage,block-hotplug))
|
||||
|
78
package/block-mount/files/10-swap
Normal file
78
package/block-mount/files/10-swap
Normal file
@ -0,0 +1,78 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2009-2010 OpenWrt.org
|
||||
# Copyright (C) 2010 Vertical Communications
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
. /lib/functions/block.sh
|
||||
|
||||
blkdev=`dirname $DEVPATH`
|
||||
|
||||
if [ `basename $blkdev` != "block" ]; then
|
||||
|
||||
device=`basename $DEVPATH`
|
||||
|
||||
|
||||
case "$ACTION" in
|
||||
add)
|
||||
local autoswap_from_fstab
|
||||
local automount_from_fstab
|
||||
local from_fstab
|
||||
local anon_mount
|
||||
local anon_swap
|
||||
local anon_fsck
|
||||
local mds_mount_device
|
||||
local sds_swap_device
|
||||
local sds_swap_enabled
|
||||
local use_device
|
||||
local do_swap=0
|
||||
|
||||
mount_dev_section_cb() {
|
||||
mds_mount_device="$3"
|
||||
}
|
||||
|
||||
swap_dev_section_cb() {
|
||||
sds_swap_device="$2"
|
||||
sds_swap_enabled="$3"
|
||||
return 0
|
||||
}
|
||||
|
||||
config_get_automount
|
||||
automount_from_fstab="$from_fstab"
|
||||
|
||||
[ "$automount_from_fstab" -eq 1 ] && {
|
||||
config_get_mount_section_by_device "/dev/$device"
|
||||
}
|
||||
|
||||
# skip trying swap if this device is defined as a mount point
|
||||
[ -z "$mds_mount_device" ] && {
|
||||
config_get_autoswap
|
||||
autoswap_from_fstab="$from_fstab"
|
||||
|
||||
[ "$autoswap_from_fstab" -eq 1 ] && {
|
||||
config_get_swap_section_by_device "/dev/$device"
|
||||
use_device="$sds_swap_device"
|
||||
do_swap="$sds_swap_enabled"
|
||||
}
|
||||
|
||||
[ -z "$use_device" ] && [ "$anon_swap" -eq 1 ] && {
|
||||
use_device="/dev/$device" && do_swap=1
|
||||
}
|
||||
}
|
||||
|
||||
[ -n "$use_device" ] && [ "$do_swap" -eq 1 ] && {
|
||||
grep -q "$use_device" /proc/swaps || grep -q "$use_device" /proc/mounts || {
|
||||
swapon "$use_device"
|
||||
}
|
||||
}
|
||||
reset_dev_section_cb
|
||||
;;
|
||||
remove)
|
||||
grep -q "/dev/$device" /proc/swaps && {
|
||||
swapoff "/dev/$device"
|
||||
}
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
83
package/block-mount/files/20-fsck
Normal file
83
package/block-mount/files/20-fsck
Normal file
@ -0,0 +1,83 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2009-2010 OpenWrt.org
|
||||
# Copyright (C) 2010 Vertical Communications
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
. /lib/functions/block.sh
|
||||
. /lib/functions/fsck.sh
|
||||
|
||||
blkdev=`dirname $DEVPATH`
|
||||
|
||||
if [ `basename $blkdev` != "block" ]; then
|
||||
|
||||
device=`basename $DEVPATH`
|
||||
|
||||
case "$ACTION" in
|
||||
add)
|
||||
local from_fstab
|
||||
local anon_mount
|
||||
local anon_swap
|
||||
local anon_fsck
|
||||
local mds_mount_target
|
||||
local mds_mount_device
|
||||
local mds_mount_fstype
|
||||
local mds_mount_enabled_fsck
|
||||
local sds_swap_device
|
||||
local use_device
|
||||
local do_fsck=0
|
||||
local fsck_type
|
||||
|
||||
local autoswap_from_fstab
|
||||
local automount_from_fstab
|
||||
local hotplug_blkid_fstype_match
|
||||
|
||||
mount_dev_section_cb() {
|
||||
mds_mount_device="$3"
|
||||
mds_mount_fstype="$4"
|
||||
mds_mount_enabled_fsck="$7"
|
||||
}
|
||||
|
||||
swap_dev_section_cb() {
|
||||
sds_swap_device="$2"
|
||||
return 0
|
||||
}
|
||||
|
||||
config_get_automount
|
||||
automount_from_fstab="$from_fstab"
|
||||
|
||||
[ "$automount_from_fstab" -eq 1 ] && {
|
||||
config_get_mount_section_by_device "/dev/$device"
|
||||
use_device="$mds_mount_device"
|
||||
[ "$mds_mount_enabled_fsck" -eq 1 ] && {
|
||||
do_fsck=1
|
||||
fsck_type="$mds_mount_fstype"
|
||||
}
|
||||
}
|
||||
|
||||
[ -z "$use_device" ] && {
|
||||
config_get_autoswap
|
||||
autoswap_from_fstab="$from_fstab"
|
||||
|
||||
[ "$autoswap_from_fstab" -eq 1 ] && {
|
||||
config_get_swap_section_by_device "/dev/$device"
|
||||
use_device="$sds_swap_device" && do_fsck=0
|
||||
}
|
||||
}
|
||||
|
||||
grep -q "/dev/$device" /proc/swaps || grep -q "/dev/$device" /proc/mounts || {
|
||||
[ "$anon_fsck" -eq 1 ] && [ -z "$use_device" ] && {
|
||||
use_device="/dev/$device" && do_fsck=1 && mds_mount_fstype="" && hotplug_blkid_fstype_match=0
|
||||
}
|
||||
}
|
||||
|
||||
[ "$do_fsck" -eq 1 ] && {
|
||||
libmount_fsck "$use_device" "$fsck_type" "$do_fsck"
|
||||
}
|
||||
|
||||
reset_dev_section_cb
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
84
package/block-mount/files/40-mount
Normal file
84
package/block-mount/files/40-mount
Normal file
@ -0,0 +1,84 @@
|
||||
#!/bin/sh
|
||||
# Copyright (C) 2009-2010 OpenWrt.org
|
||||
# Copyright (C) 2010 Vertical Communications
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
. /lib/functions/block.sh
|
||||
|
||||
blkdev=`dirname $DEVPATH`
|
||||
if [ `basename $blkdev` != "block" ]; then
|
||||
|
||||
device=`basename $DEVPATH`
|
||||
|
||||
case "$ACTION" in
|
||||
add)
|
||||
|
||||
local from_fstab
|
||||
local anon_mount
|
||||
local anon_swap
|
||||
local anon_fsck
|
||||
local mds_mount_target
|
||||
local mds_mount_device
|
||||
local mds_mount_fstype
|
||||
local sds_swap_device
|
||||
local use_device
|
||||
local do_fsck=0
|
||||
local fsck_type
|
||||
|
||||
local autoswap_from_fstab
|
||||
local automount_from_fstab
|
||||
|
||||
mount_dev_section_cb() {
|
||||
mds_mount_target="$2"
|
||||
mds_mount_device="$3"
|
||||
mds_mount_fstype="$4"
|
||||
mds_mount_enabled="$6"
|
||||
}
|
||||
|
||||
swap_dev_section_cb() {
|
||||
sds_swap_device="$2"
|
||||
return 0
|
||||
}
|
||||
|
||||
config_get_automount
|
||||
automount_from_fstab="$from_fstab"
|
||||
[ "$automount_from_fstab" -eq 1 ] && {
|
||||
config_get_mount_section_by_device "/dev/$device"
|
||||
use_device="$mds_mount_device"
|
||||
[ "$mds_mount_enabled" -eq 1 ] && {
|
||||
if [ -n "$mds_mount_target" ]; then
|
||||
grep -q "/dev/$device" /proc/swaps || grep -q "/dev/$device" /proc/mounts || {
|
||||
( mkdir -p "$mds_mount_target" && mount "$mds_mount_target" ) 2>&1 | tee /proc/self/fd/2 | logger -t 'fstab'
|
||||
}
|
||||
else
|
||||
logger -t 'fstab' "Mount enabled for $mds_mount_device but it doesn't have a defined mountpoint (target)"
|
||||
fi
|
||||
}
|
||||
}
|
||||
|
||||
[ -z "$use_device" ] && {
|
||||
config_get_autoswap
|
||||
autoswap_from_fstab="$from_fstab"
|
||||
|
||||
[ "$autoswap_from_fstab" -eq 1 ] && {
|
||||
config_get_swap_section_by_device "/dev/$device"
|
||||
use_device="$sds_swap_device"
|
||||
}
|
||||
}
|
||||
|
||||
grep -q "/dev/$device" /proc/swaps || grep -q "/dev/$device" /proc/mounts || {
|
||||
[ "$anon_mount" -eq 1 ] && [ -z "$use_device" ] && {
|
||||
( mkdir -p /mnt/$device && mount /dev/$device /mnt/$device ) 2>&1 | tee /proc/self/fd/2 | logger -t 'fstab'
|
||||
}
|
||||
}
|
||||
reset_dev_section_cb
|
||||
;;
|
||||
remove)
|
||||
umount /dev/$device
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
262
package/block-mount/files/block.sh
Normal file
262
package/block-mount/files/block.sh
Normal file
@ -0,0 +1,262 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2010 Vertical Communications
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
. /etc/functions.sh
|
||||
|
||||
reset_block_cb() {
|
||||
mount_cb() {
|
||||
dmc_mount_cfg="$1"
|
||||
shift # skip optional param
|
||||
dmc_target="$2"
|
||||
dmc_mount_device="$3"
|
||||
dmc_fstype="$4"
|
||||
dmc_options="$5"
|
||||
dmc_enabled="$6"
|
||||
dmc_enabled_fsck="$7"
|
||||
dmc_uuid="$8"
|
||||
dmc_label="$9"
|
||||
shift
|
||||
dmc_is_rootfs="$9"
|
||||
return 0
|
||||
}
|
||||
swap_cb() {
|
||||
dsc_swap_cfg="$1"
|
||||
shift # skip optional param
|
||||
dsc_swap_device="$2"
|
||||
dsc_enabled="$3"
|
||||
dsc_uuid="$4"
|
||||
dsc_label="$5"
|
||||
return 0
|
||||
}
|
||||
}
|
||||
reset_block_cb
|
||||
|
||||
reset_dev_section_cb() {
|
||||
mount_dev_section_cb() {
|
||||
dmds_mount_cfg="$1"
|
||||
dmds_mount_target="$2"
|
||||
dmds_mount_device="$3"
|
||||
dmds_mount_fstype="$4"
|
||||
dmds_mount_options="$5"
|
||||
dmds_mount_enabled="$6"
|
||||
dmds_mount_enabled_fsck="$7"
|
||||
dmds_mount_uuid="$8"
|
||||
dmds_mount_label="$9"
|
||||
shift
|
||||
dmds_is_rootfs="$9"
|
||||
return 0
|
||||
}
|
||||
swap_dev_section_cb() {
|
||||
dsds_swap_cfg="$1"
|
||||
dsds_swap_device="$2"
|
||||
dsds_swap_enabled="$3"
|
||||
dsds_swap_uuid="$4"
|
||||
dsds_swap_label="$5"
|
||||
return 0
|
||||
}
|
||||
}
|
||||
reset_dev_section_cb
|
||||
|
||||
config_get_mount() {
|
||||
local gm_cfg="$1"
|
||||
local gm_param="$2"
|
||||
local gm_target
|
||||
local gm_device
|
||||
local gm_fstype
|
||||
local gm_options
|
||||
local gm_enabled
|
||||
local gm_enabled_fsck
|
||||
local gm_uuid
|
||||
local gm_label
|
||||
local gm_is_rootfs
|
||||
config_get gm_target "$1" target
|
||||
config_get gm_device "$1" device
|
||||
config_get gm_fstype "$1" fstype 'auto'
|
||||
config_get gm_options "$1" options 'rw'
|
||||
config_get_bool gm_enabled "$1" enabled 1
|
||||
config_get_bool gm_enabled_fsck "$1" enabled_fsck 0
|
||||
config_get gm_uuid "$1" uuid
|
||||
config_get gm_label "$1" label
|
||||
config_get_bool gm_is_rootfs "$1" is_rootfs 0
|
||||
mount_cb "$gm_cfg" "$gm_param" "$gm_target" "$gm_device" "$gm_fstype" "$gm_options" "$gm_enabled" "$gm_enabled_fsck" "$gm_uuid" "$gm_label" "$gm_is_rootfs"
|
||||
}
|
||||
|
||||
config_get_swap() {
|
||||
local gs_cfg="$1"
|
||||
local gs_param="$2"
|
||||
local gs_device
|
||||
local gs_enabled
|
||||
local gs_uuid
|
||||
local gs_label
|
||||
config_get gs_device "$1" device
|
||||
config_get_bool gs_enabled "$1" enabled 1
|
||||
config_get gs_uuid "$1" uuid
|
||||
config_get gs_label "$1" label
|
||||
|
||||
swap_cb "$gs_cfg" "$gs_param" "$gs_device" "$gs_enabled" "$gs_uuid" "$gs_label"
|
||||
}
|
||||
|
||||
config_get_automount() {
|
||||
config_load fstab
|
||||
config_get_bool from_fstab "automount" from_fstab 1
|
||||
config_get_bool anon_mount "automount" anon_mount 1
|
||||
config_get_bool anon_fsck "automount" anon_fsck 0
|
||||
}
|
||||
|
||||
config_get_autoswap() {
|
||||
config_load fstab
|
||||
config_get_bool from_fstab "autoswap" from_fstab 1
|
||||
config_get_bool anon_swap "autoswap" anon_swap 0
|
||||
}
|
||||
|
||||
config_create_swap_fstab_entry() {
|
||||
local device="$1"
|
||||
local enabled="$2"
|
||||
|
||||
[ -n "$device" ] || return 0
|
||||
|
||||
local fstabnew="$(mktemp -t '.fstab.XXXXXXXX')"
|
||||
|
||||
mkdir -p /var/lock
|
||||
lock /var/lock/fstab.lck
|
||||
cat /tmp/fstab | grep -E -v "^$device[[:blank:]]" >>"$fstabnew"
|
||||
[ "$enabled" -eq 1 ] && echo "$device none swap sw 0 0" >> "$fstabnew"
|
||||
cat "$fstabnew" >/tmp/fstab
|
||||
lock -u /var/lock/fstab.lck
|
||||
rm -f $fstabnew
|
||||
}
|
||||
|
||||
config_create_mount_fstab_entry() {
|
||||
local device="$1"
|
||||
local target="$2"
|
||||
local fstype="$3"
|
||||
local options="$4"
|
||||
local enabled="$5"
|
||||
options="${options:-rw}"
|
||||
[ "$enabled" -eq 0 ] && options="noauto,$options"
|
||||
[ -n "$target" ] || return 0
|
||||
[ -n "$device" ] || return 0
|
||||
|
||||
local fstabnew="$(mktemp -t '.fstab.XXXXXXXX')"
|
||||
|
||||
mkdir -p /var/lock
|
||||
lock /var/lock/fstab.lck
|
||||
cat /tmp/fstab | grep -E -v "^$device[[:blank:]]" | grep -v "$target" >>"$fstabnew"
|
||||
echo "$device $target $fstype $options 0 0" >>"$fstabnew"
|
||||
cat "$fstabnew" >/tmp/fstab
|
||||
lock -u /var/lock/fstab.lck
|
||||
rm -f $fstabnew
|
||||
}
|
||||
|
||||
libmount_find_token() {
|
||||
local token="$1"
|
||||
local value="$2"
|
||||
local device
|
||||
device="$(blkid | grep "$token=\"$value\"" | cut -f1 -d:)"
|
||||
echo "$device"
|
||||
}
|
||||
|
||||
libmount_find_device_by_id() {
|
||||
local uuid="$1"
|
||||
local label="$2"
|
||||
local device="$3"
|
||||
local cfg_device="$4"
|
||||
local found_device
|
||||
|
||||
if [ -n "$uuid" ]; then
|
||||
found_device="$(libmount_find_token "UUID" "$uuid")"
|
||||
elif [ -n "$label" ]; then
|
||||
found_device="$(libmount_find_token "LABEL" "$label")"
|
||||
elif [ "$device" = "$cfg_device" ]; then
|
||||
found_device="$device"
|
||||
elif [ -z "$device" ] && [ -e "$cfg_device" ]; then
|
||||
found_device="$cfg_device"
|
||||
fi
|
||||
[ -n "$device" ] && [ "$device" != "$found_device" ] && {
|
||||
found_device=""
|
||||
}
|
||||
echo "$found_device"
|
||||
}
|
||||
|
||||
config_get_mount_section_by_device() {
|
||||
local msbd_device="$1"
|
||||
local msbd_mount_cfg=
|
||||
local msbd_target=
|
||||
local msbd_mount_device=
|
||||
local msbd_fstype=
|
||||
local msbd_options=
|
||||
local msbd_enabled=
|
||||
local msbd_enabled_fsck=
|
||||
local msbd_uuid=
|
||||
local msbd_label=
|
||||
local msbd_is_rootfs
|
||||
local msbd_blkid_fstype_match=
|
||||
mount_cb() {
|
||||
local mc_cfg="$1"
|
||||
local mc_device="$2"
|
||||
shift
|
||||
local mc_target="$2"
|
||||
local mc_cfgdevice="$3"
|
||||
local mc_fstype="$4"
|
||||
local mc_uuid="$8"
|
||||
local mc_label="$9"
|
||||
shift
|
||||
local mc_is_rootfs="$9"
|
||||
local mc_found_device=""
|
||||
|
||||
mc_found_device="$(libmount_find_device_by_id "$mc_uuid" "$mc_label" "$mc_device" "$mc_cfgdevice")"
|
||||
if [ -n "$mc_found_device" ]; then
|
||||
msbd_mount_cfg="$mc_cfg"
|
||||
msbd_target="$mc_target"
|
||||
msbd_mount_device="$mc_found_device"
|
||||
msbd_fstype="$mc_fstype"
|
||||
msbd_options="$4"
|
||||
msbd_enabled="$5"
|
||||
msbd_enabled_fsck="$6"
|
||||
msbd_uuid="$7"
|
||||
msbd_label="$8"
|
||||
msbd_is_rootfs="$9"
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
config_foreach config_get_mount mount "$msbd_device"
|
||||
[ -n "$msbd_mount_device" ] && config_create_mount_fstab_entry "$msbd_mount_device" "$msbd_target" "$msbd_fstype" "$msbd_options" "$msbd_enabled"
|
||||
mount_dev_section_cb "$msbd_mount_cfg" "$msbd_target" "$msbd_mount_device" "$msbd_fstype" "$msbd_options" "$msbd_enabled" "$msbd_enabled_fsck" "$msbd_uuid" "$msbd_label" "$msbd_is_rootfs"
|
||||
reset_block_cb
|
||||
}
|
||||
|
||||
config_get_swap_section_by_device() {
|
||||
local ssbd_device="$1"
|
||||
local ssbd_swap_cfg=
|
||||
local ssbd_swap_device=
|
||||
local ssbd_enabled=
|
||||
local ssbd_uuid=
|
||||
local ssbd_label=
|
||||
swap_cb() {
|
||||
local sc_cfg="$1"
|
||||
local sc_device="$2"
|
||||
local sc_uuid="$5"
|
||||
local sc_label="$6"
|
||||
local sc_cfgdevice="$3"
|
||||
local sc_found_device
|
||||
|
||||
sc_found_device="$(libmount_find_device_by_id "$sc_uuid" "$sc_label" "$sc_device" "$sc_cfgdevice")"
|
||||
if [ -n "$sc_found_device" ]; then
|
||||
ssbd_swap_cfg="$sc_cfg"
|
||||
ssbd_swap_device="$sc_found_device"
|
||||
ssbd_enabled="$4"
|
||||
ssbd_uuid="$5"
|
||||
ssbd_label="$6"
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
config_foreach config_get_swap swap "$ssbd_device"
|
||||
[ -n "$ssbd_swap_device" ] && config_create_swap_fstab_entry "$ssbd_swap_device" "$ssbd_enabled"
|
||||
swap_dev_section_cb "$ssbd_swap_cfg" "$ssbd_swap_device" "$ssbd_enabled" "$ssbd_uuid" "$ssbd_label"
|
||||
reset_block_cb
|
||||
}
|
||||
|
||||
|
36
package/block-mount/files/fsck.sh
Normal file
36
package/block-mount/files/fsck.sh
Normal file
@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2010 Vertical Communications
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
libmount_fsck() {
|
||||
local device="$1"
|
||||
local fsck_fstype="$2"
|
||||
local fsck_enabled="$3"
|
||||
local known_type
|
||||
local found_fsck=0
|
||||
|
||||
|
||||
[ -n "$fsck_type" ] && [ "$fsck_type" != "swap" ] && {
|
||||
grep -q "$device" /proc/swaps || grep -q "$device" /proc/mounts || {
|
||||
[ -e "$device" ] && [ "$fsck_enabled" -eq 1 ] && {
|
||||
for known_type in $libmount_known_fsck; do
|
||||
if [ "$known_type" = "$fsck_fstype" ]; then
|
||||
fsck_${known_type} "$device"
|
||||
found_fsck=1
|
||||
break
|
||||
fi
|
||||
done
|
||||
if [ "$found_fsck" -ne 1 ]; then
|
||||
logger -t 'fstab' "Unable to check/repair $device; no known fsck for filesystem type $fstype"
|
||||
fi
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
libmount_known_fsck=""
|
||||
|
||||
include /lib/functions/fsck
|
||||
|
@ -1,10 +1,20 @@
|
||||
config global automount
|
||||
option from_fstab 1
|
||||
option anon_mount 1
|
||||
|
||||
config global autoswap
|
||||
option from_fstab 1
|
||||
option anon_swap 0
|
||||
|
||||
config mount
|
||||
option target /home
|
||||
option device /dev/sda1
|
||||
option fstype ext3
|
||||
option options rw,sync
|
||||
option enabled 0
|
||||
option enabled_fsck 0
|
||||
|
||||
config swap
|
||||
option device /dev/sda2
|
||||
option enabled 0
|
||||
|
34
package/base-files/files/etc/init.d/fstab → package/block-mount/files/fstab.init
Executable file → Normal file
34
package/base-files/files/etc/init.d/fstab → package/block-mount/files/fstab.init
Executable file → Normal file
@ -1,30 +1,23 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2007 OpenWrt.org
|
||||
# Copyright (C) 2010 Vertical Communications
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
|
||||
START=20
|
||||
|
||||
. /lib/functions/mount.sh
|
||||
|
||||
do_mount() {
|
||||
local cfg="$1"
|
||||
|
||||
config_get device "$cfg" device
|
||||
config_get target "$cfg" target
|
||||
[ -n "$device" -a -n "$target" ] || return 0
|
||||
|
||||
mkdir -p $target
|
||||
config_get fstype "$cfg" fstype 'auto'
|
||||
config_get options "$cfg" options '-rw'
|
||||
config_get_bool enabled "$cfg" "enabled" '1'
|
||||
[ "$enabled" -eq 0 ] && options="noauto,$options"
|
||||
echo "$device $target $fstype $options 0 0" >> /tmp/fstab
|
||||
config_mount_by_section "$cfg"
|
||||
}
|
||||
|
||||
do_swapon() {
|
||||
local cfg="$1"
|
||||
|
||||
config_get device "$cfg" device
|
||||
config_get_bool enabled "$cfg" "enabled" '1'
|
||||
[ -n "$device" -a "$enabled" -gt 0 ] || return 0
|
||||
echo "$device none swap sw 0 0" >> /tmp/fstab
|
||||
config_swapon_by_section "$cfg"
|
||||
}
|
||||
|
||||
do_unmount() {
|
||||
@ -47,17 +40,18 @@ do_swapoff() {
|
||||
|
||||
start() {
|
||||
config_load fstab
|
||||
echo '# WARNING: this is an auto generated file, please use uci to set static filesystems' > /tmp/fstab
|
||||
mkdir -p /var/lock
|
||||
lock /var/lock/fstab.lck
|
||||
echo '# WARNING: this is an auto generated file, please use uci to set defined filesystems' > /etc/fstab
|
||||
lock -u /var/lock/fstab.lck
|
||||
config_foreach do_mount mount
|
||||
config_foreach do_swapon swap
|
||||
mount -a
|
||||
[ -x /sbin/swapon ] && swapon -a
|
||||
}
|
||||
|
||||
stop() {
|
||||
config_load fstab
|
||||
config_foreach do_unmount mount
|
||||
config_foreach do_swapoff swap
|
||||
[ -x /sbin/swapoff ] && swapoff -a
|
||||
swapoff -a
|
||||
}
|
||||
|
89
package/block-mount/files/mount.sh
Normal file
89
package/block-mount/files/mount.sh
Normal file
@ -0,0 +1,89 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2010 Vertical Communications
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
|
||||
. /lib/functions/block.sh
|
||||
. /lib/functions/fsck.sh
|
||||
|
||||
config_mount_by_section() {
|
||||
local cfg="$1"
|
||||
local find_rootfs="$2"
|
||||
|
||||
mount_cb() {
|
||||
local cfg="$1"
|
||||
local device="$2"
|
||||
shift
|
||||
local target="$2"
|
||||
local cfgdevice="$3"
|
||||
local fstype="$4"
|
||||
local options="$5"
|
||||
local enabled="$6"
|
||||
local enabled_fsck="$7"
|
||||
local uuid="$8"
|
||||
local label="$9"
|
||||
shift
|
||||
local is_rootfs="$9"
|
||||
shift
|
||||
local found_device=""
|
||||
local fsck_type=""
|
||||
|
||||
found_device="$(libmount_find_device_by_id "$uuid" "$label" "$device" "$cfgdevice")"
|
||||
if [ -n "$found_device" ]; then
|
||||
if [ -z "$find_rootfs" ] || [ "$find_rootfs" -eq 0 ] || [ "$is_rootfs" -eq 1 ]; then
|
||||
[ "$enabled_fsck" -eq 1 ] && {
|
||||
grep -q "$found_device" /proc/swaps || grep -q "$found_device" /proc/mounts || {
|
||||
libmount_fsck "$found_device" "$fsck_type" "$enabled_fsck"
|
||||
}
|
||||
}
|
||||
|
||||
[ "$is_rootfs" -eq 1 ] && [ "$find_rootfs" -eq 1 ] && {
|
||||
target=/overlay
|
||||
}
|
||||
config_create_mount_fstab_entry "$found_device" "$target" "$fstype" "$options" "$enabled"
|
||||
grep -q "$found_device" /proc/swaps || grep -q "$found_device" /proc/mounts || {
|
||||
[ "$enabled" -eq 1 ] && mkdir -p "$target" && mount "$target" 2>&1 | tee /proc/self/fd/2 | logger -t 'fstab'
|
||||
}
|
||||
|
||||
fi
|
||||
fi
|
||||
[ "$is_rootfs" -eq 1 ] && [ "$find_rootfs" -eq 1 ] && {
|
||||
rootfs_found=1
|
||||
}
|
||||
return 0
|
||||
}
|
||||
config_get_mount "$cfg"
|
||||
reset_block_cb
|
||||
}
|
||||
|
||||
config_swapon_by_section() {
|
||||
local cfg="$1"
|
||||
|
||||
swap_cb() {
|
||||
local cfg="$1"
|
||||
local device="$2"
|
||||
local cfgdevice="$3"
|
||||
local enabled="$4"
|
||||
local uuid="$5"
|
||||
local label="$6"
|
||||
local uuid
|
||||
local label
|
||||
|
||||
local found_device=""
|
||||
local fsck_type=""
|
||||
|
||||
found_device="$(libmount_find_device_by_id "$uuid" "$label" "$device" "$cfgdevice")"
|
||||
|
||||
if [ -n "$found_device" ]; then
|
||||
config_create_swap_fstab_entry "$found_device" "$enabled"
|
||||
grep -q "$found_device" /proc/swaps || grep -q "$found_device" /proc/mounts || {
|
||||
[ "$enabled" -eq 1 ] && swapon "$found_device" | tee /proc/self/fd/2 | logger -t 'fstab'
|
||||
}
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
config_get_swap "$cfg"
|
||||
reset_block_cb
|
||||
}
|
@ -141,6 +141,9 @@ enum {
|
||||
|
||||
/* OvisLink */
|
||||
WL1600GL,
|
||||
|
||||
/* Microsoft */
|
||||
MN700,
|
||||
};
|
||||
|
||||
static void __init bcm4780_init(void) {
|
||||
@ -868,6 +871,16 @@ static struct platform_t __initdata platforms[] = {
|
||||
{ .name = "connected", .gpio = 1 << 0, .polarity = REVERSE },
|
||||
},
|
||||
},
|
||||
/* Microsoft */
|
||||
[MN700] = {
|
||||
.name = "Microsoft MN-700",
|
||||
.buttons = {
|
||||
{ .name = "reset", .gpio = 1 << 7 },
|
||||
},
|
||||
.leds = {
|
||||
{ .name = "power", .gpio = 1 << 6, .polarity = NORMAL },
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
static struct platform_t __init *platform_detect(void)
|
||||
@ -1027,8 +1040,13 @@ static struct platform_t __init *platform_detect(void)
|
||||
if (simple_strtoul(boardnum, NULL, 0) == 2)
|
||||
return &platforms[WAP54GV1];
|
||||
}
|
||||
if (startswith(getvar("hardware_version"), "WL500-"))
|
||||
return &platforms[WL500G];
|
||||
/* MN-700 has also hardware_version 'WL500-...', so use boardnum */
|
||||
if (startswith(getvar("hardware_version"), "WL500-")) {
|
||||
if (!strcmp(getvar("boardnum"), "mn700"))
|
||||
return &platforms[MN700];
|
||||
else
|
||||
return &platforms[WL500G];
|
||||
}
|
||||
if (startswith(getvar("hardware_version"), "WL300-")) {
|
||||
/* Either WL-300g or WL-HDD, do more extensive checks */
|
||||
if ((simple_strtoul(getvar("et0phyaddr"), NULL, 0) == 0) &&
|
||||
|
@ -110,7 +110,7 @@ config BUSYBOX_CONFIG_FEATURE_SETFONT_TEXTUAL_MAP
|
||||
|
||||
config BUSYBOX_CONFIG_DEFAULT_SETFONT_DIR
|
||||
string "Default directory for console-tools files"
|
||||
default n
|
||||
default ""
|
||||
depends on BUSYBOX_CONFIG_SETFONT
|
||||
help
|
||||
Directory to use if setfont's params are simple filenames
|
||||
|
@ -1,6 +1,16 @@
|
||||
--- a/networking/ping.c
|
||||
+++ b/networking/ping.c
|
||||
@@ -91,7 +91,7 @@ static void ping4(len_and_sockaddr *lsa)
|
||||
Index: busybox-1.15.3/networking/ping.c
|
||||
===================================================================
|
||||
--- busybox-1.15.3.orig/networking/ping.c 2010-02-28 13:47:00.000000000 +0100
|
||||
+++ busybox-1.15.3/networking/ping.c 2010-02-28 13:47:19.000000000 +0100
|
||||
@@ -79,6 +79,7 @@
|
||||
/* simple version */
|
||||
|
||||
static char *hostname;
|
||||
+static unsigned datalen = DEFDATALEN;
|
||||
|
||||
static void noresp(int ign UNUSED_PARAM)
|
||||
{
|
||||
@@ -91,7 +92,7 @@
|
||||
struct sockaddr_in pingaddr;
|
||||
struct icmp *pkt;
|
||||
int pingsock, c;
|
||||
@ -9,7 +19,7 @@
|
||||
|
||||
pingsock = create_icmp_socket();
|
||||
pingaddr = lsa->u.sin;
|
||||
@@ -101,7 +101,7 @@ static void ping4(len_and_sockaddr *lsa)
|
||||
@@ -101,7 +102,7 @@
|
||||
pkt->icmp_type = ICMP_ECHO;
|
||||
pkt->icmp_cksum = in_cksum((unsigned short *) pkt, sizeof(packet));
|
||||
|
||||
@ -18,7 +28,7 @@
|
||||
(struct sockaddr *) &pingaddr, sizeof(pingaddr));
|
||||
|
||||
/* listen for replies */
|
||||
@@ -135,7 +135,7 @@ static void ping6(len_and_sockaddr *lsa)
|
||||
@@ -135,7 +136,7 @@
|
||||
struct icmp6_hdr *pkt;
|
||||
int pingsock, c;
|
||||
int sockopt;
|
||||
@ -27,7 +37,7 @@
|
||||
|
||||
pingsock = create_icmp6_socket();
|
||||
pingaddr = lsa->u.sin6;
|
||||
@@ -147,7 +147,7 @@ static void ping6(len_and_sockaddr *lsa)
|
||||
@@ -147,7 +148,7 @@
|
||||
sockopt = offsetof(struct icmp6_hdr, icmp6_cksum);
|
||||
setsockopt(pingsock, SOL_RAW, IPV6_CHECKSUM, &sockopt, sizeof(sockopt));
|
||||
|
||||
|
@ -29,6 +29,8 @@ define KernelPackage/compcache
|
||||
$(PKG_BUILD_DIR)/sub-projects/allocators/xvmalloc-kmod/xvmalloc.$(LINUX_KMOD_SUFFIX)
|
||||
endef
|
||||
|
||||
include $(INCLUDE_DIR)/kernel-defaults.mk
|
||||
|
||||
XVM = sub-projects/allocators/xvmalloc-kmod
|
||||
LZO = sub-projects/compression/lzo-kmod
|
||||
|
||||
@ -38,13 +40,7 @@ BUILDFLAGS:=-DCONFIG_BLK_DEV_RAMZSWAP_STATS \
|
||||
-g -Wall
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C "$(LINUX_DIR)" \
|
||||
CROSS_COMPILE="$(KERNEL_CROSS)" \
|
||||
CC="$(KERNEL_CC)" \
|
||||
ARCH="$(LINUX_KARCH)" \
|
||||
SUBDIRS="$(PKG_BUILD_DIR)" \
|
||||
EXTRA_CFLAGS="$(BUILDFLAGS)" \
|
||||
modules
|
||||
$(MAKE) $(KERNEL_MAKEOPTS) EXTRA_CFLAGS="$(BUILDFLAGS)" M="$(PKG_BUILD_DIR)" modules
|
||||
endef
|
||||
|
||||
define KernelPackage/compcache/install
|
||||
|
@ -36,7 +36,7 @@ endef
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
CFLAGS="$(TARGET_CFLAGS) -DHAVE_ISC_READER=1" \
|
||||
CFLAGS="$(TARGET_CFLAGS)" \
|
||||
BINDIR="/usr/sbin" MANDIR="/usr/man" \
|
||||
AWK="awk" \
|
||||
all
|
||||
|
@ -176,13 +176,15 @@ dhcp_host_add() {
|
||||
config_get networkid "$cfg" networkid
|
||||
[ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid"
|
||||
|
||||
config_get mac "$cfg" mac
|
||||
[ -n "$mac" ] || return 0
|
||||
|
||||
config_get ip "$cfg" ip
|
||||
[ -n "$ip" ] || return 0
|
||||
|
||||
append args "--dhcp-host=$mac,${networkid:+net:$networkid,}$ip${name:+,$name}"
|
||||
macs=""
|
||||
config_get mac "$cfg" mac
|
||||
for m in $mac; do append macs "$m" ","; done
|
||||
[ -n "$macs" ] || return 0
|
||||
|
||||
append args "--dhcp-host=$macs,${networkid:+net:$networkid,}$ip${name:+,$name}"
|
||||
}
|
||||
|
||||
dhcp_mac_add() {
|
||||
@ -235,7 +237,7 @@ dhcp_add() {
|
||||
DNS_SERVERS="$DNS_SERVERS $dnsserver"
|
||||
}
|
||||
|
||||
append_bool "$cfg" ignore "-2 $ifname" && return 0
|
||||
append_bool "$cfg" ignore "-2 '$ifname'" && return 0
|
||||
|
||||
config_get proto "$net" proto
|
||||
[ static = "$proto" ] || return 0
|
||||
|
@ -1,6 +1,6 @@
|
||||
#
|
||||
# Copyright (C) 2006-2008 OpenWrt.org
|
||||
#
|
||||
# Copyright 2010 Vertical Communications
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
@ -156,8 +156,8 @@ define Package/e2fsprogs/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(foreach lib,com_err e2p,$(PKG_INSTALL_DIR)/usr/lib/lib$(lib).so.*) $(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/e2fsck.init $(1)/etc/init.d/e2fsck
|
||||
|
||||
$(INSTALL_DIR) $(1)/lib/functions/fsck
|
||||
$(INSTALL_DATA) ./files/e2fsck.sh $(1)/lib/functions/fsck/
|
||||
endef
|
||||
|
||||
define Package/libuuid/install
|
||||
|
@ -1,35 +0,0 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
# Copyright (C) 2008 OpenWrt.org
|
||||
# Vasilis Tsiligiannis <acinonyxs@yahoo.gr>
|
||||
|
||||
START=15
|
||||
|
||||
e2fsck() {
|
||||
local args
|
||||
local cfg="$1"
|
||||
|
||||
config_get device "$cfg" device
|
||||
[ -b "$device" ] || return 0
|
||||
|
||||
config_get fstype "$cfg" fstype
|
||||
case "$fstype" in
|
||||
ext2|ext3|ext4)
|
||||
/usr/sbin/e2fsck -p "$device"
|
||||
local status="$?"
|
||||
case "$status" in
|
||||
0|1) continue;;
|
||||
2) reboot;;
|
||||
4) echo "e2fsck ($device): Warning! Uncorrected errors.";;
|
||||
*) echo "e2fsck ($device): Error $status. Check not complete.";;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
start() {
|
||||
config_load fstab
|
||||
config_foreach e2fsck mount
|
||||
}
|
||||
|
35
package/e2fsprogs/files/e2fsck.sh
Normal file
35
package/e2fsprogs/files/e2fsck.sh
Normal file
@ -0,0 +1,35 @@
|
||||
#!/bin/sh
|
||||
# Copyright 2010 Vertical Communications
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
fsck_e2fsck() {
|
||||
e2fsck -p "$device" 2>&1 | logger -t "fstab: e2fsck ($device)"
|
||||
local status="$?"
|
||||
case "$status" in
|
||||
0|1) ;; #success
|
||||
2) reboot;;
|
||||
4) echo "e2fsck ($device): Warning! Uncorrected errors."| logger -t fstab
|
||||
return 1
|
||||
;;
|
||||
*) echo "e2fsck ($device): Error $status. Check not complete."| logger -t fstab;;
|
||||
esac
|
||||
return 0
|
||||
}
|
||||
|
||||
fsck_ext2() {
|
||||
fsck_e2fsck "$@"
|
||||
}
|
||||
|
||||
fsck_ext3() {
|
||||
fsck_e2fsck "$@"
|
||||
}
|
||||
|
||||
fsck_ext4() {
|
||||
fsck_e2fsck "$@"
|
||||
}
|
||||
|
||||
append libmount_known_fsck "ext2"
|
||||
append libmount_known_fsck "ext3"
|
||||
append libmount_known_fsck "ext4"
|
@ -294,8 +294,11 @@ fw_rule() {
|
||||
[ -n "$src" -a -z "$dest" ] && ZONE=zone_$src
|
||||
[ -n "$src" -a -n "$dest" ] && ZONE=zone_${src}_forward
|
||||
[ -n "$dest" ] && TARGET=zone_${dest}_$target
|
||||
|
||||
eval 'RULE_COUNT=$((++RULE_COUNT_'$ZONE'))'
|
||||
|
||||
add_rule() {
|
||||
$IPTABLES -A $ZONE \
|
||||
$IPTABLES -I $ZONE $RULE_COUNT \
|
||||
${proto:+-p $proto} \
|
||||
${icmp_type:+--icmp-type $icmp_type} \
|
||||
${src_ip:+-s $src_ip} \
|
||||
|
@ -8,9 +8,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hostapd
|
||||
PKG_VERSION:=20100117
|
||||
PKG_VERSION:=20100309
|
||||
PKG_RELEASE:=1
|
||||
PKG_REV:=43a7fe2e0e614e52fa05ff4d78af91bd4e17d3b2
|
||||
PKG_REV:=7b90c16aa9ca377b1a6d160c1ba0f2bd304f7e2f
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=git://w1.fi/srv/git/hostap.git
|
||||
@ -75,7 +75,7 @@ define Package/hostapd/Default
|
||||
CATEGORY:=Network
|
||||
TITLE:=IEEE 802.1x Authenticator
|
||||
URL:=http://hostap.epitest.fi/
|
||||
DEPENDS:=@!TARGET_avr32 @!TARGET_etrax +PACKAGE_kmod-mac80211:libnl-tiny +PACKAGE_kmod-mac80211:crda
|
||||
DEPENDS:= +PACKAGE_kmod-mac80211:libnl-tiny +PACKAGE_kmod-mac80211:crda @(!(TARGET_avr32||TARGET_etrax)||BROKEN)
|
||||
MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
|
||||
endef
|
||||
|
||||
@ -116,7 +116,7 @@ define Package/wpad/Default
|
||||
CATEGORY:=Network
|
||||
TITLE:=IEEE 802.1x Authenticator/Supplicant
|
||||
URL:=http://hostap.epitest.fi/
|
||||
DEPENDS:=@!TARGET_avr32 @!TARGET_etrax +PACKAGE_kmod-mac80211:libnl-tiny +PACKAGE_kmod-mac80211:crda
|
||||
DEPENDS:= +PACKAGE_kmod-mac80211:libnl-tiny +PACKAGE_kmod-mac80211:crda @(!(TARGET_avr32||TARGET_etrax)||BROKEN)
|
||||
MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
|
||||
endef
|
||||
|
||||
@ -146,7 +146,7 @@ define Package/wpa-supplicant
|
||||
CATEGORY:=Network
|
||||
TITLE:=WPA Supplicant
|
||||
URL:=http://hostap.epitest.fi/wpa_supplicant/
|
||||
DEPENDS:=@!TARGET_avr32 @!TARGET_etrax +PACKAGE_kmod-mac80211:libnl-tiny +PACKAGE_kmod-mac80211:crda
|
||||
DEPENDS:= +PACKAGE_kmod-mac80211:libnl-tiny +PACKAGE_kmod-mac80211:crda @(!(TARGET_avr32||TARGET_etrax)||BROKEN)
|
||||
VARIANT:=supplicant-full
|
||||
MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
|
||||
endef
|
||||
@ -262,8 +262,6 @@ define Build/Compile
|
||||
endef
|
||||
|
||||
define Install/hostapd
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/net
|
||||
$(INSTALL_DATA) ./files/hostapd.hotplug $(1)/etc/hotplug.d/net/
|
||||
$(INSTALL_DIR) $(1)/lib/wifi
|
||||
$(INSTALL_DATA) ./files/hostapd.sh $(1)/lib/wifi/hostapd.sh
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
|
@ -1,12 +0,0 @@
|
||||
if [ "$ACTION" = "add" -o "$ACTION" = "register" ]; then
|
||||
case "$INTERFACE" in
|
||||
wlan*.sta*)
|
||||
local BASEIF="${INTERFACE%%\.*}"
|
||||
|
||||
include /lib/network
|
||||
scan_interfaces
|
||||
local CONFIG="$(find_config "$BASEIF")"
|
||||
[ -n "$CONFIG" ] && setup_interface "$INTERFACE" "$CONFIG"
|
||||
;;
|
||||
esac
|
||||
fi
|
@ -14,6 +14,14 @@ wpa_supplicant_setup_vif() {
|
||||
config_get key "$vif" key
|
||||
}
|
||||
|
||||
local net_cfg bridge
|
||||
config_get bridge "$vif" bridge
|
||||
[ -z "$bridge" ] && {
|
||||
net_cfg="$(find_net_config "$vif")"
|
||||
[ -z "$net_cfg" ] || bridge="$(bridge_interface "$net_cfg")"
|
||||
config_set "$vif" bridge "$bridge"
|
||||
}
|
||||
|
||||
case "$enc" in
|
||||
*none*)
|
||||
key_mgmt='NONE'
|
||||
|
@ -1,15 +1,15 @@
|
||||
--- a/src/drivers/driver_madwifi.c
|
||||
+++ b/src/drivers/driver_madwifi.c
|
||||
@@ -1170,8 +1170,6 @@ madwifi_init(struct hostapd_data *hapd,
|
||||
@@ -1177,8 +1177,6 @@ madwifi_init(struct hostapd_data *hapd,
|
||||
goto bad;
|
||||
}
|
||||
|
||||
- /* mark down during setup */
|
||||
- linux_set_iface_flags(drv->ioctl_sock, drv->iface, 0);
|
||||
madwifi_set_privacy(drv->iface, drv, 0); /* default to no privacy */
|
||||
madwifi_set_privacy(drv, 0); /* default to no privacy */
|
||||
|
||||
madwifi_receive_probe_req(drv);
|
||||
@@ -1261,8 +1259,7 @@ madwifi_set_countermeasures(void *priv,
|
||||
@@ -1268,8 +1266,7 @@ madwifi_set_countermeasures(void *priv,
|
||||
static int
|
||||
madwifi_commit(void *priv)
|
||||
{
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -649,7 +649,6 @@ static int setup_interface(struct hostap
|
||||
@@ -650,7 +650,6 @@ static int setup_interface(struct hostap
|
||||
country[3] = '\0';
|
||||
if (hostapd_set_country(hapd, country) < 0) {
|
||||
wpa_printf(MSG_ERROR, "Failed to set country code");
|
||||
|
@ -18,7 +18,7 @@
|
||||
|
||||
#ifdef HOSTAPD
|
||||
|
||||
@@ -1499,7 +1500,6 @@ wpa_driver_madwifi_set_key(const char *i
|
||||
@@ -1506,7 +1507,6 @@ wpa_driver_madwifi_set_key(const char *i
|
||||
wk.ik_keyix = key_idx;
|
||||
wk.ik_keylen = key_len;
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
|
@ -10,7 +10,7 @@
|
||||
/* hostapd.c */
|
||||
--- a/src/ap/hostapd.c
|
||||
+++ b/src/ap/hostapd.c
|
||||
@@ -745,6 +745,9 @@ int hostapd_setup_interface_complete(str
|
||||
@@ -746,6 +746,9 @@ int hostapd_setup_interface_complete(str
|
||||
wpa_printf(MSG_DEBUG, "%s: Setup of interface done.",
|
||||
iface->bss[0]->conf->iface);
|
||||
|
||||
@ -116,7 +116,7 @@
|
||||
os_program_deinit();
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -1854,6 +1854,8 @@ struct hostapd_config * hostapd_config_r
|
||||
@@ -1855,6 +1855,8 @@ struct hostapd_config * hostapd_config_r
|
||||
}
|
||||
#endif /* CONFIG_IEEE80211W */
|
||||
#ifdef CONFIG_IEEE80211N
|
||||
|
@ -1,12 +0,0 @@
|
||||
--- a/src/ap/sta_info.c
|
||||
+++ b/src/ap/sta_info.c
|
||||
@@ -121,7 +121,8 @@ void ap_free_sta(struct hostapd_data *ha
|
||||
|
||||
accounting_sta_stop(hapd, sta);
|
||||
|
||||
- hapd->drv.set_wds_sta(hapd, sta->addr, sta->aid, 0);
|
||||
+ if (sta->flags & WLAN_STA_WDS)
|
||||
+ hapd->drv.set_wds_sta(hapd, sta->addr, sta->aid, 0);
|
||||
if (!ap_sta_in_other_bss(hapd, sta, WLAN_STA_ASSOC) &&
|
||||
!(sta->flags & WLAN_STA_PREAUTH))
|
||||
hapd->drv.sta_remove(hapd, sta->addr);
|
File diff suppressed because it is too large
Load Diff
@ -1,79 +0,0 @@
|
||||
--- a/src/ap/sta_info.c
|
||||
+++ b/src/ap/sta_info.c
|
||||
@@ -32,8 +32,8 @@
|
||||
#include "vlan_init.h"
|
||||
#include "sta_info.h"
|
||||
|
||||
-static int ap_sta_in_other_bss(struct hostapd_data *hapd,
|
||||
- struct sta_info *sta, u32 flags);
|
||||
+static void ap_sta_remove_in_other_bss(struct hostapd_data *hapd,
|
||||
+ struct sta_info *sta);
|
||||
static void ap_handle_session_timer(void *eloop_ctx, void *timeout_ctx);
|
||||
#ifdef CONFIG_IEEE80211W
|
||||
static void ap_sa_query_timer(void *eloop_ctx, void *timeout_ctx);
|
||||
@@ -123,8 +123,8 @@ void ap_free_sta(struct hostapd_data *ha
|
||||
|
||||
if (sta->flags & WLAN_STA_WDS)
|
||||
hapd->drv.set_wds_sta(hapd, sta->addr, sta->aid, 0);
|
||||
- if (!ap_sta_in_other_bss(hapd, sta, WLAN_STA_ASSOC) &&
|
||||
- !(sta->flags & WLAN_STA_PREAUTH))
|
||||
+
|
||||
+ if (!(sta->flags & WLAN_STA_PREAUTH))
|
||||
hapd->drv.sta_remove(hapd, sta->addr);
|
||||
|
||||
ap_sta_hash_del(hapd, sta);
|
||||
@@ -451,6 +451,7 @@ struct sta_info * ap_sta_add(struct host
|
||||
hapd->num_sta++;
|
||||
ap_sta_hash_add(hapd, sta);
|
||||
sta->ssid = &hapd->conf->ssid;
|
||||
+ ap_sta_remove_in_other_bss(hapd, sta);
|
||||
|
||||
return sta;
|
||||
}
|
||||
@@ -472,8 +473,8 @@ static int ap_sta_remove(struct hostapd_
|
||||
}
|
||||
|
||||
|
||||
-static int ap_sta_in_other_bss(struct hostapd_data *hapd,
|
||||
- struct sta_info *sta, u32 flags)
|
||||
+static void ap_sta_remove_in_other_bss(struct hostapd_data *hapd,
|
||||
+ struct sta_info *sta)
|
||||
{
|
||||
struct hostapd_iface *iface = hapd->iface;
|
||||
size_t i;
|
||||
@@ -488,11 +489,11 @@ static int ap_sta_in_other_bss(struct ho
|
||||
if (bss == hapd || bss == NULL)
|
||||
continue;
|
||||
sta2 = ap_get_sta(bss, sta->addr);
|
||||
- if (sta2 && ((sta2->flags & flags) == flags))
|
||||
- return 1;
|
||||
- }
|
||||
+ if (!sta2)
|
||||
+ continue;
|
||||
|
||||
- return 0;
|
||||
+ ap_sta_disconnect(bss, sta2, sta2->addr, WLAN_REASON_DEAUTH_LEAVING);
|
||||
+ }
|
||||
}
|
||||
|
||||
|
||||
@@ -502,8 +503,7 @@ void ap_sta_disassociate(struct hostapd_
|
||||
wpa_printf(MSG_DEBUG, "%s: disassociate STA " MACSTR,
|
||||
hapd->conf->iface, MAC2STR(sta->addr));
|
||||
sta->flags &= ~WLAN_STA_ASSOC;
|
||||
- if (!ap_sta_in_other_bss(hapd, sta, WLAN_STA_ASSOC))
|
||||
- ap_sta_remove(hapd, sta);
|
||||
+ ap_sta_remove(hapd, sta);
|
||||
sta->timeout_next = STA_DEAUTH;
|
||||
eloop_cancel_timeout(ap_handle_timer, hapd, sta);
|
||||
eloop_register_timeout(AP_MAX_INACTIVITY_AFTER_DISASSOC, 0,
|
||||
@@ -521,8 +521,7 @@ void ap_sta_deauthenticate(struct hostap
|
||||
wpa_printf(MSG_DEBUG, "%s: deauthenticate STA " MACSTR,
|
||||
hapd->conf->iface, MAC2STR(sta->addr));
|
||||
sta->flags &= ~(WLAN_STA_AUTH | WLAN_STA_ASSOC);
|
||||
- if (!ap_sta_in_other_bss(hapd, sta, WLAN_STA_ASSOC))
|
||||
- ap_sta_remove(hapd, sta);
|
||||
+ ap_sta_remove(hapd, sta);
|
||||
sta->timeout_next = STA_REMOVE;
|
||||
eloop_cancel_timeout(ap_handle_timer, hapd, sta);
|
||||
eloop_register_timeout(AP_MAX_INACTIVITY_AFTER_DEAUTH, 0,
|
@ -75,18 +75,18 @@
|
||||
ifdef CONFIG_AP
|
||||
@@ -631,6 +636,12 @@ CFLAGS += -DEAP_SERVER_WSC
|
||||
OBJS += ../src/ap/wps_hostapd.o
|
||||
OBJS += ../src/eap_server/eap_wsc.o
|
||||
OBJS += ../src/eap_server/eap_server_wsc.o
|
||||
endif
|
||||
+else
|
||||
+ ifdef MULTICALL
|
||||
+ OBJS += ../src/eap_server/eap.o
|
||||
+ OBJS += ../src/eap_server/eap_identity.o
|
||||
+ OBJS += ../src/eap_server/eap_methods.o
|
||||
+ OBJS += ../src/eap_server/eap_server.o
|
||||
+ OBJS += ../src/eap_server/eap_server_identity.o
|
||||
+ OBJS += ../src/eap_server/eap_server_methods.o
|
||||
+ endif
|
||||
endif
|
||||
|
||||
ifdef NEED_RSN_AUTHENTICATOR
|
||||
@@ -1260,6 +1271,12 @@ BCHECK=../src/drivers/build.wpa_supplica
|
||||
@@ -1261,6 +1272,12 @@ BCHECK=../src/drivers/build.wpa_supplica
|
||||
wpa_priv: $(BCHECK) $(OBJS_priv)
|
||||
$(LDO) $(LDFLAGS) -o wpa_priv $(OBJS_priv) $(LIBS)
|
||||
|
||||
@ -99,7 +99,7 @@
|
||||
wpa_supplicant: .config $(BCHECK) $(OBJS) $(EXTRA_progs)
|
||||
$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
|
||||
|
||||
@@ -1319,6 +1336,12 @@ endif
|
||||
@@ -1320,6 +1337,12 @@ endif
|
||||
$(Q)$(CC) -c -o $@ $(CFLAGS) $<
|
||||
@$(E) " CC " $<
|
||||
|
||||
@ -114,7 +114,7 @@
|
||||
wpa_cli.exe: wpa_cli
|
||||
--- a/src/drivers/driver.h
|
||||
+++ b/src/drivers/driver.h
|
||||
@@ -2384,8 +2384,8 @@ union wpa_event_data {
|
||||
@@ -2413,8 +2413,8 @@ union wpa_event_data {
|
||||
* Driver wrapper code should call this function whenever an event is received
|
||||
* from the driver.
|
||||
*/
|
||||
@ -169,7 +169,7 @@
|
||||
for (;;) {
|
||||
--- a/wpa_supplicant/events.c
|
||||
+++ b/wpa_supplicant/events.c
|
||||
@@ -1425,8 +1425,8 @@ static void wpa_supplicant_event_ibss_rs
|
||||
@@ -1506,8 +1506,8 @@ static void wpa_supplicant_event_ibss_rs
|
||||
#endif /* CONFIG_IBSS_RSN */
|
||||
|
||||
|
||||
|
@ -1,14 +1,14 @@
|
||||
--- a/wpa_supplicant/scan.c
|
||||
+++ b/wpa_supplicant/scan.c
|
||||
@@ -215,6 +215,7 @@ static void wpa_supplicant_scan(void *el
|
||||
@@ -248,6 +248,7 @@ static void wpa_supplicant_scan(void *el
|
||||
enum wps_request_type req_type = WPS_REQ_ENROLLEE_INFO;
|
||||
#endif /* CONFIG_WPS */
|
||||
struct wpa_driver_scan_params params;
|
||||
+ int scan_ssid_all = 1;
|
||||
size_t max_ssids;
|
||||
enum wpa_states prev_state;
|
||||
|
||||
if (wpa_s->disconnected && !wpa_s->scan_req) {
|
||||
@@ -275,6 +276,16 @@ static void wpa_supplicant_scan(void *el
|
||||
@@ -310,6 +311,16 @@ static void wpa_supplicant_scan(void *el
|
||||
wpa_s->wpa_state == WPA_INACTIVE)
|
||||
wpa_supplicant_set_state(wpa_s, WPA_SCANNING);
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
/* Find the starting point from which to continue scanning */
|
||||
ssid = wpa_s->conf->ssid;
|
||||
if (wpa_s->prev_scan_ssid != WILDCARD_SSID_SCAN) {
|
||||
@@ -336,6 +347,9 @@ static void wpa_supplicant_scan(void *el
|
||||
@@ -371,6 +382,9 @@ static void wpa_supplicant_scan(void *el
|
||||
int_array_sort_unique(params.freqs);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/wpa_supplicant/events.c
|
||||
+++ b/wpa_supplicant/events.c
|
||||
@@ -843,7 +843,7 @@ static void wpa_supplicant_event_scan_re
|
||||
@@ -924,7 +924,7 @@ static void wpa_supplicant_event_scan_re
|
||||
wpa_printf(MSG_DEBUG, "Setup a new network");
|
||||
wpa_supplicant_associate(wpa_s, NULL, ssid);
|
||||
} else
|
||||
|
@ -145,7 +145,7 @@
|
||||
madwifi_raw_receive, drv, 1);
|
||||
if (drv->sock_raw == NULL)
|
||||
return -1;
|
||||
@@ -1017,7 +1019,7 @@ madwifi_get_we_version(struct madwifi_dr
|
||||
@@ -1016,7 +1018,7 @@ madwifi_get_we_version(struct madwifi_dr
|
||||
return -1;
|
||||
|
||||
memset(&iwr, 0, sizeof(iwr));
|
||||
@ -154,7 +154,7 @@
|
||||
iwr.u.data.pointer = (caddr_t) range;
|
||||
iwr.u.data.length = buflen;
|
||||
|
||||
@@ -1134,17 +1136,17 @@ madwifi_init(struct hostapd_data *hapd,
|
||||
@@ -1133,17 +1135,17 @@ madwifi_init(struct hostapd_data *hapd,
|
||||
perror("socket[PF_INET,SOCK_DGRAM]");
|
||||
goto bad;
|
||||
}
|
||||
@ -175,7 +175,7 @@
|
||||
handle_read, drv, 1);
|
||||
if (drv->sock_xmit == NULL)
|
||||
goto bad;
|
||||
@@ -1158,7 +1160,7 @@ madwifi_init(struct hostapd_data *hapd,
|
||||
@@ -1157,7 +1159,7 @@ madwifi_init(struct hostapd_data *hapd,
|
||||
1);
|
||||
if (drv->sock_recv == NULL)
|
||||
goto bad;
|
||||
@ -184,7 +184,7 @@
|
||||
wpa_printf(MSG_DEBUG, "Interface in bridge %s; configure for "
|
||||
"EAPOL receive", brname);
|
||||
drv->sock_recv = l2_packet_init(brname, NULL, ETH_P_EAPOL,
|
||||
@@ -1169,7 +1171,7 @@ madwifi_init(struct hostapd_data *hapd,
|
||||
@@ -1168,7 +1170,7 @@ madwifi_init(struct hostapd_data *hapd,
|
||||
drv->sock_recv = drv->sock_xmit;
|
||||
|
||||
memset(&iwr, 0, sizeof(iwr));
|
||||
@ -193,16 +193,7 @@
|
||||
|
||||
iwr.u.mode = IW_MODE_MASTER;
|
||||
|
||||
@@ -1179,7 +1181,7 @@ madwifi_init(struct hostapd_data *hapd,
|
||||
goto bad;
|
||||
}
|
||||
|
||||
- madwifi_set_privacy(drv->iface, drv, 0); /* default to no privacy */
|
||||
+ madwifi_set_privacy(drv->ifname, drv, 0); /* default to no privacy */
|
||||
|
||||
madwifi_receive_probe_req(drv);
|
||||
|
||||
@@ -1204,7 +1206,7 @@ madwifi_deinit(void *priv)
|
||||
@@ -1203,7 +1205,7 @@ madwifi_deinit(void *priv)
|
||||
struct madwifi_driver_data *drv = priv;
|
||||
|
||||
netlink_deinit(drv->netlink);
|
||||
@ -211,7 +202,7 @@
|
||||
if (drv->ioctl_sock >= 0)
|
||||
close(drv->ioctl_sock);
|
||||
if (drv->sock_recv != NULL && drv->sock_recv != drv->sock_xmit)
|
||||
@@ -1223,7 +1225,7 @@ madwifi_set_ssid(const char *ifname, voi
|
||||
@@ -1222,7 +1224,7 @@ madwifi_set_ssid(void *priv, const u8 *b
|
||||
struct iwreq iwr;
|
||||
|
||||
memset(&iwr, 0, sizeof(iwr));
|
||||
@ -220,7 +211,7 @@
|
||||
iwr.u.essid.flags = 1; /* SSID active */
|
||||
iwr.u.essid.pointer = (caddr_t) buf;
|
||||
iwr.u.essid.length = len + 1;
|
||||
@@ -1244,7 +1246,7 @@ madwifi_get_ssid(const char *ifname, voi
|
||||
@@ -1243,7 +1245,7 @@ madwifi_get_ssid(void *priv, u8 *buf, in
|
||||
int ret = 0;
|
||||
|
||||
memset(&iwr, 0, sizeof(iwr));
|
||||
@ -229,7 +220,7 @@
|
||||
iwr.u.essid.pointer = (caddr_t) buf;
|
||||
iwr.u.essid.length = len;
|
||||
|
||||
@@ -1271,137 +1273,16 @@ madwifi_commit(void *priv)
|
||||
@@ -1270,137 +1272,16 @@ madwifi_commit(void *priv)
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -370,7 +361,7 @@
|
||||
const u8 *wpa_ie, size_t wpa_ie_len)
|
||||
{
|
||||
struct iwreq iwr;
|
||||
@@ -1412,7 +1293,7 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
|
||||
@@ -1411,7 +1292,7 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
|
||||
iwr.u.data.pointer = (void *) wpa_ie;
|
||||
iwr.u.data.length = wpa_ie_len;
|
||||
|
||||
@ -379,7 +370,7 @@
|
||||
perror("ioctl[IEEE80211_IOCTL_SETOPTIE]");
|
||||
return -1;
|
||||
}
|
||||
@@ -1420,156 +1301,51 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
|
||||
@@ -1419,156 +1300,51 @@ wpa_driver_madwifi_set_wpa_ie(struct wpa
|
||||
}
|
||||
|
||||
static int
|
||||
@ -544,7 +535,7 @@
|
||||
ret = -1;
|
||||
if (wpa_driver_madwifi_set_auth_alg(drv, params->auth_alg) < 0)
|
||||
ret = -1;
|
||||
@@ -1592,12 +1368,12 @@ wpa_driver_madwifi_associate(void *priv,
|
||||
@@ -1591,12 +1367,12 @@ wpa_driver_madwifi_associate(void *priv,
|
||||
params->wpa_ie_len == 0)
|
||||
privacy = 0;
|
||||
|
||||
@ -559,7 +550,7 @@
|
||||
ret = -1;
|
||||
|
||||
if (params->bssid == NULL) {
|
||||
@@ -1605,14 +1381,14 @@ wpa_driver_madwifi_associate(void *priv,
|
||||
@@ -1604,14 +1380,14 @@ wpa_driver_madwifi_associate(void *priv,
|
||||
* roaming */
|
||||
/* FIX: this does not seem to work; would probably need to
|
||||
* change something in the driver */
|
||||
@ -576,7 +567,7 @@
|
||||
ret = -1;
|
||||
if (wpa_driver_wext_set_ssid(drv->wext, params->ssid,
|
||||
params->ssid_len) < 0)
|
||||
@@ -1621,7 +1397,7 @@ wpa_driver_madwifi_associate(void *priv,
|
||||
@@ -1620,7 +1396,7 @@ wpa_driver_madwifi_associate(void *priv,
|
||||
mlme.im_op = IEEE80211_MLME_ASSOC;
|
||||
os_memcpy(mlme.im_macaddr, params->bssid, IEEE80211_ADDR_LEN);
|
||||
if (set80211priv(drv, IEEE80211_IOCTL_SETMLME, &mlme,
|
||||
@ -585,7 +576,7 @@
|
||||
wpa_printf(MSG_DEBUG, "%s: SETMLME[ASSOC] failed",
|
||||
__func__);
|
||||
ret = -1;
|
||||
@@ -1634,7 +1410,7 @@ wpa_driver_madwifi_associate(void *priv,
|
||||
@@ -1633,7 +1409,7 @@ wpa_driver_madwifi_associate(void *priv,
|
||||
static int
|
||||
wpa_driver_madwifi_set_auth_alg(void *priv, int auth_alg)
|
||||
{
|
||||
@ -594,7 +585,7 @@
|
||||
int authmode;
|
||||
|
||||
if ((auth_alg & WPA_AUTH_ALG_OPEN) &&
|
||||
@@ -1645,13 +1421,13 @@ wpa_driver_madwifi_set_auth_alg(void *pr
|
||||
@@ -1644,13 +1420,13 @@ wpa_driver_madwifi_set_auth_alg(void *pr
|
||||
else
|
||||
authmode = IEEE80211_AUTH_OPEN;
|
||||
|
||||
@ -610,7 +601,7 @@
|
||||
struct iwreq iwr;
|
||||
int ret = 0;
|
||||
const u8 *ssid = params->ssids[0].ssid;
|
||||
@@ -1669,7 +1445,7 @@ wpa_driver_madwifi_scan(void *priv, stru
|
||||
@@ -1668,7 +1444,7 @@ wpa_driver_madwifi_scan(void *priv, stru
|
||||
if (wpa_driver_wext_set_ssid(drv->wext, ssid, ssid_len) < 0)
|
||||
ret = -1;
|
||||
|
||||
@ -619,7 +610,7 @@
|
||||
perror("ioctl[SIOCSIWSCAN]");
|
||||
ret = -1;
|
||||
}
|
||||
@@ -1691,14 +1467,14 @@ wpa_driver_madwifi_scan(void *priv, stru
|
||||
@@ -1690,14 +1466,14 @@ wpa_driver_madwifi_scan(void *priv, stru
|
||||
|
||||
static int wpa_driver_madwifi_get_bssid(void *priv, u8 *bssid)
|
||||
{
|
||||
@ -636,7 +627,7 @@
|
||||
return wpa_driver_wext_get_ssid(drv->wext, ssid);
|
||||
}
|
||||
|
||||
@@ -1706,14 +1482,14 @@ static int wpa_driver_madwifi_get_ssid(v
|
||||
@@ -1705,14 +1481,14 @@ static int wpa_driver_madwifi_get_ssid(v
|
||||
static struct wpa_scan_results *
|
||||
wpa_driver_madwifi_get_scan_results(void *priv)
|
||||
{
|
||||
@ -653,7 +644,7 @@
|
||||
return wpa_driver_wext_set_operstate(drv->wext, state);
|
||||
}
|
||||
|
||||
@@ -1734,7 +1510,7 @@ static int wpa_driver_madwifi_set_probe_
|
||||
@@ -1733,7 +1509,7 @@ static int wpa_driver_madwifi_set_probe_
|
||||
|
||||
ret = set80211priv(priv, IEEE80211_IOCTL_SET_APPIEBUF, probe_req_ie,
|
||||
sizeof(struct ieee80211req_getset_appiebuf) +
|
||||
@ -662,7 +653,7 @@
|
||||
|
||||
os_free(probe_req_ie);
|
||||
|
||||
@@ -1744,7 +1520,7 @@ static int wpa_driver_madwifi_set_probe_
|
||||
@@ -1743,7 +1519,7 @@ static int wpa_driver_madwifi_set_probe_
|
||||
|
||||
static void * wpa_driver_madwifi_init(void *ctx, const char *ifname)
|
||||
{
|
||||
@ -671,7 +662,7 @@
|
||||
|
||||
drv = os_zalloc(sizeof(*drv));
|
||||
if (drv == NULL)
|
||||
@@ -1755,17 +1531,17 @@ static void * wpa_driver_madwifi_init(vo
|
||||
@@ -1754,17 +1530,17 @@ static void * wpa_driver_madwifi_init(vo
|
||||
|
||||
drv->ctx = ctx;
|
||||
os_strlcpy(drv->ifname, ifname, sizeof(drv->ifname));
|
||||
@ -693,7 +684,7 @@
|
||||
wpa_printf(MSG_DEBUG, "%s: failed to enable WPA support",
|
||||
__FUNCTION__);
|
||||
goto fail3;
|
||||
@@ -1774,7 +1550,7 @@ static void * wpa_driver_madwifi_init(vo
|
||||
@@ -1773,7 +1549,7 @@ static void * wpa_driver_madwifi_init(vo
|
||||
return drv;
|
||||
|
||||
fail3:
|
||||
@ -702,7 +693,7 @@
|
||||
fail2:
|
||||
wpa_driver_wext_deinit(drv->wext);
|
||||
fail:
|
||||
@@ -1785,38 +1561,37 @@ fail:
|
||||
@@ -1784,38 +1560,37 @@ fail:
|
||||
|
||||
static void wpa_driver_madwifi_deinit(void *priv)
|
||||
{
|
||||
@ -748,7 +739,7 @@
|
||||
#ifdef HOSTAPD
|
||||
.hapd_init = madwifi_init,
|
||||
.hapd_deinit = madwifi_deinit,
|
||||
@@ -1836,7 +1611,8 @@ const struct wpa_driver_ops wpa_driver_m
|
||||
@@ -1835,7 +1610,8 @@ const struct wpa_driver_ops wpa_driver_m
|
||||
.sta_clear_stats = madwifi_sta_clear_stats,
|
||||
.commit = madwifi_commit,
|
||||
.set_ap_wps_ie = madwifi_set_ap_wps_ie,
|
||||
@ -758,7 +749,7 @@
|
||||
.get_bssid = wpa_driver_madwifi_get_bssid,
|
||||
.get_ssid = wpa_driver_madwifi_get_ssid,
|
||||
.init = wpa_driver_madwifi_init,
|
||||
@@ -1848,5 +1624,5 @@ const struct wpa_driver_ops wpa_driver_m
|
||||
@@ -1847,5 +1623,5 @@ const struct wpa_driver_ops wpa_driver_m
|
||||
.disassociate = wpa_driver_madwifi_disassociate,
|
||||
.associate = wpa_driver_madwifi_associate,
|
||||
.set_operstate = wpa_driver_madwifi_set_operstate,
|
||||
|
28
package/hostapd/patches/350-wds_fix.patch
Normal file
28
package/hostapd/patches/350-wds_fix.patch
Normal file
@ -0,0 +1,28 @@
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -4435,9 +4435,11 @@ static int i802_set_wds_sta(void *priv,
|
||||
wpa_printf(MSG_DEBUG, "nl80211: Set WDS STA addr=" MACSTR
|
||||
" aid=%d val=%d name=%s", MAC2STR(addr), aid, val, name);
|
||||
if (val) {
|
||||
- if (nl80211_create_iface(drv, name, NL80211_IFTYPE_AP_VLAN,
|
||||
+ if (!if_nametoindex(name)) {
|
||||
+ if (nl80211_create_iface(drv, name, NL80211_IFTYPE_AP_VLAN,
|
||||
NULL, 1) < 0)
|
||||
- return -1;
|
||||
+ return -1;
|
||||
+ }
|
||||
linux_set_iface_flags(drv->ioctl_sock, name, 1);
|
||||
return i802_set_sta_vlan(priv, addr, name, 0);
|
||||
} else {
|
||||
--- a/src/ap/ieee802_11.c
|
||||
+++ b/src/ap/ieee802_11.c
|
||||
@@ -1559,6 +1559,9 @@ static void handle_assoc_cb(struct hosta
|
||||
"Could not add STA to kernel driver");
|
||||
}
|
||||
|
||||
+ if (sta->flags & WLAN_STA_WDS)
|
||||
+ hapd->drv.set_wds_sta(hapd, sta->addr, sta->aid, 1);
|
||||
+
|
||||
if (sta->eapol_sm == NULL) {
|
||||
/*
|
||||
* This STA does not use RADIUS server for EAP authentication,
|
75
package/hostapd/patches/360-wds_bridge.patch
Normal file
75
package/hostapd/patches/360-wds_bridge.patch
Normal file
@ -0,0 +1,75 @@
|
||||
--- a/src/ap/ap_config.h
|
||||
+++ b/src/ap/ap_config.h
|
||||
@@ -148,6 +148,7 @@ struct hostapd_wmm_ac_params {
|
||||
struct hostapd_bss_config {
|
||||
char iface[IFNAMSIZ + 1];
|
||||
char bridge[IFNAMSIZ + 1];
|
||||
+ char wds_bridge[IFNAMSIZ + 1];
|
||||
|
||||
enum hostapd_logger_level logger_syslog_level, logger_stdout_level;
|
||||
|
||||
--- a/hostapd/config_file.c
|
||||
+++ b/hostapd/config_file.c
|
||||
@@ -1193,6 +1193,8 @@ struct hostapd_config * hostapd_config_r
|
||||
sizeof(conf->bss[0].iface));
|
||||
} else if (os_strcmp(buf, "bridge") == 0) {
|
||||
os_strlcpy(bss->bridge, pos, sizeof(bss->bridge));
|
||||
+ } else if (os_strcmp(buf, "wds_bridge") == 0) {
|
||||
+ os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge));
|
||||
} else if (os_strcmp(buf, "driver") == 0) {
|
||||
int j;
|
||||
/* clear to get error below if setting is invalid */
|
||||
--- a/src/drivers/driver_nl80211.c
|
||||
+++ b/src/drivers/driver_nl80211.c
|
||||
@@ -4425,7 +4425,8 @@ static int i802_set_sta_vlan(void *priv,
|
||||
}
|
||||
|
||||
|
||||
-static int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val)
|
||||
+static int i802_set_wds_sta(void *priv, const u8 *addr, int aid, int val,
|
||||
+ const char *bridge_ifname)
|
||||
{
|
||||
struct i802_bss *bss = priv;
|
||||
struct wpa_driver_nl80211_data *drv = bss->drv;
|
||||
@@ -4439,6 +4440,10 @@ static int i802_set_wds_sta(void *priv,
|
||||
if (nl80211_create_iface(drv, name, NL80211_IFTYPE_AP_VLAN,
|
||||
NULL, 1) < 0)
|
||||
return -1;
|
||||
+ if (bridge_ifname) {
|
||||
+ if (linux_br_add_if(drv->ioctl_sock, bridge_ifname, name) < 0)
|
||||
+ return -1;
|
||||
+ }
|
||||
}
|
||||
linux_set_iface_flags(drv->ioctl_sock, name, 1);
|
||||
return i802_set_sta_vlan(priv, addr, name, 0);
|
||||
--- a/src/ap/ap_drv_ops.c
|
||||
+++ b/src/ap/ap_drv_ops.c
|
||||
@@ -253,9 +253,15 @@ static int hostapd_vlan_if_remove(struct
|
||||
static int hostapd_set_wds_sta(struct hostapd_data *hapd, const u8 *addr,
|
||||
int aid, int val)
|
||||
{
|
||||
+ const char *bridge = NULL;
|
||||
+
|
||||
if (hapd->driver == NULL || hapd->driver->set_wds_sta == NULL)
|
||||
return 0;
|
||||
- return hapd->driver->set_wds_sta(hapd->drv_priv, addr, aid, val);
|
||||
+ if (hapd->conf->wds_bridge[0])
|
||||
+ bridge = hapd->conf->wds_bridge;
|
||||
+ else if (hapd->conf->bridge[0])
|
||||
+ bridge = hapd->conf->bridge;
|
||||
+ return hapd->driver->set_wds_sta(hapd->drv_priv, addr, aid, val, bridge);
|
||||
}
|
||||
|
||||
|
||||
--- a/src/drivers/driver.h
|
||||
+++ b/src/drivers/driver.h
|
||||
@@ -1610,7 +1610,8 @@ struct wpa_driver_ops {
|
||||
* @val: 1 = bind to 4-address WDS; 0 = unbind
|
||||
* Returns: 0 on success, -1 on failure
|
||||
*/
|
||||
- int (*set_wds_sta)(void *priv, const u8 *addr, int aid, int val);
|
||||
+ int (*set_wds_sta)(void *priv, const u8 *addr, int aid, int val,
|
||||
+ const char *bridge_ifname);
|
||||
|
||||
/**
|
||||
* send_action - Transmit an Action frame
|
@ -254,10 +254,6 @@ TARGET_CPPFLAGS := \
|
||||
-I$(LINUX_DIR)/arch/$(LINUX_KARCH)/include \
|
||||
$(TARGET_CPPFLAGS)
|
||||
|
||||
TARGET_CFLAGS := \
|
||||
$(TARGET_CFLAGS) \
|
||||
-DFORCE_MODPROBE_PROGRAM="\\\"/sbin/insmod\\\""
|
||||
|
||||
CONFIGURE_ARGS += \
|
||||
--enable-shared \
|
||||
--enable-devel \
|
||||
|
18
package/iptables/patches/020-iptables-disable-modprobe.patch
Normal file
18
package/iptables/patches/020-iptables-disable-modprobe.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- a/xtables.c
|
||||
+++ b/xtables.c
|
||||
@@ -313,6 +313,7 @@ static char *get_modprobe(void)
|
||||
|
||||
int xtables_insmod(const char *modname, const char *modprobe, bool quiet)
|
||||
{
|
||||
+#if 0
|
||||
char *buf = NULL;
|
||||
char *argv[4];
|
||||
int status;
|
||||
@@ -356,6 +357,7 @@ int xtables_insmod(const char *modname,
|
||||
free(buf);
|
||||
if (WIFEXITED(status) && WEXITSTATUS(status) == 0)
|
||||
return 0;
|
||||
+#endif
|
||||
return -1;
|
||||
}
|
||||
|
@ -1,20 +0,0 @@
|
||||
--- a/xtables.c
|
||||
+++ b/xtables.c
|
||||
@@ -285,6 +285,7 @@ void *xtables_realloc(void *ptr, size_t
|
||||
|
||||
static char *get_modprobe(void)
|
||||
{
|
||||
+#ifndef FORCE_MODPROBE_PROGRAM
|
||||
int procfile;
|
||||
char *ret;
|
||||
|
||||
@@ -309,6 +310,9 @@ static char *get_modprobe(void)
|
||||
free(ret);
|
||||
close(procfile);
|
||||
return NULL;
|
||||
+#else
|
||||
+ return strdup(FORCE_MODPROBE_PROGRAM);
|
||||
+#endif
|
||||
}
|
||||
|
||||
int xtables_insmod(const char *modname, const char *modprobe, bool quiet)
|
@ -23,7 +23,7 @@ define Package/iw
|
||||
CATEGORY:=Network
|
||||
TITLE:=cfg80211 interface configuration utility
|
||||
URL:=http://wireless.kernel.org/en/users/Documentation/iw
|
||||
DEPENDS:=@!TARGET_avr32 @!TARGET_etrax +libnl-tiny
|
||||
DEPENDS:= +libnl-tiny @(!(TARGET_avr32||TARGET_etrax)||BROKEN)
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
|
@ -13,7 +13,7 @@ define KernelPackage/ata-core
|
||||
DEPENDS:=@PCI_SUPPORT @LINUX_2_6 +kmod-scsi-core @!TARGET_ubicom32
|
||||
KCONFIG:=CONFIG_ATA
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/libata.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,21,libata)
|
||||
AUTOLOAD:=$(call AutoLoad,21,libata,1)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ata-core))
|
||||
@ -30,7 +30,7 @@ $(call KernelPackage/ata/Depends,)
|
||||
TITLE:=AHCI Serial ATA support
|
||||
KCONFIG:=CONFIG_SATA_AHCI
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/ahci.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,41,ahci)
|
||||
AUTOLOAD:=$(call AutoLoad,41,ahci,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-ahci/description
|
||||
@ -44,7 +44,7 @@ $(call KernelPackage/ata/Depends,)
|
||||
TITLE:=Silicon Image SATA support
|
||||
KCONFIG:=CONFIG_SATA_SIL
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/sata_sil.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,41,sata_sil)
|
||||
AUTOLOAD:=$(call AutoLoad,41,sata_sil,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-sil/description
|
||||
@ -59,7 +59,7 @@ $(call KernelPackage/ata/Depends,)
|
||||
TITLE:=Silicon Image 3124/3132 SATA support
|
||||
KCONFIG:=CONFIG_SATA_SIL24
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/sata_sil24.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,41,sata_sil24)
|
||||
AUTOLOAD:=$(call AutoLoad,41,sata_sil24,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-sil24/description
|
||||
@ -74,7 +74,7 @@ $(call KernelPackage/ata/Depends,)
|
||||
TITLE:=ARTOP 6210/6260 PATA support
|
||||
KCONFIG:=CONFIG_PATA_ARTOP
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/pata_artop.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,41,pata_artop)
|
||||
AUTOLOAD:=$(call AutoLoad,41,pata_artop,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-artop/description
|
||||
@ -88,7 +88,7 @@ $(call KernelPackage/ata/Depends,@TARGET_octeon)
|
||||
TITLE:=Octeon Compact Flash support
|
||||
KCONFIG:=CONFIG_PATA_OCTEON_CF
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/pata_octeon_cf.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,41,pata_octeon_cf)
|
||||
AUTOLOAD:=$(call AutoLoad,41,pata_octeon_cf,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-octeon-cf/description
|
||||
@ -103,7 +103,7 @@ $(call KernelPackage/ata/Depends,@TARGET_ixp4xx)
|
||||
TITLE:=IXP4XX Compact Flash support
|
||||
KCONFIG:=CONFIG_PATA_IXP4XX_CF
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/pata_ixp4xx_cf.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,41,pata_ixp4xx_cf)
|
||||
AUTOLOAD:=$(call AutoLoad,41,pata_ixp4xx_cf,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-ixp4xx-cf/description
|
||||
@ -121,7 +121,7 @@ $(call KernelPackage/ata/Depends,@TARGET_rb532 @BROKEN)
|
||||
FILES:=\
|
||||
$(LINUX_DIR)/drivers/ata/pata_platform.$(LINUX_KMOD_SUFFIX) \
|
||||
$(LINUX_DIR)/drivers/ata/pata_rb532_cf.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,41,pata_platform pata_rb532_cf)
|
||||
AUTOLOAD:=$(call AutoLoad,41,pata_platform pata_rb532_cf,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-rb532-cf/description
|
||||
@ -135,7 +135,7 @@ $(call KernelPackage/ata/Depends,)
|
||||
TITLE:=Nvidia Serial ATA support
|
||||
KCONFIG:=CONFIG_SATA_NV
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/sata_nv.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,41,sata_nv)
|
||||
AUTOLOAD:=$(call AutoLoad,41,sata_nv,1)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ata-nvidia-sata))
|
||||
@ -143,14 +143,14 @@ $(eval $(call KernelPackage,ata-nvidia-sata))
|
||||
|
||||
define KernelPackage/ata-magicbox-cf
|
||||
$(call KernelPackage/ata/Depends,@TARGET_ppc40x)
|
||||
TITLE:=Magicbox v2/OpenRB Compact flash support (ATA)
|
||||
TITLE:=Magicbox v2/OpenRB Compact flash support
|
||||
KCONFIG:=CONFIG_PATA_MAGICBOX_CF
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/pata_magicbox_cf.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,41,pata_magicbox_cf)
|
||||
AUTOLOAD:=$(call AutoLoad,41,pata_magicbox_cf,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-magicbox-cf/description
|
||||
Support for Magicbox v2/OpenRB on-board CF slot. (ATA version).
|
||||
Support for Magicbox v2/OpenRB on-board CF slot.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ata-magicbox-cf))
|
||||
@ -161,7 +161,7 @@ $(call KernelPackage/ata/Depends,)
|
||||
TITLE:=Intel PIIX PATA/SATA support
|
||||
KCONFIG:=CONFIG_ATA_PIIX
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/ata_piix.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,41,ata_piix)
|
||||
AUTOLOAD:=$(call AutoLoad,41,ata_piix,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-piix/description
|
||||
@ -177,7 +177,7 @@ $(call KernelPackage/ata/Depends,)
|
||||
TITLE:=VIA SATA support
|
||||
KCONFIG:=CONFIG_SATA_VIA
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/sata_via.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,41,sata_via)
|
||||
AUTOLOAD:=$(call AutoLoad,41,sata_via,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/ata-via-sata/description
|
||||
@ -206,8 +206,8 @@ define KernelPackage/ide-core
|
||||
$(LINUX_DIR)/drivers/ide/ide-core.$(LINUX_KMOD_SUFFIX) \
|
||||
$(LINUX_DIR)/drivers/ide/ide-gd_mod.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:= \
|
||||
$(call AutoLoad,20,ide-core) \
|
||||
$(call AutoLoad,40,ide-gd_mod)
|
||||
$(call AutoLoad,20,ide-core,1) \
|
||||
$(call AutoLoad,40,ide-gd_mod,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/ide-core/2.4
|
||||
@ -216,15 +216,15 @@ define KernelPackage/ide-core/2.4
|
||||
$(LINUX_DIR)/drivers/ide/ide-detect.$(LINUX_KMOD_SUFFIX) \
|
||||
$(LINUX_DIR)/drivers/ide/ide-disk.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:= \
|
||||
$(call AutoLoad,20,ide-core) \
|
||||
$(call AutoLoad,35,ide-detect) \
|
||||
$(call AutoLoad,40,ide-disk)
|
||||
$(call AutoLoad,20,ide-core,1) \
|
||||
$(call AutoLoad,35,ide-detect,1) \
|
||||
$(call AutoLoad,40,ide-disk,1)
|
||||
endef
|
||||
|
||||
ifneq ($(CONFIG_arm)$(CONFIG_powerpc),y)
|
||||
define KernelPackage/ide-core/2.6
|
||||
FILES+=$(LINUX_DIR)/drivers/ide/ide-generic.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD+=$(call AutoLoad,30,ide-generic)
|
||||
AUTOLOAD+=$(call AutoLoad,30,ide-generic,1)
|
||||
endef
|
||||
endif
|
||||
|
||||
@ -250,7 +250,7 @@ $(call KernelPackage/ide/Depends,@PCI_SUPPORT)
|
||||
TITLE:=Acard AEC62xx IDE driver
|
||||
KCONFIG:=CONFIG_BLK_DEV_AEC62XX
|
||||
FILES:=$(LINUX_DIR)/drivers/ide/aec62xx.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,30,aec62xx)
|
||||
AUTOLOAD:=$(call AutoLoad,30,aec62xx,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/ide-aec62xx/2.4
|
||||
@ -261,22 +261,7 @@ define KernelPackage/ide-aec62xx/description
|
||||
Support for Acard AEC62xx (Artop ATP8xx) IDE controllers.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ide-aec62xx))
|
||||
|
||||
|
||||
define KernelPackage/ide-magicbox
|
||||
$(call KernelPackage/ide/Depends,@TARGET_ppc40x)
|
||||
TITLE:=Magicbox v2/OpenRB Compact flash support (IDE)
|
||||
KCONFIG:=CONFIG_BLK_DEV_IDE_MAGICBOX
|
||||
FILES:=$(LINUX_DIR)/drivers/ide/magicbox_ide.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,30,magicbox_ide)
|
||||
endef
|
||||
|
||||
define KernelPackage/ide-magicbox/description
|
||||
Support for Magicbox v2/OpenRB on-board CF slot. (IDE version).
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ide-magicbox))
|
||||
$(eval $(call KernelPackage,ide-aec62xx,1))
|
||||
|
||||
|
||||
define KernelPackage/ide-pdc202xx
|
||||
@ -284,7 +269,7 @@ $(call KernelPackage/ide/Depends,@PCI_SUPPORT)
|
||||
TITLE:=Promise PDC202xx IDE driver
|
||||
KCONFIG:=CONFIG_BLK_DEV_PDC202XX_OLD
|
||||
FILES:=$(LINUX_DIR)/drivers/ide/pdc202xx_old.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,30,pdc202xx_old)
|
||||
AUTOLOAD:=$(call AutoLoad,30,pdc202xx_old,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/ide-pdc202xx/2.4
|
||||
@ -304,7 +289,7 @@ $(call KernelPackage/ide/Depends,@PCI_SUPPORT)
|
||||
TITLE:=ITE IT821x IDE driver
|
||||
KCONFIG:=CONFIG_BLK_DEV_IT821X
|
||||
FILES=$(LINUX_DIR)/drivers/ide/it821x.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,30,it821x)
|
||||
AUTOLOAD:=$(call AutoLoad,30,it821x,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/ide-it821x/description
|
||||
@ -323,7 +308,7 @@ define KernelPackage/scsi-core
|
||||
FILES:= \
|
||||
$(if $(findstring y,$(CONFIG_SCSI)),,$(LINUX_DIR)/drivers/scsi/scsi_mod.$(LINUX_KMOD_SUFFIX)) \
|
||||
$(LINUX_DIR)/drivers/scsi/sd_mod.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,20,scsi_mod) $(call AutoLoad,40,sd_mod)
|
||||
AUTOLOAD:=$(call AutoLoad,20,scsi_mod,1) $(call AutoLoad,40,sd_mod,1)
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,scsi-core))
|
||||
@ -409,14 +394,14 @@ $(call KernelPackage/ata/Depends,@TARGET_adm5120_router_le)
|
||||
TITLE:=RouterBOARD 153 CF Slot support
|
||||
KCONFIG:=CONFIG_PATA_RB153_CF
|
||||
FILES:=$(LINUX_DIR)/drivers/ata/pata_rb153_cf.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,30,pata_rb153_cf)
|
||||
AUTOLOAD:=$(call AutoLoad,30,pata_rb153_cf,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/pata-rb153-cf/description
|
||||
Kernel support for the RouterBoard 153 CF slot.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,pata-rb153-cf))
|
||||
$(eval $(call KernelPackage,pata-rb153-cf,1))
|
||||
|
||||
|
||||
define KernelPackage/aoe
|
||||
@ -475,14 +460,14 @@ define KernelPackage/libsas
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/scsi/scsi_transport_sas.$(LINUX_KMOD_SUFFIX) \
|
||||
$(LINUX_DIR)/drivers/scsi/libsas/libsas.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,29,scsi_transport_sas libsas)
|
||||
AUTOLOAD:=$(call AutoLoad,29,scsi_transport_sas libsas,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/libsas/description
|
||||
SAS Domain Transport Attributes support.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,libsas))
|
||||
$(eval $(call KernelPackage,libsas,1))
|
||||
|
||||
define KernelPackage/mvsas
|
||||
SUBMENU:=$(BLOCK_MENU)
|
||||
@ -490,7 +475,7 @@ define KernelPackage/mvsas
|
||||
DEPENDS:=@TARGET_x86 +kmod-libsas
|
||||
KCONFIG:=CONFIG_SCSI_MVSAS
|
||||
FILES:=$(LINUX_DIR)/drivers/scsi/mvsas.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,40,mvsas)
|
||||
AUTOLOAD:=$(call AutoLoad,40,mvsas,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/mvsas/description
|
||||
|
@ -65,7 +65,7 @@ define KernelPackage/fs-mbcache
|
||||
KCONFIG:=CONFIG_FS_MBCACHE
|
||||
ifneq ($(CONFIG_FS_MBCACHE),)
|
||||
FILES:=$(LINUX_DIR)/fs/mbcache.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,20,mbcache)
|
||||
AUTOLOAD:=$(call AutoLoad,20,mbcache,1)
|
||||
endif
|
||||
endef
|
||||
|
||||
@ -82,14 +82,14 @@ define KernelPackage/fs-ext2
|
||||
KCONFIG:=CONFIG_EXT2_FS
|
||||
DEPENDS:=$(if $(DUMP)$(CONFIG_FS_MBCACHE),+kmod-fs-mbcache)
|
||||
FILES:=$(LINUX_DIR)/fs/ext2/ext2.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,32,ext2)
|
||||
AUTOLOAD:=$(call AutoLoad,32,ext2,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-ext2/description
|
||||
Kernel module for EXT2 filesystem support
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,fs-ext2))
|
||||
$(eval $(call KernelPackage,fs-ext2,1))
|
||||
|
||||
|
||||
define KernelPackage/fs-ext3
|
||||
@ -102,7 +102,7 @@ define KernelPackage/fs-ext3
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/ext3/ext3.$(LINUX_KMOD_SUFFIX) \
|
||||
$(LINUX_DIR)/fs/jbd/jbd.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,31,jbd ext3)
|
||||
AUTOLOAD:=$(call AutoLoad,31,jbd ext3,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-ext3/description
|
||||
@ -124,7 +124,7 @@ define KernelPackage/fs-ext4
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/fs/ext4/ext4.$(LINUX_KMOD_SUFFIX) \
|
||||
$(LINUX_DIR)/fs/jbd2/jbd2.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,30,jbd2 ext4)
|
||||
AUTOLOAD:=$(call AutoLoad,30,jbd2 ext4,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-ext4/description
|
||||
@ -308,7 +308,7 @@ define KernelPackage/fs-reiserfs
|
||||
TITLE:=ReiserFS filesystem support
|
||||
KCONFIG:=CONFIG_REISERFS_FS
|
||||
FILES:=$(LINUX_DIR)/fs/reiserfs/reiserfs.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,30,reiserfs)
|
||||
AUTOLOAD:=$(call AutoLoad,30,reiserfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-reiserfs/description
|
||||
@ -349,7 +349,7 @@ define KernelPackage/fs-xfs
|
||||
KCONFIG:=CONFIG_XFS_FS
|
||||
DEPENDS:= +kmod-fs-exportfs
|
||||
FILES:=$(LINUX_DIR)/fs/xfs/xfs.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,30,xfs)
|
||||
AUTOLOAD:=$(call AutoLoad,30,xfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-xfs/description
|
||||
@ -372,7 +372,7 @@ define KernelPackage/fs-btrfs
|
||||
$(LINUX_DIR)/crypto/crc32c.$(LINUX_KMOD_SUFFIX) \
|
||||
$(LINUX_DIR)/lib/libcrc32c.$(LINUX_KMOD_SUFFIX) \
|
||||
$(LINUX_DIR)/fs/btrfs/btrfs.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,30,crc32c libcrc32c btrfs)
|
||||
AUTOLOAD:=$(call AutoLoad,30,crc32c libcrc32c btrfs,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/fs-btrfs/description
|
||||
@ -401,7 +401,7 @@ define KernelPackage/nls-base
|
||||
TITLE:=Native Language Support
|
||||
KCONFIG:=CONFIG_NLS
|
||||
FILES:=$(LINUX_DIR)/fs/nls/nls_base.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,20,nls_base)
|
||||
AUTOLOAD:=$(call AutoLoad,20,nls_base,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/nls-base/description
|
||||
|
@ -345,7 +345,7 @@ define KernelPackage/mmc
|
||||
FILES:= \
|
||||
$(LINUX_DIR)/drivers/mmc/core/mmc_core.$(LINUX_KMOD_SUFFIX) \
|
||||
$(LINUX_DIR)/drivers/mmc/card/mmc_block.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,90,mmc_core mmc_block)
|
||||
AUTOLOAD:=$(call AutoLoad,90,mmc_core mmc_block,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/mmc/description
|
||||
@ -361,7 +361,7 @@ define KernelPackage/mmc-at91
|
||||
DEPENDS:=@TARGET_at91 +kmod-mmc
|
||||
KCONFIG:=CONFIG_MMC_AT91
|
||||
FILES:=$(LINUX_DIR)/drivers/mmc/host/at91_mci.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,90,at91_mci)
|
||||
AUTOLOAD:=$(call AutoLoad,90,at91_mci,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/mmc-at91/description
|
||||
@ -520,6 +520,22 @@ endef
|
||||
$(eval $(call KernelPackage,leds-wndr3700-usb))
|
||||
|
||||
|
||||
define KernelPackage/leds-rb750
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=RouterBOARD 750 LED support
|
||||
DEPENDS:=@TARGET_ar71xx
|
||||
KCONFIG:=CONFIG_LEDS_RB750
|
||||
FILES:=$(LINUX_DIR)/drivers/leds/leds-rb750.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,60,leds-rb750)
|
||||
endef
|
||||
|
||||
define KernelPackage/leds-rb750/description
|
||||
Kernel module for the LEDs on the MikroTik RouterBOARD 750.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,leds-rb750))
|
||||
|
||||
|
||||
define KernelPackage/ledtrig-netdev
|
||||
SUBMENU:=$(OTHER_MENU)
|
||||
TITLE:=LED NETDEV Trigger
|
||||
@ -774,7 +790,7 @@ define KernelPackage/mmc-atmelmci/description
|
||||
Kernel support for Atmel Multimedia Card Interface.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,mmc-atmelmci))
|
||||
$(eval $(call KernelPackage,mmc-atmelmci,1))
|
||||
|
||||
|
||||
define KernelPackage/cs5535-gpio
|
||||
|
@ -18,9 +18,9 @@ USBINPUT_DIR?=input/misc
|
||||
define KernelPackage/usb-core
|
||||
SUBMENU:=$(USB_MENU)
|
||||
TITLE:=Support for USB
|
||||
DEPENDS:=@USB_SUPPORT +LINUX_2_6_31||LINUX_2_6_32:kmod-nls-base
|
||||
DEPENDS:=@USB_SUPPORT +LINUX_2_6_31:kmod-nls-base +LINUX_2_6_32:kmod-nls-base
|
||||
KCONFIG:=CONFIG_USB
|
||||
AUTOLOAD:=$(call AutoLoad,20,usbcore)
|
||||
AUTOLOAD:=$(call AutoLoad,20,usbcore,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-core/2.4
|
||||
@ -55,20 +55,20 @@ endef
|
||||
define KernelPackage/usb-uhci/2.4
|
||||
# KCONFIG:=CONFIG_USB_UHCI_ALT
|
||||
FILES:=$(LINUX_DIR)/drivers/usb/host/uhci.o
|
||||
AUTOLOAD:=$(call AutoLoad,50,uhci)
|
||||
AUTOLOAD:=$(call AutoLoad,50,uhci,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-uhci/2.6
|
||||
# KCONFIG:=CONFIG_USB_UHCI_HCD
|
||||
FILES:=$(LINUX_DIR)/drivers/usb/host/uhci-hcd.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,uhci-hcd)
|
||||
AUTOLOAD:=$(call AutoLoad,50,uhci-hcd,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-uhci/description
|
||||
Kernel support for USB UHCI controllers
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,usb-uhci))
|
||||
$(eval $(call KernelPackage,usb-uhci,1))
|
||||
|
||||
|
||||
define KernelPackage/usb-uhci-iv
|
||||
@ -76,14 +76,14 @@ $(call KernelPackage/usb/Depends,@LINUX_2_4)
|
||||
TITLE:=Support for Intel/VIA UHCI controllers
|
||||
KCONFIG:=CONFIG_USB_UHCI
|
||||
FILES:=$(LINUX_DIR)/drivers/usb/host/usb-uhci.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,50,usb-uhci)
|
||||
AUTOLOAD:=$(call AutoLoad,50,usb-uhci,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-uhci-iv/description
|
||||
Kernel support for Intel/VIA USB UHCI controllers
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,usb-uhci-iv))
|
||||
$(eval $(call KernelPackage,usb-uhci-iv,1))
|
||||
|
||||
|
||||
define KernelPackage/usb-ohci
|
||||
@ -98,20 +98,20 @@ endef
|
||||
define KernelPackage/usb-ohci/2.4
|
||||
# KCONFIG:=CONFIG_USB_OHCI
|
||||
FILES:=$(LINUX_DIR)/drivers/usb/host/usb-ohci.o
|
||||
AUTOLOAD:=$(call AutoLoad,50,usb-ohci)
|
||||
AUTOLOAD:=$(call AutoLoad,50,usb-ohci,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-ohci/2.6
|
||||
# KCONFIG:=CONFIG_USB_OHCI_HCD
|
||||
FILES:=$(LINUX_DIR)/drivers/usb/host/ohci-hcd.ko
|
||||
AUTOLOAD:=$(call AutoLoad,50,ohci-hcd)
|
||||
AUTOLOAD:=$(call AutoLoad,50,ohci-hcd,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-ohci/description
|
||||
Kernel support for USB OHCI controllers
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,usb-ohci))
|
||||
$(eval $(call KernelPackage,usb-ohci,1))
|
||||
|
||||
|
||||
define KernelPackage/usb-adm5120
|
||||
@ -119,7 +119,7 @@ $(call KernelPackage/usb/Depends,@TARGET_adm5120_router_be||@TARGET_adm5120_rout
|
||||
TITLE:=Support for the ADM5120 HCD controller
|
||||
KCONFIG:=CONFIG_USB_ADM5120_HCD
|
||||
FILES:=$(LINUX_DIR)/drivers/usb/host/adm5120-hcd.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,50,adm5120-hcd)
|
||||
AUTOLOAD:=$(call AutoLoad,50,adm5120-hcd,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-adm5120/description
|
||||
@ -134,7 +134,7 @@ $(call KernelPackage/usb/Depends,@TARGET_etrax)
|
||||
KCONFIG:=CONFIG_ETRAX_USB_HOST \
|
||||
CONFIG_ETRAX_USB_HOST_PORT1=y CONFIG_ETRAX_USB_HOST_PORT2=y
|
||||
FILES:=$(LINUX_DIR)/drivers/usb/host/hc-crisv10.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,50,hc-crisv10)
|
||||
AUTOLOAD:=$(call AutoLoad,50,hc-crisv10,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-etrax/description
|
||||
@ -164,7 +164,7 @@ $(call KernelPackage/usb/Depends,)
|
||||
KCONFIG:=CONFIG_USB_EHCI_HCD \
|
||||
CONFIG_USB_EHCI_AR71XX=y
|
||||
FILES:=$(LINUX_DIR)/drivers/usb/host/ehci-hcd.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,40,ehci-hcd)
|
||||
AUTOLOAD:=$(call AutoLoad,40,ehci-hcd,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb2/description
|
||||
@ -499,7 +499,7 @@ $(call KernelPackage/usb/Depends,+kmod-scsi-core)
|
||||
TITLE:=USB Storage support
|
||||
KCONFIG:=CONFIG_USB_STORAGE
|
||||
FILES:=$(LINUX_DIR)/drivers/usb/storage/usb-storage.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,60,scsi_mod sd_mod usb-storage)
|
||||
AUTOLOAD:=$(call AutoLoad,60,scsi_mod sd_mod usb-storage,1)
|
||||
endef
|
||||
|
||||
define KernelPackage/usb-storage/description
|
||||
|
@ -40,59 +40,6 @@ endef
|
||||
|
||||
$(eval $(call KernelPackage,lib80211))
|
||||
|
||||
|
||||
define KernelPackage/net-libipw
|
||||
SUBMENU:=$(WIRELESS_MENU)
|
||||
TITLE:=libipw for ipw2100 and ipw2200
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-crypto-core +kmod-crypto-arc4 +kmod-crypto-aes +kmod-crypto-michael-mic +kmod-lib80211
|
||||
KCONFIG:=CONFIG_LIBIPW
|
||||
FILES:=$(LINUX_DIR)/drivers/net/wireless/ipw2x00/libipw.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,49,libipw)
|
||||
endef
|
||||
|
||||
define KernelPackage/net-libipw/description
|
||||
Hardware independent IEEE 802.11 networking stack for ipw2100 and ipw2200.
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,net-libipw))
|
||||
|
||||
|
||||
define KernelPackage/net-ipw2100
|
||||
SUBMENU:=$(WIRELESS_MENU)
|
||||
TITLE:=Intel IPW2100 driver
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-net-libipw
|
||||
KCONFIG:=CONFIG_IPW2100
|
||||
FILES:=$(LINUX_DIR)/drivers/net/wireless/ipw2x00/ipw2100.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,50,ipw2100)
|
||||
endef
|
||||
|
||||
define KernelPackage/net-ipw2100/description
|
||||
Kernel support for Intel IPW2100
|
||||
Includes:
|
||||
- ipw2100
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,net-ipw2100))
|
||||
|
||||
|
||||
define KernelPackage/net-ipw2200
|
||||
SUBMENU:=$(WIRELESS_MENU)
|
||||
TITLE:=Intel IPW2200 driver
|
||||
DEPENDS:=@PCI_SUPPORT +kmod-net-libipw
|
||||
KCONFIG:=CONFIG_IPW2200
|
||||
FILES:=$(LINUX_DIR)/drivers/net/wireless/ipw2x00/ipw2200.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,50,ipw2200)
|
||||
endef
|
||||
|
||||
define KernelPackage/net-ipw2200/description
|
||||
Kernel support for Intel IPW2200
|
||||
Includes:
|
||||
- ipw2200
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,net-ipw2200))
|
||||
|
||||
|
||||
define KernelPackage/net-airo
|
||||
SUBMENU:=$(WIRELESS_MENU)
|
||||
TITLE:=Cisco Aironet driver
|
||||
|
12
package/libpcap/Config.in
Normal file
12
package/libpcap/Config.in
Normal file
@ -0,0 +1,12 @@
|
||||
config PCAP_HAS_USB
|
||||
bool "Include USB support"
|
||||
depends PACKAGE_libpcap
|
||||
depends PACKAGE_kmod-usb-core
|
||||
default n
|
||||
|
||||
config PCAP_HAS_BT
|
||||
bool "Include bluetooth support"
|
||||
depends PACKAGE_libpcap
|
||||
depends PACKAGE_kmod-bluetooth
|
||||
depends BROKEN
|
||||
default n
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2006 OpenWrt.org
|
||||
#
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@ -9,12 +9,14 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libpcap
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://www.tcpdump.org/release/
|
||||
PKG_MD5SUM:=9ad1358c5dec48456405eac197a46d3d
|
||||
|
||||
PKG_INSTALL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
@ -26,28 +28,17 @@ define Package/libpcap
|
||||
endef
|
||||
|
||||
define Package/libpcap/description
|
||||
This package contains a system-independent library for user-level network
|
||||
packet capture.
|
||||
This package contains a system-independent library for user-level network packet
|
||||
capture.
|
||||
endef
|
||||
|
||||
define Package/libpcap/config
|
||||
config PCAP_HAS_USB
|
||||
bool "Include USB support"
|
||||
depends PACKAGE_libpcap
|
||||
depends PACKAGE_kmod-usb-core
|
||||
default n
|
||||
|
||||
config PCAP_HAS_BT
|
||||
bool "Include bluetooth support"
|
||||
depends PACKAGE_libpcap
|
||||
depends PACKAGE_kmod-bluetooth
|
||||
depends BROKEN
|
||||
default n
|
||||
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-ffunction-sections -fdata-sections
|
||||
-ffunction-sections \
|
||||
-fdata-sections
|
||||
|
||||
CONFIGURE_VARS += \
|
||||
ac_cv_linux_vers=$(LINUX_VERSION)
|
||||
@ -62,31 +53,28 @@ CONFIGURE_ARGS += \
|
||||
--without-septel \
|
||||
--without-dag
|
||||
|
||||
define Build/Compile
|
||||
rm -rf $(PKG_INSTALL_DIR)
|
||||
MAKE_FLAGS += \
|
||||
CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include"
|
||||
|
||||
define Build/Configure
|
||||
$(call Build/Configure/Default)
|
||||
$(if $(CONFIG_PCAP_HAS_USB),,$(SED) '/^#define PCAP_SUPPORT_USB/D' $(PKG_BUILD_DIR)/config.h)
|
||||
$(if $(CONFIG_PCAP_HAS_USB),,$(SED) 's/pcap-usb-linux.c *//' $(PKG_BUILD_DIR)/Makefile)
|
||||
$(if $(CONFIG_PCAP_HAS_BT),,$(SED) '/^#define PCAP_SUPPORT_BT/D' $(PKG_BUILD_DIR)/config.h)
|
||||
$(if $(CONFIG_PCAP_HAS_BT),,$(SED) 's/pcap-bt-linux.c *//' $(PKG_BUILD_DIR)/Makefile)
|
||||
$(MAKE) -C $(PKG_BUILD_DIR) \
|
||||
CCOPT="$(TARGET_CFLAGS) -I$(BUILD_DIR)/linux/include" \
|
||||
DESTDIR="$(PKG_INSTALL_DIR)" \
|
||||
all install
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
mkdir -p $(1)/usr/include $(1)/usr/lib
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/include/pcap* \
|
||||
$(1)/usr/include/
|
||||
$(CP) \
|
||||
$(PKG_INSTALL_DIR)/usr/lib/libpcap.{a,so*} \
|
||||
$(1)/usr/lib/
|
||||
$(INSTALL_DIR) $(1)/usr/include
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/include/pcap* $(1)/usr/include/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.{a,so*} $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
define Package/libpcap/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so.* $(1)/usr/lib/
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/libpcap.so* $(1)/usr/lib/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,libpcap))
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user