mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-30 19:18:06 +02:00
Merge branch 'master' of openwrt-backfire into xburst
Conflicts: target/linux/x86/image/Config.in
This commit is contained in:
commit
4ecc663fa9
@ -102,7 +102,7 @@ menu "Target Images"
|
|||||||
|
|
||||||
source "target/linux/*/image/Config.in"
|
source "target/linux/*/image/Config.in"
|
||||||
|
|
||||||
config TARGET_ROOTFS_FSPART
|
config TARGET_ROOTFS_PARTSIZE
|
||||||
int "Root filesystem partition size (in MB)"
|
int "Root filesystem partition size (in MB)"
|
||||||
depends X86_GRUB_IMAGES || TARGET_ROOTFS_EXT2FS || TARGET_rb532
|
depends X86_GRUB_IMAGES || TARGET_ROOTFS_EXT2FS || TARGET_rb532
|
||||||
default 48
|
default 48
|
||||||
|
@ -110,7 +110,7 @@ ifneq ($(CONFIG_TARGET_ROOTFS_TARGZ),)
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(CONFIG_TARGET_ROOTFS_EXT2FS),)
|
ifneq ($(CONFIG_TARGET_ROOTFS_EXT2FS),)
|
||||||
E2SIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_FSPART)*1024)))
|
E2SIZE=$(shell echo $$(($(CONFIG_TARGET_ROOTFS_PARTSIZE)*1024)))
|
||||||
|
|
||||||
define Image/mkfs/ext2
|
define Image/mkfs/ext2
|
||||||
$(STAGING_DIR_HOST)/bin/genext2fs -U -b $(E2SIZE) -N $(CONFIG_TARGET_ROOTFS_MAXINODE) -d $(TARGET_DIR)/ $(KDIR)/root.ext2
|
$(STAGING_DIR_HOST)/bin/genext2fs -U -b $(E2SIZE) -N $(CONFIG_TARGET_ROOTFS_MAXINODE) -d $(TARGET_DIR)/ $(KDIR)/root.ext2
|
||||||
|
@ -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.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_NAME:=acx
|
PKG_NAME:=acx
|
||||||
PKG_VERSION:=20080210
|
PKG_VERSION:=20080210
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=@SF/acx100
|
PKG_SOURCE_URL:=@SF/acx100
|
||||||
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=base-files
|
PKG_NAME:=base-files
|
||||||
PKG_RELEASE:=43
|
PKG_RELEASE:=43.1
|
||||||
|
|
||||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||||
|
|
||||||
|
@ -68,7 +68,36 @@ case "$ACTION" in
|
|||||||
ifup)
|
ifup)
|
||||||
include /lib/network
|
include /lib/network
|
||||||
scan_interfaces
|
scan_interfaces
|
||||||
|
|
||||||
|
# Setup aliases
|
||||||
|
config_set "$INTERFACE" aliases ""
|
||||||
|
config_set "$INTERFACE" alias_count 0
|
||||||
|
config_foreach setup_interface_alias alias "$INTERFACE" "$DEVICE"
|
||||||
|
|
||||||
|
# Save alias references in state vars
|
||||||
|
local aliases
|
||||||
|
config_get aliases "$INTERFACE" aliases
|
||||||
|
[ -z "$aliases" ] || uci_set_state network "$INTERFACE" aliases "$aliases"
|
||||||
|
|
||||||
|
# Make ip6addr of parent iface the main address again
|
||||||
|
local ip6addr
|
||||||
|
config_get ip6addr "$INTERFACE" ip6addr
|
||||||
|
[ -z "$ip6addr" ] || {
|
||||||
|
ifconfig "$DEVICE" del "$ip6addr"
|
||||||
|
ifconfig "$DEVICE" add "$ip6addr"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Setup routes
|
||||||
config_foreach "add_route" route
|
config_foreach "add_route" route
|
||||||
config_foreach "add_route6" route6
|
config_foreach "add_route6" route6
|
||||||
;;
|
;;
|
||||||
|
ifdown)
|
||||||
|
# Bring down named aliases
|
||||||
|
local device=$(uci_get_state network "$INTERFACE" device)
|
||||||
|
local ifn
|
||||||
|
for ifn in $(ifconfig | sed -ne "s/^\(\($DEVICE${device:+\|$device}\|br-$INTERFACE\):[^[:space:]]\+\).*/\1/p"); do
|
||||||
|
ifconfig "$ifn" down
|
||||||
|
done
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ addif() {
|
|||||||
|
|
||||||
# PPP devices are configured by pppd, no need to run setup_interface here
|
# PPP devices are configured by pppd, no need to run setup_interface here
|
||||||
case "$INTERFACE" in
|
case "$INTERFACE" in
|
||||||
ppp*) return 0;;
|
ppp*|3g-*) return 0;;
|
||||||
ath*) return 0;;
|
ath*) return 0;;
|
||||||
wlan*) return 0;;
|
wlan*) return 0;;
|
||||||
esac
|
esac
|
||||||
@ -46,7 +46,7 @@ delif() {
|
|||||||
for ifc in $interfaces; do
|
for ifc in $interfaces; do
|
||||||
config_get iftype "$ifc" type
|
config_get iftype "$ifc" type
|
||||||
config_get ifs "$ifc" device
|
config_get ifs "$ifc" device
|
||||||
confdevs="$(uci get network.$ifc.ifname)"
|
confdevs="$(uci_get network.$ifc.ifname)"
|
||||||
for dev in $ifs; do
|
for dev in $ifs; do
|
||||||
[ "${dev%%\.*}" = "$INTERFACE" ] && {
|
[ "${dev%%\.*}" = "$INTERFACE" ] && {
|
||||||
list_contains confdevs "$dev" || list_remove ifs "$dev"
|
list_contains confdevs "$dev" || list_remove ifs "$dev"
|
||||||
|
@ -8,7 +8,6 @@ DEVICENAME ~~ (null|full|ptmx|tty|zero|gpio|hvc) {
|
|||||||
DEVICENAME ~~ (tun|tap[0-9]) {
|
DEVICENAME ~~ (tun|tap[0-9]) {
|
||||||
nothrottle
|
nothrottle
|
||||||
makedev /dev/net/%DEVICENAME% 0644
|
makedev /dev/net/%DEVICENAME% 0644
|
||||||
next
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DEVICENAME ~~ (ppp) {
|
DEVICENAME ~~ (ppp) {
|
||||||
|
@ -15,6 +15,20 @@ boot() {
|
|||||||
rm -f /etc/config/wireless
|
rm -f /etc/config/wireless
|
||||||
/sbin/wifi detect > /etc/config/wireless
|
/sbin/wifi detect > /etc/config/wireless
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scan_interfaces
|
||||||
|
|
||||||
|
local ifc
|
||||||
|
for ifc in $interfaces; do
|
||||||
|
local proto
|
||||||
|
config_get proto "$ifc" proto
|
||||||
|
|
||||||
|
local auto
|
||||||
|
config_get_bool auto "$ifc" auto 1
|
||||||
|
|
||||||
|
type "coldplug_interface_$proto" >/dev/null && [ "$auto" = 1 ] && \
|
||||||
|
coldplug_interface_$proto "$ifc"
|
||||||
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
start() {
|
start() {
|
||||||
|
@ -32,6 +32,7 @@ find_mtd_part() {
|
|||||||
|
|
||||||
jffs2_ready () {
|
jffs2_ready () {
|
||||||
mtdpart="$(find_mtd_part rootfs_data)"
|
mtdpart="$(find_mtd_part rootfs_data)"
|
||||||
|
[ -z "$mtdpart" ] && return 1
|
||||||
magic=$(hexdump $mtdpart -n 4 -e '4/1 "%02x"')
|
magic=$(hexdump $mtdpart -n 4 -e '4/1 "%02x"')
|
||||||
[ "$magic" != "deadc0de" ]
|
[ "$magic" != "deadc0de" ]
|
||||||
}
|
}
|
||||||
|
@ -66,6 +66,52 @@ add_vlan() {
|
|||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# add dns entries if they are not in resolv.conf yet
|
||||||
|
add_dns() {
|
||||||
|
local cfg="$1"; shift
|
||||||
|
|
||||||
|
remove_dns "$cfg"
|
||||||
|
|
||||||
|
# We may be called by pppd's ip-up which has a nonstandard umask set.
|
||||||
|
# Create an empty file here and force its permission to 0644, otherwise
|
||||||
|
# dnsmasq will not be able to re-read the resolv.conf.auto .
|
||||||
|
[ ! -f /tmp/resolv.conf.auto ] && {
|
||||||
|
touch /tmp/resolv.conf.auto
|
||||||
|
chmod 0644 /tmp/resolv.conf.auto
|
||||||
|
}
|
||||||
|
|
||||||
|
local dns
|
||||||
|
local add
|
||||||
|
for dns in "$@"; do
|
||||||
|
grep -qsF "nameserver $dns" /tmp/resolv.conf.auto || {
|
||||||
|
add="${add:+$add }$dns"
|
||||||
|
echo "nameserver $dns" >> /tmp/resolv.conf.auto
|
||||||
|
}
|
||||||
|
done
|
||||||
|
|
||||||
|
[ -n "$cfg" ] && {
|
||||||
|
uci_set_state network "$cfg" dns "$add"
|
||||||
|
uci_set_state network "$cfg" resolv_dns "$add"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# remove dns entries of the given iface
|
||||||
|
remove_dns() {
|
||||||
|
local cfg="$1"
|
||||||
|
|
||||||
|
[ -n "$cfg" ] && {
|
||||||
|
[ -f /tmp/resolv.conf.auto ] && {
|
||||||
|
local dns=$(uci_get_state network "$cfg" resolv_dns)
|
||||||
|
for dns in $dns; do
|
||||||
|
sed -i -e "/^nameserver $dns$/d" /tmp/resolv.conf.auto
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
uci_revert_state network "$cfg" dns
|
||||||
|
uci_revert_state network "$cfg" resolv_dns
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# sort the device list, drop duplicates
|
# sort the device list, drop duplicates
|
||||||
sort_list() {
|
sort_list() {
|
||||||
local arg="$*"
|
local arg="$*"
|
||||||
@ -115,7 +161,18 @@ prepare_interface() {
|
|||||||
config_get iftype "$config" type
|
config_get iftype "$config" type
|
||||||
case "$iftype" in
|
case "$iftype" in
|
||||||
bridge)
|
bridge)
|
||||||
|
local macaddr
|
||||||
|
config_get macaddr "$config" macaddr
|
||||||
[ -x /usr/sbin/brctl ] && {
|
[ -x /usr/sbin/brctl ] && {
|
||||||
|
# Remove IPv6 link local addr before adding the iface to the bridge
|
||||||
|
local llv6="$(ifconfig "$iface")"
|
||||||
|
case "$llv6" in
|
||||||
|
*fe80:*/64*)
|
||||||
|
llv6="${llv6#* fe80:}"
|
||||||
|
ifconfig "$iface" del "fe80:${llv6%% *}"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
ifconfig "br-$config" 2>/dev/null >/dev/null && {
|
ifconfig "br-$config" 2>/dev/null >/dev/null && {
|
||||||
local newdevs devices
|
local newdevs devices
|
||||||
config_get devices "$config" device
|
config_get devices "$config" device
|
||||||
@ -139,7 +196,7 @@ prepare_interface() {
|
|||||||
# result in another setup_interface() call, so we simply stop processing
|
# result in another setup_interface() call, so we simply stop processing
|
||||||
# the current event at this point.
|
# the current event at this point.
|
||||||
}
|
}
|
||||||
ifconfig "$iface" up 2>/dev/null >/dev/null
|
ifconfig "$iface" ${macaddr:+hw ether "${macaddr}"} up 2>/dev/null >/dev/null
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
;;
|
;;
|
||||||
@ -181,13 +238,7 @@ setup_interface_static() {
|
|||||||
[ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" add "$ip6addr"
|
[ -z "$ip6addr" ] || $DEBUG ifconfig "$iface" add "$ip6addr"
|
||||||
[ -z "$gateway" ] || $DEBUG route add default gw "$gateway" dev "$iface"
|
[ -z "$gateway" ] || $DEBUG route add default gw "$gateway" dev "$iface"
|
||||||
[ -z "$ip6gw" ] || $DEBUG route -A inet6 add default gw "$ip6gw" dev "$iface"
|
[ -z "$ip6gw" ] || $DEBUG route -A inet6 add default gw "$ip6gw" dev "$iface"
|
||||||
[ -z "$dns" ] || {
|
[ -z "$dns" ] || add_dns "$config" $dns
|
||||||
for ns in $dns; do
|
|
||||||
grep "$ns" /tmp/resolv.conf.auto 2>/dev/null >/dev/null || {
|
|
||||||
echo "nameserver $ns" >> /tmp/resolv.conf.auto
|
|
||||||
}
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
config_get type "$config" TYPE
|
config_get type "$config" TYPE
|
||||||
[ "$type" = "alias" ] && return 0
|
[ "$type" = "alias" ] && return 0
|
||||||
@ -204,6 +255,25 @@ setup_interface_alias() {
|
|||||||
config_get cfg "$config" interface
|
config_get cfg "$config" interface
|
||||||
[ "$parent" == "$cfg" ] || return 0
|
[ "$parent" == "$cfg" ] || return 0
|
||||||
|
|
||||||
|
# parent device and ifname
|
||||||
|
local p_device p_type
|
||||||
|
config_get p_device "$cfg" device
|
||||||
|
config_get p_type "$cfg" type
|
||||||
|
|
||||||
|
# select alias ifname
|
||||||
|
local layer use_iface
|
||||||
|
config_get layer "$config" layer 2
|
||||||
|
case "$layer:$p_type" in
|
||||||
|
# layer 3: e.g. pppoe-wan or pptp-vpn
|
||||||
|
3:*) use_iface="$iface" ;;
|
||||||
|
|
||||||
|
# layer 2 and parent is bridge: e.g. br-wan
|
||||||
|
2:bridge) use_iface="br-$cfg" ;;
|
||||||
|
|
||||||
|
# layer 1: e.g. eth0 or ath0
|
||||||
|
*) use_iface="$p_device" ;;
|
||||||
|
esac
|
||||||
|
|
||||||
# alias counter
|
# alias counter
|
||||||
local ctr
|
local ctr
|
||||||
config_get ctr "$parent" alias_count 0
|
config_get ctr "$parent" alias_count 0
|
||||||
@ -216,14 +286,14 @@ setup_interface_alias() {
|
|||||||
append list "$config"
|
append list "$config"
|
||||||
config_set "$parent" aliases "$list"
|
config_set "$parent" aliases "$list"
|
||||||
|
|
||||||
iface="$iface:$ctr"
|
use_iface="$use_iface:$ctr"
|
||||||
set_interface_ifname "$config" "$iface"
|
set_interface_ifname "$config" "$use_iface"
|
||||||
|
|
||||||
local proto
|
local proto
|
||||||
config_get proto "$config" proto "static"
|
config_get proto "$config" proto "static"
|
||||||
case "${proto}" in
|
case "${proto}" in
|
||||||
static)
|
static)
|
||||||
setup_interface_static "$iface" "$config"
|
setup_interface_static "$use_iface" "$config"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unsupported type '$proto' for alias config '$config'"
|
echo "Unsupported type '$proto' for alias config '$config'"
|
||||||
@ -233,102 +303,110 @@ setup_interface_alias() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
setup_interface() {
|
setup_interface() {
|
||||||
local iface_main="$1"
|
local iface="$1"
|
||||||
local config="$2"
|
local config="$2"
|
||||||
local proto="$3"
|
local proto="$3"
|
||||||
local vifmac="$4"
|
local vifmac="$4"
|
||||||
local ip6addr_main=
|
|
||||||
|
|
||||||
[ -n "$config" ] || {
|
[ -n "$config" ] || {
|
||||||
config=$(find_config "$iface_main")
|
config=$(find_config "$iface")
|
||||||
[ "$?" = 0 ] || return 1
|
[ "$?" = 0 ] || return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
prepare_interface "$iface_main" "$config" "$vifmac" || return 0
|
prepare_interface "$iface" "$config" "$vifmac" || return 0
|
||||||
|
|
||||||
[ "$iface_main" = "br-$config" ] && {
|
[ "$iface" = "br-$config" ] && {
|
||||||
# need to bring up the bridge and wait a second for
|
# need to bring up the bridge and wait a second for
|
||||||
# it to switch to the 'forwarding' state, otherwise
|
# it to switch to the 'forwarding' state, otherwise
|
||||||
# it will lose its routes...
|
# it will lose its routes...
|
||||||
ifconfig "$iface_main" up
|
ifconfig "$iface" up
|
||||||
sleep 1
|
sleep 1
|
||||||
}
|
}
|
||||||
|
|
||||||
# Interface settings
|
# Interface settings
|
||||||
grep "$iface_main:" /proc/net/dev > /dev/null && {
|
grep "$iface:" /proc/net/dev > /dev/null && {
|
||||||
local mtu macaddr
|
local mtu macaddr
|
||||||
config_get mtu "$config" mtu
|
config_get mtu "$config" mtu
|
||||||
config_get macaddr "$config" macaddr
|
config_get macaddr "$config" macaddr
|
||||||
[ -n "$macaddr" ] && $DEBUG ifconfig "$iface_main" down
|
[ -n "$macaddr" ] && $DEBUG ifconfig "$iface" down
|
||||||
$DEBUG ifconfig "$iface_main" ${macaddr:+hw ether "$macaddr"} ${mtu:+mtu $mtu} up
|
$DEBUG ifconfig "$iface" ${macaddr:+hw ether "$macaddr"} ${mtu:+mtu $mtu} up
|
||||||
}
|
}
|
||||||
set_interface_ifname "$config" "$iface_main"
|
set_interface_ifname "$config" "$iface"
|
||||||
|
|
||||||
pidfile="/var/run/$iface_main.pid"
|
|
||||||
[ -n "$proto" ] || config_get proto "$config" proto
|
[ -n "$proto" ] || config_get proto "$config" proto
|
||||||
case "$proto" in
|
case "$proto" in
|
||||||
static)
|
static)
|
||||||
config_get ip6addr_main "$config" ip6addr
|
setup_interface_static "$iface" "$config"
|
||||||
setup_interface_static "$iface_main" "$config"
|
|
||||||
;;
|
;;
|
||||||
dhcp)
|
dhcp)
|
||||||
|
local lockfile="/var/lock/dhcp-$iface"
|
||||||
|
lock "$lockfile"
|
||||||
|
|
||||||
# prevent udhcpc from starting more than once
|
# prevent udhcpc from starting more than once
|
||||||
lock "/var/lock/dhcp-$iface_main"
|
local pidfile="/var/run/dhcp-${iface}.pid"
|
||||||
local pid="$(cat "$pidfile" 2>/dev/null)"
|
local pid="$(cat "$pidfile" 2>/dev/null)"
|
||||||
if [ -d "/proc/$pid" ] && grep udhcpc "/proc/${pid}/cmdline" >/dev/null 2>/dev/null; then
|
if [ -d "/proc/$pid" ] && grep -qs udhcpc "/proc/${pid}/cmdline"; then
|
||||||
lock -u "/var/lock/dhcp-$iface_main"
|
lock -u "$lockfile"
|
||||||
else
|
else
|
||||||
local ipaddr netmask hostname proto1 clientid
|
local ipaddr netmask hostname proto1 clientid broadcast
|
||||||
config_get ipaddr "$config" ipaddr
|
config_get ipaddr "$config" ipaddr
|
||||||
config_get netmask "$config" netmask
|
config_get netmask "$config" netmask
|
||||||
config_get hostname "$config" hostname
|
config_get hostname "$config" hostname
|
||||||
config_get proto1 "$config" proto
|
config_get proto1 "$config" proto
|
||||||
config_get clientid "$config" clientid
|
config_get clientid "$config" clientid
|
||||||
|
config_get_bool broadcast "$config" broadcast 0
|
||||||
|
|
||||||
[ -z "$ipaddr" ] || \
|
[ -z "$ipaddr" ] || \
|
||||||
$DEBUG ifconfig "$iface_main" "$ipaddr" ${netmask:+netmask "$netmask"}
|
$DEBUG ifconfig "$iface" "$ipaddr" ${netmask:+netmask "$netmask"}
|
||||||
|
|
||||||
# don't stay running in background if dhcp is not the main proto on the interface (e.g. when using pptp)
|
# don't stay running in background if dhcp is not the main proto on the interface (e.g. when using pptp)
|
||||||
local dhcpopts
|
local dhcpopts
|
||||||
[ ."$proto1" != ."$proto" ] && dhcpopts="-n -q"
|
[ ."$proto1" != ."$proto" ] && dhcpopts="-n -q"
|
||||||
$DEBUG eval udhcpc -t 0 -i "$iface_main" ${ipaddr:+-r $ipaddr} ${hostname:+-H $hostname} ${clientid:+-c $clientid} -b -p "$pidfile" ${dhcpopts:- -O rootpath -R &}
|
[ "$broadcast" = 1 ] && broadcast="-O broadcast" || broadcast=
|
||||||
lock -u "/var/lock/dhcp-$iface_main"
|
|
||||||
|
$DEBUG eval udhcpc -t 0 -i "$iface" \
|
||||||
|
${ipaddr:+-r $ipaddr} \
|
||||||
|
${hostname:+-H $hostname} \
|
||||||
|
${clientid:+-c $clientid} \
|
||||||
|
-b -p "$pidfile" $broadcast \
|
||||||
|
${dhcpopts:- -O rootpath -R &}
|
||||||
|
|
||||||
|
lock -u "$lockfile"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
none)
|
none)
|
||||||
setup_interface_none "$iface_main" "$config"
|
setup_interface_none "$iface" "$config"
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
if ( eval "type setup_interface_$proto" ) >/dev/null 2>/dev/null; then
|
if ( eval "type setup_interface_$proto" ) >/dev/null 2>/dev/null; then
|
||||||
eval "setup_interface_$proto '$iface_main' '$config' '$proto'"
|
eval "setup_interface_$proto '$iface' '$config' '$proto'"
|
||||||
else
|
else
|
||||||
echo "Interface type $proto not supported."
|
echo "Interface type $proto not supported."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
[ "$proto" = none ] || {
|
|
||||||
for ifn in `ifconfig | grep "^$iface_main:" | awk '{print $1}'`; do
|
|
||||||
ifconfig "$ifn" down
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
local aliases
|
|
||||||
config_set "$config" aliases ""
|
|
||||||
config_set "$config" alias_count 0
|
|
||||||
config_foreach setup_interface_alias alias "$config" "$iface_main"
|
|
||||||
config_get aliases "$config" aliases
|
|
||||||
[ -z "$aliases" ] || uci_set_state network "$config" aliases "$aliases"
|
|
||||||
|
|
||||||
# put the ip6addr back to the beginning to become the main ip again
|
|
||||||
[ -z "$ip6addr_main" ] || {
|
|
||||||
$DEBUG ifconfig "$iface_main" del "$ip6addr_main"
|
|
||||||
$DEBUG ifconfig "$iface_main" add "$ip6addr_main"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stop_interface_dhcp() {
|
stop_interface_dhcp() {
|
||||||
local config="$1"
|
local config="$1"
|
||||||
|
|
||||||
|
local ifname
|
||||||
|
config_get ifname "$config" ifname
|
||||||
|
|
||||||
|
local lock="/var/lock/dhcp-${ifname}"
|
||||||
|
[ -f "$lock" ] && lock -u "$lock"
|
||||||
|
|
||||||
|
remove_dns "$config"
|
||||||
|
|
||||||
|
local pidfile="/var/run/dhcp-${ifname}.pid"
|
||||||
|
local pid="$(cat "$pidfile" 2>/dev/null)"
|
||||||
|
[ -d "/proc/$pid" ] && {
|
||||||
|
grep -qs udhcpc "/proc/$pid/cmdline" && kill -TERM $pid && \
|
||||||
|
while grep -qs udhcpc "/proc/$pid/cmdline"; do sleep 1; done
|
||||||
|
rm -f "$pidfile"
|
||||||
|
}
|
||||||
|
|
||||||
uci -P /var/state revert "network.$config"
|
uci -P /var/state revert "network.$config"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -29,28 +29,6 @@ config_get iface "$cfg" device
|
|||||||
# call interface stop handler
|
# call interface stop handler
|
||||||
( type "stop_interface_$proto" ) >/dev/null 2>/dev/null && eval "stop_interface_$proto '$cfg'"
|
( type "stop_interface_$proto" ) >/dev/null 2>/dev/null && eval "stop_interface_$proto '$cfg'"
|
||||||
|
|
||||||
# make sure all locks are removed
|
|
||||||
for lock in "/var/lock/dhcp-$iface" "/var/lock/ppp-$iface"; do
|
|
||||||
[ -f "$lock" ] && {
|
|
||||||
lock -u "$lock"
|
|
||||||
sleep 1
|
|
||||||
}
|
|
||||||
done
|
|
||||||
|
|
||||||
# kill active ppp daemon and other processes
|
|
||||||
config_get ifname "$cfg" ifname
|
|
||||||
pids="$(head -n1 -q /var/run/${ifname}.pid /var/run/ppp-${cfg}.pid 2>/dev/null)"
|
|
||||||
for pid in $pids; do
|
|
||||||
[ -d "/proc/$pid" ] && {
|
|
||||||
kill $pid
|
|
||||||
[ -d "/proc/$pid" ] && {
|
|
||||||
sleep 1
|
|
||||||
kill -9 $pid 2>/dev/null >/dev/null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
done
|
|
||||||
rm -f /var/run/${ifname}.pid /var/run/ppp-${cfg}.pid
|
|
||||||
|
|
||||||
config_get ifname "$cfg" ifname
|
config_get ifname "$cfg" ifname
|
||||||
config_get device "$cfg" device
|
config_get device "$cfg" device
|
||||||
|
|
||||||
@ -62,6 +40,9 @@ done
|
|||||||
config_get iftype "$cfg" type
|
config_get iftype "$cfg" type
|
||||||
[ "bridge" = "$iftype" ] && brctl delbr "$ifname" >/dev/null 2>/dev/null
|
[ "bridge" = "$iftype" ] && brctl delbr "$ifname" >/dev/null 2>/dev/null
|
||||||
|
|
||||||
|
# remove the interface's dns entries
|
||||||
|
remove_dns "$cfg"
|
||||||
|
|
||||||
# remove the interface's network state
|
# remove the interface's network state
|
||||||
uci_revert_state network "$1"
|
uci_revert_state network "$1"
|
||||||
|
|
||||||
|
@ -11,11 +11,6 @@ change_state () {
|
|||||||
uci_set_state "$1" "$2" "$3" "$4"
|
uci_set_state "$1" "$2" "$3" "$4"
|
||||||
}
|
}
|
||||||
|
|
||||||
uci_get() {
|
|
||||||
[ -n "$ifc" ] || return
|
|
||||||
uci -P /dev/null get "$1" 2>/dev/null
|
|
||||||
}
|
|
||||||
|
|
||||||
setup_interface () {
|
setup_interface () {
|
||||||
local old_ip
|
local old_ip
|
||||||
local old_broadcast
|
local old_broadcast
|
||||||
@ -144,21 +139,21 @@ setup_interface () {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# DNS
|
# DNS
|
||||||
config_get old_dns "$ifc" dns
|
old_dns=$(uci_get_state network "$ifc" dns)
|
||||||
|
old_domain=$(uci_get_state network "$ifc" dnsdomain)
|
||||||
user_dns=$(uci_get "network.$ifc.dns")
|
user_dns=$(uci_get "network.$ifc.dns")
|
||||||
[ -n "$user_dns" ] && dns="$user_dns"
|
[ -n "$user_dns" ] && dns="$user_dns"
|
||||||
|
|
||||||
[ -n "$dns" ] && [ ! -s "${RESOLV_CONF}" -o "$dns" != "$old_dns" ] && {
|
[ -n "$dns" ] && [ "$dns" != "$old_dns" -o -n "$user_dns" ] && {
|
||||||
echo "udhcpc: setting dns servers: $dns"
|
echo "udhcpc: setting dns servers: $dns"
|
||||||
echo -n > "${RESOLV_CONF}.tmp"
|
add_dns "$ifc" $dns
|
||||||
for i in $dns ; do
|
|
||||||
echo "nameserver $i" >> "${RESOLV_CONF}.tmp"
|
|
||||||
done
|
|
||||||
${domain:+echo search $domain} >> "${RESOLV_CONF}.tmp"
|
|
||||||
mv "${RESOLV_CONF}.tmp" "$RESOLV_CONF"
|
|
||||||
|
|
||||||
|
[ -n "$domain" ] && [ "$domain" != "$old_domain" ] && {
|
||||||
|
echo "udhcpc: setting dns domain: $domain"
|
||||||
|
sed -i -e "${old_domain:+/^search $old_domain$/d; }/^search $domain$/d" "${RESOLV_CONF}"
|
||||||
|
echo "search $domain" >> "${RESOLV_CONF}"
|
||||||
change_state network "$ifc" dnsdomain "$domain"
|
change_state network "$ifc" dnsdomain "$domain"
|
||||||
change_state network "$ifc" dns "$dns"
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -n "$ifc" ] || return
|
[ -n "$ifc" ] || return
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2009 OpenWrt.org
|
# Copyright (C) 2009-2010 OpenWrt.org
|
||||||
# Copyright (C) 2010 Vertical Communications
|
# Copyright (C) 2010 Vertical Communications
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=block-extroot
|
PKG_NAME:=block-extroot
|
||||||
PKG_VERSION:=0.0.1
|
PKG_VERSION:=0.0.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||||
|
|
||||||
|
@ -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.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
|
||||||
PKG_NAME:=broadcom-diag
|
PKG_NAME:=broadcom-diag
|
||||||
PKG_RELEASE:=6
|
PKG_RELEASE:=7
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
@ -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.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_NAME:=broadcom-wl
|
PKG_NAME:=broadcom-wl
|
||||||
PKG_VERSION:=4.150.10.5.3
|
PKG_VERSION:=4.150.10.5.3
|
||||||
PKG_RELEASE:=6
|
PKG_RELEASE:=7
|
||||||
WLC_VERSION:=0.2
|
WLC_VERSION:=0.2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
START=50
|
START=50
|
||||||
|
|
||||||
start () {
|
start () {
|
||||||
loglevel=$(/sbin/uci get "system.@system[0].cronloglevel" 2>/dev/null)
|
loglevel=$(uci_get "system.@system[0].cronloglevel")
|
||||||
[ -z "$(ls /etc/crontabs/)" ] && exit 1
|
[ -z "$(ls /etc/crontabs/)" ] && exit 1
|
||||||
mkdir -p /var/spool/cron
|
mkdir -p /var/spool/cron
|
||||||
ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
|
ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
|
||||||
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
|||||||
|
|
||||||
PKG_NAME:=comgt
|
PKG_NAME:=comgt
|
||||||
PKG_VERSION:=0.32
|
PKG_VERSION:=0.32
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
|
PKG_SOURCE:=$(PKG_NAME).$(PKG_VERSION).tgz
|
||||||
PKG_SOURCE_URL:=@SF/comgt
|
PKG_SOURCE_URL:=@SF/comgt
|
||||||
|
@ -6,15 +6,9 @@ config_get proto "$INTERFACE" proto
|
|||||||
config_get iface "$INTERFACE" ifname
|
config_get iface "$INTERFACE" ifname
|
||||||
case "$ACTION" in
|
case "$ACTION" in
|
||||||
ifup)
|
ifup)
|
||||||
iptables -I LAN_ACCEPT 1 -i "$iface" -j RETURN
|
|
||||||
iptables -A FORWARD -o "$iface" -j ACCEPT
|
|
||||||
iptables -t nat -A POSTROUTING -o "$iface" -j MASQUERADE
|
|
||||||
set_3g_led 1 1 0
|
set_3g_led 1 1 0
|
||||||
;;
|
;;
|
||||||
ifdown)
|
ifdown)
|
||||||
iptables -D LAN_ACCEPT -i "$iface" -j RETURN
|
|
||||||
iptables -D FORWARD -o "$iface" -j ACCEPT
|
|
||||||
iptables -t nat -D POSTROUTING -o "$iface" -j MASQUERADE
|
|
||||||
set_3g_led 0 0 0
|
set_3g_led 0 0 0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -9,8 +9,6 @@ set_3g_led() {
|
|||||||
|
|
||||||
scan_3g() {
|
scan_3g() {
|
||||||
local device
|
local device
|
||||||
|
|
||||||
scan_ppp "$@"
|
|
||||||
config_get device "$1" device
|
config_get device "$1" device
|
||||||
|
|
||||||
# try to figure out the device if it's invalid
|
# try to figure out the device if it's invalid
|
||||||
@ -24,6 +22,7 @@ scan_3g() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# enable 3G with the 3G button by default
|
# enable 3G with the 3G button by default
|
||||||
|
local button
|
||||||
config_get button "$1" button
|
config_get button "$1" button
|
||||||
[ -z "$button" ] && {
|
[ -z "$button" ] && {
|
||||||
config_set "$1" button 1
|
config_set "$1" button 1
|
||||||
@ -31,6 +30,7 @@ scan_3g() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
stop_interface_3g() {
|
stop_interface_3g() {
|
||||||
|
stop_interface_ppp "$1"
|
||||||
set_3g_led 0 0 0
|
set_3g_led 0 0 0
|
||||||
killall gcom >/dev/null 2>/dev/null
|
killall gcom >/dev/null 2>/dev/null
|
||||||
}
|
}
|
||||||
@ -40,7 +40,10 @@ setup_interface_3g() {
|
|||||||
local config="$2"
|
local config="$2"
|
||||||
local chat="/etc/chatscripts/3g.chat"
|
local chat="/etc/chatscripts/3g.chat"
|
||||||
|
|
||||||
|
local device
|
||||||
config_get device "$config" device
|
config_get device "$config" device
|
||||||
|
|
||||||
|
local maxwait
|
||||||
config_get maxwait "$config" maxwait
|
config_get maxwait "$config" maxwait
|
||||||
maxwait=${maxwait:-20}
|
maxwait=${maxwait:-20}
|
||||||
while [ ! -e "$device" -a $maxwait -gt 0 ];do # wait for driver loading to catch up
|
while [ ! -e "$device" -a $maxwait -gt 0 ];do # wait for driver loading to catch up
|
||||||
@ -52,9 +55,16 @@ setup_interface_3g() {
|
|||||||
/sbin/insmod $module 2>&- >&-
|
/sbin/insmod $module 2>&- >&-
|
||||||
done
|
done
|
||||||
|
|
||||||
|
local apn
|
||||||
config_get apn "$config" apn
|
config_get apn "$config" apn
|
||||||
|
|
||||||
|
local service
|
||||||
config_get service "$config" service
|
config_get service "$config" service
|
||||||
|
|
||||||
|
local pincode
|
||||||
config_get pincode "$config" pincode
|
config_get pincode "$config" pincode
|
||||||
|
|
||||||
|
local mtu
|
||||||
config_get mtu "$config" mtu
|
config_get mtu "$config" mtu
|
||||||
|
|
||||||
set_3g_led 1 0 1
|
set_3g_led 1 0 1
|
||||||
|
@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_NAME:=compcache
|
PKG_NAME:=compcache
|
||||||
PKG_VERSION:=0.6.2
|
PKG_VERSION:=0.6.2
|
||||||
PKG_RELEASE:=$(PKG_VERSION)-1
|
PKG_RELEASE:=1
|
||||||
PKG_SOURCE_URL:=http://compcache.googlecode.com/files/
|
PKG_SOURCE_URL:=http://compcache.googlecode.com/files/
|
||||||
PKG_MD5SUM:=27aec78dc50e34fb800c74e879057743
|
PKG_MD5SUM:=27aec78dc50e34fb800c74e879057743
|
||||||
|
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2008 OpenWrt.org
|
# Copyright (C) 2008-2010 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
#
|
#
|
||||||
# $Id: $
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
@ -12,6 +12,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
PKG_NAME:=ifxmips-dsl-api
|
PKG_NAME:=ifxmips-dsl-api
|
||||||
PKG_BASE_NAME:=drv_dsl_cpe_api_danube
|
PKG_BASE_NAME:=drv_dsl_cpe_api_danube
|
||||||
PKG_VERSION:=3.24.4.4
|
PKG_VERSION:=3.24.4.4
|
||||||
|
PKG_RELEASE:=1
|
||||||
PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/drv_dsl_cpe_api-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/drv_dsl_cpe_api-$(PKG_VERSION)
|
||||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
|
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
|
||||||
|
@ -11,6 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_BASE_NAME:=dsl_cpe_control_danube
|
PKG_BASE_NAME:=dsl_cpe_control_danube
|
||||||
PKG_VERSION:=3.24.4.4
|
PKG_VERSION:=3.24.4.4
|
||||||
|
PKG_RELEASE:=1
|
||||||
PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_BASE_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/dsl_cpe_control-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(BUILD_DIR)/dsl_cpe_control-$(PKG_VERSION)
|
||||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
|
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2009 OpenWrt.org
|
# Copyright (C) 2009-2010 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
#
|
#
|
||||||
# $Id: $
|
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
@ -236,7 +236,7 @@ $(call KernelPackage/ipt/Depends,)
|
|||||||
FILES:= \
|
FILES:= \
|
||||||
$(LINUX_DIR)/drivers/net/imq.$(LINUX_KMOD_SUFFIX) \
|
$(LINUX_DIR)/drivers/net/imq.$(LINUX_KMOD_SUFFIX) \
|
||||||
$(foreach mod,$(IPT_IMQ-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
|
$(foreach mod,$(IPT_IMQ-m),$(LINUX_DIR)/net/$(mod).$(LINUX_KMOD_SUFFIX))
|
||||||
AUTOLOAD:=$(call AutoLoad,45,$(notdir \
|
AUTOLOAD:=$(call AutoLoad,46,$(notdir \
|
||||||
imq \
|
imq \
|
||||||
$(IPT_IMQ-m) \
|
$(IPT_IMQ-m) \
|
||||||
))
|
))
|
||||||
|
@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_NAME:=mac80211
|
PKG_NAME:=mac80211
|
||||||
|
|
||||||
PKG_VERSION:=2010-04-28
|
PKG_VERSION:=2010-05-24
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=1
|
||||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
||||||
# http://www.orbit-lab.org/kernel/compat-wireless-2.6/2010/11 \
|
# http://www.orbit-lab.org/kernel/compat-wireless-2.6/2010/11 \
|
||||||
# http://wireless.kernel.org/download/compat-wireless-2.6
|
# http://wireless.kernel.org/download/compat-wireless-2.6
|
||||||
PKG_MD5SUM:=4b8c23ac7f33af7556034635af744c67
|
PKG_MD5SUM:=3d465dc6e0213964d0349f61c485817f
|
||||||
|
|
||||||
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
|
||||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
|
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
|
||||||
@ -550,7 +550,7 @@ endef
|
|||||||
ifneq ($(CONFIG_B43_EXPERIMENTAL),)
|
ifneq ($(CONFIG_B43_EXPERIMENTAL),)
|
||||||
PKG_B43_FWV4_NAME:=broadcom-wl
|
PKG_B43_FWV4_NAME:=broadcom-wl
|
||||||
PKG_B43_FWV4_VERSION:=4.178.10.4
|
PKG_B43_FWV4_VERSION:=4.178.10.4
|
||||||
PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/linux/wl.o
|
PKG_B43_FWV4_OBJECT:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION)/linux/wl_apsta.o
|
||||||
PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
|
PKG_B43_FWV4_SOURCE:=$(PKG_B43_FWV4_NAME)-$(PKG_B43_FWV4_VERSION).tar.bz2
|
||||||
PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
|
PKG_B43_FWV4_SOURCE_URL:=http://mirror2.openwrt.org/sources/
|
||||||
PKG_B43_FWV4_MD5SUM:=14477e8cbbb91b11896affac9b219fdb
|
PKG_B43_FWV4_MD5SUM:=14477e8cbbb91b11896affac9b219fdb
|
||||||
@ -578,7 +578,7 @@ PKG_B43_FWV3_SOURCE:=$(PKG_B43_FWV3_NAME)-$(PKG_B43_FWV3_VERSION).o
|
|||||||
PKG_B43_FWV3_SOURCE_URL:=http://downloads.openwrt.org/sources/
|
PKG_B43_FWV3_SOURCE_URL:=http://downloads.openwrt.org/sources/
|
||||||
PKG_B43_FWV3_MD5SUM:=e08665c5c5b66beb9c3b2dd54aa80cb3
|
PKG_B43_FWV3_MD5SUM:=e08665c5c5b66beb9c3b2dd54aa80cb3
|
||||||
|
|
||||||
ifneq ($(CONFIG_B43_OPENFIRMWARE),)
|
ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
|
||||||
PKG_B43_FWCUTTER_NAME:=b43-fwcutter
|
PKG_B43_FWCUTTER_NAME:=b43-fwcutter
|
||||||
PKG_B43_FWCUTTER_VERSION:=3e69531aa65b8f664a0ab00dfc3e2eefeb0cb417
|
PKG_B43_FWCUTTER_VERSION:=3e69531aa65b8f664a0ab00dfc3e2eefeb0cb417
|
||||||
PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
|
PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
|
||||||
@ -588,11 +588,11 @@ ifneq ($(CONFIG_B43_OPENFIRMWARE),)
|
|||||||
PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/fwcutter/
|
PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/fwcutter/
|
||||||
else
|
else
|
||||||
PKG_B43_FWCUTTER_NAME:=b43-fwcutter
|
PKG_B43_FWCUTTER_NAME:=b43-fwcutter
|
||||||
PKG_B43_FWCUTTER_VERSION:=012
|
PKG_B43_FWCUTTER_VERSION:=013
|
||||||
PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
|
PKG_B43_FWCUTTER_SOURCE:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION).tar.bz2
|
||||||
PKG_B43_FWCUTTER_PROTO:=default
|
PKG_B43_FWCUTTER_PROTO:=default
|
||||||
PKG_B43_FWCUTTER_SOURCE_URL:=http://bu3sch.de/b43/fwcutter/
|
PKG_B43_FWCUTTER_SOURCE_URL:=http://bu3sch.de/b43/fwcutter/
|
||||||
PKG_B43_FWCUTTER_MD5SUM:=69eadf67b459f313a8d6b37aaabef96c
|
PKG_B43_FWCUTTER_MD5SUM:=3547ec6c474ac1bc2c4a5bb765b791a4
|
||||||
PKG_B43_FWCUTTER_SUBDIR:=b43-fwcutter-$(PKG_B43_FWCUTTER_VERSION)
|
PKG_B43_FWCUTTER_SUBDIR:=b43-fwcutter-$(PKG_B43_FWCUTTER_VERSION)
|
||||||
PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/
|
PKG_B43_FWCUTTER_OBJECT:=$(PKG_B43_FWCUTTER_NAME)-$(PKG_B43_FWCUTTER_VERSION)/
|
||||||
endif
|
endif
|
||||||
@ -644,7 +644,7 @@ define KernelPackage/b43/config
|
|||||||
|
|
||||||
choice
|
choice
|
||||||
prompt "b43 firmware version"
|
prompt "b43 firmware version"
|
||||||
default B43_EXPERIMENTAL
|
default B43_STABLE
|
||||||
help
|
help
|
||||||
This option allows you to select the version of the b43 firmware.
|
This option allows you to select the version of the b43 firmware.
|
||||||
|
|
||||||
@ -773,14 +773,13 @@ endef
|
|||||||
BUILDFLAGS:= \
|
BUILDFLAGS:= \
|
||||||
-I$(PKG_BUILD_DIR)/include \
|
-I$(PKG_BUILD_DIR)/include \
|
||||||
$(foreach opt,$(CONFOPTS),-DCONFIG_$(opt)) \
|
$(foreach opt,$(CONFOPTS),-DCONFIG_$(opt)) \
|
||||||
$(if $(CONFIG_PCI),-DCONFIG_B43_PCI_AUTOSELECT -DCONFIG_B43_PCICORE_AUTOSELECT -DCONFIG_SSB_DRIVER_PCICORE_POSSIBLE -DCONFIG_SSB_DRIVER_PCICORE) \
|
$(if $(CONFIG_PCI),-DCONFIG_B43_PCI_AUTOSELECT -DCONFIG_B43_PCICORE_AUTOSELECT) \
|
||||||
$(if $(CONFIG_PCI),-DCONFIG_SSB_PCIHOST_POSSIBLE -DCONFIG_SSB_PCIHOST) \
|
|
||||||
$(if $(CONFIG_PCI),-DCONFIG_SSB_SPROM) \
|
|
||||||
$(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS -DCONFIG_B43_LEDS -DCONFIG_B43LEGACY_LEDS -DCONFIG_AR9170_LEDS) \
|
$(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS -DCONFIG_B43_LEDS -DCONFIG_B43LEGACY_LEDS -DCONFIG_AR9170_LEDS) \
|
||||||
-DCONFIG_B43_HWRNG -DCONFIG_B43LEGACY_HWRNG \
|
-DCONFIG_B43_HWRNG -DCONFIG_B43LEGACY_HWRNG \
|
||||||
$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),-DCONFIG_MAC80211_DEBUGFS -DCONFIG_ATH9K_DEBUGFS) \
|
$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),-DCONFIG_MAC80211_DEBUGFS -DCONFIG_ATH9K_DEBUGFS) \
|
||||||
$(if $(CONFIG_PACKAGE_ATH_DEBUG),-DCONFIG_ATH_DEBUG) \
|
$(if $(CONFIG_PACKAGE_ATH_DEBUG),-DCONFIG_ATH_DEBUG) \
|
||||||
-D__CONFIG_MAC80211_RC_DEFAULT=minstrel \
|
-D__CONFIG_MAC80211_RC_DEFAULT=minstrel \
|
||||||
|
-DCONFIG_MAC80211_RC_MINSTREL_HT \
|
||||||
$(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD=1) \
|
$(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD=1) \
|
||||||
$(if $(CONFIG_PACKAGE_ATH9K_USE_MINSTREL),-DATH9K_USE_MINSTREL) \
|
$(if $(CONFIG_PACKAGE_ATH9K_USE_MINSTREL),-DATH9K_USE_MINSTREL) \
|
||||||
$(if $(CONFIG_PACKAGE_RT2X00_LIB_DEBUGFS),-DCONFIG_RT2X00_LIB_DEBUGFS) \
|
$(if $(CONFIG_PACKAGE_RT2X00_LIB_DEBUGFS),-DCONFIG_RT2X00_LIB_DEBUGFS) \
|
||||||
@ -808,10 +807,6 @@ MAKE_OPTS:= \
|
|||||||
CONFIG_B43_PCMCIA=n CONFIG_B43_PIO=n \
|
CONFIG_B43_PCMCIA=n CONFIG_B43_PIO=n \
|
||||||
CONFIG_B43_PCI_AUTOSELECT=$(if $(CONFIG_PCI),y) \
|
CONFIG_B43_PCI_AUTOSELECT=$(if $(CONFIG_PCI),y) \
|
||||||
CONFIG_B43_PCICORE_AUTOSELECT=$(if $(CONFIG_PCI),y) \
|
CONFIG_B43_PCICORE_AUTOSELECT=$(if $(CONFIG_PCI),y) \
|
||||||
CONFIG_SSB_DRIVER_PCICORE_POSSIBLE=$(if $(CONFIG_PCI),y) \
|
|
||||||
CONFIG_SSB_DRIVER_PCICORE=$(if $(CONFIG_PCI),y) \
|
|
||||||
CONFIG_SSB_PCIHOST_POSSIBLE=$(if $(CONFIG_PCI),y) \
|
|
||||||
CONFIG_SSB_PCIHOST=$(if $(CONFIG_PCI),y) \
|
|
||||||
CONFIG_B43LEGACY_LEDS=$(CONFIG_LEDS_TRIGGERS) \
|
CONFIG_B43LEGACY_LEDS=$(CONFIG_LEDS_TRIGGERS) \
|
||||||
CONFIG_B43_LEDS=$(CONFIG_LEDS_TRIGGERS) \
|
CONFIG_B43_LEDS=$(CONFIG_LEDS_TRIGGERS) \
|
||||||
CONFIG_B43_HWRNG=$(if $(CONFIG_HW_RANDOM),y) \
|
CONFIG_B43_HWRNG=$(if $(CONFIG_HW_RANDOM),y) \
|
||||||
@ -883,6 +878,7 @@ MAKE_OPTS:= \
|
|||||||
CONFIG_AR9170_LEDS=$(CONFIG_LEDS_TRIGGERS) \
|
CONFIG_AR9170_LEDS=$(CONFIG_LEDS_TRIGGERS) \
|
||||||
CONFIG_IWM= \
|
CONFIG_IWM= \
|
||||||
CONFIG_ATH9K_HTC= \
|
CONFIG_ATH9K_HTC= \
|
||||||
|
CONFIG_MAC80211_RC_MINSTREL_HT=y \
|
||||||
MADWIFI= \
|
MADWIFI= \
|
||||||
OLD_IWL= \
|
OLD_IWL= \
|
||||||
KLIB_BUILD="$(LINUX_DIR)" \
|
KLIB_BUILD="$(LINUX_DIR)" \
|
||||||
@ -993,7 +989,7 @@ define Build/b43-common
|
|||||||
$(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_OBJECT)" \
|
$(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_OBJECT)" \
|
||||||
CFLAGS="-I$(STAGING_DIR_HOST)/include -include endian.h"
|
CFLAGS="-I$(STAGING_DIR_HOST)/include -include endian.h"
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_OBJECT)/b43-fwcutter $(STAGING_DIR_HOST)/bin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_OBJECT)/b43-fwcutter $(STAGING_DIR_HOST)/bin/
|
||||||
ifneq ($(CONFIG_B43_OPENFIRMWARE),)
|
ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
|
||||||
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
|
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
|
||||||
$(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/"
|
$(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/"
|
||||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/b43-asm $(STAGING_DIR_HOST)/bin/
|
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_SUBDIR)/assembler/b43-asm $(STAGING_DIR_HOST)/bin/
|
||||||
@ -1005,20 +1001,20 @@ endef
|
|||||||
define KernelPackage/b43/install
|
define KernelPackage/b43/install
|
||||||
rm -rf $(1)/lib/firmware/
|
rm -rf $(1)/lib/firmware/
|
||||||
$(call Build/b43-common)
|
$(call Build/b43-common)
|
||||||
ifneq ($(CONFIG_B43_OPENFIRMWARE),)
|
ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
|
||||||
tar xzf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
|
tar xzf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
|
||||||
else
|
else
|
||||||
tar xjf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
|
tar xjf "$(DL_DIR)/$(PKG_B43_FWV4_SOURCE)" -C "$(PKG_BUILD_DIR)"
|
||||||
endif
|
endif
|
||||||
$(INSTALL_DIR) $(1)/lib/firmware/
|
$(INSTALL_DIR) $(1)/lib/firmware/
|
||||||
ifneq ($(CONFIG_B43_OPENFIRMWARE),)
|
ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
|
||||||
$(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/"
|
$(MAKE) -C "$(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/"
|
||||||
$(INSTALL_DIR) $(1)/lib/firmware/b43-open/
|
$(INSTALL_DIR) $(1)/lib/firmware/b43-open/
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/ucode5.fw $(1)/lib/firmware/b43-open/ucode5.fw
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/ucode5.fw $(1)/lib/firmware/b43-open/ucode5.fw
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0bsinitvals5.fw $(1)/lib/firmware/b43-open/b0g0bsinitvals5.fw
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0bsinitvals5.fw $(1)/lib/firmware/b43-open/b0g0bsinitvals5.fw
|
||||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0initvals5.fw $(1)/lib/firmware/b43-open/b0g0initvals5.fw
|
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)/b0g0initvals5.fw $(1)/lib/firmware/b43-open/b0g0initvals5.fw
|
||||||
else
|
else
|
||||||
b43-fwcutter --unsupported -w $(1)/lib/firmware/ $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)
|
b43-fwcutter -w $(1)/lib/firmware/ $(PKG_BUILD_DIR)/$(PKG_B43_FWV4_OBJECT)
|
||||||
endif
|
endif
|
||||||
ifneq ($(CONFIG_B43_FW_SQUASH),)
|
ifneq ($(CONFIG_B43_FW_SQUASH),)
|
||||||
b43-fwsquash.py "$(CONFIG_B43_FW_SQUASH_PHYTYPES)" "$(CONFIG_B43_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43"
|
b43-fwsquash.py "$(CONFIG_B43_FW_SQUASH_PHYTYPES)" "$(CONFIG_B43_FW_SQUASH_COREREVS)" "$(1)/lib/firmware/b43"
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
ifeq ($(CONFIG_MAC80211),y)
|
ifeq ($(CONFIG_MAC80211),y)
|
||||||
$(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular")
|
$(error "ERROR: you have MAC80211 compiled into the kernel, CONFIG_MAC80211=y, as such you cannot replace its mac80211 driver. You need this set to CONFIG_MAC80211=m. If you are using Fedora upgrade your kernel as later version should this set as modular. For further information on Fedora see https://bugzilla.redhat.com/show_bug.cgi?id=470143. If you are using your own kernel recompile it and make mac80211 modular")
|
||||||
@@ -481,8 +481,8 @@ endif
|
@@ -483,8 +483,8 @@ endif
|
||||||
# We need the backported rfkill module on kernel < 2.6.31.
|
# We need the backported rfkill module on kernel < 2.6.31.
|
||||||
# In more recent kernel versions use the in kernel rfkill module.
|
# In more recent kernel versions use the in kernel rfkill module.
|
||||||
ifdef CONFIG_COMPAT_KERNEL_31
|
ifdef CONFIG_COMPAT_KERNEL_31
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/Makefile
|
--- a/Makefile
|
||||||
+++ b/Makefile
|
+++ b/Makefile
|
||||||
@@ -28,7 +28,7 @@ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) +=
|
@@ -30,7 +30,7 @@ obj-$(CONFIG_COMPAT_WIRELESS_MODULES) +=
|
||||||
obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/
|
obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/
|
||||||
|
|
||||||
obj-$(CONFIG_COMPAT_NETWORK_MODULES) += drivers/net/
|
obj-$(CONFIG_COMPAT_NETWORK_MODULES) += drivers/net/
|
||||||
@ -9,3 +9,43 @@
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
obj-$(CONFIG_COMPAT_BLUETOOTH) += net/bluetooth/
|
obj-$(CONFIG_COMPAT_BLUETOOTH) += net/bluetooth/
|
||||||
|
--- a/config.mk
|
||||||
|
+++ b/config.mk
|
||||||
|
@@ -9,7 +9,6 @@ ifeq ($(wildcard $(KLIB_BUILD)/.config),
|
||||||
|
CONFIG_PCI=y
|
||||||
|
CONFIG_USB=y
|
||||||
|
CONFIG_PCMCIA=y
|
||||||
|
- CONFIG_SSB=m
|
||||||
|
else
|
||||||
|
include $(KLIB_BUILD)/.config
|
||||||
|
endif
|
||||||
|
@@ -239,21 +238,6 @@ CONFIG_IPW2200_QOS=y
|
||||||
|
#
|
||||||
|
# % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface
|
||||||
|
|
||||||
|
-ifneq ($(CONFIG_SSB),)
|
||||||
|
-# Sonics Silicon Backplane
|
||||||
|
-CONFIG_SSB_SPROM=y
|
||||||
|
-# CONFIG_SSB_DEBUG=y
|
||||||
|
-
|
||||||
|
-CONFIG_SSB_BLOCKIO=y
|
||||||
|
-CONFIG_SSB_PCIHOST=y
|
||||||
|
-CONFIG_SSB_B43_PCI_BRIDGE=y
|
||||||
|
-ifneq ($(CONFIG_PCMCIA),)
|
||||||
|
-CONFIG_SSB_PCMCIAHOST=y
|
||||||
|
-endif
|
||||||
|
-# CONFIG_SSB_DEBUG=y
|
||||||
|
-CONFIG_SSB_DRIVER_PCICORE=y
|
||||||
|
-endif
|
||||||
|
-
|
||||||
|
CONFIG_P54_PCI=m
|
||||||
|
|
||||||
|
# CONFIG_B44=m
|
||||||
|
@@ -413,7 +397,6 @@ endif # end of SPI driver list
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_MMC),)
|
||||||
|
|
||||||
|
-CONFIG_SSB_SDIOHOST=y
|
||||||
|
CONFIG_B43_SDIO=y
|
||||||
|
CONFIG_WL1251_SDIO=m
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/config.mk
|
--- a/config.mk
|
||||||
+++ b/config.mk
|
+++ b/config.mk
|
||||||
@@ -286,10 +286,10 @@ endif
|
@@ -270,10 +270,10 @@ endif
|
||||||
CONFIG_MWL8K=m
|
CONFIG_MWL8K=m
|
||||||
|
|
||||||
# Ethernet drivers go here
|
# Ethernet drivers go here
|
||||||
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
CONFIG_HERMES=m
|
CONFIG_HERMES=m
|
||||||
CONFIG_HERMES_CACHE_FW_ON_INIT=y
|
CONFIG_HERMES_CACHE_FW_ON_INIT=y
|
||||||
@@ -342,10 +342,10 @@ CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
|
@@ -326,10 +326,10 @@ CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
|
||||||
CONFIG_USB_NET_COMPAT_RNDIS_WLAN=n
|
CONFIG_USB_NET_COMPAT_RNDIS_WLAN=n
|
||||||
CONFIG_USB_NET_COMPAT_CDCETHER=n
|
CONFIG_USB_NET_COMPAT_CDCETHER=n
|
||||||
else
|
else
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/config.mk
|
--- a/config.mk
|
||||||
+++ b/config.mk
|
+++ b/config.mk
|
||||||
@@ -43,21 +43,6 @@ $(error "ERROR: Your 2.6.27 kernel has C
|
@@ -42,21 +42,6 @@ $(error "ERROR: Your 2.6.27 kernel has C
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -6,10 +6,10 @@
|
|||||||
CONFIG_USB=y
|
CONFIG_USB=y
|
||||||
- CONFIG_PCMCIA=y
|
- CONFIG_PCMCIA=y
|
||||||
+# CONFIG_PCMCIA=y
|
+# CONFIG_PCMCIA=y
|
||||||
CONFIG_SSB=m
|
|
||||||
else
|
else
|
||||||
include $(KLIB_BUILD)/.config
|
include $(KLIB_BUILD)/.config
|
||||||
@@ -181,7 +181,7 @@ CONFIG_B43=m
|
endif
|
||||||
|
@@ -180,7 +180,7 @@ CONFIG_B43=m
|
||||||
CONFIG_B43_HWRNG=y
|
CONFIG_B43_HWRNG=y
|
||||||
CONFIG_B43_PCI_AUTOSELECT=y
|
CONFIG_B43_PCI_AUTOSELECT=y
|
||||||
ifneq ($(CONFIG_PCMCIA),)
|
ifneq ($(CONFIG_PCMCIA),)
|
||||||
@ -18,12 +18,3 @@
|
|||||||
endif
|
endif
|
||||||
CONFIG_B43_LEDS=y
|
CONFIG_B43_LEDS=y
|
||||||
CONFIG_B43_PHY_LP=y
|
CONFIG_B43_PHY_LP=y
|
||||||
@@ -233,7 +233,7 @@ CONFIG_SSB_BLOCKIO=y
|
|
||||||
CONFIG_SSB_PCIHOST=y
|
|
||||||
CONFIG_SSB_B43_PCI_BRIDGE=y
|
|
||||||
ifneq ($(CONFIG_PCMCIA),)
|
|
||||||
-CONFIG_SSB_PCMCIAHOST=y
|
|
||||||
+# CONFIG_SSB_PCMCIAHOST=y
|
|
||||||
endif
|
|
||||||
# CONFIG_SSB_DEBUG=y
|
|
||||||
CONFIG_SSB_DRIVER_PCICORE=y
|
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
--- a/config.mk
|
--- a/config.mk
|
||||||
+++ b/config.mk
|
+++ b/config.mk
|
||||||
@@ -396,8 +396,8 @@ endif # end of SPI driver list
|
@@ -382,7 +382,7 @@ endif # end of SPI driver list
|
||||||
|
|
||||||
ifneq ($(CONFIG_MMC),)
|
ifneq ($(CONFIG_MMC),)
|
||||||
|
|
||||||
-CONFIG_SSB_SDIOHOST=y
|
|
||||||
-CONFIG_B43_SDIO=y
|
-CONFIG_B43_SDIO=y
|
||||||
+# CONFIG_SSB_SDIOHOST=y
|
|
||||||
+# CONFIG_B43_SDIO=y
|
+# CONFIG_B43_SDIO=y
|
||||||
CONFIG_WL1251_SDIO=m
|
CONFIG_WL1251_SDIO=m
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/config.mk
|
--- a/config.mk
|
||||||
+++ b/config.mk
|
+++ b/config.mk
|
||||||
@@ -185,7 +185,7 @@ ifneq ($(CONFIG_PCMCIA),)
|
@@ -184,7 +184,7 @@ ifneq ($(CONFIG_PCMCIA),)
|
||||||
endif
|
endif
|
||||||
CONFIG_B43_LEDS=y
|
CONFIG_B43_LEDS=y
|
||||||
CONFIG_B43_PHY_LP=y
|
CONFIG_B43_PHY_LP=y
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/config.mk
|
--- a/config.mk
|
||||||
+++ b/config.mk
|
+++ b/config.mk
|
||||||
@@ -248,12 +248,12 @@ CONFIG_RTL8180=m
|
@@ -232,12 +232,12 @@ CONFIG_RTL8180=m
|
||||||
|
|
||||||
CONFIG_ADM8211=m
|
CONFIG_ADM8211=m
|
||||||
|
|
||||||
@ -15,7 +15,7 @@
|
|||||||
# CONFIG_RT2800PCI_RT30XX=y
|
# CONFIG_RT2800PCI_RT30XX=y
|
||||||
# CONFIG_RT2800PCI_RT35XX=y
|
# CONFIG_RT2800PCI_RT35XX=y
|
||||||
# CONFIG_RT2800PCI_SOC=y
|
# CONFIG_RT2800PCI_SOC=y
|
||||||
@@ -355,7 +355,7 @@ CONFIG_RT2800USB=m
|
@@ -339,7 +339,7 @@ CONFIG_RT2800USB=m
|
||||||
# CONFIG_RT2800USB_RT35XX=y
|
# CONFIG_RT2800USB_RT35XX=y
|
||||||
# CONFIG_RT2800USB_UNKNOWN=y
|
# CONFIG_RT2800USB_UNKNOWN=y
|
||||||
endif
|
endif
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
#include <pcmcia/cs_types.h>
|
#include <pcmcia/cs_types.h>
|
||||||
#include <pcmcia/cistpl.h>
|
#include <pcmcia/cistpl.h>
|
||||||
#include <pcmcia/ds.h>
|
#include <pcmcia/ds.h>
|
||||||
@@ -70,9 +70,9 @@ static inline struct sk_buff *netdev_all
|
@@ -67,9 +67,9 @@ static inline struct sk_buff *netdev_all
|
||||||
return skb;
|
return skb;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,8 +11,8 @@
|
|||||||
{
|
{
|
||||||
--- a/compat/compat-2.6.29.c
|
--- a/compat/compat-2.6.29.c
|
||||||
+++ b/compat/compat-2.6.29.c
|
+++ b/compat/compat-2.6.29.c
|
||||||
@@ -16,7 +16,7 @@
|
@@ -50,7 +50,7 @@ void netdev_attach_ops(struct net_device
|
||||||
#include <linux/etherdevice.h>
|
EXPORT_SYMBOL(netdev_attach_ops);
|
||||||
|
|
||||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23))
|
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23))
|
||||||
-#if defined(CONFIG_USB) || defined(CONFIG_USB_MODULE)
|
-#if defined(CONFIG_USB) || defined(CONFIG_USB_MODULE)
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
--- a/include/linux/compat-2.6.34.h
|
|
||||||
+++ b/include/linux/compat-2.6.34.h
|
|
||||||
@@ -197,6 +197,8 @@ do { \
|
|
||||||
*/
|
|
||||||
#define sysfs_bin_attr_init(bin_attr) sysfs_attr_init(&(bin_attr)->attr)
|
|
||||||
|
|
||||||
+#define rcu_dereference_check(p, c) rcu_dereference(p)
|
|
||||||
+
|
|
||||||
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,34)) */
|
|
||||||
|
|
||||||
#endif /* LINUX_26_34_COMPAT_H */
|
|
@ -1,11 +0,0 @@
|
|||||||
--- a/include/linux/tracepoint.h
|
|
||||||
+++ b/include/linux/tracepoint.h
|
|
||||||
@@ -3,6 +3,8 @@
|
|
||||||
|
|
||||||
#include <linux/version.h>
|
|
||||||
|
|
||||||
+#include <linux/version.h>
|
|
||||||
+
|
|
||||||
#if (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27))
|
|
||||||
#include_next <linux/tracepoint.h>
|
|
||||||
#endif /* (LINUX_VERSION_CODE > KERNEL_VERSION(2,6,27)) */
|
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath5k/reset.c
|
--- a/drivers/net/wireless/ath/ath5k/reset.c
|
||||||
+++ b/drivers/net/wireless/ath/ath5k/reset.c
|
+++ b/drivers/net/wireless/ath/ath5k/reset.c
|
||||||
@@ -1377,10 +1377,18 @@ int ath5k_hw_reset(struct ath5k_hw *ah,
|
@@ -1374,10 +1374,18 @@ int ath5k_hw_reset(struct ath5k_hw *ah,
|
||||||
* guess we can tweak it and see how it goes ;-)
|
* guess we can tweak it and see how it goes ;-)
|
||||||
*/
|
*/
|
||||||
if (ah->ah_version != AR5K_AR5210) {
|
if (ah->ah_version != AR5K_AR5210) {
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include "regd_common.h"
|
#include "regd_common.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -588,3 +591,5 @@ u32 ath_regd_get_band_ctl(struct ath_reg
|
@@ -587,3 +590,5 @@ u32 ath_regd_get_band_ctl(struct ath_reg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ath_regd_get_band_ctl);
|
EXPORT_SYMBOL(ath_regd_get_band_ctl);
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include "ath9k.h"
|
#include "ath9k.h"
|
||||||
|
|
||||||
static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {
|
static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {
|
||||||
@@ -53,21 +54,36 @@ static void ath_pci_read_cachesize(struc
|
@@ -52,21 +53,36 @@ static void ath_pci_read_cachesize(struc
|
||||||
|
|
||||||
static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data)
|
static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data)
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
@@ -1380,7 +1380,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
@@ -1400,7 +1400,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||||
|
|
||||||
if (ah->config.rx_intr_mitigation) {
|
if (ah->config.rx_intr_mitigation) {
|
||||||
REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 500);
|
REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 500);
|
||||||
|
@ -1,130 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
|
||||||
@@ -78,6 +78,90 @@ static const struct file_operations fops
|
|
||||||
|
|
||||||
#define DMA_BUF_LEN 1024
|
|
||||||
|
|
||||||
+static ssize_t read_file_tx_chainmask(struct file *file, char __user *user_buf,
|
|
||||||
+ size_t count, loff_t *ppos)
|
|
||||||
+{
|
|
||||||
+ struct ath_softc *sc = file->private_data;
|
|
||||||
+ struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
|
||||||
+ char buf[32];
|
|
||||||
+ unsigned int len;
|
|
||||||
+
|
|
||||||
+ len = snprintf(buf, sizeof(buf), "0x%08x\n", common->tx_chainmask);
|
|
||||||
+ return simple_read_from_buffer(user_buf, count, ppos, buf, len);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static ssize_t write_file_tx_chainmask(struct file *file, const char __user *user_buf,
|
|
||||||
+ size_t count, loff_t *ppos)
|
|
||||||
+{
|
|
||||||
+ struct ath_softc *sc = file->private_data;
|
|
||||||
+ struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
|
||||||
+ unsigned long mask;
|
|
||||||
+ char buf[32];
|
|
||||||
+ ssize_t len;
|
|
||||||
+
|
|
||||||
+ len = min(count, sizeof(buf) - 1);
|
|
||||||
+ if (copy_from_user(buf, user_buf, len))
|
|
||||||
+ return -EINVAL;
|
|
||||||
+
|
|
||||||
+ buf[len] = '\0';
|
|
||||||
+ if (strict_strtoul(buf, 0, &mask))
|
|
||||||
+ return -EINVAL;
|
|
||||||
+
|
|
||||||
+ common->tx_chainmask = mask;
|
|
||||||
+ sc->sc_ah->caps.tx_chainmask = mask;
|
|
||||||
+ return count;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const struct file_operations fops_tx_chainmask = {
|
|
||||||
+ .read = read_file_tx_chainmask,
|
|
||||||
+ .write = write_file_tx_chainmask,
|
|
||||||
+ .open = ath9k_debugfs_open,
|
|
||||||
+ .owner = THIS_MODULE
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+
|
|
||||||
+static ssize_t read_file_rx_chainmask(struct file *file, char __user *user_buf,
|
|
||||||
+ size_t count, loff_t *ppos)
|
|
||||||
+{
|
|
||||||
+ struct ath_softc *sc = file->private_data;
|
|
||||||
+ struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
|
||||||
+ char buf[32];
|
|
||||||
+ unsigned int len;
|
|
||||||
+
|
|
||||||
+ len = snprintf(buf, sizeof(buf), "0x%08x\n", common->rx_chainmask);
|
|
||||||
+ return simple_read_from_buffer(user_buf, count, ppos, buf, len);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static ssize_t write_file_rx_chainmask(struct file *file, const char __user *user_buf,
|
|
||||||
+ size_t count, loff_t *ppos)
|
|
||||||
+{
|
|
||||||
+ struct ath_softc *sc = file->private_data;
|
|
||||||
+ struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
|
||||||
+ unsigned long mask;
|
|
||||||
+ char buf[32];
|
|
||||||
+ ssize_t len;
|
|
||||||
+
|
|
||||||
+ len = min(count, sizeof(buf) - 1);
|
|
||||||
+ if (copy_from_user(buf, user_buf, len))
|
|
||||||
+ return -EINVAL;
|
|
||||||
+
|
|
||||||
+ buf[len] = '\0';
|
|
||||||
+ if (strict_strtoul(buf, 0, &mask))
|
|
||||||
+ return -EINVAL;
|
|
||||||
+
|
|
||||||
+ common->rx_chainmask = mask;
|
|
||||||
+ sc->sc_ah->caps.rx_chainmask = mask;
|
|
||||||
+ return count;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const struct file_operations fops_rx_chainmask = {
|
|
||||||
+ .read = read_file_rx_chainmask,
|
|
||||||
+ .write = write_file_rx_chainmask,
|
|
||||||
+ .open = ath9k_debugfs_open,
|
|
||||||
+ .owner = THIS_MODULE
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+
|
|
||||||
static ssize_t read_file_dma(struct file *file, char __user *user_buf,
|
|
||||||
size_t count, loff_t *ppos)
|
|
||||||
{
|
|
||||||
@@ -731,6 +815,16 @@ int ath9k_init_debug(struct ath_hw *ah)
|
|
||||||
goto err;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+ sc->debug.debugfs_rx_chainmask = debugfs_create_file("rx_chainmask",
|
|
||||||
+ S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, sc, &fops_rx_chainmask);
|
|
||||||
+ if (!sc->debug.debugfs_rx_chainmask)
|
|
||||||
+ goto err;
|
|
||||||
+
|
|
||||||
+ sc->debug.debugfs_tx_chainmask = debugfs_create_file("tx_chainmask",
|
|
||||||
+ S_IRUSR | S_IWUSR, sc->debug.debugfs_phy, sc, &fops_tx_chainmask);
|
|
||||||
+ if (!sc->debug.debugfs_tx_chainmask)
|
|
||||||
+ goto err;
|
|
||||||
+
|
|
||||||
sc->debug.debugfs_dma = debugfs_create_file("dma", S_IRUSR,
|
|
||||||
sc->debug.debugfs_phy, sc, &fops_dma);
|
|
||||||
if (!sc->debug.debugfs_dma)
|
|
||||||
@@ -781,6 +875,8 @@ void ath9k_exit_debug(struct ath_hw *ah)
|
|
||||||
struct ath_common *common = ath9k_hw_common(ah);
|
|
||||||
struct ath_softc *sc = (struct ath_softc *) common->priv;
|
|
||||||
|
|
||||||
+ debugfs_remove(sc->debug.debugfs_tx_chainmask);
|
|
||||||
+ debugfs_remove(sc->debug.debugfs_rx_chainmask);
|
|
||||||
debugfs_remove(sc->debug.debugfs_recv);
|
|
||||||
debugfs_remove(sc->debug.debugfs_xmit);
|
|
||||||
debugfs_remove(sc->debug.debugfs_wiphy);
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/debug.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/debug.h
|
|
||||||
@@ -152,6 +152,8 @@ struct ath_stats {
|
|
||||||
};
|
|
||||||
|
|
||||||
struct ath9k_debug {
|
|
||||||
+ struct dentry *debugfs_rx_chainmask;
|
|
||||||
+ struct dentry *debugfs_tx_chainmask;
|
|
||||||
struct dentry *debugfs_phy;
|
|
||||||
struct dentry *debugfs_debug;
|
|
||||||
struct dentry *debugfs_dma;
|
|
9874
package/mac80211/patches/500-pending_work.patch
Normal file
9874
package/mac80211/patches/500-pending_work.patch
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,128 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/debug.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/debug.c
|
|
||||||
@@ -795,6 +795,86 @@ static const struct file_operations fops
|
|
||||||
.owner = THIS_MODULE
|
|
||||||
};
|
|
||||||
|
|
||||||
+static ssize_t read_file_regidx(struct file *file, char __user *user_buf,
|
|
||||||
+ size_t count, loff_t *ppos)
|
|
||||||
+{
|
|
||||||
+ struct ath_softc *sc = file->private_data;
|
|
||||||
+ char buf[32];
|
|
||||||
+ unsigned int len;
|
|
||||||
+
|
|
||||||
+ len = snprintf(buf, sizeof(buf), "0x%08x\n", sc->debug.regidx);
|
|
||||||
+ return simple_read_from_buffer(user_buf, count, ppos, buf, len);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static ssize_t write_file_regidx(struct file *file, const char __user *user_buf,
|
|
||||||
+ size_t count, loff_t *ppos)
|
|
||||||
+{
|
|
||||||
+ struct ath_softc *sc = file->private_data;
|
|
||||||
+ unsigned long regidx;
|
|
||||||
+ char buf[32];
|
|
||||||
+ ssize_t len;
|
|
||||||
+
|
|
||||||
+ len = min(count, sizeof(buf) - 1);
|
|
||||||
+ if (copy_from_user(buf, user_buf, len))
|
|
||||||
+ return -EINVAL;
|
|
||||||
+
|
|
||||||
+ buf[len] = '\0';
|
|
||||||
+ if (strict_strtoul(buf, 0, ®idx))
|
|
||||||
+ return -EINVAL;
|
|
||||||
+
|
|
||||||
+ sc->debug.regidx = regidx;
|
|
||||||
+ return count;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const struct file_operations fops_regidx = {
|
|
||||||
+ .read = read_file_regidx,
|
|
||||||
+ .write = write_file_regidx,
|
|
||||||
+ .open = ath9k_debugfs_open,
|
|
||||||
+ .owner = THIS_MODULE
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+static ssize_t read_file_regval(struct file *file, char __user *user_buf,
|
|
||||||
+ size_t count, loff_t *ppos)
|
|
||||||
+{
|
|
||||||
+ struct ath_softc *sc = file->private_data;
|
|
||||||
+ struct ath_hw *ah = sc->sc_ah;
|
|
||||||
+ char buf[32];
|
|
||||||
+ unsigned int len;
|
|
||||||
+ u32 regval;
|
|
||||||
+
|
|
||||||
+ regval = REG_READ_D(ah, sc->debug.regidx);
|
|
||||||
+ len = snprintf(buf, sizeof(buf), "0x%08x\n", regval);
|
|
||||||
+ return simple_read_from_buffer(user_buf, count, ppos, buf, len);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static ssize_t write_file_regval(struct file *file, const char __user *user_buf,
|
|
||||||
+ size_t count, loff_t *ppos)
|
|
||||||
+{
|
|
||||||
+ struct ath_softc *sc = file->private_data;
|
|
||||||
+ struct ath_hw *ah = sc->sc_ah;
|
|
||||||
+ unsigned long regval;
|
|
||||||
+ char buf[32];
|
|
||||||
+ ssize_t len;
|
|
||||||
+
|
|
||||||
+ len = min(count, sizeof(buf) - 1);
|
|
||||||
+ if (copy_from_user(buf, user_buf, len))
|
|
||||||
+ return -EINVAL;
|
|
||||||
+
|
|
||||||
+ buf[len] = '\0';
|
|
||||||
+ if (strict_strtoul(buf, 0, ®val))
|
|
||||||
+ return -EINVAL;
|
|
||||||
+
|
|
||||||
+ REG_WRITE_D(ah, sc->debug.regidx, regval);
|
|
||||||
+ return count;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static const struct file_operations fops_regval = {
|
|
||||||
+ .read = read_file_regval,
|
|
||||||
+ .write = write_file_regval,
|
|
||||||
+ .open = ath9k_debugfs_open,
|
|
||||||
+ .owner = THIS_MODULE
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
int ath9k_init_debug(struct ath_hw *ah)
|
|
||||||
{
|
|
||||||
struct ath_common *common = ath9k_hw_common(ah);
|
|
||||||
@@ -864,6 +944,17 @@ int ath9k_init_debug(struct ath_hw *ah)
|
|
||||||
if (!sc->debug.debugfs_recv)
|
|
||||||
goto err;
|
|
||||||
|
|
||||||
+ sc->debug.regidx = 0;
|
|
||||||
+ sc->debug.debugfs_regidx = debugfs_create_file("regidx",
|
|
||||||
+ S_IRUSR|S_IWUSR, sc->debug.debugfs_phy, sc, &fops_regidx);
|
|
||||||
+ if (!sc->debug.debugfs_regidx)
|
|
||||||
+ goto err;
|
|
||||||
+
|
|
||||||
+ sc->debug.debugfs_regval = debugfs_create_file("regval",
|
|
||||||
+ S_IRUSR|S_IWUSR, sc->debug.debugfs_phy, sc, &fops_regval);
|
|
||||||
+ if (!sc->debug.debugfs_regval)
|
|
||||||
+ goto err;
|
|
||||||
+
|
|
||||||
return 0;
|
|
||||||
err:
|
|
||||||
ath9k_exit_debug(ah);
|
|
||||||
@@ -877,6 +968,8 @@ void ath9k_exit_debug(struct ath_hw *ah)
|
|
||||||
|
|
||||||
debugfs_remove(sc->debug.debugfs_tx_chainmask);
|
|
||||||
debugfs_remove(sc->debug.debugfs_rx_chainmask);
|
|
||||||
+ debugfs_remove(sc->debug.debugfs_regval);
|
|
||||||
+ debugfs_remove(sc->debug.debugfs_regidx);
|
|
||||||
debugfs_remove(sc->debug.debugfs_recv);
|
|
||||||
debugfs_remove(sc->debug.debugfs_xmit);
|
|
||||||
debugfs_remove(sc->debug.debugfs_wiphy);
|
|
||||||
--- a/drivers/net/wireless/ath/ath9k/debug.h
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/debug.h
|
|
||||||
@@ -162,6 +162,9 @@ struct ath9k_debug {
|
|
||||||
struct dentry *debugfs_wiphy;
|
|
||||||
struct dentry *debugfs_xmit;
|
|
||||||
struct dentry *debugfs_recv;
|
|
||||||
+ struct dentry *debugfs_regidx;
|
|
||||||
+ struct dentry *debugfs_regval;
|
|
||||||
+ u32 regidx;
|
|
||||||
struct ath_stats stats;
|
|
||||||
};
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||||
@@ -686,7 +686,11 @@ void ath9k_set_hw_capab(struct ath_softc
|
@@ -689,7 +689,11 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||||
hw->sta_data_size = sizeof(struct ath_node);
|
hw->sta_data_size = sizeof(struct ath_node);
|
||||||
hw->vif_data_size = sizeof(struct ath_vif);
|
hw->vif_data_size = sizeof(struct ath_vif);
|
||||||
|
|
36
package/mac80211/patches/520-ath0k_hw_mcast_search.patch
Normal file
36
package/mac80211/patches/520-ath0k_hw_mcast_search.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||||
|
@@ -1497,6 +1497,7 @@ EXPORT_SYMBOL(ath9k_hw_keyreset);
|
||||||
|
bool ath9k_hw_keysetmac(struct ath_hw *ah, u16 entry, const u8 *mac)
|
||||||
|
{
|
||||||
|
u32 macHi, macLo;
|
||||||
|
+ u32 unicast_flag = AR_KEYTABLE_VALID;
|
||||||
|
|
||||||
|
if (entry >= ah->caps.keycache_size) {
|
||||||
|
ath_print(ath9k_hw_common(ah), ATH_DBG_FATAL,
|
||||||
|
@@ -1505,6 +1506,16 @@ bool ath9k_hw_keysetmac(struct ath_hw *a
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mac != NULL) {
|
||||||
|
+ /*
|
||||||
|
+ * AR_KEYTABLE_VALID indicates that the address is a unicast
|
||||||
|
+ * address, which must match the transmitter address for
|
||||||
|
+ * decrypting frames.
|
||||||
|
+ * Not setting this bit allows the hardware to use the key
|
||||||
|
+ * for multicast frame decryption.
|
||||||
|
+ */
|
||||||
|
+ if (mac[0] & 0x01)
|
||||||
|
+ unicast_flag = 0;
|
||||||
|
+
|
||||||
|
macHi = (mac[5] << 8) | mac[4];
|
||||||
|
macLo = (mac[3] << 24) |
|
||||||
|
(mac[2] << 16) |
|
||||||
|
@@ -1517,7 +1528,7 @@ bool ath9k_hw_keysetmac(struct ath_hw *a
|
||||||
|
macLo = macHi = 0;
|
||||||
|
}
|
||||||
|
REG_WRITE(ah, AR_KEYTABLE_MAC0(entry), macLo);
|
||||||
|
- REG_WRITE(ah, AR_KEYTABLE_MAC1(entry), macHi | AR_KEYTABLE_VALID);
|
||||||
|
+ REG_WRITE(ah, AR_KEYTABLE_MAC1(entry), macHi | unicast_flag);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
@ -1,34 +0,0 @@
|
|||||||
--- a/net/wireless/core.h
|
|
||||||
+++ b/net/wireless/core.h
|
|
||||||
@@ -76,6 +76,7 @@ struct cfg80211_registered_device {
|
|
||||||
|
|
||||||
/* current channel */
|
|
||||||
struct ieee80211_channel *channel;
|
|
||||||
+ enum nl80211_channel_type channel_type;
|
|
||||||
|
|
||||||
/* must be last because of the way we do wiphy_priv(),
|
|
||||||
* and it should at least be aligned to NETDEV_ALIGN */
|
|
||||||
--- a/net/wireless/chan.c
|
|
||||||
+++ b/net/wireless/chan.c
|
|
||||||
@@ -97,6 +97,7 @@ int rdev_set_freq(struct cfg80211_regist
|
|
||||||
return result;
|
|
||||||
|
|
||||||
rdev->channel = chan;
|
|
||||||
+ rdev->channel_type = channel_type;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
--- a/net/wireless/nl80211.c
|
|
||||||
+++ b/net/wireless/nl80211.c
|
|
||||||
@@ -887,6 +887,11 @@ static int nl80211_send_iface(struct sk_
|
|
||||||
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY, rdev->wiphy_idx);
|
|
||||||
NLA_PUT_STRING(msg, NL80211_ATTR_IFNAME, dev->name);
|
|
||||||
NLA_PUT_U32(msg, NL80211_ATTR_IFTYPE, dev->ieee80211_ptr->iftype);
|
|
||||||
+ if (rdev->channel) {
|
|
||||||
+ NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, rdev->channel->center_freq);
|
|
||||||
+ NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_CHANNEL_TYPE, rdev->channel_type);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
|
|
||||||
NLA_PUT_U32(msg, NL80211_ATTR_GENERATION,
|
|
||||||
rdev->devlist_generation ^
|
|
@ -0,0 +1,72 @@
|
|||||||
|
--- a/drivers/net/wireless/ath/ath9k/common.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/common.c
|
||||||
|
@@ -211,10 +211,14 @@ static int ath_reserve_key_cache_slot_tk
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int ath_reserve_key_cache_slot(struct ath_common *common)
|
||||||
|
+static int ath_reserve_key_cache_slot(struct ath_common *common,
|
||||||
|
+ enum ieee80211_key_alg alg)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
|
||||||
|
+ if (alg == ALG_TKIP)
|
||||||
|
+ return ath_reserve_key_cache_slot_tkip(common);
|
||||||
|
+
|
||||||
|
/* First, try to find slots that would not be available for TKIP. */
|
||||||
|
if (common->splitmic) {
|
||||||
|
for (i = IEEE80211_WEP_NKID; i < common->keymax / 4; i++) {
|
||||||
|
@@ -283,6 +287,7 @@ int ath9k_cmn_key_config(struct ath_comm
|
||||||
|
struct ath_hw *ah = common->ah;
|
||||||
|
struct ath9k_keyval hk;
|
||||||
|
const u8 *mac = NULL;
|
||||||
|
+ u8 gmac[ETH_ALEN];
|
||||||
|
int ret = 0;
|
||||||
|
int idx;
|
||||||
|
|
||||||
|
@@ -306,9 +311,23 @@ int ath9k_cmn_key_config(struct ath_comm
|
||||||
|
memcpy(hk.kv_val, key->key, key->keylen);
|
||||||
|
|
||||||
|
if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
|
||||||
|
- /* For now, use the default keys for broadcast keys. This may
|
||||||
|
- * need to change with virtual interfaces. */
|
||||||
|
- idx = key->keyidx;
|
||||||
|
+ switch (vif->type) {
|
||||||
|
+ case NL80211_IFTYPE_AP:
|
||||||
|
+ memcpy(gmac, vif->addr, ETH_ALEN);
|
||||||
|
+ gmac[0] |= 0x01;
|
||||||
|
+ mac = gmac;
|
||||||
|
+ idx = ath_reserve_key_cache_slot(common, key->alg);
|
||||||
|
+ break;
|
||||||
|
+ case NL80211_IFTYPE_ADHOC:
|
||||||
|
+ memcpy(gmac, sta->addr, ETH_ALEN);
|
||||||
|
+ gmac[0] |= 0x01;
|
||||||
|
+ mac = gmac;
|
||||||
|
+ idx = ath_reserve_key_cache_slot(common, key->alg);
|
||||||
|
+ break;
|
||||||
|
+ default:
|
||||||
|
+ idx = key->keyidx;
|
||||||
|
+ break;
|
||||||
|
+ }
|
||||||
|
} else if (key->keyidx) {
|
||||||
|
if (WARN_ON(!sta))
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
@@ -325,14 +344,12 @@ int ath9k_cmn_key_config(struct ath_comm
|
||||||
|
return -EOPNOTSUPP;
|
||||||
|
mac = sta->addr;
|
||||||
|
|
||||||
|
- if (key->alg == ALG_TKIP)
|
||||||
|
- idx = ath_reserve_key_cache_slot_tkip(common);
|
||||||
|
- else
|
||||||
|
- idx = ath_reserve_key_cache_slot(common);
|
||||||
|
- if (idx < 0)
|
||||||
|
- return -ENOSPC; /* no free key cache entries */
|
||||||
|
+ idx = ath_reserve_key_cache_slot(common, key->alg);
|
||||||
|
}
|
||||||
|
|
||||||
|
+ if (idx < 0)
|
||||||
|
+ return -ENOSPC; /* no free key cache entries */
|
||||||
|
+
|
||||||
|
if (key->alg == ALG_TKIP)
|
||||||
|
ret = ath_setkey_tkip(common, idx, key->key, &hk, mac,
|
||||||
|
vif->type == NL80211_IFTYPE_AP);
|
255
package/mac80211/patches/522-ath9k_remove_duplicate_code.patch
Normal file
255
package/mac80211/patches/522-ath9k_remove_duplicate_code.patch
Normal file
@ -0,0 +1,255 @@
|
|||||||
|
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||||
|
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||||
|
@@ -622,234 +622,6 @@ static u32 ath_get_extchanmode(struct at
|
||||||
|
return chanmode;
|
||||||
|
}
|
||||||
|
|
||||||
|
-static int ath_setkey_tkip(struct ath_common *common, u16 keyix, const u8 *key,
|
||||||
|
- struct ath9k_keyval *hk, const u8 *addr,
|
||||||
|
- bool authenticator)
|
||||||
|
-{
|
||||||
|
- struct ath_hw *ah = common->ah;
|
||||||
|
- const u8 *key_rxmic;
|
||||||
|
- const u8 *key_txmic;
|
||||||
|
-
|
||||||
|
- key_txmic = key + NL80211_TKIP_DATA_OFFSET_TX_MIC_KEY;
|
||||||
|
- key_rxmic = key + NL80211_TKIP_DATA_OFFSET_RX_MIC_KEY;
|
||||||
|
-
|
||||||
|
- if (addr == NULL) {
|
||||||
|
- /*
|
||||||
|
- * Group key installation - only two key cache entries are used
|
||||||
|
- * regardless of splitmic capability since group key is only
|
||||||
|
- * used either for TX or RX.
|
||||||
|
- */
|
||||||
|
- if (authenticator) {
|
||||||
|
- memcpy(hk->kv_mic, key_txmic, sizeof(hk->kv_mic));
|
||||||
|
- memcpy(hk->kv_txmic, key_txmic, sizeof(hk->kv_mic));
|
||||||
|
- } else {
|
||||||
|
- memcpy(hk->kv_mic, key_rxmic, sizeof(hk->kv_mic));
|
||||||
|
- memcpy(hk->kv_txmic, key_rxmic, sizeof(hk->kv_mic));
|
||||||
|
- }
|
||||||
|
- return ath9k_hw_set_keycache_entry(ah, keyix, hk, addr);
|
||||||
|
- }
|
||||||
|
- if (!common->splitmic) {
|
||||||
|
- /* TX and RX keys share the same key cache entry. */
|
||||||
|
- memcpy(hk->kv_mic, key_rxmic, sizeof(hk->kv_mic));
|
||||||
|
- memcpy(hk->kv_txmic, key_txmic, sizeof(hk->kv_txmic));
|
||||||
|
- return ath9k_hw_set_keycache_entry(ah, keyix, hk, addr);
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- /* Separate key cache entries for TX and RX */
|
||||||
|
-
|
||||||
|
- /* TX key goes at first index, RX key at +32. */
|
||||||
|
- memcpy(hk->kv_mic, key_txmic, sizeof(hk->kv_mic));
|
||||||
|
- if (!ath9k_hw_set_keycache_entry(ah, keyix, hk, NULL)) {
|
||||||
|
- /* TX MIC entry failed. No need to proceed further */
|
||||||
|
- ath_print(common, ATH_DBG_FATAL,
|
||||||
|
- "Setting TX MIC Key Failed\n");
|
||||||
|
- return 0;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- memcpy(hk->kv_mic, key_rxmic, sizeof(hk->kv_mic));
|
||||||
|
- /* XXX delete tx key on failure? */
|
||||||
|
- return ath9k_hw_set_keycache_entry(ah, keyix + 32, hk, addr);
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static int ath_reserve_key_cache_slot_tkip(struct ath_common *common)
|
||||||
|
-{
|
||||||
|
- int i;
|
||||||
|
-
|
||||||
|
- for (i = IEEE80211_WEP_NKID; i < common->keymax / 2; i++) {
|
||||||
|
- if (test_bit(i, common->keymap) ||
|
||||||
|
- test_bit(i + 64, common->keymap))
|
||||||
|
- continue; /* At least one part of TKIP key allocated */
|
||||||
|
- if (common->splitmic &&
|
||||||
|
- (test_bit(i + 32, common->keymap) ||
|
||||||
|
- test_bit(i + 64 + 32, common->keymap)))
|
||||||
|
- continue; /* At least one part of TKIP key allocated */
|
||||||
|
-
|
||||||
|
- /* Found a free slot for a TKIP key */
|
||||||
|
- return i;
|
||||||
|
- }
|
||||||
|
- return -1;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static int ath_reserve_key_cache_slot(struct ath_common *common)
|
||||||
|
-{
|
||||||
|
- int i;
|
||||||
|
-
|
||||||
|
- /* First, try to find slots that would not be available for TKIP. */
|
||||||
|
- if (common->splitmic) {
|
||||||
|
- for (i = IEEE80211_WEP_NKID; i < common->keymax / 4; i++) {
|
||||||
|
- if (!test_bit(i, common->keymap) &&
|
||||||
|
- (test_bit(i + 32, common->keymap) ||
|
||||||
|
- test_bit(i + 64, common->keymap) ||
|
||||||
|
- test_bit(i + 64 + 32, common->keymap)))
|
||||||
|
- return i;
|
||||||
|
- if (!test_bit(i + 32, common->keymap) &&
|
||||||
|
- (test_bit(i, common->keymap) ||
|
||||||
|
- test_bit(i + 64, common->keymap) ||
|
||||||
|
- test_bit(i + 64 + 32, common->keymap)))
|
||||||
|
- return i + 32;
|
||||||
|
- if (!test_bit(i + 64, common->keymap) &&
|
||||||
|
- (test_bit(i , common->keymap) ||
|
||||||
|
- test_bit(i + 32, common->keymap) ||
|
||||||
|
- test_bit(i + 64 + 32, common->keymap)))
|
||||||
|
- return i + 64;
|
||||||
|
- if (!test_bit(i + 64 + 32, common->keymap) &&
|
||||||
|
- (test_bit(i, common->keymap) ||
|
||||||
|
- test_bit(i + 32, common->keymap) ||
|
||||||
|
- test_bit(i + 64, common->keymap)))
|
||||||
|
- return i + 64 + 32;
|
||||||
|
- }
|
||||||
|
- } else {
|
||||||
|
- for (i = IEEE80211_WEP_NKID; i < common->keymax / 2; i++) {
|
||||||
|
- if (!test_bit(i, common->keymap) &&
|
||||||
|
- test_bit(i + 64, common->keymap))
|
||||||
|
- return i;
|
||||||
|
- if (test_bit(i, common->keymap) &&
|
||||||
|
- !test_bit(i + 64, common->keymap))
|
||||||
|
- return i + 64;
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- /* No partially used TKIP slots, pick any available slot */
|
||||||
|
- for (i = IEEE80211_WEP_NKID; i < common->keymax; i++) {
|
||||||
|
- /* Do not allow slots that could be needed for TKIP group keys
|
||||||
|
- * to be used. This limitation could be removed if we know that
|
||||||
|
- * TKIP will not be used. */
|
||||||
|
- if (i >= 64 && i < 64 + IEEE80211_WEP_NKID)
|
||||||
|
- continue;
|
||||||
|
- if (common->splitmic) {
|
||||||
|
- if (i >= 32 && i < 32 + IEEE80211_WEP_NKID)
|
||||||
|
- continue;
|
||||||
|
- if (i >= 64 + 32 && i < 64 + 32 + IEEE80211_WEP_NKID)
|
||||||
|
- continue;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (!test_bit(i, common->keymap))
|
||||||
|
- return i; /* Found a free slot for a key */
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- /* No free slot found */
|
||||||
|
- return -1;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static int ath_key_config(struct ath_common *common,
|
||||||
|
- struct ieee80211_vif *vif,
|
||||||
|
- struct ieee80211_sta *sta,
|
||||||
|
- struct ieee80211_key_conf *key)
|
||||||
|
-{
|
||||||
|
- struct ath_hw *ah = common->ah;
|
||||||
|
- struct ath9k_keyval hk;
|
||||||
|
- const u8 *mac = NULL;
|
||||||
|
- int ret = 0;
|
||||||
|
- int idx;
|
||||||
|
-
|
||||||
|
- memset(&hk, 0, sizeof(hk));
|
||||||
|
-
|
||||||
|
- switch (key->alg) {
|
||||||
|
- case ALG_WEP:
|
||||||
|
- hk.kv_type = ATH9K_CIPHER_WEP;
|
||||||
|
- break;
|
||||||
|
- case ALG_TKIP:
|
||||||
|
- hk.kv_type = ATH9K_CIPHER_TKIP;
|
||||||
|
- break;
|
||||||
|
- case ALG_CCMP:
|
||||||
|
- hk.kv_type = ATH9K_CIPHER_AES_CCM;
|
||||||
|
- break;
|
||||||
|
- default:
|
||||||
|
- return -EOPNOTSUPP;
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- hk.kv_len = key->keylen;
|
||||||
|
- memcpy(hk.kv_val, key->key, key->keylen);
|
||||||
|
-
|
||||||
|
- if (!(key->flags & IEEE80211_KEY_FLAG_PAIRWISE)) {
|
||||||
|
- /* For now, use the default keys for broadcast keys. This may
|
||||||
|
- * need to change with virtual interfaces. */
|
||||||
|
- idx = key->keyidx;
|
||||||
|
- } else if (key->keyidx) {
|
||||||
|
- if (WARN_ON(!sta))
|
||||||
|
- return -EOPNOTSUPP;
|
||||||
|
- mac = sta->addr;
|
||||||
|
-
|
||||||
|
- if (vif->type != NL80211_IFTYPE_AP) {
|
||||||
|
- /* Only keyidx 0 should be used with unicast key, but
|
||||||
|
- * allow this for client mode for now. */
|
||||||
|
- idx = key->keyidx;
|
||||||
|
- } else
|
||||||
|
- return -EIO;
|
||||||
|
- } else {
|
||||||
|
- if (WARN_ON(!sta))
|
||||||
|
- return -EOPNOTSUPP;
|
||||||
|
- mac = sta->addr;
|
||||||
|
-
|
||||||
|
- if (key->alg == ALG_TKIP)
|
||||||
|
- idx = ath_reserve_key_cache_slot_tkip(common);
|
||||||
|
- else
|
||||||
|
- idx = ath_reserve_key_cache_slot(common);
|
||||||
|
- if (idx < 0)
|
||||||
|
- return -ENOSPC; /* no free key cache entries */
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- if (key->alg == ALG_TKIP)
|
||||||
|
- ret = ath_setkey_tkip(common, idx, key->key, &hk, mac,
|
||||||
|
- vif->type == NL80211_IFTYPE_AP);
|
||||||
|
- else
|
||||||
|
- ret = ath9k_hw_set_keycache_entry(ah, idx, &hk, mac);
|
||||||
|
-
|
||||||
|
- if (!ret)
|
||||||
|
- return -EIO;
|
||||||
|
-
|
||||||
|
- set_bit(idx, common->keymap);
|
||||||
|
- if (key->alg == ALG_TKIP) {
|
||||||
|
- set_bit(idx + 64, common->keymap);
|
||||||
|
- if (common->splitmic) {
|
||||||
|
- set_bit(idx + 32, common->keymap);
|
||||||
|
- set_bit(idx + 64 + 32, common->keymap);
|
||||||
|
- }
|
||||||
|
- }
|
||||||
|
-
|
||||||
|
- return idx;
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
-static void ath_key_delete(struct ath_common *common, struct ieee80211_key_conf *key)
|
||||||
|
-{
|
||||||
|
- struct ath_hw *ah = common->ah;
|
||||||
|
-
|
||||||
|
- ath9k_hw_keyreset(ah, key->hw_key_idx);
|
||||||
|
- if (key->hw_key_idx < IEEE80211_WEP_NKID)
|
||||||
|
- return;
|
||||||
|
-
|
||||||
|
- clear_bit(key->hw_key_idx, common->keymap);
|
||||||
|
- if (key->alg != ALG_TKIP)
|
||||||
|
- return;
|
||||||
|
-
|
||||||
|
- clear_bit(key->hw_key_idx + 64, common->keymap);
|
||||||
|
- if (common->splitmic) {
|
||||||
|
- ath9k_hw_keyreset(ah, key->hw_key_idx + 32);
|
||||||
|
- clear_bit(key->hw_key_idx + 32, common->keymap);
|
||||||
|
- clear_bit(key->hw_key_idx + 64 + 32, common->keymap);
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
static void ath9k_bss_assoc_info(struct ath_softc *sc,
|
||||||
|
struct ieee80211_vif *vif,
|
||||||
|
struct ieee80211_bss_conf *bss_conf)
|
||||||
|
@@ -1814,7 +1586,7 @@ static int ath9k_set_key(struct ieee8021
|
||||||
|
|
||||||
|
switch (cmd) {
|
||||||
|
case SET_KEY:
|
||||||
|
- ret = ath_key_config(common, vif, sta, key);
|
||||||
|
+ ret = ath9k_cmn_key_config(common, vif, sta, key);
|
||||||
|
if (ret >= 0) {
|
||||||
|
key->hw_key_idx = ret;
|
||||||
|
/* push IV and Michael MIC generation to stack */
|
||||||
|
@@ -1827,7 +1599,7 @@ static int ath9k_set_key(struct ieee8021
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case DISABLE_KEY:
|
||||||
|
- ath_key_delete(common, key);
|
||||||
|
+ ath9k_cmn_key_delete(common, key);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
ret = -EINVAL;
|
File diff suppressed because it is too large
Load Diff
@ -1,24 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/ath/ath9k/common.c
|
|
||||||
+++ b/drivers/net/wireless/ath/ath9k/common.c
|
|
||||||
@@ -57,13 +57,19 @@ static bool ath9k_rx_accept(struct ath_c
|
|
||||||
* rs_more indicates chained descriptors which can be used
|
|
||||||
* to link buffers together for a sort of scatter-gather
|
|
||||||
* operation.
|
|
||||||
- *
|
|
||||||
+ * reject the frame, we don't support scatter-gather yet and
|
|
||||||
+ * the frame is probably corrupt anyway
|
|
||||||
+ */
|
|
||||||
+ if (rx_stats->rs_more)
|
|
||||||
+ return false;
|
|
||||||
+
|
|
||||||
+ /*
|
|
||||||
* The rx_stats->rs_status will not be set until the end of the
|
|
||||||
* chained descriptors so it can be ignored if rs_more is set. The
|
|
||||||
* rs_more will be false at the last element of the chained
|
|
||||||
* descriptors.
|
|
||||||
*/
|
|
||||||
- if (!rx_stats->rs_more && rx_stats->rs_status != 0) {
|
|
||||||
+ if (rx_stats->rs_status != 0) {
|
|
||||||
if (rx_stats->rs_status & ATH9K_RXERR_CRC)
|
|
||||||
rxs->flag |= RX_FLAG_FAILED_FCS_CRC;
|
|
||||||
if (rx_stats->rs_status & ATH9K_RXERR_PHY)
|
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
|
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||||
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
|
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||||
@@ -225,6 +225,7 @@ void rt2x00pci_uninitialize(struct rt2x0
|
@@ -216,6 +216,7 @@ void rt2x00pci_uninitialize(struct rt2x0
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(rt2x00pci_uninitialize);
|
EXPORT_SYMBOL_GPL(rt2x00pci_uninitialize);
|
||||||
|
|
||||||
@ -8,7 +8,7 @@
|
|||||||
/*
|
/*
|
||||||
* PCI driver handlers.
|
* PCI driver handlers.
|
||||||
*/
|
*/
|
||||||
@@ -399,6 +400,7 @@ int rt2x00pci_resume(struct pci_dev *pci
|
@@ -390,6 +391,7 @@ int rt2x00pci_resume(struct pci_dev *pci
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL_GPL(rt2x00pci_resume);
|
EXPORT_SYMBOL_GPL(rt2x00pci_resume);
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
@ -1,11 +0,0 @@
|
|||||||
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
|
|
||||||
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
|
|
||||||
@@ -215,7 +215,7 @@ void rt2x00pci_uninitialize(struct rt2x0
|
|
||||||
/*
|
|
||||||
* Free irq line.
|
|
||||||
*/
|
|
||||||
- free_irq(to_pci_dev(rt2x00dev->dev)->irq, rt2x00dev);
|
|
||||||
+ free_irq(rt2x00dev->irq, rt2x00dev);
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Free DMA
|
|
@ -1,6 +1,6 @@
|
|||||||
--- a/drivers/net/wireless/mwl8k.c
|
--- a/drivers/net/wireless/mwl8k.c
|
||||||
+++ b/drivers/net/wireless/mwl8k.c
|
+++ b/drivers/net/wireless/mwl8k.c
|
||||||
@@ -3850,6 +3850,7 @@ MODULE_FIRMWARE("mwl8k/helper_8366.fw");
|
@@ -3882,6 +3882,7 @@ MODULE_FIRMWARE("mwl8k/helper_8366.fw");
|
||||||
MODULE_FIRMWARE("mwl8k/fmimage_8366.fw");
|
MODULE_FIRMWARE("mwl8k/fmimage_8366.fw");
|
||||||
|
|
||||||
static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {
|
static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
# Copyright (C) 2009 OpenWrt.org
|
# Copyright (C) 2009-2010 OpenWrt.org
|
||||||
# All rights reserved.
|
# All rights reserved.
|
||||||
|
|
||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=mountd
|
PKG_NAME:=mountd
|
||||||
PKG_VERSION:=0.1
|
PKG_VERSION:=0.1
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2009 Jo-Philipp Wich <xm@subsignal.org>
|
# Copyright (C) 2009-2010 Jo-Philipp Wich <xm@subsignal.org>
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -8,7 +8,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=nvram
|
PKG_NAME:=nvram
|
||||||
PKG_RELEASE:=6
|
PKG_RELEASE:=7
|
||||||
|
|
||||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||||
|
|
||||||
|
@ -52,7 +52,13 @@ fixup_linksys() {
|
|||||||
}
|
}
|
||||||
;;
|
;;
|
||||||
"1071") #0x042f
|
"1071") #0x042f
|
||||||
nvram_set sdram_init "$(printf 0x%04x $(( $(/usr/sbin/nvram get sdram_init) | 0x0009 )))"
|
# do sanity check first! max 0x0011 = 128mb
|
||||||
|
SDRAM_INIT=$(printf %d $(/usr/sbin/nvram get sdram_init))
|
||||||
|
[ "$SDRAM_INIT" -lt "9" -o "$SDRAM_INIT" -gt "17" ] && {
|
||||||
|
# set this to default: 0x09 only if value is invaild like 16MB on Asus WL-500GP
|
||||||
|
echo "sdram_init is invaild: $(printf 0x%04x $SDRAM_INIT), force to default!"
|
||||||
|
nvram_set sdram_init 0x0009
|
||||||
|
}
|
||||||
[ "$COMMIT" = 1 ] && {
|
[ "$COMMIT" = 1 ] && {
|
||||||
nvram_set sdram_ncdl 0x0
|
nvram_set sdram_ncdl 0x0
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_NAME:=ppp
|
PKG_NAME:=ppp
|
||||||
PKG_VERSION:=2.4.4
|
PKG_VERSION:=2.4.4
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=7
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
|
PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
|
||||||
@ -140,7 +140,7 @@ define Package/ppp/install
|
|||||||
$(INSTALL_BIN) ./files/etc/ppp/ipv6-up $(1)/etc/ppp/
|
$(INSTALL_BIN) ./files/etc/ppp/ipv6-up $(1)/etc/ppp/
|
||||||
$(INSTALL_BIN) ./files/etc/ppp/ipv6-down $(1)/etc/ppp/
|
$(INSTALL_BIN) ./files/etc/ppp/ipv6-down $(1)/etc/ppp/
|
||||||
$(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
|
$(INSTALL_DATA) ./files/etc/ppp/options $(1)/etc/ppp/
|
||||||
ln -sf /tmp/resolv.conf.auto $(1)/etc/ppp/resolv.conf
|
ln -sf /tmp/resolv.conf.ppp $(1)/etc/ppp/resolv.conf
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/ppp-mod-pppoa/install
|
define Package/ppp-mod-pppoa/install
|
||||||
@ -149,6 +149,8 @@ define Package/ppp-mod-pppoa/install
|
|||||||
$(1)/usr/lib/pppd/$(PKG_VERSION)/
|
$(1)/usr/lib/pppd/$(PKG_VERSION)/
|
||||||
$(INSTALL_DIR) $(1)/lib/network
|
$(INSTALL_DIR) $(1)/lib/network
|
||||||
$(INSTALL_BIN) ./files/pppoa.sh $(1)/lib/network/
|
$(INSTALL_BIN) ./files/pppoa.sh $(1)/lib/network/
|
||||||
|
$(INSTALL_DIR) $(1)/etc/hotplug.d/atm
|
||||||
|
$(INSTALL_DATA) ./files/etc/hotplug.d/atm/20-atm-modem $(1)/etc/hotplug.d/atm/
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define Package/ppp-mod-pppoe/install
|
define Package/ppp-mod-pppoe/install
|
||||||
|
25
package/ppp/files/etc/hotplug.d/atm/20-atm-modem
Normal file
25
package/ppp/files/etc/hotplug.d/atm/20-atm-modem
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$ACTION" = "add" ]; then
|
||||||
|
include /lib/network
|
||||||
|
scan_interfaces
|
||||||
|
|
||||||
|
local found=0
|
||||||
|
local ifc
|
||||||
|
for ifc in $interfaces; do
|
||||||
|
local up
|
||||||
|
config_get_bool up "$ifc" up 0
|
||||||
|
|
||||||
|
local proto
|
||||||
|
config_get proto "$ifc" proto
|
||||||
|
|
||||||
|
if [ "$proto" = "pppoa" ] && [ "$up" != 1 ]; then
|
||||||
|
found=1
|
||||||
|
( sleep 1; ifup "$ifc" ) &
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ "$found" != 1 ]; then
|
||||||
|
logger "Found no matching interface for DSL device $DEVICENAME"
|
||||||
|
fi
|
||||||
|
fi
|
@ -1,22 +1,25 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
. /etc/functions.sh
|
. /etc/functions.sh
|
||||||
|
. /lib/network/config.sh
|
||||||
|
|
||||||
PPP_IFACE="$1"
|
PPP_IFACE="$1"
|
||||||
PPP_TTY="$2"
|
PPP_TTY="$2"
|
||||||
PPP_SPEED="$3"
|
PPP_SPEED="$3"
|
||||||
PPP_LOCAL="$4"
|
PPP_LOCAL="$4"
|
||||||
PPP_REMOTE="$5"
|
PPP_REMOTE="$5"
|
||||||
PPP_IPPARAM="$(echo $6 | sed 's/\./_/g')"
|
PPP_IPPARAM="$(echo $6 | sed 's/\./_/g')"
|
||||||
PPP_UNIT="${PPP_IFACE##ppp}"
|
|
||||||
|
|
||||||
export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
|
export PPP_IFACE PPP_TTY PPP_SPEED PPP_LOCAL PPP_REMOTE PPP_IPPARAM
|
||||||
[ -z "$PPP_IPPARAM" -o -z "$PPP_LOCAL" ] || {
|
[ -z "$PPP_IPPARAM" -o -z "$PPP_LOCAL" ] || {
|
||||||
uci_set_state network "$PPP_IPPARAM" unit "$PPP_UNIT"
|
uci_set_state network "$PPP_IPPARAM" ifname "$PPP_IFACE"
|
||||||
uci_set_state network "$PPP_IPPARAM" ipaddr "$PPP_LOCAL"
|
uci_set_state network "$PPP_IPPARAM" ipaddr "$PPP_LOCAL"
|
||||||
uci_set_state network "$PPP_IPPARAM" gateway "$PPP_REMOTE"
|
uci_set_state network "$PPP_IPPARAM" gateway "$PPP_REMOTE"
|
||||||
|
|
||||||
local dns="$DNS1${DNS2:+ $DNS2}"
|
local dns="$DNS1${DNS2:+ $DNS2}"
|
||||||
[ -n "$dns" ] && uci_set_state network "$PPP_IPPARAM" dns "$dns"
|
[ -n "$dns" ] && add_dns "$PPP_IPPARAM" $dns
|
||||||
}
|
}
|
||||||
|
|
||||||
[ -z "$PPP_IPPARAM" ] || env -i ACTION="ifup" INTERFACE="$PPP_IPPARAM" DEVICE="$PPP_IFACE" PROTO=ppp /sbin/hotplug-call "iface"
|
[ -z "$PPP_IPPARAM" ] || env -i ACTION="ifup" INTERFACE="$PPP_IPPARAM" DEVICE="$PPP_IFACE" PROTO=ppp /sbin/hotplug-call "iface"
|
||||||
|
|
||||||
[ -d /etc/ppp/ip-up.d ] && {
|
[ -d /etc/ppp/ip-up.d ] && {
|
||||||
|
@ -1,63 +1,40 @@
|
|||||||
scan_ppp() {
|
stop_interface_ppp() {
|
||||||
config_get ifname "$1" ifname
|
local cfg="$1"
|
||||||
pppdev="${pppdev:-0}"
|
|
||||||
config_get devunit "$1" unit
|
local proto
|
||||||
{
|
config_get proto "$cfg" proto
|
||||||
unit=
|
|
||||||
pppif=
|
local link="$proto-$cfg"
|
||||||
if [ ! -d /tmp/.ppp-counter ]; then
|
[ -f "/var/run/ppp-${link}.pid" ] && {
|
||||||
mkdir -p /tmp/.ppp-counter
|
local pid="$(head -n1 /var/run/ppp-${link}.pid 2>/dev/null)"
|
||||||
fi
|
local try=0
|
||||||
local maxunit
|
grep -qs pppd "/proc/$pid/cmdline" && kill -TERM $pid && \
|
||||||
maxunit="$(cat /tmp/.ppp-counter/max-unit 2>/dev/null)"
|
while grep -qs pppd "/proc/$pid/cmdline" && [ $((try++)) -lt 5 ]; do sleep 1; done
|
||||||
if [ -z "$maxunit" ]; then
|
grep -qs pppd "/proc/$pid/cmdline" && kill -KILL $pid && \
|
||||||
maxunit=-1
|
while grep -qs pppd "/proc/$pid/cmdline"; do sleep 1; done
|
||||||
fi
|
rm -f "/var/run/ppp-${link}.pid"
|
||||||
local i
|
|
||||||
i=0
|
|
||||||
while [ $i -le $maxunit ]; do
|
|
||||||
local unitdev
|
|
||||||
unitdev="$(cat /tmp/.ppp-counter/ppp${i} 2>/dev/null)"
|
|
||||||
if [ "$unitdev" = "$1" ]; then
|
|
||||||
unit="$i"
|
|
||||||
pppif="ppp${i}"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
i="$(($i + 1))"
|
|
||||||
done
|
|
||||||
if [ -z "$unit" ] || [ -z "$pppif" ]; then
|
|
||||||
maxunit="$(($maxunit + 1))"
|
|
||||||
if [ -n "$devunit" ]; then
|
|
||||||
unit="$devunit"
|
|
||||||
elif [ "${ifname%%[0-9]*}" = ppp ]; then
|
|
||||||
unit="${ifname##ppp}"
|
|
||||||
else
|
|
||||||
unit="$maxunit"
|
|
||||||
fi
|
|
||||||
[ "$maxunit" -lt "$unit" ] && maxunit="$unit"
|
|
||||||
pppif="ppp${unit}"
|
|
||||||
echo "$1" >/tmp/.ppp-counter/$pppif 2>/dev/null
|
|
||||||
echo "$maxunit" >/tmp/.ppp-counter/max-unit 2>/dev/null
|
|
||||||
fi
|
|
||||||
config_set "$1" ifname "ppp$unit"
|
|
||||||
config_set "$1" unit "$unit"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
remove_dns "$cfg"
|
||||||
|
|
||||||
|
local lock="/var/lock/ppp-$link"
|
||||||
|
[ -f "$lock" ] && lock -u "$lock"
|
||||||
}
|
}
|
||||||
|
|
||||||
start_pppd() {
|
start_pppd() {
|
||||||
local cfg="$1"; shift
|
local cfg="$1"; shift
|
||||||
local ifname
|
|
||||||
|
|
||||||
# make sure the network state references the correct ifname
|
local proto
|
||||||
scan_ppp "$cfg"
|
config_get proto "$cfg" proto
|
||||||
config_get ifname "$cfg" ifname
|
|
||||||
set_interface_ifname "$cfg" "$ifname"
|
# unique link identifier
|
||||||
|
local link="${proto:-ppp}-$cfg"
|
||||||
|
|
||||||
# make sure only one pppd process is started
|
# make sure only one pppd process is started
|
||||||
lock "/var/lock/ppp-${cfg}"
|
lock "/var/lock/ppp-${link}"
|
||||||
local pid="$(head -n1 /var/run/ppp-${cfg}.pid 2>/dev/null)"
|
local pid="$(head -n1 /var/run/ppp-${link}.pid 2>/dev/null)"
|
||||||
[ -d "/proc/$pid" ] && grep pppd "/proc/$pid/cmdline" 2>/dev/null >/dev/null && {
|
[ -d "/proc/$pid" ] && grep pppd "/proc/$pid/cmdline" 2>/dev/null >/dev/null && {
|
||||||
lock -u "/var/lock/ppp-${cfg}"
|
lock -u "/var/lock/ppp-${link}"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -68,9 +45,6 @@ start_pppd() {
|
|||||||
local device
|
local device
|
||||||
config_get device "$cfg" device
|
config_get device "$cfg" device
|
||||||
|
|
||||||
local unit
|
|
||||||
config_get unit "$cfg" unit
|
|
||||||
|
|
||||||
local username
|
local username
|
||||||
config_get username "$cfg" username
|
config_get username "$cfg" username
|
||||||
|
|
||||||
@ -91,7 +65,8 @@ start_pppd() {
|
|||||||
|
|
||||||
local defaultroute
|
local defaultroute
|
||||||
config_get_bool defaultroute "$cfg" defaultroute 1
|
config_get_bool defaultroute "$cfg" defaultroute 1
|
||||||
[ "$defaultroute" -eq 1 ] && defaultroute="defaultroute replacedefaultroute" || defaultroute=""
|
[ "$defaultroute" -eq 1 ] && \
|
||||||
|
defaultroute="defaultroute replacedefaultroute" || defaultroute="nodefaultroute"
|
||||||
|
|
||||||
local interval="${keepalive##*[, ]}"
|
local interval="${keepalive##*[, ]}"
|
||||||
[ "$interval" != "$keepalive" ] || interval=5
|
[ "$interval" != "$keepalive" ] || interval=5
|
||||||
@ -109,15 +84,11 @@ start_pppd() {
|
|||||||
local peerdns
|
local peerdns
|
||||||
config_get_bool peerdns "$cfg" peerdns $peer_default
|
config_get_bool peerdns "$cfg" peerdns $peer_default
|
||||||
|
|
||||||
echo -n "" > /tmp/resolv.conf.auto
|
|
||||||
|
|
||||||
[ "$peerdns" -eq 1 ] && {
|
[ "$peerdns" -eq 1 ] && {
|
||||||
peerdns="usepeerdns"
|
peerdns="usepeerdns"
|
||||||
} || {
|
} || {
|
||||||
peerdns=""
|
peerdns=""
|
||||||
for dns in $dns; do
|
add_dns "$cfg" $dns
|
||||||
echo "nameserver $dns" >> /tmp/resolv.conf.auto
|
|
||||||
done
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local demand
|
local demand
|
||||||
@ -126,8 +97,7 @@ start_pppd() {
|
|||||||
local demandargs
|
local demandargs
|
||||||
[ "$demand" -eq 1 ] && {
|
[ "$demand" -eq 1 ] && {
|
||||||
demandargs="precompiled-active-filter /etc/ppp/filter demand idle"
|
demandargs="precompiled-active-filter /etc/ppp/filter demand idle"
|
||||||
[ "$has_dns" -eq 0 ] && \
|
[ "$has_dns" -eq 0 ] && add_dns "$cfg" 1.1.1.1
|
||||||
echo "nameserver 1.1.1.1" > /tmp/resolv.conf.auto
|
|
||||||
} || {
|
} || {
|
||||||
demandargs="persist"
|
demandargs="persist"
|
||||||
}
|
}
|
||||||
@ -136,21 +106,21 @@ start_pppd() {
|
|||||||
config_get_bool ipv6 "$cfg" ipv6 0
|
config_get_bool ipv6 "$cfg" ipv6 0
|
||||||
[ "$ipv6" -eq 1 ] && ipv6="+ipv6" || ipv6=""
|
[ "$ipv6" -eq 1 ] && ipv6="+ipv6" || ipv6=""
|
||||||
|
|
||||||
/usr/sbin/pppd "$@" \
|
start-stop-daemon -S -b -x /usr/sbin/pppd -m -p /var/run/ppp-$link.pid -- "$@" \
|
||||||
${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \
|
${keepalive:+lcp-echo-interval $interval lcp-echo-failure ${keepalive%%[, ]*}} \
|
||||||
$demandargs \
|
$demandargs \
|
||||||
$peerdns \
|
$peerdns \
|
||||||
$defaultroute \
|
$defaultroute \
|
||||||
${username:+user "$username" password "$password"} \
|
${username:+user "$username" password "$password"} \
|
||||||
unit "$unit" \
|
|
||||||
linkname "$cfg" \
|
|
||||||
ipparam "$cfg" \
|
ipparam "$cfg" \
|
||||||
|
ifname "$link" \
|
||||||
${connect:+connect "$connect"} \
|
${connect:+connect "$connect"} \
|
||||||
${disconnect:+disconnect "$disconnect"} \
|
${disconnect:+disconnect "$disconnect"} \
|
||||||
${ipv6} \
|
${ipv6} \
|
||||||
${pppd_options}
|
${pppd_options} \
|
||||||
|
nodetach
|
||||||
|
|
||||||
lock -u "/var/lock/ppp-${cfg}"
|
lock -u "/var/lock/ppp-${link}"
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_interface_ppp() {
|
setup_interface_ppp() {
|
||||||
|
@ -1,28 +1,37 @@
|
|||||||
scan_pppoa() {
|
stop_interface_pppoa() {
|
||||||
scan_ppp "$@"
|
stop_interface_ppp "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_interface_pppoa() {
|
setup_interface_pppoa() {
|
||||||
local iface="$1"
|
local iface="$1"
|
||||||
local config="$2"
|
local config="$2"
|
||||||
|
|
||||||
|
local device
|
||||||
config_get device "$config" device
|
config_get device "$config" device
|
||||||
|
|
||||||
|
local vpi
|
||||||
config_get vpi "$config" vpi
|
config_get vpi "$config" vpi
|
||||||
|
|
||||||
|
local vci
|
||||||
config_get vci "$config" vci
|
config_get vci "$config" vci
|
||||||
|
|
||||||
for module in slhc ppp_generic pppoatm; do
|
for module in slhc ppp_generic pppoatm; do
|
||||||
/sbin/insmod $module 2>&- >&-
|
/sbin/insmod $module 2>&- >&-
|
||||||
done
|
done
|
||||||
|
|
||||||
|
local encaps
|
||||||
config_get encaps "$config" encaps
|
config_get encaps "$config" encaps
|
||||||
|
|
||||||
case "$encaps" in
|
case "$encaps" in
|
||||||
1|vc) ENCAPS="vc-encaps" ;;
|
1|vc) encaps="vc-encaps" ;;
|
||||||
*) ENCAPS="llc-encaps" ;;
|
*) encaps="llc-encaps" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
local mtu
|
||||||
config_get mtu "$config" mtu
|
config_get mtu "$config" mtu
|
||||||
mtu=${mtu:-1500}
|
mtu=${mtu:-1500}
|
||||||
|
|
||||||
start_pppd "$config" \
|
start_pppd "$config" \
|
||||||
plugin pppoatm.so ${vpi:-8}.${vci:-35} ${ENCAPS} \
|
plugin pppoatm.so ${vpi:-8}.${vci:-35} ${encaps} \
|
||||||
mtu $mtu mru $mtu
|
mtu $mtu mru $mtu
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
scan_pppoe() {
|
stop_interface_pppoe() {
|
||||||
scan_ppp "$@"
|
stop_interface_ppp "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
setup_interface_pppoe() {
|
setup_interface_pppoe() {
|
||||||
|
128
package/ppp/patches/320-custom_iface_names.patch
Normal file
128
package/ppp/patches/320-custom_iface_names.patch
Normal file
@ -0,0 +1,128 @@
|
|||||||
|
--- a/pppd/main.c
|
||||||
|
+++ b/pppd/main.c
|
||||||
|
@@ -742,8 +742,11 @@ void
|
||||||
|
set_ifunit(iskey)
|
||||||
|
int iskey;
|
||||||
|
{
|
||||||
|
- info("Using interface %s%d", PPP_DRV_NAME, ifunit);
|
||||||
|
- slprintf(ifname, sizeof(ifname), "%s%d", PPP_DRV_NAME, ifunit);
|
||||||
|
+ if (use_ifname[0] == 0)
|
||||||
|
+ slprintf(ifname, sizeof(ifname), "%s%d", PPP_DRV_NAME, ifunit);
|
||||||
|
+ else
|
||||||
|
+ slprintf(ifname, sizeof(ifname), "%s", use_ifname);
|
||||||
|
+ info("Using interface %s", ifname);
|
||||||
|
script_setenv("IFNAME", ifname, iskey);
|
||||||
|
if (iskey) {
|
||||||
|
create_pidfile(getpid()); /* write pid to file */
|
||||||
|
--- a/pppd/options.c
|
||||||
|
+++ b/pppd/options.c
|
||||||
|
@@ -111,6 +111,7 @@ int log_to_fd = 1; /* send log messages
|
||||||
|
bool log_default = 1; /* log_to_fd is default (stdout) */
|
||||||
|
int maxfail = 10; /* max # of unsuccessful connection attempts */
|
||||||
|
char linkname[MAXPATHLEN]; /* logical name for link */
|
||||||
|
+char use_ifname[IFNAMSIZ]; /* physical name for PPP link */
|
||||||
|
bool tune_kernel; /* may alter kernel settings */
|
||||||
|
int connect_delay = 1000; /* wait this many ms after connect script */
|
||||||
|
int req_unit = -1; /* requested interface unit */
|
||||||
|
@@ -264,6 +265,9 @@ option_t general_options[] = {
|
||||||
|
{ "linkname", o_string, linkname,
|
||||||
|
"Set logical name for link",
|
||||||
|
OPT_PRIO | OPT_PRIV | OPT_STATIC, NULL, MAXPATHLEN },
|
||||||
|
+ { "ifname", o_string, use_ifname,
|
||||||
|
+ "Set physical name for PPP interface",
|
||||||
|
+ OPT_PRIO | OPT_PRIV | OPT_STATIC, NULL, IFNAMSIZ },
|
||||||
|
|
||||||
|
{ "maxfail", o_int, &maxfail,
|
||||||
|
"Maximum number of unsuccessful connection attempts to allow",
|
||||||
|
--- a/pppd/pppd.h
|
||||||
|
+++ b/pppd/pppd.h
|
||||||
|
@@ -71,6 +71,10 @@
|
||||||
|
#include "eui64.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifndef IFNAMSIZ
|
||||||
|
+#define IFNAMSIZ 16
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
/*
|
||||||
|
* Limits.
|
||||||
|
*/
|
||||||
|
@@ -308,6 +312,7 @@ extern char *record_file; /* File to rec
|
||||||
|
extern bool sync_serial; /* Device is synchronous serial device */
|
||||||
|
extern int maxfail; /* Max # of unsuccessful connection attempts */
|
||||||
|
extern char linkname[MAXPATHLEN]; /* logical name for link */
|
||||||
|
+extern char use_ifname[IFNAMSIZ]; /* physical name for PPP interface */
|
||||||
|
extern bool tune_kernel; /* May alter kernel settings as necessary */
|
||||||
|
extern int connect_delay; /* Time to delay after connect script */
|
||||||
|
extern int max_data_rate; /* max bytes/sec through charshunt */
|
||||||
|
--- a/pppd/sys-linux.c
|
||||||
|
+++ b/pppd/sys-linux.c
|
||||||
|
@@ -168,6 +168,10 @@ struct in6_ifreq {
|
||||||
|
/* We can get an EIO error on an ioctl if the modem has hung up */
|
||||||
|
#define ok_error(num) ((num)==EIO)
|
||||||
|
|
||||||
|
+#if !defined(PPP_DRV_NAME)
|
||||||
|
+#define PPP_DRV_NAME "ppp"
|
||||||
|
+#endif /* !defined(PPP_DRV_NAME) */
|
||||||
|
+
|
||||||
|
static int tty_disc = N_TTY; /* The TTY discipline */
|
||||||
|
static int ppp_disc = N_PPP; /* The PPP discpline */
|
||||||
|
static int initfdflags = -1; /* Initial file descriptor flags for fd */
|
||||||
|
@@ -622,7 +626,8 @@ void generic_disestablish_ppp(int dev_fd
|
||||||
|
*/
|
||||||
|
static int make_ppp_unit()
|
||||||
|
{
|
||||||
|
- int x, flags;
|
||||||
|
+ struct ifreq ifr;
|
||||||
|
+ int x, flags, s;
|
||||||
|
|
||||||
|
if (ppp_dev_fd >= 0) {
|
||||||
|
dbglog("in make_ppp_unit, already had /dev/ppp open?");
|
||||||
|
@@ -645,6 +650,32 @@ static int make_ppp_unit()
|
||||||
|
}
|
||||||
|
if (x < 0)
|
||||||
|
error("Couldn't create new ppp unit: %m");
|
||||||
|
+
|
||||||
|
+ if (use_ifname[0] != 0) {
|
||||||
|
+ s = socket(PF_INET, SOCK_DGRAM, 0);
|
||||||
|
+ if (s < 0)
|
||||||
|
+ s = socket(PF_PACKET, SOCK_DGRAM, 0);
|
||||||
|
+ if (s < 0)
|
||||||
|
+ s = socket(PF_INET6, SOCK_DGRAM, 0);
|
||||||
|
+ if (s < 0)
|
||||||
|
+ s = socket(PF_UNIX, SOCK_DGRAM, 0);
|
||||||
|
+ if (s >= 0) {
|
||||||
|
+ slprintf(ifr.ifr_name, sizeof(ifr.ifr_name), "%s%d", PPP_DRV_NAME, ifunit);
|
||||||
|
+ slprintf(ifr.ifr_newname, sizeof(ifr.ifr_newname), "%s", use_ifname);
|
||||||
|
+ x = ioctl(s, SIOCSIFNAME, &ifr);
|
||||||
|
+ close(s);
|
||||||
|
+ } else {
|
||||||
|
+ x = s;
|
||||||
|
+ }
|
||||||
|
+ if (x < 0) {
|
||||||
|
+ error("Couldn't rename %s to %s", ifr.ifr_name, ifr.ifr_newname);
|
||||||
|
+ close(ppp_dev_fd);
|
||||||
|
+ ppp_dev_fd = -1;
|
||||||
|
+ } else {
|
||||||
|
+ info("Renamed %s to %s", ifr.ifr_name, ifr.ifr_newname);
|
||||||
|
+ }
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
return x;
|
||||||
|
}
|
||||||
|
|
||||||
|
--- a/pppstats/pppstats.c
|
||||||
|
+++ b/pppstats/pppstats.c
|
||||||
|
@@ -506,10 +506,12 @@ main(argc, argv)
|
||||||
|
if (argc > 0)
|
||||||
|
interface = argv[0];
|
||||||
|
|
||||||
|
+/*
|
||||||
|
if (sscanf(interface, PPP_DRV_NAME "%d", &unit) != 1) {
|
||||||
|
fprintf(stderr, "%s: invalid interface '%s' specified\n",
|
||||||
|
progname, interface);
|
||||||
|
}
|
||||||
|
+*/
|
||||||
|
|
||||||
|
#ifndef STREAMS
|
||||||
|
{
|
@ -8,12 +8,12 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=pptp
|
PKG_NAME:=pptp
|
||||||
PKG_VERSION:=1.6.0
|
PKG_VERSION:=1.7.1
|
||||||
PKG_RELEASE:=6
|
PKG_RELEASE:=3
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_SOURCE_URL:=@SF/pptpclient
|
PKG_SOURCE_URL:=@SF/pptpclient
|
||||||
PKG_MD5SUM:=9a706327fb9827541d7c86d48ceb9631
|
PKG_MD5SUM:=b47735ba5d6d37dfdbccb85afc044ede
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
@ -1,33 +0,0 @@
|
|||||||
#!/bin/sh /etc/rc.common
|
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
|
||||||
|
|
||||||
START=41
|
|
||||||
STOP=30
|
|
||||||
|
|
||||||
updown_pptp_interface () {
|
|
||||||
config_get proto "$1" proto
|
|
||||||
if [ "$proto" = "pptp" ]; then
|
|
||||||
if$2 "$1"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
boot () {
|
|
||||||
start
|
|
||||||
}
|
|
||||||
|
|
||||||
start() {
|
|
||||||
config_load network
|
|
||||||
config_foreach updown_pptp_interface interface up
|
|
||||||
}
|
|
||||||
|
|
||||||
restart() {
|
|
||||||
config_load network
|
|
||||||
config_foreach updown_pptp_interface interface down
|
|
||||||
config_foreach updown_pptp_interface interface up
|
|
||||||
}
|
|
||||||
|
|
||||||
stop() {
|
|
||||||
config_load network
|
|
||||||
config_foreach updown_pptp_interface interface down
|
|
||||||
}
|
|
||||||
|
|
@ -1,20 +1,36 @@
|
|||||||
scan_pptp() {
|
|
||||||
scan_ppp "$@"
|
|
||||||
}
|
|
||||||
|
|
||||||
find_gw() {
|
find_gw() {
|
||||||
route -n | awk '$1 == "0.0.0.0" { print $2; exit }'
|
route -n | awk '$1 == "0.0.0.0" { print $2; exit }'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
scan_pptp() {
|
||||||
|
config_set "$1" device "pptp-$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
stop_interface_pptp() {
|
||||||
|
stop_interface_ppp "$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
coldplug_interface_pptp() {
|
||||||
|
setup_interface_pptp "pptp-$1" "$1"
|
||||||
|
}
|
||||||
|
|
||||||
setup_interface_pptp() {
|
setup_interface_pptp() {
|
||||||
local config="$2"
|
local config="$2"
|
||||||
local ifname
|
local ifname
|
||||||
|
|
||||||
|
local device
|
||||||
config_get device "$config" device
|
config_get device "$config" device
|
||||||
|
|
||||||
|
local ipproto
|
||||||
config_get ipproto "$config" ipproto
|
config_get ipproto "$config" ipproto
|
||||||
|
|
||||||
|
local server
|
||||||
config_get server "$config" server
|
config_get server "$config" server
|
||||||
|
|
||||||
|
local buffering
|
||||||
|
config_get_bool buffering "$config" buffering 1
|
||||||
|
[ "$buffering" == 0 ] && buffering="--nobuffer" || buffering=
|
||||||
|
|
||||||
for module in slhc ppp_generic ppp_async ip_gre; do
|
for module in slhc ppp_generic ppp_async ip_gre; do
|
||||||
/sbin/insmod $module 2>&- >&-
|
/sbin/insmod $module 2>&- >&-
|
||||||
done
|
done
|
||||||
@ -23,7 +39,7 @@ setup_interface_pptp() {
|
|||||||
setup_interface "$device" "$config" "${ipproto:-dhcp}"
|
setup_interface "$device" "$config" "${ipproto:-dhcp}"
|
||||||
local gw="$(find_gw)"
|
local gw="$(find_gw)"
|
||||||
[ -n "$gw" ] && {
|
[ -n "$gw" ] && {
|
||||||
route delete "$server" 2>/dev/null >/dev/null
|
[ "$gw" != 0.0.0.0 ] && route delete "$server" 2>/dev/null >/dev/null
|
||||||
route add "$server" gw "$gw"
|
route add "$server" gw "$gw"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -31,15 +47,10 @@ setup_interface_pptp() {
|
|||||||
config_get netmask "$config" netmask
|
config_get netmask "$config" netmask
|
||||||
[ -z "$netmask" -o -z "$device" ] || ifconfig $device netmask $netmask
|
[ -z "$netmask" -o -z "$device" ] || ifconfig $device netmask $netmask
|
||||||
|
|
||||||
# make sure the network state references the correct ifname
|
|
||||||
scan_ppp "$config"
|
|
||||||
config_get ifname "$config" ifname
|
|
||||||
uci_set_state network "$config" ifname "$ifname"
|
|
||||||
|
|
||||||
config_get mtu "$config" mtu
|
config_get mtu "$config" mtu
|
||||||
mtu=${mtu:-1452}
|
mtu=${mtu:-1452}
|
||||||
start_pppd "$config" \
|
start_pppd "$config" \
|
||||||
pty "/usr/sbin/pptp $server --loglevel 0 --nolaunchpppd" \
|
pty "/usr/sbin/pptp $server --loglevel 0 --nolaunchpppd $buffering" \
|
||||||
file /etc/ppp/options.pptp \
|
file /etc/ppp/options.pptp \
|
||||||
mtu $mtu mru $mtu
|
mtu $mtu mru $mtu
|
||||||
}
|
}
|
||||||
|
@ -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.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -10,6 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_NAME:=siit
|
PKG_NAME:=siit
|
||||||
PKG_VERSION:=1.1
|
PKG_VERSION:=1.1
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2008-2009 OpenWrt.org
|
# Copyright (C) 2008-2010 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -8,7 +8,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=swconfig
|
PKG_NAME:=swconfig
|
||||||
PKG_RELEASE:=5
|
PKG_RELEASE:=6
|
||||||
|
|
||||||
include $(INCLUDE_DIR)/package.mk
|
include $(INCLUDE_DIR)/package.mk
|
||||||
include $(INCLUDE_DIR)/kernel.mk
|
include $(INCLUDE_DIR)/kernel.mk
|
||||||
|
@ -12,7 +12,7 @@ UCI_RELEASE=5
|
|||||||
|
|
||||||
PKG_NAME:=uci
|
PKG_NAME:=uci
|
||||||
PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE))
|
PKG_VERSION:=$(UCI_VERSION)$(if $(UCI_RELEASE),.$(UCI_RELEASE))
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
PKG_REV:=aa3ab8012bfbf793d2884c08ea924545a04e9544
|
PKG_REV:=aa3ab8012bfbf793d2884c08ea924545a04e9544
|
||||||
|
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Shell script compatibility wrappers for /sbin/uci
|
# Shell script compatibility wrappers for /sbin/uci
|
||||||
#
|
#
|
||||||
|
# Copyright (C) 2008-2010 OpenWrt.org
|
||||||
# Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org>
|
# Copyright (C) 2008 Felix Fietkau <nbd@openwrt.org>
|
||||||
#
|
#
|
||||||
# This program is free software; you can redistribute it and/or modify
|
# This program is free software; you can redistribute it and/or modify
|
||||||
@ -41,9 +42,9 @@ uci_load() {
|
|||||||
|
|
||||||
uci_set_default() {
|
uci_set_default() {
|
||||||
local PACKAGE="$1"
|
local PACKAGE="$1"
|
||||||
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q show "$1" > /dev/null && return 0
|
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} -q show "$PACKAGE" > /dev/null && return 0
|
||||||
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} import "$1"
|
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} import "$PACKAGE"
|
||||||
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} commit "$1"
|
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} commit "$PACKAGE"
|
||||||
}
|
}
|
||||||
|
|
||||||
uci_revert_state() {
|
uci_revert_state() {
|
||||||
@ -73,6 +74,23 @@ uci_set() {
|
|||||||
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set "$PACKAGE.$CONFIG.$OPTION=$VALUE"
|
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} set "$PACKAGE.$CONFIG.$OPTION=$VALUE"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uci_get_state() {
|
||||||
|
uci_get "$1" "$2" "$3" "$4" "/var/state"
|
||||||
|
}
|
||||||
|
|
||||||
|
uci_get() {
|
||||||
|
local PACKAGE="$1"
|
||||||
|
local CONFIG="$2"
|
||||||
|
local OPTION="$3"
|
||||||
|
local DEFAULT="$4"
|
||||||
|
local STATE="$5"
|
||||||
|
|
||||||
|
/sbin/uci ${UCI_CONFIG_DIR:+-c $UCI_CONFIG_DIR} ${STATE:+-P $STATE} -q get "$PACKAGE${CONFIG:+.$CONFIG}${OPTION:+.$OPTION}"
|
||||||
|
RET="$?"
|
||||||
|
[ "$RET" -ne 0 ] && [ -n "$DEFAULT" ] && echo "$DEFAULT"
|
||||||
|
return "$RET"
|
||||||
|
}
|
||||||
|
|
||||||
uci_add() {
|
uci_add() {
|
||||||
local PACKAGE="$1"
|
local PACKAGE="$1"
|
||||||
local TYPE="$2"
|
local TYPE="$2"
|
||||||
|
@ -48,7 +48,7 @@ start_instance()
|
|||||||
UHTTPD_KEY=""
|
UHTTPD_KEY=""
|
||||||
|
|
||||||
local cfg="$1"
|
local cfg="$1"
|
||||||
local realm="$(uci get system.@system[0].hostname 2>/dev/null)"
|
local realm="$(uci_get system.@system[0].hostname)"
|
||||||
local listen http https
|
local listen http https
|
||||||
|
|
||||||
append_arg "$cfg" home "-h"
|
append_arg "$cfg" home "-h"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (C) 2008 OpenWrt.org
|
# Copyright (C) 2008-2010 OpenWrt.org
|
||||||
#
|
#
|
||||||
# This is free software, licensed under the GNU General Public License v2.
|
# This is free software, licensed under the GNU General Public License v2.
|
||||||
# See /LICENSE for more information.
|
# See /LICENSE for more information.
|
||||||
@ -9,6 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
|||||||
|
|
||||||
PKG_NAME:=wprobe
|
PKG_NAME:=wprobe
|
||||||
PKG_VERSION:=1
|
PKG_VERSION:=1
|
||||||
|
PKG_RELEASE:=1
|
||||||
|
|
||||||
PKG_BUILD_DEPENDS:=PACKAGE_wprobe-export:libipfix
|
PKG_BUILD_DEPENDS:=PACKAGE_wprobe-export:libipfix
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ define Image/Build/CyberTAN
|
|||||||
$(STAGING_DIR_HOST)/bin/addpattern -4 -p $(3) -v v$(4) -i $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx -o $(BIN_DIR)/openwrt-$(2)-$(5).bin $(if $(6),-s $(6))
|
$(STAGING_DIR_HOST)/bin/addpattern -4 -p $(3) -v v$(4) -i $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx -o $(BIN_DIR)/openwrt-$(2)-$(5).bin $(if $(6),-s $(6))
|
||||||
endef
|
endef
|
||||||
define Image/Build/CyberTAN2
|
define Image/Build/CyberTAN2
|
||||||
$(STAGING_DIR_HOST)/bin/addpattern -4 -p $(3) -v v$(4) -i $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx2 -o $(BIN_DIR)/openwrt-$(2)-$(5).bin $(if $(6),-s $(6))
|
$(STAGING_DIR_HOST)/bin/addpattern -4 -p $(3) -v v$(4) -i $(BIN_DIR)/openwrt-$(2)-$(5)-sysupgrade.bin -o $(BIN_DIR)/openwrt-$(2)-$(5)-factory.bin $(if $(6),-s $(6))
|
||||||
endef
|
endef
|
||||||
define Image/Build/CyberTANHead
|
define Image/Build/CyberTANHead
|
||||||
$(STAGING_DIR_HOST)/bin/addpattern -5 -p $(3) -v v$(4) -i /dev/null -o $(KDIR)/openwrt-$(2)-header.bin $(if $(6),-s $(6))
|
$(STAGING_DIR_HOST)/bin/addpattern -5 -p $(3) -v v$(4) -i /dev/null -o $(KDIR)/openwrt-$(2)-header.bin $(if $(6),-s $(6))
|
||||||
@ -61,7 +61,7 @@ endef
|
|||||||
|
|
||||||
define Image/Build/trxV2
|
define Image/Build/trxV2
|
||||||
$(call Image/Build/CyberTANHead,$(1),$(2),$(3),$(4),$(5),$(if $(6),$(6)))
|
$(call Image/Build/CyberTANHead,$(1),$(2),$(3),$(4),$(5),$(if $(6),$(6)))
|
||||||
$(STAGING_DIR_HOST)/bin/trx -2 -o $(BIN_DIR)/$(IMG_PREFIX)-$(1).trx2 \
|
$(STAGING_DIR_HOST)/bin/trx -2 -o $(BIN_DIR)/openwrt-$(2)-$(5)-sysupgrade.bin \
|
||||||
-f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
|
-f $(KDIR)/loader.gz -f $(KDIR)/vmlinux.lzma \
|
||||||
$(call trxalign/$(1),$(1),$(KDIR)/openwrt-$(2)-header.bin)
|
$(call trxalign/$(1),$(1),$(KDIR)/openwrt-$(2)-header.bin)
|
||||||
$(call Image/Build/CyberTAN2,$(1),$(2),$(3),$(4),$(5),$(if $(6),$(6)))
|
$(call Image/Build/CyberTAN2,$(1),$(2),$(3),$(4),$(5),$(if $(6),$(6)))
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/drivers/usb/host/ehci-ssb.c
|
+++ b/drivers/usb/host/ehci-ssb.c
|
||||||
@@ -0,0 +1,201 @@
|
@@ -0,0 +1,158 @@
|
||||||
+/*
|
+/*
|
||||||
+ * Sonics Silicon Backplane
|
+ * Sonics Silicon Backplane
|
||||||
+ * Broadcom USB-core EHCI driver (SSB bus glue)
|
+ * Broadcom USB-core EHCI driver (SSB bus glue)
|
||||||
@ -90,7 +90,6 @@
|
|||||||
+ return (struct ssb_ehci_device *)(hcd->hcd_priv);
|
+ return (struct ssb_ehci_device *)(hcd->hcd_priv);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+
|
|
||||||
+static int ssb_ehci_reset(struct usb_hcd *hcd)
|
+static int ssb_ehci_reset(struct usb_hcd *hcd)
|
||||||
+{
|
+{
|
||||||
+ struct ehci_hcd *ehci = hcd_to_ehci(hcd);
|
+ struct ehci_hcd *ehci = hcd_to_ehci(hcd);
|
||||||
@ -115,55 +114,11 @@
|
|||||||
+ if (err)
|
+ if (err)
|
||||||
+ return err;
|
+ return err;
|
||||||
+
|
+
|
||||||
+ ehci_port_power(ehci, 0);
|
+ ehci_reset(ehci);
|
||||||
+
|
+
|
||||||
+ return err;
|
+ return err;
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+static int ssb_ehci_start(struct usb_hcd *hcd)
|
|
||||||
+{
|
|
||||||
+ struct ehci_hcd *ehci = hcd_to_ehci(hcd);
|
|
||||||
+ int err;
|
|
||||||
+
|
|
||||||
+ err = ehci_run(hcd);
|
|
||||||
+ if (err < 0) {
|
|
||||||
+ ehci_err(ehci, "can't start\n");
|
|
||||||
+ ehci_stop(hcd);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ return err;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#ifdef CONFIG_PM
|
|
||||||
+static int ssb_ehci_hcd_suspend(struct usb_hcd *hcd, pm_message_t message)
|
|
||||||
+{
|
|
||||||
+ struct ssb_ehci_device *ehcidev = hcd_to_ssb_ehci(hcd);
|
|
||||||
+ struct ehci_hcd *ehci = &ehcidev->ehci;
|
|
||||||
+ unsigned long flags;
|
|
||||||
+
|
|
||||||
+ spin_lock_irqsave(&ehci->lock, flags);
|
|
||||||
+
|
|
||||||
+ ehci_writel(ehci, EHCI_INTR_MIE, &ehci->regs->intrdisable);
|
|
||||||
+ ehci_readl(ehci, &ehci->regs->intrdisable); /* commit write */
|
|
||||||
+
|
|
||||||
+ /* make sure snapshot being resumed re-enumerates everything */
|
|
||||||
+ if (message.event == PM_EVENT_PRETHAW)
|
|
||||||
+ ehci_usb_reset(ehci);
|
|
||||||
+
|
|
||||||
+ clear_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
|
|
||||||
+
|
|
||||||
+ spin_unlock_irqrestore(&ehci->lock, flags);
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static int ssb_ehci_hcd_resume(struct usb_hcd *hcd)
|
|
||||||
+{
|
|
||||||
+ set_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags);
|
|
||||||
+ usb_hcd_resume_root_hub(hcd);
|
|
||||||
+ return 0;
|
|
||||||
+}
|
|
||||||
+#endif /* CONFIG_PM */
|
|
||||||
+
|
|
||||||
+static const struct hc_driver ssb_ehci_hc_driver = {
|
+static const struct hc_driver ssb_ehci_hc_driver = {
|
||||||
+ .description = "ssb-usb-ehci",
|
+ .description = "ssb-usb-ehci",
|
||||||
+ .product_desc = "SSB EHCI Controller",
|
+ .product_desc = "SSB EHCI Controller",
|
||||||
@ -173,35 +128,37 @@
|
|||||||
+ .flags = HCD_MEMORY | HCD_USB2,
|
+ .flags = HCD_MEMORY | HCD_USB2,
|
||||||
+
|
+
|
||||||
+ .reset = ssb_ehci_reset,
|
+ .reset = ssb_ehci_reset,
|
||||||
+ .start = ssb_ehci_start,
|
+ .start = ehci_run,
|
||||||
+ .stop = ehci_stop,
|
+ .stop = ehci_stop,
|
||||||
+ .shutdown = ehci_shutdown,
|
+ .shutdown = ehci_shutdown,
|
||||||
+
|
+
|
||||||
+#ifdef CONFIG_PM
|
|
||||||
+ .suspend = ssb_ehci_hcd_suspend,
|
|
||||||
+ .resume = ssb_ehci_hcd_resume,
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+ .urb_enqueue = ehci_urb_enqueue,
|
+ .urb_enqueue = ehci_urb_enqueue,
|
||||||
+ .urb_dequeue = ehci_urb_dequeue,
|
+ .urb_dequeue = ehci_urb_dequeue,
|
||||||
+ .endpoint_disable = ehci_endpoint_disable,
|
+ .endpoint_disable = ehci_endpoint_disable,
|
||||||
|
+ .endpoint_reset = ehci_endpoint_reset,
|
||||||
+
|
+
|
||||||
+ .get_frame_number = ehci_get_frame,
|
+ .get_frame_number = ehci_get_frame,
|
||||||
+
|
+
|
||||||
+ .hub_status_data = ehci_hub_status_data,
|
+ .hub_status_data = ehci_hub_status_data,
|
||||||
+ .hub_control = ehci_hub_control,
|
+ .hub_control = ehci_hub_control,
|
||||||
+#ifdef CONFIG_PM
|
|
||||||
+ .bus_suspend = ehci_bus_suspend,
|
+ .bus_suspend = ehci_bus_suspend,
|
||||||
+ .bus_resume = ehci_bus_resume,
|
+ .bus_resume = ehci_bus_resume,
|
||||||
+#endif
|
+ .relinquish_port = ehci_relinquish_port,
|
||||||
|
+ .port_handed_over = ehci_port_handed_over,
|
||||||
+
|
+
|
||||||
|
+ .clear_tt_buffer_complete = ehci_clear_tt_buffer_complete,
|
||||||
+};
|
+};
|
||||||
+
|
+
|
||||||
+static void ssb_ehci_detach(struct ssb_device *dev, struct usb_hcd *hcd)
|
+static void ssb_ehci_detach(struct ssb_device *dev, struct usb_hcd *hcd)
|
||||||
+{
|
+{
|
||||||
|
+ if (hcd->driver->shutdown)
|
||||||
|
+ hcd->driver->shutdown(hcd);
|
||||||
+
|
+
|
||||||
+ usb_remove_hcd(hcd);
|
+ usb_remove_hcd(hcd);
|
||||||
|
+
|
||||||
+ iounmap(hcd->regs);
|
+ iounmap(hcd->regs);
|
||||||
|
+ release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
|
||||||
|
+
|
||||||
+ usb_put_hcd(hcd);
|
+ usb_put_hcd(hcd);
|
||||||
+}
|
+}
|
||||||
+EXPORT_SYMBOL_GPL(ssb_ehci_detach);
|
+EXPORT_SYMBOL_GPL(ssb_ehci_detach);
|
||||||
|
@ -2164,7 +2164,6 @@ CONFIG_SQUASHFS_LZMA=y
|
|||||||
CONFIG_SQUASHFS_SUPPORT_ZLIB=y
|
CONFIG_SQUASHFS_SUPPORT_ZLIB=y
|
||||||
# CONFIG_SQUASHFS_VMALLOC is not set
|
# CONFIG_SQUASHFS_VMALLOC is not set
|
||||||
CONFIG_SQUASHFS=y
|
CONFIG_SQUASHFS=y
|
||||||
# CONFIG_SSB_BLOCKIO is not set
|
|
||||||
# CONFIG_SSB_DEBUG is not set
|
# CONFIG_SSB_DEBUG is not set
|
||||||
# CONFIG_SSB is not set
|
# CONFIG_SSB is not set
|
||||||
# CONFIG_SSB_PCMCIAHOST is not set
|
# CONFIG_SSB_PCMCIAHOST is not set
|
||||||
|
@ -2283,7 +2283,6 @@ CONFIG_SQUASHFS_LZMA=y
|
|||||||
CONFIG_SQUASHFS_SUPPORT_ZLIB=y
|
CONFIG_SQUASHFS_SUPPORT_ZLIB=y
|
||||||
# CONFIG_SQUASHFS_VMALLOC is not set
|
# CONFIG_SQUASHFS_VMALLOC is not set
|
||||||
CONFIG_SQUASHFS=y
|
CONFIG_SQUASHFS=y
|
||||||
# CONFIG_SSB_BLOCKIO is not set
|
|
||||||
# CONFIG_SSB_DEBUG is not set
|
# CONFIG_SSB_DEBUG is not set
|
||||||
# CONFIG_SSB is not set
|
# CONFIG_SSB is not set
|
||||||
# CONFIG_SSB_PCMCIAHOST is not set
|
# CONFIG_SSB_PCMCIAHOST is not set
|
||||||
|
@ -128,7 +128,170 @@
|
|||||||
+EXPORT_SYMBOL(ssb_pmu_set_ldo_paref);
|
+EXPORT_SYMBOL(ssb_pmu_set_ldo_paref);
|
||||||
--- a/drivers/ssb/main.c
|
--- a/drivers/ssb/main.c
|
||||||
+++ b/drivers/ssb/main.c
|
+++ b/drivers/ssb/main.c
|
||||||
@@ -472,6 +472,8 @@ static int ssb_devices_register(struct s
|
@@ -120,6 +120,19 @@ static void ssb_device_put(struct ssb_de
|
||||||
|
put_device(dev->dev);
|
||||||
|
}
|
||||||
|
|
||||||
|
+static inline struct ssb_driver *ssb_driver_get(struct ssb_driver *drv)
|
||||||
|
+{
|
||||||
|
+ if (drv)
|
||||||
|
+ get_driver(&drv->drv);
|
||||||
|
+ return drv;
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+static inline void ssb_driver_put(struct ssb_driver *drv)
|
||||||
|
+{
|
||||||
|
+ if (drv)
|
||||||
|
+ put_driver(&drv->drv);
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
static int ssb_device_resume(struct device *dev)
|
||||||
|
{
|
||||||
|
struct ssb_device *ssb_dev = dev_to_ssb_dev(dev);
|
||||||
|
@@ -190,90 +203,81 @@ int ssb_bus_suspend(struct ssb_bus *bus)
|
||||||
|
EXPORT_SYMBOL(ssb_bus_suspend);
|
||||||
|
|
||||||
|
#ifdef CONFIG_SSB_SPROM
|
||||||
|
-int ssb_devices_freeze(struct ssb_bus *bus)
|
||||||
|
+/** ssb_devices_freeze - Freeze all devices on the bus.
|
||||||
|
+ *
|
||||||
|
+ * After freezing no device driver will be handling a device
|
||||||
|
+ * on this bus anymore. ssb_devices_thaw() must be called after
|
||||||
|
+ * a successful freeze to reactivate the devices.
|
||||||
|
+ *
|
||||||
|
+ * @bus: The bus.
|
||||||
|
+ * @ctx: Context structure. Pass this to ssb_devices_thaw().
|
||||||
|
+ */
|
||||||
|
+int ssb_devices_freeze(struct ssb_bus *bus, struct ssb_freeze_context *ctx)
|
||||||
|
{
|
||||||
|
- struct ssb_device *dev;
|
||||||
|
- struct ssb_driver *drv;
|
||||||
|
- int err = 0;
|
||||||
|
- int i;
|
||||||
|
- pm_message_t state = PMSG_FREEZE;
|
||||||
|
+ struct ssb_device *sdev;
|
||||||
|
+ struct ssb_driver *sdrv;
|
||||||
|
+ unsigned int i;
|
||||||
|
+
|
||||||
|
+ memset(ctx, 0, sizeof(*ctx));
|
||||||
|
+ ctx->bus = bus;
|
||||||
|
+ SSB_WARN_ON(bus->nr_devices > ARRAY_SIZE(ctx->device_frozen));
|
||||||
|
|
||||||
|
- /* First check that we are capable to freeze all devices. */
|
||||||
|
for (i = 0; i < bus->nr_devices; i++) {
|
||||||
|
- dev = &(bus->devices[i]);
|
||||||
|
- if (!dev->dev ||
|
||||||
|
- !dev->dev->driver ||
|
||||||
|
- !device_is_registered(dev->dev))
|
||||||
|
- continue;
|
||||||
|
- drv = drv_to_ssb_drv(dev->dev->driver);
|
||||||
|
- if (!drv)
|
||||||
|
+ sdev = ssb_device_get(&bus->devices[i]);
|
||||||
|
+
|
||||||
|
+ if (!sdev->dev || !sdev->dev->driver ||
|
||||||
|
+ !device_is_registered(sdev->dev)) {
|
||||||
|
+ ssb_device_put(sdev);
|
||||||
|
continue;
|
||||||
|
- if (!drv->suspend) {
|
||||||
|
- /* Nope, can't suspend this one. */
|
||||||
|
- return -EOPNOTSUPP;
|
||||||
|
}
|
||||||
|
- }
|
||||||
|
- /* Now suspend all devices */
|
||||||
|
- for (i = 0; i < bus->nr_devices; i++) {
|
||||||
|
- dev = &(bus->devices[i]);
|
||||||
|
- if (!dev->dev ||
|
||||||
|
- !dev->dev->driver ||
|
||||||
|
- !device_is_registered(dev->dev))
|
||||||
|
- continue;
|
||||||
|
- drv = drv_to_ssb_drv(dev->dev->driver);
|
||||||
|
- if (!drv)
|
||||||
|
+ sdrv = ssb_driver_get(drv_to_ssb_drv(sdev->dev->driver));
|
||||||
|
+ if (!sdrv || SSB_WARN_ON(!sdrv->remove)) {
|
||||||
|
+ ssb_device_put(sdev);
|
||||||
|
continue;
|
||||||
|
- err = drv->suspend(dev, state);
|
||||||
|
- if (err) {
|
||||||
|
- ssb_printk(KERN_ERR PFX "Failed to freeze device %s\n",
|
||||||
|
- dev_name(dev->dev));
|
||||||
|
- goto err_unwind;
|
||||||
|
}
|
||||||
|
+ sdrv->remove(sdev);
|
||||||
|
+ ctx->device_frozen[i] = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
-err_unwind:
|
||||||
|
- for (i--; i >= 0; i--) {
|
||||||
|
- dev = &(bus->devices[i]);
|
||||||
|
- if (!dev->dev ||
|
||||||
|
- !dev->dev->driver ||
|
||||||
|
- !device_is_registered(dev->dev))
|
||||||
|
- continue;
|
||||||
|
- drv = drv_to_ssb_drv(dev->dev->driver);
|
||||||
|
- if (!drv)
|
||||||
|
- continue;
|
||||||
|
- if (drv->resume)
|
||||||
|
- drv->resume(dev);
|
||||||
|
- }
|
||||||
|
- return err;
|
||||||
|
}
|
||||||
|
|
||||||
|
-int ssb_devices_thaw(struct ssb_bus *bus)
|
||||||
|
+/** ssb_devices_thaw - Unfreeze all devices on the bus.
|
||||||
|
+ *
|
||||||
|
+ * This will re-attach the device drivers and re-init the devices.
|
||||||
|
+ *
|
||||||
|
+ * @ctx: The context structure from ssb_devices_freeze()
|
||||||
|
+ */
|
||||||
|
+int ssb_devices_thaw(struct ssb_freeze_context *ctx)
|
||||||
|
{
|
||||||
|
- struct ssb_device *dev;
|
||||||
|
- struct ssb_driver *drv;
|
||||||
|
- int err;
|
||||||
|
- int i;
|
||||||
|
+ struct ssb_bus *bus = ctx->bus;
|
||||||
|
+ struct ssb_device *sdev;
|
||||||
|
+ struct ssb_driver *sdrv;
|
||||||
|
+ unsigned int i;
|
||||||
|
+ int err, result = 0;
|
||||||
|
|
||||||
|
for (i = 0; i < bus->nr_devices; i++) {
|
||||||
|
- dev = &(bus->devices[i]);
|
||||||
|
- if (!dev->dev ||
|
||||||
|
- !dev->dev->driver ||
|
||||||
|
- !device_is_registered(dev->dev))
|
||||||
|
+ if (!ctx->device_frozen[i])
|
||||||
|
continue;
|
||||||
|
- drv = drv_to_ssb_drv(dev->dev->driver);
|
||||||
|
- if (!drv)
|
||||||
|
+ sdev = &bus->devices[i];
|
||||||
|
+
|
||||||
|
+ if (SSB_WARN_ON(!sdev->dev || !sdev->dev->driver))
|
||||||
|
continue;
|
||||||
|
- if (SSB_WARN_ON(!drv->resume))
|
||||||
|
+ sdrv = drv_to_ssb_drv(sdev->dev->driver);
|
||||||
|
+ if (SSB_WARN_ON(!sdrv || !sdrv->probe))
|
||||||
|
continue;
|
||||||
|
- err = drv->resume(dev);
|
||||||
|
+
|
||||||
|
+ err = sdrv->probe(sdev, &sdev->id);
|
||||||
|
if (err) {
|
||||||
|
ssb_printk(KERN_ERR PFX "Failed to thaw device %s\n",
|
||||||
|
- dev_name(dev->dev));
|
||||||
|
+ dev_name(sdev->dev));
|
||||||
|
+ result = err;
|
||||||
|
}
|
||||||
|
+ ssb_driver_put(sdrv);
|
||||||
|
+ ssb_device_put(sdev);
|
||||||
|
}
|
||||||
|
|
||||||
|
- return 0;
|
||||||
|
+ return result;
|
||||||
|
}
|
||||||
|
#endif /* CONFIG_SSB_SPROM */
|
||||||
|
|
||||||
|
@@ -472,6 +476,8 @@ static int ssb_devices_register(struct s
|
||||||
case SSB_BUSTYPE_SSB:
|
case SSB_BUSTYPE_SSB:
|
||||||
dev->dma_mask = &dev->coherent_dma_mask;
|
dev->dma_mask = &dev->coherent_dma_mask;
|
||||||
break;
|
break;
|
||||||
@ -137,7 +300,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
sdev->dev = dev;
|
sdev->dev = dev;
|
||||||
@@ -1358,8 +1360,10 @@ static int __init ssb_modinit(void)
|
@@ -1358,8 +1364,10 @@ static int __init ssb_modinit(void)
|
||||||
ssb_buses_lock();
|
ssb_buses_lock();
|
||||||
err = ssb_attach_queued_buses();
|
err = ssb_attach_queued_buses();
|
||||||
ssb_buses_unlock();
|
ssb_buses_unlock();
|
||||||
@ -149,7 +312,7 @@
|
|||||||
|
|
||||||
err = b43_pci_ssb_bridge_init();
|
err = b43_pci_ssb_bridge_init();
|
||||||
if (err) {
|
if (err) {
|
||||||
@@ -1375,7 +1379,7 @@ static int __init ssb_modinit(void)
|
@@ -1375,7 +1383,7 @@ static int __init ssb_modinit(void)
|
||||||
/* don't fail SSB init because of this */
|
/* don't fail SSB init because of this */
|
||||||
err = 0;
|
err = 0;
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,14 @@
|
|||||||
--- a/drivers/ssb/Kconfig
|
--- a/drivers/ssb/Kconfig
|
||||||
+++ b/drivers/ssb/Kconfig
|
+++ b/drivers/ssb/Kconfig
|
||||||
@@ -49,7 +49,7 @@ config SSB_PCIHOST
|
@@ -29,6 +29,7 @@ config SSB_SPROM
|
||||||
|
config SSB_BLOCKIO
|
||||||
|
bool
|
||||||
|
depends on SSB
|
||||||
|
+ default y
|
||||||
|
|
||||||
|
config SSB_PCIHOST_POSSIBLE
|
||||||
|
bool
|
||||||
|
@@ -49,7 +50,7 @@ config SSB_PCIHOST
|
||||||
config SSB_B43_PCI_BRIDGE
|
config SSB_B43_PCI_BRIDGE
|
||||||
bool
|
bool
|
||||||
depends on SSB_PCIHOST
|
depends on SSB_PCIHOST
|
||||||
|
@ -1,6 +1,14 @@
|
|||||||
--- a/drivers/ssb/Kconfig
|
--- a/drivers/ssb/Kconfig
|
||||||
+++ b/drivers/ssb/Kconfig
|
+++ b/drivers/ssb/Kconfig
|
||||||
@@ -49,7 +49,7 @@ config SSB_PCIHOST
|
@@ -29,6 +29,7 @@ config SSB_SPROM
|
||||||
|
config SSB_BLOCKIO
|
||||||
|
bool
|
||||||
|
depends on SSB
|
||||||
|
+ default y
|
||||||
|
|
||||||
|
config SSB_PCIHOST_POSSIBLE
|
||||||
|
bool
|
||||||
|
@@ -49,7 +50,7 @@ config SSB_PCIHOST
|
||||||
config SSB_B43_PCI_BRIDGE
|
config SSB_B43_PCI_BRIDGE
|
||||||
bool
|
bool
|
||||||
depends on SSB_PCIHOST
|
depends on SSB_PCIHOST
|
||||||
|
@ -28,6 +28,23 @@ set system.wifi_led.mode='link tx rx'
|
|||||||
set system.wifi_led.default='0'
|
set system.wifi_led.default='0'
|
||||||
commit system
|
commit system
|
||||||
__EOF
|
__EOF
|
||||||
|
|
||||||
|
# add mac address from U-Boot partition to lan and wan devices
|
||||||
|
MTD=`grep -e 'u-boot' /proc/mtd`
|
||||||
|
MTD=`echo ${MTD} | sed 's/[a-z]*\([0-9]*\):.*/\1/'`
|
||||||
|
[ -n "${MTD}" ] && {
|
||||||
|
MACADDR=`dd if=/dev/mtdblock${MTD} bs=1 skip=262048 count=6 2>/dev/null | hexdump -e '1/1 "%02x"'`
|
||||||
|
MACADDR2=$(( 0x${MACADDR} + 1))
|
||||||
|
MACADDR2=`printf "%012x" ${MACADDR2}`
|
||||||
|
|
||||||
|
MACADDR=`echo ${MACADDR} | sed 's/\(..\)/\1:/g' | sed 's/:$//'`
|
||||||
|
MACADDR2=`echo ${MACADDR2} | sed 's/\(..\)/\1:/g' | sed 's/:$//'`
|
||||||
|
|
||||||
|
uci set network.eth0.macaddr=${MACADDR}
|
||||||
|
uci set network.lan.macaddr=${MACADDR}
|
||||||
|
uci set network.wan.macaddr=${MACADDR2}
|
||||||
|
uci commit network
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
case "${hardware}" in
|
case "${hardware}" in
|
||||||
|
@ -55,7 +55,7 @@ endef
|
|||||||
define Image/Build
|
define Image/Build
|
||||||
$(CP) $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel
|
$(CP) $(KDIR)/vmlinux.elf $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel
|
||||||
$(STAGING_DIR_HOST)/bin/patch-cmdline $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel '$(strip $(call Image/cmdline/$(1))) '
|
$(STAGING_DIR_HOST)/bin/patch-cmdline $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel '$(strip $(call Image/cmdline/$(1))) '
|
||||||
./gen_image.sh $(BIN_DIR)/$(IMG_PREFIX)-$(1).bin 4 $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel $(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1)
|
./gen_image.sh $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).bin 4 $(BIN_DIR)/$(IMG_PREFIX)-$(1).kernel $(CONFIG_TARGET_ROOTFS_PARTSIZE) $(KDIR)/root.$(1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
|
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),y)
|
||||||
|
@ -1,91 +1,74 @@
|
|||||||
config X86_GRUB_IMAGES
|
config X86_GRUB_IMAGES
|
||||||
bool "Build GRUB images (Linux x86 or x86_64 host only)"
|
bool "Build GRUB images (Linux x86 or x86_64 host only)"
|
||||||
depends TARGET_x86 && !TARGET_x86_olpc
|
depends TARGET_x86 && !TARGET_x86_olpc
|
||||||
depends TARGET_ROOTFS_EXT2FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS || TARGET_ROOTFS_ISO
|
depends TARGET_ROOTFS_EXT2FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
|
||||||
select PACKAGE_grub
|
select PACKAGE_grub
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config X86_GRUB_IMAGES_PAD
|
|
||||||
bool "Pad GRUB images to filesystem size (for JFFS2)"
|
|
||||||
depends X86_GRUB_IMAGES
|
|
||||||
|
|
||||||
config X86_GRUB_CONSOLE
|
config X86_GRUB_CONSOLE
|
||||||
bool
|
bool "Use Console Terminal (in addition to Serial)"
|
||||||
depends X86_GRUB_IMAGES
|
depends X86_GRUB_IMAGES
|
||||||
prompt "Use Console Terminal (in addition to Serial)"
|
default n if (TARGET_x86_generic_Soekris45xx || TARGET_x86_generic_Soekris48xx || TARGET_x86_net5501)
|
||||||
default n if TARGET_x86_generic_Soekris48xx || TARGET_x86_generic_Soekris45xx || TARGET_x86_net5501
|
default y
|
||||||
default y if ! (TARGET_x86_generic_Soekris48xx || TARGET_x86_generic_Soekris45xx || TARGET_x86_net5501)
|
|
||||||
|
|
||||||
config X86_GRUB_SERIAL
|
config X86_GRUB_SERIAL
|
||||||
string
|
string "Serial port device"
|
||||||
prompt "Serial port device"
|
|
||||||
depends X86_GRUB_IMAGES
|
depends X86_GRUB_IMAGES
|
||||||
default "hvc0" if TARGET_x86_xen_domu
|
default "hvc0" if TARGET_x86_xen_domu
|
||||||
default "ttyS0" if ! TARGET_x86_xen_domu
|
default "ttyS0"
|
||||||
|
|
||||||
config X86_GRUB_BAUDRATE
|
config X86_GRUB_BAUDRATE
|
||||||
int "Serial port baud rate"
|
int "Serial port baud rate"
|
||||||
depends X86_GRUB_IMAGES
|
depends X86_GRUB_IMAGES
|
||||||
default 19200 if TARGET_x86_generic_Soekris48xx || TARGET_x86_generic_Soekris45xx || TARGET_x86_net5501
|
default 19200 if TARGET_x86_generic_Soekris45xx || TARGET_x86_generic_Soekris48xx || TARGET_x86_net5501
|
||||||
default 38400 if ! (TARGET_x86_generic_Soekris48xx || TARGET_x86_generic_Soekris45xx || TARGET_x86_net5501)
|
default 38400
|
||||||
|
|
||||||
config X86_GRUB_KERNELPART
|
|
||||||
int "Kernel partition size (in MB)"
|
|
||||||
depends X86_GRUB_IMAGES
|
|
||||||
default 4
|
|
||||||
|
|
||||||
config X86_GRUB_ROOTPART
|
|
||||||
string
|
|
||||||
prompt "Root partition on target device" if X86_GRUB_IMAGES
|
|
||||||
default "/dev/xvda2" if TARGET_x86_xen_domu
|
|
||||||
default "/dev/sda2" if ! TARGET_x86_xen_domu
|
|
||||||
help
|
|
||||||
The root partition on the final device. If you don't know,
|
|
||||||
you probably want the default (/dev/sda2).
|
|
||||||
|
|
||||||
config X86_GRUB_BOOTOPTS
|
config X86_GRUB_BOOTOPTS
|
||||||
string
|
string "Extra kernel boot options"
|
||||||
prompt "Extra kernel boot options" if X86_GRUB_IMAGES
|
depends X86_GRUB_IMAGES
|
||||||
default "xencons=hvc" if TARGET_x86_xen_domu
|
default "xencons=hvc" if TARGET_x86_xen_domu
|
||||||
default "" if ! TARGET_x86_xen_domu
|
|
||||||
help
|
help
|
||||||
If you don't know, just leave it blank.
|
If you don't know, just leave it blank.
|
||||||
|
|
||||||
|
|
||||||
config X86_VDI_IMAGES
|
config X86_VDI_IMAGES
|
||||||
bool "Build VirtualBox image files (VDI). Requires VBoxManage"
|
bool "Build VirtualBox image files (VDI)"
|
||||||
|
depends X86_GRUB_IMAGES
|
||||||
depends TARGET_x86_generic
|
depends TARGET_x86_generic
|
||||||
depends TARGET_ROOTFS_EXT2FS
|
depends TARGET_ROOTFS_EXT2FS
|
||||||
depends X86_GRUB_IMAGES
|
|
||||||
select PACKAGE_kmod-pcnet32
|
select PACKAGE_kmod-pcnet32
|
||||||
|
help
|
||||||
|
Requires VBoxManage installed on the build system.
|
||||||
|
|
||||||
config X86_VMDK_IMAGES
|
config X86_VMDK_IMAGES
|
||||||
bool "Build VMware image files (VMDK). Requires qemu-img"
|
bool "Build VMware image files (VMDK)"
|
||||||
|
depends X86_GRUB_IMAGES
|
||||||
depends TARGET_x86_generic
|
depends TARGET_x86_generic
|
||||||
depends TARGET_ROOTFS_EXT2FS
|
depends TARGET_ROOTFS_EXT2FS
|
||||||
depends X86_GRUB_IMAGES
|
|
||||||
select PACKAGE_kmod-e1000
|
select PACKAGE_kmod-e1000
|
||||||
|
help
|
||||||
|
Requires qemu-img installed on the build system.
|
||||||
|
|
||||||
|
|
||||||
config OLPC_BOOTSCRIPT_IMAGES
|
config OLPC_BOOTSCRIPT_IMAGES
|
||||||
bool "Build images with bootscript"
|
bool "Build images with bootscript"
|
||||||
depends TARGET_x86_olpc
|
depends TARGET_x86_olpc
|
||||||
depends TARGET_ROOTFS_EXT2FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS || TARGET_ROOTFS_ISO
|
depends TARGET_ROOTFS_EXT2FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
|
||||||
default y
|
|
||||||
|
|
||||||
config OLPC_BOOTSCRIPT_IMAGES_PAD
|
|
||||||
bool "Pad bootscript images to filesystem size (for JFFS2)"
|
|
||||||
depends OLPC_BOOTSCRIPT_IMAGES
|
|
||||||
|
|
||||||
config OLPC_BOOTSCRIPT_KERNELPART
|
config TARGET_IMAGES_PAD
|
||||||
|
bool "Pad images to filesystem size (for JFFS2)"
|
||||||
|
depends OLPC_BOOTSCRIPT_IMAGES || X86_GRUB_IMAGES
|
||||||
|
|
||||||
|
config TARGET_KERNEL_PARTSIZE
|
||||||
int "Kernel partition size (in MB)"
|
int "Kernel partition size (in MB)"
|
||||||
depends OLPC_BOOTSCRIPT_IMAGES
|
depends OLPC_BOOTSCRIPT_IMAGES || X86_GRUB_IMAGES
|
||||||
default 4
|
default 4
|
||||||
|
|
||||||
config OLPC_BOOTSCRIPT_ROOTPART
|
config TARGET_ROOTFS_PARTNAME
|
||||||
string
|
string "Root partition on target device"
|
||||||
prompt "Root partition on target device" if OLPC_BOOTSCRIPT_IMAGES
|
depends OLPC_BOOTSCRIPT_IMAGES || X86_GRUB_IMAGES
|
||||||
|
default "/dev/xvda2" if TARGET_x86_xen_domu
|
||||||
default "/dev/sda2"
|
default "/dev/sda2"
|
||||||
help
|
help
|
||||||
The root partition on the final device. If you don't know,
|
The root partition on the final device. If you don't know,
|
||||||
you probably want the default (/dev/sda2).
|
you probably want the default (/dev/sda2).
|
||||||
|
|
||||||
|
@ -29,12 +29,12 @@ ifneq ($(GRUB_TERMINALS),)
|
|||||||
GRUB_TERMINAL_CONFIG := terminal --timeout=2 $(GRUB_TERMINALS)
|
GRUB_TERMINAL_CONFIG := terminal --timeout=2 $(GRUB_TERMINALS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ROOTPART:=$(call qstrip,$(CONFIG_TARGET_ROOTFS_PARTNAME))
|
||||||
|
|
||||||
ifneq ($(CONFIG_X86_GRUB_IMAGES),)
|
ifneq ($(CONFIG_X86_GRUB_IMAGES),)
|
||||||
ifneq ($(HOST_OS),Darwin)
|
ifneq ($(HOST_OS),Darwin)
|
||||||
|
|
||||||
BOOTOPTS:=$(call qstrip,$(CONFIG_X86_GRUB_BOOTOPTS))
|
BOOTOPTS:=$(call qstrip,$(CONFIG_X86_GRUB_BOOTOPTS))
|
||||||
ROOTPART:=$(call qstrip,$(CONFIG_X86_GRUB_ROOTPART))
|
|
||||||
|
|
||||||
define Image/cmdline/ext2
|
define Image/cmdline/ext2
|
||||||
root=$(ROOTPART) rootfstype=ext2 rootwait
|
root=$(ROOTPART) rootfstype=ext2 rootwait
|
||||||
@ -66,10 +66,10 @@ ifneq ($(CONFIG_X86_GRUB_IMAGES),)
|
|||||||
-e 's#@TERMINAL_CONFIG@#$(strip $(GRUB_TERMINAL_CONFIG))#g' \
|
-e 's#@TERMINAL_CONFIG@#$(strip $(GRUB_TERMINAL_CONFIG))#g' \
|
||||||
-e 's#@CMDLINE@#$(strip $(call Image/cmdline/$(1)) $(BOOTOPTS) $(GRUB_CONSOLE_CMDLINE))#g' \
|
-e 's#@CMDLINE@#$(strip $(call Image/cmdline/$(1)) $(BOOTOPTS) $(GRUB_CONSOLE_CMDLINE))#g' \
|
||||||
./menu.lst > $(KDIR)/root.grub/boot/grub/menu.lst
|
./menu.lst > $(KDIR)/root.grub/boot/grub/menu.lst
|
||||||
PADDING="$(CONFIG_X86_GRUB_IMAGES_PAD)" PATH="$(TARGET_PATH)" ./gen_image_x86.sh \
|
PADDING="$(CONFIG_TARGET_IMAGES_PAD)" PATH="$(TARGET_PATH)" ./gen_image_x86.sh \
|
||||||
$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
|
$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
|
||||||
$(CONFIG_X86_GRUB_KERNELPART) $(KDIR)/root.grub \
|
$(CONFIG_TARGET_KERNEL_PARTSIZE) $(KDIR)/root.grub \
|
||||||
$(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1)
|
$(CONFIG_TARGET_ROOTFS_PARTSIZE) $(KDIR)/root.$(1)
|
||||||
$(call Image/Build/grub/$(1))
|
$(call Image/Build/grub/$(1))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
@ -88,8 +88,8 @@ ifneq ($(CONFIG_X86_GRUB_IMAGES),)
|
|||||||
define Image/Build/grub
|
define Image/Build/grub
|
||||||
PADDING="$(CONFIG_X86_GRUB_IMAGES_PAD)" PATH="$(TARGET_PATH)" NOGRUB=1 ./gen_image_x86.sh \
|
PADDING="$(CONFIG_X86_GRUB_IMAGES_PAD)" PATH="$(TARGET_PATH)" NOGRUB=1 ./gen_image_x86.sh \
|
||||||
$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
|
$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
|
||||||
$(CONFIG_X86_GRUB_KERNELPART) "" \
|
$(CONFIG_TARGET_KERNEL_PARTSIZE) "" \
|
||||||
$(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1)
|
$(CONFIG_TARGET_ROOTFS_PARTSIZE) $(KDIR)/root.$(1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
endif
|
endif
|
||||||
@ -99,8 +99,6 @@ ROOTDELAY=10
|
|||||||
|
|
||||||
ifneq ($(CONFIG_OLPC_BOOTSCRIPT_IMAGES),)
|
ifneq ($(CONFIG_OLPC_BOOTSCRIPT_IMAGES),)
|
||||||
|
|
||||||
ROOTPART:=$(call qstrip,$(CONFIG_OLPC_BOOTSCRIPT_ROOTPART))
|
|
||||||
|
|
||||||
define Image/cmdline/ext2
|
define Image/cmdline/ext2
|
||||||
root=$(ROOTPART) rootfstype=ext2 rootwait
|
root=$(ROOTPART) rootfstype=ext2 rootwait
|
||||||
endef
|
endef
|
||||||
@ -123,10 +121,10 @@ ifneq ($(CONFIG_OLPC_BOOTSCRIPT_IMAGES),)
|
|||||||
$(CP) $(KDIR)/bzImage $(KDIR)/root.bootscript/boot/vmlinuz
|
$(CP) $(KDIR)/bzImage $(KDIR)/root.bootscript/boot/vmlinuz
|
||||||
sed -e 's#@CMDLINE@#$(strip $(call Image/cmdline/$(1))) $(BOOTOPTS)#g' \
|
sed -e 's#@CMDLINE@#$(strip $(call Image/cmdline/$(1))) $(BOOTOPTS)#g' \
|
||||||
./olpc.fth > $(KDIR)/root.bootscript/boot/olpc.fth
|
./olpc.fth > $(KDIR)/root.bootscript/boot/olpc.fth
|
||||||
PADDING="$(CONFIG_OLPC_BOOTSCRIPT_IMAGES_PAD)" PATH="$(TARGET_PATH)" ./gen_image_olpc.sh \
|
PADDING="$(CONFIG_TARGET_IMAGES_PAD)" PATH="$(TARGET_PATH)" ./gen_image_olpc.sh \
|
||||||
$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
|
$(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
|
||||||
$(CONFIG_OLPC_BOOTSCRIPT_KERNELPART) $(KDIR)/root.bootscript \
|
$(CONFIG_TARGET_KERNEL_PARTSIZE) $(KDIR)/root.bootscript \
|
||||||
$(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1)
|
$(CONFIG_TARGET_ROOTFS_PARTSIZE) $(KDIR)/root.$(1)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
Loading…
Reference in New Issue
Block a user