mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2025-02-17 14:54:43 +02:00
Merge remote branch 'remotes/backfire/master' into xburst
This commit is contained in:
commit
4fbb2ba781
22
Config.in
22
Config.in
@ -155,6 +155,15 @@ menu "Global build settings"
|
||||
help
|
||||
This removes all ipkg/opkg status data files from the target directory before building the root fs
|
||||
|
||||
config COLLECT_KERNEL_DEBUG
|
||||
bool
|
||||
prompt "Collect kernel debug information"
|
||||
select KERNEL_DEBUG_INFO
|
||||
default n
|
||||
help
|
||||
This collects debugging symbols from the kernel and all compiled modules.
|
||||
Useful for release builds, so that kernel issues can be debugged offline later.
|
||||
|
||||
comment "Kernel build options"
|
||||
|
||||
config KERNEL_DEBUG_FS
|
||||
@ -179,6 +188,17 @@ menu "Global build settings"
|
||||
help
|
||||
This will give you more information in stack traces from kernel oopses
|
||||
|
||||
config KERNEL_DEBUG_KERNEL
|
||||
bool
|
||||
default n
|
||||
|
||||
config KERNEL_DEBUG_INFO
|
||||
bool "Compile the kernel with debug information"
|
||||
default n
|
||||
select KERNEL_DEBUG_KERNEL
|
||||
help
|
||||
This will compile your kernel and modules with debug information.
|
||||
|
||||
comment "Package build options"
|
||||
|
||||
config DEBUG
|
||||
@ -191,7 +211,7 @@ menu "Global build settings"
|
||||
config IPV6
|
||||
bool
|
||||
prompt "Enable IPv6 support in packages"
|
||||
default n
|
||||
default y
|
||||
help
|
||||
Enable IPV6 support in packages (passes --enable-ipv6 to configure scripts).
|
||||
|
||||
|
@ -44,6 +44,19 @@ define Download/kernel
|
||||
MD5SUM:=$(LINUX_KERNEL_MD5SUM)
|
||||
endef
|
||||
|
||||
ifdef CONFIG_COLLECT_KERNEL_DEBUG
|
||||
define Kernel/CollectDebug
|
||||
rm -rf $(KERNEL_BUILD_DIR)/debug
|
||||
mkdir -p $(KERNEL_BUILD_DIR)/debug/modules
|
||||
$(CP) $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/debug/
|
||||
-$(CP) \
|
||||
$(STAGING_DIR_ROOT)/lib/modules/$(LINUX_VERSION)/* \
|
||||
$(KERNEL_BUILD_DIR)/debug/modules/
|
||||
$(FIND) $(KERNEL_BUILD_DIR)/debug -type f | $(XARGS) $(KERNEL_CROSS)strip --only-keep-debug
|
||||
$(TAR) c -C $(KERNEL_BUILD_DIR) debug | bzip2 -c -9 > $(BIN_DIR)/kernel-debug.tar.bz2
|
||||
endef
|
||||
endif
|
||||
|
||||
define BuildKernel
|
||||
$(if $(QUILT),$(Build/Quilt))
|
||||
$(if $(LINUX_SITE),$(call Download,kernel))
|
||||
@ -86,6 +99,7 @@ define BuildKernel
|
||||
|
||||
$(LINUX_DIR)/.image: $(STAMP_CONFIGURED) $(if $(CONFIG_STRIP_KERNEL_EXPORTS),$(KERNEL_BUILD_DIR)/symtab.h) FORCE
|
||||
$(Kernel/CompileImage)
|
||||
$(Kernel/CollectDebug)
|
||||
touch $$@
|
||||
|
||||
mostlyclean: FORCE
|
||||
|
@ -97,9 +97,8 @@ define Kernel/Configure/2.6
|
||||
endef
|
||||
define Kernel/Configure/Default
|
||||
$(LINUX_CONFCMD) > $(LINUX_DIR)/.config.target
|
||||
echo "$(if $(CONFIG_KERNEL_KALLSYMS),CONFIG_KALLSYMS=y,# CONFIG_KALLSYMS is not set)" >> $(LINUX_DIR)/.config.target
|
||||
echo "$(if $(CONFIG_KERNEL_PROFILING),CONFIG_PROFILING=y,# CONFIG_PROFILING is not set)" >> $(LINUX_DIR)/.config.target
|
||||
echo "$(if $(CONFIG_KERNEL_DEBUG_FS),CONFIG_DEBUG_FS=y,# CONFIG_DEBUG_FS is not set)" >> $(LINUX_DIR)/.config.target
|
||||
# copy CONFIG_KERNEL_* settings over to .config.target
|
||||
awk '/^(#[[:space:]]+)?CONFIG_KERNEL/{sub("CONFIG_KERNEL_","CONFIG_");print}' $(TOPDIR)/.config >> $(LINUX_DIR)/.config.target
|
||||
echo "# CONFIG_KALLSYMS_EXTRA_PASS is not set" >> $(LINUX_DIR)/.config.target
|
||||
echo "# CONFIG_KALLSYMS_ALL is not set" >> $(LINUX_DIR)/.config.target
|
||||
echo "# CONFIG_KPROBES is not set" >> $(LINUX_DIR)/.config.target
|
||||
|
@ -17,8 +17,8 @@ endif
|
||||
ifeq ($(LINUX_VERSION),2.6.31.12)
|
||||
LINUX_KERNEL_MD5SUM:=517be354b81b780e2f4b2ad614d030de
|
||||
endif
|
||||
ifeq ($(LINUX_VERSION),2.6.32.10)
|
||||
LINUX_KERNEL_MD5SUM:=5d996507ad482a3a8c8e6b2d48e7994b
|
||||
ifeq ($(LINUX_VERSION),2.6.32.16)
|
||||
LINUX_KERNEL_MD5SUM:=d94d91ef3be4eb76765401b4fa462759
|
||||
endif
|
||||
ifeq ($(LINUX_VERSION),2.6.33)
|
||||
LINUX_KERNEL_MD5SUM:=c3883760b18d50e8d78819c54d579b00
|
||||
|
43
package/6in4/Makefile
Normal file
43
package/6in4/Makefile
Normal file
@ -0,0 +1,43 @@
|
||||
#
|
||||
# Copyright (C) 2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=6in4
|
||||
PKG_VERSION:=3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/6in4
|
||||
SECTION:=ipv6
|
||||
CATEGORY:=IPv6
|
||||
DEPENDS:=+ip +kmod-ipv6 +kmod-sit
|
||||
TITLE:=IPv6-in-IPv4 configuration support
|
||||
PKGARCH:=all
|
||||
endef
|
||||
|
||||
define Package/6in4/description
|
||||
Provides support for 6in4 tunnels in /etc/config/network.
|
||||
Refer to http://wiki.openwrt.org/doc/uci/network for
|
||||
configuration details.
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
endef
|
||||
|
||||
define Build/Configure
|
||||
endef
|
||||
|
||||
define Package/6in4/install
|
||||
$(INSTALL_DIR) $(1)/lib/network
|
||||
$(INSTALL_DATA) ./files/6in4.sh $(1)/lib/network/6in4.sh
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/iface
|
||||
$(INSTALL_DATA) ./files/6in4.hotplug $(1)/etc/hotplug.d/iface/90-6in4
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,6in4))
|
44
package/6in4/files/6in4.hotplug
Normal file
44
package/6in4/files/6in4.hotplug
Normal file
@ -0,0 +1,44 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ "$ACTION" = ifup ]; then
|
||||
. /etc/functions.sh
|
||||
|
||||
include /lib/network
|
||||
scan_interfaces
|
||||
|
||||
update_tunnel() {
|
||||
local cfg="$1"
|
||||
|
||||
local proto
|
||||
config_get proto "$cfg" proto
|
||||
[ "$proto" = 6in4 ] || return 0
|
||||
|
||||
local wandev
|
||||
config_get wandev "$cfg" wan_device "$(find_6in4_wanif)"
|
||||
[ "$wandev" = "$DEVICE" ] || return 0
|
||||
|
||||
local oldip
|
||||
local wanip=$(find_6in4_wanip "$wandev")
|
||||
config_get oldip "$cfg" ipaddr
|
||||
|
||||
[ -n "$wanip" ] && [ "$oldip" != "$wanip" ] && {
|
||||
local tunnelid
|
||||
config_get tunnelid "$cfg" tunnelid
|
||||
|
||||
local username
|
||||
config_get username "$cfg" username
|
||||
|
||||
local password
|
||||
config_get password "$cfg" password
|
||||
|
||||
[ -n "$tunnelid" ] && [ -n "$username" ] && [ -n "$password" ] && {
|
||||
password="$(echo -n "$password" | md5sum)"; password="${password%% *}"
|
||||
uci_set_state network "$cfg" ipaddr "$wanip"
|
||||
|
||||
( wget -qO/dev/null "http://ipv4.tunnelbroker.net/ipv4_end.php?ipv4b=AUTO&user_id=$username&pass=$password&tunnel_id=$tunnelid" && ifup "$cfg" )&
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
config_foreach update_tunnel interface
|
||||
fi
|
103
package/6in4/files/6in4.sh
Executable file
103
package/6in4/files/6in4.sh
Executable file
@ -0,0 +1,103 @@
|
||||
# 6in4.sh - IPv6-in-IPv4 tunnel backend
|
||||
# Copyright (c) 2010 OpenWrt.org
|
||||
|
||||
find_6in4_wanif() {
|
||||
local if=$(ip -4 r l e 0/0); if="${if#default via * dev }"; if="${if%% *}"
|
||||
[ -n "$if" ] && grep -qs "^ *$if:" /proc/net/dev && echo "$if"
|
||||
}
|
||||
|
||||
find_6in4_wanip() {
|
||||
local ip=$(ip -4 a s dev "$1"); ip="${ip#*inet }"
|
||||
echo "${ip%%/[0-9]* brd *}"
|
||||
}
|
||||
|
||||
# Hook into scan_interfaces() to synthesize a .device option
|
||||
# This is needed for /sbin/ifup to properly dispatch control
|
||||
# to setup_interface_6in4() even if no .ifname is set in
|
||||
# the configuration.
|
||||
scan_6in4() {
|
||||
config_set "$1" device "6in4-$1"
|
||||
}
|
||||
|
||||
coldplug_interface_6in4() {
|
||||
setup_interface_6in4 "6in4-$1" "$1"
|
||||
}
|
||||
|
||||
setup_interface_6in4() {
|
||||
local iface="$1"
|
||||
local cfg="$2"
|
||||
local link="6in4-$cfg"
|
||||
|
||||
local local4
|
||||
config_get local4 "$cfg" ipaddr
|
||||
|
||||
local remote4
|
||||
config_get remote4 "$cfg" peeraddr
|
||||
|
||||
local local6
|
||||
config_get local6 "$cfg" ip6addr
|
||||
|
||||
local mtu
|
||||
config_get mtu "$cfg" mtu
|
||||
|
||||
local ttl
|
||||
config_get ttl "$cfg" ttl
|
||||
|
||||
local defaultroute
|
||||
config_get_bool defaultroute "$cfg" defaultroute 1
|
||||
|
||||
# If local4 is unset, guess local IPv4 address from the
|
||||
# interface used by the default route.
|
||||
[ -z "$local4" ] && {
|
||||
local wanif=$(find_6in4_wanif)
|
||||
[ -n "$wanif" ] && {
|
||||
local4=$(find_6in4_wanip "$wanif")
|
||||
uci_set_state network "$cfg" wan_device "$wanif"
|
||||
}
|
||||
}
|
||||
|
||||
[ -n "$local4" ] && {
|
||||
# creating the tunnel below will trigger a net subsystem event
|
||||
# prevent it from touching or iface by disabling .auto here
|
||||
uci_set_state network "$cfg" ifname $link
|
||||
uci_set_state network "$cfg" auto 0
|
||||
|
||||
ip tunnel add $link mode sit remote $remote4 local $local4 ttl 255
|
||||
ip link set $link up
|
||||
ip link set mtu ${mtu:-1280} dev $link
|
||||
ip tunnel change $link ttl ${ttl:-64}
|
||||
ip addr add $local6 dev $link
|
||||
|
||||
uci_set_state network "$cfg" ipaddr $local4
|
||||
uci_set_state network "$cfg" ip6addr $local6
|
||||
|
||||
[ "$defaultroute" = 1 ] && {
|
||||
ip -6 route add ::/0 dev $link
|
||||
uci_set_state network "$cfg" defaultroute 1
|
||||
}
|
||||
|
||||
env -i ACTION="ifup" INTERFACE="$cfg" DEVICE="$link" PROTO=6in4 /sbin/hotplug-call "iface" &
|
||||
} || {
|
||||
echo "Cannot determine local IPv4 address for 6in4 tunnel $cfg - skipping"
|
||||
}
|
||||
}
|
||||
|
||||
stop_interface_6in4() {
|
||||
local cfg="$1"
|
||||
local link="6in4-$cfg"
|
||||
|
||||
local local6=$(uci_get_state network "$cfg" ip6addr)
|
||||
local defaultroute=$(uci_get_state network "$cfg" defaultroute)
|
||||
|
||||
grep -qs "^ *$link:" /proc/net/dev && {
|
||||
env -i ACTION="ifdown" INTERFACE="$cfg" DEVICE="$link" PROTO=6in4 /sbin/hotplug-call "iface" &
|
||||
|
||||
[ "$defaultroute" = "1" ] && {
|
||||
ip -6 route del ::/0 dev $link
|
||||
}
|
||||
|
||||
ip addr del $local6 dev $link
|
||||
ip link set $link down
|
||||
ip tunnel del $link
|
||||
}
|
||||
}
|
@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=base-files
|
||||
PKG_RELEASE:=43.1
|
||||
PKG_RELEASE:=43.3
|
||||
|
||||
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
|
||||
|
||||
|
@ -13,6 +13,7 @@ add_route() {
|
||||
config_get netmask "$config" netmask
|
||||
config_get gateway "$config" gateway
|
||||
config_get metric "$config" metric
|
||||
config_get mtu "$config" mtu
|
||||
|
||||
# make sure there is a gateway and a target
|
||||
[ -n "$target" ] || {
|
||||
@ -33,7 +34,8 @@ add_route() {
|
||||
dest="${dest:--host "$target"}"
|
||||
|
||||
/sbin/route add $dest ${gateway:+gw "$gateway"} \
|
||||
${dev:+dev "$dev"} ${metric:+ metric "$metric"}
|
||||
${dev:+dev "$dev"} ${metric:+ metric "$metric"} \
|
||||
${mtu:+mss "$mtu"}
|
||||
}
|
||||
|
||||
add_route6() {
|
||||
@ -50,6 +52,7 @@ add_route6() {
|
||||
config_get target "$config" target
|
||||
config_get gateway "$config" gateway
|
||||
config_get metric "$config" metric
|
||||
config_get mtu "$config" mtu
|
||||
|
||||
# make sure there is a gateway and a target
|
||||
[ -n "$target" ] || {
|
||||
@ -61,7 +64,8 @@ add_route6() {
|
||||
}
|
||||
|
||||
/sbin/route -A inet6 add $target ${gateway:+gw "$gateway"} \
|
||||
${dev:+dev "$dev"} ${metric:+ metric "$metric"}
|
||||
${dev:+dev "$dev"} ${metric:+ metric "$metric"} \
|
||||
${mtu:+mss "$mtu"}
|
||||
}
|
||||
|
||||
case "$ACTION" in
|
||||
|
@ -5,6 +5,7 @@
|
||||
find_mount_jffs2() {
|
||||
mkdir -p /tmp/overlay
|
||||
mount "$(find_mtd_part rootfs_data)" /tmp/overlay -t jffs2
|
||||
mtd -qq unlock rootfs_data
|
||||
}
|
||||
|
||||
jffs2_not_mounted() {
|
||||
|
@ -1095,7 +1095,7 @@ static struct platform_t __init *platform_detect(void)
|
||||
return &platforms[TEW411BRPP];
|
||||
}
|
||||
|
||||
if (startswith(boardnum, "04FN52")) /* SimpleTech SimpleShare */
|
||||
if (startswith(boardnum, "04FN")) /* SimpleTech SimpleShare */
|
||||
return &platforms[STI_NAS];
|
||||
|
||||
if (!strcmp(getvar("boardnum"), "10") && !strcmp(getvar("boardrev"), "0x13")) /* D-Link DWL-3150 */
|
||||
|
@ -9,13 +9,16 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=carl9170
|
||||
PKG_VERSION:=1.0.1.1
|
||||
PKG_VERSION:=1.0.5.3
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/chr/carl9170/$(PKG_VERSION) \
|
||||
@KERNEL/linux/kernel/people/chr/carl9170/old/$(PKG_VERSION)
|
||||
PKG_MD5SUM:=8abbb4ae09a45a82af6f63cb65c7e2d8
|
||||
PKG_MD5SUM:=91d714d1e5c5c62da1191ac5afd8bcb0
|
||||
|
||||
PKG_CONFIG_DEPENDS:= \
|
||||
CONFIG_PACKAGE_CARL9170_DEBUGFS \
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
@ -28,6 +31,21 @@ define KernelPackage/carl9170
|
||||
URL:=http://www.kernel.org/pub/linux/kernel/people/chr/carl9170
|
||||
FILES:=$(DRV_PATH)/carl9170usb.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,60,carl9170usb)
|
||||
MENU:=1
|
||||
endef
|
||||
|
||||
define KernelPackage/carl9170/config
|
||||
menu "Configuration"
|
||||
depends PACKAGE_kmod-carl9170
|
||||
|
||||
config PACKAGE_CARL9170_DEBUGFS
|
||||
bool "Enable Debugging (DebugFS) Support"
|
||||
depends PACKAGE_MAC80211_DEBUGFS
|
||||
help
|
||||
Say Y if you need access to carl9170usb's statistics for QoS queue
|
||||
status, rate control, etc...
|
||||
|
||||
endmenu
|
||||
endef
|
||||
|
||||
define KernelPackage/carl9170/description
|
||||
@ -39,16 +57,21 @@ define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
$(HOST_TAR) -C $(PKG_BUILD_DIR) -xjf $(DL_DIR)/$(PKG_SOURCE)
|
||||
$(HOST_TAR) -C $(PKG_BUILD_DIR) -xf $(PKG_BUILD_DIR)/$(PKG_VERSION)/driver/carl9170-driver-$(PKG_VERSION).tar
|
||||
ln -sf Makefile.standalone $(DRV_PATH)/Makefile
|
||||
ln -s $(STAGING_DIR)/usr/include/mac80211/ath/*.h $(PKG_BUILD_DIR)/drivers/net/wireless/ath/
|
||||
$(Build/Patch)
|
||||
endef
|
||||
|
||||
BUILDFLAGS = \
|
||||
CONFIG_MAC80211_DEBUGFS=$(CONFIG_PACKAGE_MAC80211_DEBUGFS)
|
||||
CONFIG_CARL9170_USB=m \
|
||||
CONFIG_CARL9170_LEDS=$(if $(CONFIG_LEDS_TRIGGERS),y) \
|
||||
CONFIG_CARL9170_DEBUGFS=$(if $(CONFIG_PACKAGE_CARL9170_DEBUGFS),y) \
|
||||
CONFIG_MAC80211_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
|
||||
|
||||
EXTRA_CFLAGS = \
|
||||
$(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD)
|
||||
$(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD) \
|
||||
$(if $(CONFIG_LEDS_TRIGGERS), -DCONFIG_MAC80211_LEDS -DCONFIG_LEDS_TRIGGERS -DCONFIG_CARL9170_LEDS) \
|
||||
$(if $(CONFIG_PACKAGE_CARL9170_DEBUGFS),-DCONFIG_CARL9170_DEBUGFS) \
|
||||
$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),-DCONFIG_MAC80211_DEBUGFS) \
|
||||
|
||||
define Build/Compile
|
||||
$(MAKE) -C $(LINUX_DIR) \
|
||||
@ -61,7 +84,7 @@ endef
|
||||
|
||||
define KernelPackage/carl9170/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_VERSION)/firmware_build/carl9170.fw $(1)/lib/firmware/
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/$(PKG_VERSION)/firmware_build/carl9170-1.fw $(1)/lib/firmware/
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,carl9170))
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/carl9170/usb.c
|
||||
+++ b/drivers/net/wireless/ath/carl9170/usb.c
|
||||
@@ -988,11 +988,28 @@ err_failed:
|
||||
@@ -1000,11 +1000,28 @@ err_failed:
|
||||
ar9170_usb_firmware_failed(aru);
|
||||
}
|
||||
|
||||
|
@ -1,13 +0,0 @@
|
||||
--- a/drivers/net/wireless/ath/carl9170/fw.c
|
||||
+++ b/drivers/net/wireless/ath/carl9170/fw.c
|
||||
@@ -185,8 +185,10 @@ static int ar9170_fw_check(struct ar9170
|
||||
if (SUPP(CARL9170FW_WLANTX_CAB))
|
||||
ar->hw->wiphy->interface_modes |= BIT(NL80211_IFTYPE_AP);
|
||||
|
||||
+#ifdef CONFIG_CARL9170_WPS_BUTTON
|
||||
if (!SUPP(CARL9170FW_GPIO_INTERRUPT))
|
||||
ar->has_wps_button = false;
|
||||
+#endif
|
||||
|
||||
#undef SUPPORTED
|
||||
return 0;
|
@ -8,12 +8,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dnsmasq
|
||||
PKG_VERSION:=2.52
|
||||
PKG_RELEASE:=4
|
||||
PKG_VERSION:=2.55
|
||||
PKG_RELEASE:=3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=http://thekelleys.org.uk/dnsmasq
|
||||
PKG_MD5SUM:=1bb32fffdb4f977ead607802b5d701d0
|
||||
PKG_MD5SUM:=b093d7c6bc7f97ae6fd35d048529232a
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
@ -1,8 +1,11 @@
|
||||
config dnsmasq
|
||||
option domainneeded 1
|
||||
option boguspriv 1
|
||||
option filterwin2k '0' #enable for dial on demand
|
||||
option filterwin2k 0 # enable for dial on demand
|
||||
option localise_queries 1
|
||||
option rebind_protection 1 # disable if upstream must serve RFC1918 addresses
|
||||
option rebind_localhost 0 # enable for RBL checking and similar services
|
||||
#list rebind_domain example.lan # whitelist RFC1918 responses for domains
|
||||
option local '/lan/'
|
||||
option domain 'lan'
|
||||
option expandhosts 1
|
||||
|
@ -23,8 +23,8 @@ append_bool() {
|
||||
local option="$2"
|
||||
local value="$3"
|
||||
local _loctmp
|
||||
config_get_bool _loctmp "$section" "$option"
|
||||
[ "$_loctmp" -gt 0 ] && append args "$value"
|
||||
config_get_bool _loctmp "$section" "$option" 0
|
||||
[ $_loctmp -gt 0 ] && append args "$value"
|
||||
}
|
||||
|
||||
append_parm() {
|
||||
@ -99,6 +99,29 @@ dnsmasq() {
|
||||
|
||||
config_get hostsfile "$cfg" dhcphostsfile
|
||||
[ -e "$hostsfile" ] && append args "--dhcp-hostsfile=$hostsfile"
|
||||
|
||||
local rebind
|
||||
config_get_bool rebind "$cfg" rebind_protection 1
|
||||
[ $rebind -gt 0 ] && {
|
||||
logger -t dnsmasq \
|
||||
"DNS rebinding protection is active," \
|
||||
"will discard upstream RFC1918 responses!"
|
||||
append args "--stop-dns-rebind"
|
||||
|
||||
local rebind_localhost
|
||||
config_get_bool rebind_localhost "$cfg" rebind_localhost 0
|
||||
[ $rebind_localhost -gt 0 ] && {
|
||||
logger -t dnsmasq "Allowing 127.0.0.0/8 responses"
|
||||
append args "--rebind-localhost-ok"
|
||||
}
|
||||
|
||||
append_rebind_domain() {
|
||||
logger -t dnsmasq "Allowing RFC1918 responses for domain $1"
|
||||
append args "--rebind-domain-ok=$1"
|
||||
}
|
||||
|
||||
config_list_foreach "$cfg" rebind_domain append_rebind_domain
|
||||
}
|
||||
}
|
||||
|
||||
dhcp_subscrid_add() {
|
||||
@ -251,7 +274,7 @@ dhcp_add() {
|
||||
|
||||
#check for an already active dhcp server on the interface, unless 'force' is set
|
||||
config_get_bool force "$cfg" force 0
|
||||
[ "$force" -gt 0 ] || {
|
||||
[ $force -gt 0 ] || {
|
||||
udhcpc -n -q -s /bin/true -t 1 -i $ifname >&- && return 0
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
PKG_NAME:=firewall
|
||||
|
||||
PKG_VERSION:=1
|
||||
PKG_RELEASE:=10
|
||||
PKG_RELEASE:=12
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
|
@ -353,8 +353,11 @@ fw_redirect() {
|
||||
config_get dest_ip $1 dest_ip
|
||||
config_get dest_port $1 dest_port
|
||||
config_get proto $1 proto
|
||||
[ -z "$src" -o -z "$dest_ip" ] && { \
|
||||
echo "redirect needs src and dest_ip"; return ; }
|
||||
[ -z "$src" -o -z "$dest_ip$dest_port" ] && { \
|
||||
echo "redirect needs src and dest_ip or dest_port"; return ; }
|
||||
|
||||
find_item "$src" $CONNTRACK_ZONES || \
|
||||
append CONNTRACK_ZONES "$src"
|
||||
|
||||
src_port_first=${src_port%-*}
|
||||
src_port_last=${src_port#*-}
|
||||
@ -382,6 +385,7 @@ fw_redirect() {
|
||||
${src_mac:+-m mac --mac-source $src_mac} \
|
||||
-j DNAT --to-destination $dest_ip${dest_port:+:$dest_port}
|
||||
|
||||
[ -n "$dest_ip" ] && \
|
||||
$IPTABLES -I zone_${src}_forward 1 \
|
||||
${proto:+-p $proto} \
|
||||
-d $dest_ip \
|
||||
@ -391,6 +395,7 @@ fw_redirect() {
|
||||
${src_mac:+-m mac --mac-source $src_mac} \
|
||||
-j ACCEPT
|
||||
}
|
||||
|
||||
[ "$proto" == "tcpudp" -o -z "$proto" ] && {
|
||||
proto=tcp
|
||||
add_rule
|
||||
|
@ -44,6 +44,11 @@ CONFIGURE_ARGS += $(MY_CONFIGURE_ARGS)
|
||||
|
||||
CONFIGURE_VARS += $(MY_CONFIGURE_VARS)
|
||||
|
||||
ifeq ($(HOST_OS),Darwin)
|
||||
HOST_CFLAGS += $(call host-cc-option,-m32)
|
||||
HOST_CFLAGS += $(call host-cc-option,-fnested-functions)
|
||||
endif
|
||||
|
||||
HOST_CFLAGS += $(call host-cc-option,-fno-stack-protector)
|
||||
HOST_CFLAGS += $(call host-cc-option,-U_FORTIFY_SOURCE)
|
||||
|
||||
@ -53,6 +58,22 @@ HOST_CONFIGURE_ARGS += $(MY_CONFIGURE_ARGS) \
|
||||
|
||||
HOST_CONFIGURE_VARS += $(MY_CONFIGURE_VARS)
|
||||
|
||||
define Host/Configure
|
||||
(cd $(HOST_BUILD_DIR); aclocal && autoconf && automake)
|
||||
$(call Host/Configure/Default)
|
||||
endef
|
||||
|
||||
ifeq ($(HOST_OS),Darwin)
|
||||
define Host/Compile
|
||||
$(MAKE) -C $(HOST_BUILD_DIR)/lib
|
||||
$(MAKE) -C $(HOST_BUILD_DIR)/stage2 libgrub.a
|
||||
$(MAKE) -C $(HOST_BUILD_DIR)/grub
|
||||
endef
|
||||
define Host/Install
|
||||
$(MAKE) -C $(HOST_BUILD_DIR)/grub install
|
||||
endef
|
||||
endif
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_INSTALL_DIR)/usr/lib/grub $(1)/usr/lib/
|
||||
|
11
package/grub/patches/100-add_configure_macros.patch
Normal file
11
package/grub/patches/100-add_configure_macros.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -56,6 +56,8 @@ fi
|
||||
|
||||
AC_CHECK_TOOL(CC, gcc)
|
||||
AC_PROG_CC
|
||||
+AM_PROG_CC_C_O
|
||||
+AM_PROG_AS
|
||||
# We need this for older versions of Autoconf.
|
||||
_AM_DEPENDENCIES(CC)
|
||||
|
38
package/grub/patches/110-remove_configure_errors.patch
Normal file
38
package/grub/patches/110-remove_configure_errors.patch
Normal file
@ -0,0 +1,38 @@
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -177,26 +177,22 @@ grub_ASM_ABSOLUTE_WITHOUT_ASTERISK
|
||||
|
||||
grub_CHECK_START_SYMBOL
|
||||
grub_CHECK_USCORE_START_SYMBOL
|
||||
-if test "x$grub_cv_check_start_symbol" != "xyes" \
|
||||
- -a "x$grub_cv_check_uscore_start_symbol" != "xyes"; then
|
||||
- AC_MSG_ERROR([Neither start nor _start is defined])
|
||||
-fi
|
||||
|
||||
grub_CHECK_USCORE_USCORE_BSS_START_SYMBOL
|
||||
grub_CHECK_USCORE_EDATA_SYMBOL
|
||||
grub_CHECK_EDATA_SYMBOL
|
||||
-if test "x$grub_cv_check_uscore_uscore_bss_start_symbol" != "xyes" \
|
||||
- -a "x$grub_cv_check_uscore_edata_symbol" != "xyes" \
|
||||
- -a "x$grub_cv_check_edata_symbol" != "xyes"; then
|
||||
- AC_MSG_ERROR([None of __bss_start, _edata, edata defined])
|
||||
-fi
|
||||
+# if test "x$grub_cv_check_uscore_uscore_bss_start_symbol" != "xyes" \
|
||||
+# -a "x$grub_cv_check_uscore_edata_symbol" != "xyes" \
|
||||
+# -a "x$grub_cv_check_edata_symbol" != "xyes"; then
|
||||
+# AC_MSG_ERROR([None of __bss_start, _edata, edata defined])
|
||||
+# fi
|
||||
|
||||
grub_CHECK_END_SYMBOL
|
||||
grub_CHECK_USCORE_END_SYMBOL
|
||||
-if test "x$grub_cv_check_end_symbol" != "xyes" \
|
||||
- -a "x$grub_cv_check_uscore_end_symbol" != "xyes"; then
|
||||
- AC_MSG_ERROR([Neither end nor _end is defined])
|
||||
-fi
|
||||
+#if test "x$grub_cv_check_end_symbol" != "xyes" \
|
||||
+# -a "x$grub_cv_check_uscore_end_symbol" != "xyes"; then
|
||||
+# AC_MSG_ERROR([Neither end nor _end is defined])
|
||||
+#fi
|
||||
|
||||
# Check for curses libraries.
|
||||
AC_ARG_WITH(curses,
|
48
package/grub/patches/200-darwin_fixes.patch
Normal file
48
package/grub/patches/200-darwin_fixes.patch
Normal file
@ -0,0 +1,48 @@
|
||||
--- a/stage2/asm.S
|
||||
+++ b/stage2/asm.S
|
||||
@@ -95,14 +95,16 @@ VARIABLE(stage2_id)
|
||||
VARIABLE(force_lba)
|
||||
.byte 0
|
||||
VARIABLE(version_string)
|
||||
- .string VERSION
|
||||
+ .ascii VERSION
|
||||
+ .byte 0
|
||||
VARIABLE(config_file)
|
||||
#ifndef STAGE1_5
|
||||
- .string "/boot/grub/menu.lst"
|
||||
+ .ascii "/boot/grub/menu.lst"
|
||||
#else /* STAGE1_5 */
|
||||
.long 0xffffffff
|
||||
- .string "/boot/grub/stage2"
|
||||
+ .ascii "/boot/grub/stage2"
|
||||
#endif /* STAGE1_5 */
|
||||
+ .byte 0
|
||||
|
||||
/*
|
||||
* Leave some breathing room for the config file name.
|
||||
@@ -762,7 +764,9 @@ ENTRY(chain_stage1)
|
||||
call EXT_C(prot_to_real)
|
||||
.code16
|
||||
|
||||
-#ifdef ABSOLUTE_WITHOUT_ASTERISK
|
||||
+#ifdef __APPLE__
|
||||
+ DATA32 ADDR32 ljmp offset
|
||||
+#elif defined(ABSOLUTE_WITHOUT_ASTERISK)
|
||||
DATA32 ADDR32 ljmp (offset)
|
||||
#else
|
||||
DATA32 ADDR32 ljmp *(offset)
|
||||
--- a/stage2/char_io.c
|
||||
+++ b/stage2/char_io.c
|
||||
@@ -1345,5 +1345,12 @@ grub_strcpy (char *dest, const char *src
|
||||
#ifndef GRUB_UTIL
|
||||
# undef memcpy
|
||||
/* GCC emits references to memcpy() for struct copies etc. */
|
||||
+#ifdef __APPLE__
|
||||
+void *memcpy (void *dest, const void *src, int n)
|
||||
+{
|
||||
+ return grub_memmove(dest, src, n);
|
||||
+}
|
||||
+#else
|
||||
void *memcpy (void *dest, const void *src, int n) __attribute__ ((alias ("grub_memmove")));
|
||||
#endif
|
||||
+#endif
|
@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2006-2009 OpenWrt.org
|
||||
# Copyright (C) 2006-2010 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hostapd
|
||||
PKG_VERSION:=20100418
|
||||
PKG_RELEASE:=1
|
||||
PKG_RELEASE:=2
|
||||
PKG_REV:=0b86f67a2970403d1b1b6d34ce49f5485ef5dbb3
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
|
||||
|
@ -7,6 +7,9 @@ hostapd_set_bss_options() {
|
||||
config_get wpa_group_rekey "$vif" wpa_group_rekey
|
||||
config_get_bool ap_isolate "$vif" isolate 0
|
||||
|
||||
config_get device "$vif" device
|
||||
config_get hwmode "$device" hwmode
|
||||
|
||||
if [ "$ap_isolate" -gt 0 ]; then
|
||||
append "$var" "ap_isolate=$ap_isolate" "$N"
|
||||
fi
|
||||
@ -38,11 +41,16 @@ hostapd_set_bss_options() {
|
||||
|
||||
# explicit override for crypto setting
|
||||
case "$enc" in
|
||||
*tkip+aes|*tkip+ccmp) crypto="CCMP TKIP";;
|
||||
*tkip+aes|*tkip+ccmp|*aes+tkip|*ccmp+tkip) crypto="CCMP TKIP";;
|
||||
*aes|*ccmp) crypto="CCMP";;
|
||||
*tkip) crypto="TKIP";;
|
||||
esac
|
||||
|
||||
# enforce CCMP for 11ng and 11na
|
||||
case "$hwmode" in
|
||||
*ng|*na) crypto="CCMP";;
|
||||
esac
|
||||
|
||||
# use crypto/auth settings for building the hostapd config
|
||||
case "$enc" in
|
||||
*psk*)
|
||||
|
@ -70,6 +70,7 @@ wpa_supplicant_setup_vif() {
|
||||
key_mgmt='WPA-EAP'
|
||||
config_get ieee80211w "$vif" ieee80211w
|
||||
config_get ca_cert "$vif" ca_cert
|
||||
config_get eap_type "$vif" eap_type
|
||||
ca_cert=${ca_cert:+"ca_cert=\"$ca_cert\""}
|
||||
case "$eap_type" in
|
||||
tls)
|
||||
|
@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=2010-05-24
|
||||
PKG_VERSION:=2010-07-29
|
||||
PKG_RELEASE:=1
|
||||
PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources
|
||||
# http://www.orbit-lab.org/kernel/compat-wireless-2.6/2010/11 \
|
||||
# http://wireless.kernel.org/download/compat-wireless-2.6
|
||||
PKG_MD5SUM:=3d465dc6e0213964d0349f61c485817f
|
||||
PKG_MD5SUM:=fcfb757939c4718efbf9c87ca59c6932
|
||||
|
||||
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
|
||||
@ -35,7 +35,7 @@ define KernelPackage/mac80211/Default
|
||||
SUBMENU:=$(WMENU)
|
||||
URL:=http://linuxwireless.org/
|
||||
MAINTAINER:=Felix Fietkau <nbd@openwrt.org>
|
||||
DEPENDS:=@LINUX_2_6 @(!(TARGET_avr32||TARGET_ep93xx||TARGET_ps3||TARGET_pxcab)||BROKEN)
|
||||
DEPENDS:=@!LINUX_2_4 @(!(TARGET_avr32||TARGET_ep93xx||TARGET_ps3||TARGET_pxcab)||BROKEN)
|
||||
endef
|
||||
|
||||
define KernelPackage/cfg80211
|
||||
@ -440,7 +440,26 @@ define Download/usb8388
|
||||
endef
|
||||
$(eval $(call Download,usb8388))
|
||||
|
||||
define KernelPackage/libertas
|
||||
SD8686FW_NAME:=sd8686
|
||||
SD8686FW_VERSION:=9.70.7.p0
|
||||
|
||||
define Download/sd8686
|
||||
URL:=http://dev.laptop.org/pub/firmware/libertas/
|
||||
FILE:=$(SD8686FW_NAME)-$(SD8686FW_VERSION).bin
|
||||
MD5SUM=b4f8be61e19780a14836f146c538c5dd
|
||||
endef
|
||||
$(eval $(call Download,sd8686))
|
||||
|
||||
SD8686HELPER_NAME:=sd8686_helper
|
||||
|
||||
define Download/sd8686_helper
|
||||
URL:=http://dev.laptop.org/pub/firmware/libertas/
|
||||
FILE:=$(SD8686HELPER_NAME).bin
|
||||
MD5SUM=2a4d8f4df198ce949c350df5674f4ac6
|
||||
endef
|
||||
$(eval $(call Download,sd8686_helper))
|
||||
|
||||
define KernelPackage/libertas-usb
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
DEPENDS+= @USB_SUPPORT +kmod-mac80211 +kmod-usb-core +kmod-lib80211
|
||||
TITLE:=Marvell 88W8015 Wireless Driver
|
||||
@ -450,6 +469,15 @@ define KernelPackage/libertas
|
||||
AUTOLOAD:=$(call AutoLoad,27,libertas usb8xxx)
|
||||
endef
|
||||
|
||||
define KernelPackage/libertas-sd
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
DEPENDS+= +kmod-mac80211 +kmod-lib80211
|
||||
TITLE:=Marvell 88W8686 Wireless Driver
|
||||
FILES:= \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas.$(LINUX_KMOD_SUFFIX) \
|
||||
$(PKG_BUILD_DIR)/drivers/net/wireless/libertas/libertas_sdio.$(LINUX_KMOD_SUFFIX)
|
||||
AUTOLOAD:=$(call AutoLoad,27,libertas libertas_sdio)
|
||||
endef
|
||||
|
||||
define KernelPackage/ar9170
|
||||
$(call KernelPackage/mac80211/Default)
|
||||
@ -777,7 +805,7 @@ BUILDFLAGS:= \
|
||||
$(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 \
|
||||
$(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 -DCONFIG_ATH9K_PKTLOG) \
|
||||
-D__CONFIG_MAC80211_RC_DEFAULT=minstrel \
|
||||
-DCONFIG_MAC80211_RC_MINSTREL_HT \
|
||||
$(if $(CONFIG_ATH_USER_REGD),-DATH_USER_REGD=1) \
|
||||
@ -800,7 +828,6 @@ MAKE_OPTS:= \
|
||||
EXTRA_CFLAGS="$(BUILDFLAGS)" \
|
||||
$(foreach opt,$(CONFOPTS),CONFIG_$(opt)=m) \
|
||||
CONFIG_MAC80211=$(if $(CONFIG_PACKAGE_kmod-mac80211),m) \
|
||||
CONFIG_MAC80211_RC_PID=y \
|
||||
CONFIG_MAC80211_RC_MINSTREL=y \
|
||||
CONFIG_MAC80211_LEDS=$(CONFIG_LEDS_TRIGGERS) \
|
||||
CONFIG_MAC80211_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
|
||||
@ -815,6 +842,7 @@ MAKE_OPTS:= \
|
||||
CONFIG_B43LEGACY=$(if $(CONFIG_PACKAGE_kmod-b43legacy),m) \
|
||||
CONFIG_ATH_COMMON=$(if $(CONFIG_PACKAGE_kmod-ath),m) \
|
||||
CONFIG_ATH_DEBUG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \
|
||||
CONFIG_ATH9K_PKTLOG=$(if $(CONFIG_PACKAGE_ATH_DEBUG),y) \
|
||||
CONFIG_ATH5K=$(if $(CONFIG_PACKAGE_kmod-ath5k),m) \
|
||||
CONFIG_ATH9K=$(if $(CONFIG_PACKAGE_kmod-ath9k),m) \
|
||||
CONFIG_ATH9K_DEBUGFS=$(if $(CONFIG_PACKAGE_MAC80211_DEBUGFS),y) \
|
||||
@ -848,11 +876,12 @@ MAKE_OPTS:= \
|
||||
CONFIG_MAC80211_HWSIM=$(if $(CONFIG_PACKAGE_kmod-mac80211-hwsim),m) \
|
||||
CONFIG_PCMCIA= \
|
||||
CONFIG_LIBIPW=$(if $(CONFIG_PACKAGE_kmod-net-libipw),m) \
|
||||
CONFIG_LIBERTAS=$(if $(CONFIG_PACKAGE_kmod-libertas),m) \
|
||||
CONFIG_LIBERTAS=$(if $(CONFIG_PACKAGE_kmod-libertas-sd)$(CONFIG_PACKAGE_kmod-libertas-usb),m) \
|
||||
CONFIG_LIBERTAS_CS= \
|
||||
CONFIG_LIBERTAS_SDIO= \
|
||||
CONFIG_LIBERTAS_SPI= \
|
||||
CONFIG_LIBERTAS_SDIO=$(if $(CONFIG_PACKAGE_kmod-libertas-sd),m) \
|
||||
CONFIG_LIBERTAS_THINFIRM= \
|
||||
CONFIG_LIBERTAS_USB=$(if $(CONFIG_PACKAGE_kmod-libertas),m) \
|
||||
CONFIG_LIBERTAS_USB=$(if $(CONFIG_PACKAGE_kmod-libertas-usb),m) \
|
||||
CONFIG_IPW2100=$(if $(CONFIG_PACKAGE_kmod-net-ipw2100),m) \
|
||||
CONFIG_IPW2200=$(if $(CONFIG_PACKAGE_kmod-net-ipw2200),m) \
|
||||
CONFIG_NL80211=y \
|
||||
@ -924,11 +953,18 @@ define Build/InstallDev
|
||||
$(CP) $(PKG_BUILD_DIR)/drivers/net/wireless/ath/*.h $(1)/usr/include/mac80211/ath/
|
||||
endef
|
||||
|
||||
define KernelPackage/libertas/install
|
||||
define KernelPackage/libertas-usb/install
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
$(INSTALL_DATA) $(DL_DIR)/$(USB8388FW_NAME)-$(USB8388FW_VERSION).bin $(1)/lib/firmware/$(USB8388FW_NAME).bin
|
||||
endef
|
||||
|
||||
define KernelPackage/libertas-sd/install
|
||||
echo "Libertas install: $(CONFIG_PACKAGE_kmod-libertas-sd)"
|
||||
$(INSTALL_DIR) $(1)/lib/firmware
|
||||
$(INSTALL_DATA) $(DL_DIR)/$(SD8686FW_NAME)-$(SD8686FW_VERSION).bin $(1)/lib/firmware/$(SD8686FW_NAME).bin
|
||||
$(INSTALL_DATA) $(DL_DIR)/$(SD8686HELPER_NAME).bin $(1)/lib/firmware/$(SD8686HELPER_NAME).bin
|
||||
endef
|
||||
|
||||
define KernelPackage/cfg80211/install
|
||||
$(INSTALL_DIR) $(1)/lib/wifi
|
||||
$(INSTALL_DATA) ./files/lib/wifi/mac80211.sh $(1)/lib/wifi
|
||||
@ -987,7 +1023,8 @@ endef
|
||||
define Build/b43-common
|
||||
tar xjf "$(DL_DIR)/$(PKG_B43_FWCUTTER_SOURCE)" -C "$(PKG_BUILD_DIR)"
|
||||
$(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" \
|
||||
QUIET_SPARSE=:
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_B43_FWCUTTER_OBJECT)/b43-fwcutter $(STAGING_DIR_HOST)/bin/
|
||||
ifeq ($(CONFIG_B43_OPENFIRMWARE),y)
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin/
|
||||
@ -1032,7 +1069,8 @@ endif
|
||||
endef
|
||||
|
||||
$(eval $(call KernelPackage,ath5k))
|
||||
$(eval $(call KernelPackage,libertas))
|
||||
$(eval $(call KernelPackage,libertas-usb))
|
||||
$(eval $(call KernelPackage,libertas-sd))
|
||||
$(eval $(call KernelPackage,cfg80211))
|
||||
$(eval $(call KernelPackage,mac80211))
|
||||
$(eval $(call KernelPackage,p54-common))
|
||||
|
@ -206,6 +206,8 @@ enable_mac80211() {
|
||||
config_get txpower "$device" txpower
|
||||
config_get country "$device" country
|
||||
config_get distance "$device" distance
|
||||
config_get frag "$device" frag
|
||||
config_get rts "$device" rts
|
||||
find_mac80211_phy "$device" || return 0
|
||||
config_get phy "$device" phy
|
||||
local i=0
|
||||
@ -219,6 +221,8 @@ enable_mac80211() {
|
||||
}
|
||||
|
||||
[ -n "$distance" ] && iw phy "$phy" set distance "$distance"
|
||||
[ -n "$frag" ] && iw phy "$phy" set frag "${frag%%.*}"
|
||||
[ -n "$rts" ] && iw phy "$phy" set rts "${rts%%.*}"
|
||||
|
||||
export channel fixed
|
||||
# convert channel to frequency
|
||||
@ -310,16 +314,6 @@ enable_mac80211() {
|
||||
# wifi-device) if the latter doesn't exist
|
||||
txpower="${txpower:-$vif_txpower}"
|
||||
[ -z "$txpower" ] || iwconfig "$ifname" txpower "${txpower%%.*}"
|
||||
|
||||
config_get frag "$vif" frag
|
||||
if [ -n "$frag" ]; then
|
||||
iw phy "$phy" set frag "${frag%%.*}"
|
||||
fi
|
||||
|
||||
config_get rts "$vif" rts
|
||||
if [ -n "$rts" ]; then
|
||||
iw phy "$phy" set rts "${rts%%.*}"
|
||||
fi
|
||||
done
|
||||
|
||||
local start_hostapd=
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -256,8 +256,8 @@ endif
|
||||
@@ -268,8 +268,8 @@ endif
|
||||
|
||||
CONFIG_P54_PCI=m
|
||||
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
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")
|
||||
@@ -483,8 +483,8 @@ endif
|
||||
@@ -495,8 +495,8 @@ endif
|
||||
# We need the backported rfkill module on kernel < 2.6.31.
|
||||
# In more recent kernel versions use the in kernel rfkill module.
|
||||
ifdef CONFIG_COMPAT_KERNEL_31
|
||||
|
@ -19,7 +19,7 @@
|
||||
else
|
||||
include $(KLIB_BUILD)/.config
|
||||
endif
|
||||
@@ -239,21 +238,6 @@ CONFIG_IPW2200_QOS=y
|
||||
@@ -251,21 +250,6 @@ CONFIG_IPW2200_QOS=y
|
||||
#
|
||||
# % echo 1 > /sys/bus/pci/drivers/ipw2200/*/rtap_iface
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
CONFIG_P54_PCI=m
|
||||
|
||||
# CONFIG_B44=m
|
||||
@@ -413,7 +397,6 @@ endif # end of SPI driver list
|
||||
@@ -429,7 +413,6 @@ endif # end of SPI driver list
|
||||
|
||||
ifneq ($(CONFIG_MMC),)
|
||||
|
||||
|
@ -1,21 +1,25 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -270,10 +270,10 @@ endif
|
||||
@@ -282,13 +282,13 @@ endif
|
||||
CONFIG_MWL8K=m
|
||||
|
||||
# Ethernet drivers go here
|
||||
-CONFIG_ATL1=m
|
||||
-CONFIG_ATL2=m
|
||||
-CONFIG_ATL1E=m
|
||||
-CONFIG_ATL1C=m
|
||||
+# CONFIG_ATL1=m
|
||||
+# CONFIG_ATL2=m
|
||||
+# CONFIG_ATL1E=m
|
||||
ifdef CONFIG_COMPAT_KERNEL_27
|
||||
-CONFIG_ATL1C=n
|
||||
+# CONFIG_ATL1C=n
|
||||
else
|
||||
-CONFIG_ATL1C=m
|
||||
+# CONFIG_ATL1C=m
|
||||
endif
|
||||
|
||||
CONFIG_HERMES=m
|
||||
CONFIG_HERMES_CACHE_FW_ON_INIT=y
|
||||
@@ -326,10 +326,10 @@ CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
|
||||
@@ -342,10 +342,10 @@ CONFIG_USB_NET_COMPAT_RNDIS_HOST=n
|
||||
CONFIG_USB_NET_COMPAT_RNDIS_WLAN=n
|
||||
CONFIG_USB_NET_COMPAT_CDCETHER=n
|
||||
else
|
||||
|
@ -9,7 +9,7 @@
|
||||
else
|
||||
include $(KLIB_BUILD)/.config
|
||||
endif
|
||||
@@ -180,7 +180,7 @@ CONFIG_B43=m
|
||||
@@ -192,7 +192,7 @@ CONFIG_B43=m
|
||||
CONFIG_B43_HWRNG=y
|
||||
CONFIG_B43_PCI_AUTOSELECT=y
|
||||
ifneq ($(CONFIG_PCMCIA),)
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -382,7 +382,7 @@ endif # end of SPI driver list
|
||||
@@ -398,7 +398,7 @@ endif # end of SPI driver list
|
||||
|
||||
ifneq ($(CONFIG_MMC),)
|
||||
|
||||
@ -8,4 +8,4 @@
|
||||
+# CONFIG_B43_SDIO=y
|
||||
CONFIG_WL1251_SDIO=m
|
||||
|
||||
ifneq ($(CONFIG_ARM),)
|
||||
ifndef CONFIG_COMPAT_KERNEL_32
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -184,7 +184,7 @@ ifneq ($(CONFIG_PCMCIA),)
|
||||
@@ -196,7 +196,7 @@ ifneq ($(CONFIG_PCMCIA),)
|
||||
endif
|
||||
CONFIG_B43_LEDS=y
|
||||
CONFIG_B43_PHY_LP=y
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -232,12 +232,12 @@ CONFIG_RTL8180=m
|
||||
@@ -244,12 +244,12 @@ CONFIG_RTL8180=m
|
||||
|
||||
CONFIG_ADM8211=m
|
||||
|
||||
@ -15,9 +15,9 @@
|
||||
# CONFIG_RT2800PCI_RT30XX=y
|
||||
# CONFIG_RT2800PCI_RT35XX=y
|
||||
# CONFIG_RT2800PCI_SOC=y
|
||||
@@ -339,7 +339,7 @@ CONFIG_RT2800USB=m
|
||||
# CONFIG_RT2800USB_RT35XX=y
|
||||
# CONFIG_RT2800USB_UNKNOWN=y
|
||||
@@ -355,7 +355,7 @@ CONFIG_RT2800USB_RT30XX=y
|
||||
CONFIG_RT2800USB_RT35XX=y
|
||||
CONFIG_RT2800USB_UNKNOWN=y
|
||||
endif
|
||||
-CONFIG_RT2X00_LIB_USB=m
|
||||
+# CONFIG_RT2X00_LIB_USB=m
|
||||
|
11
package/mac80211/patches/016-remove_pid_algo.patch
Normal file
11
package/mac80211/patches/016-remove_pid_algo.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/config.mk
|
||||
+++ b/config.mk
|
||||
@@ -112,7 +112,7 @@ CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
|
||||
# This is the one used by our compat-wireless net/mac80211/rate.c
|
||||
# in case you have and old kernel which is overriding this to pid.
|
||||
CONFIG_COMPAT_MAC80211_RC_DEFAULT=minstrel
|
||||
-CONFIG_MAC80211_RC_PID=y
|
||||
+# CONFIG_MAC80211_RC_PID=y
|
||||
CONFIG_MAC80211_RC_MINSTREL=y
|
||||
CONFIG_MAC80211_RC_MINSTREL_HT=y
|
||||
CONFIG_MAC80211_LEDS=y
|
15
package/mac80211/patches/020-wext-fix.patch
Normal file
15
package/mac80211/patches/020-wext-fix.patch
Normal file
@ -0,0 +1,15 @@
|
||||
--- a/scripts/gen-compat-autoconf.sh
|
||||
+++ b/scripts/gen-compat-autoconf.sh
|
||||
@@ -191,10 +191,8 @@ if [ -f $KLIB_BUILD/Makefile ]; then
|
||||
echo CONFIG_NETDEVICES_MULTIQUEUE >> $MULT_DEP_FILE
|
||||
define_config_multiple_deps CONFIG_MAC80211_QOS y $ALL_DEPS
|
||||
rm -f $MULT_DEP_FILE
|
||||
- # Kernels >= 2.6.32 can disable WEXT :D
|
||||
- if [ $SUBLEVEL -le 32 ]; then
|
||||
- define_config_dep CONFIG_CFG80211_WEXT 1 CONFIG_WIRELESS_EXT
|
||||
- fi
|
||||
+ # Up to kernel 2.6.35 we still need the following:
|
||||
+ define_config_dep CONFIG_CFG80211_WEXT 1 CONFIG_WIRELESS_EXT
|
||||
fi
|
||||
fi
|
||||
echo "#endif /* COMPAT_AUTOCONF_INCLUDED */"
|
11
package/mac80211/patches/030-backport_93c86_eeprom.patch
Normal file
11
package/mac80211/patches/030-backport_93c86_eeprom.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- a/include/linux/compat-2.6.36.h
|
||||
+++ b/include/linux/compat-2.6.36.h
|
||||
@@ -8,6 +8,8 @@
|
||||
#define kparam_block_sysfs_write(a)
|
||||
#define kparam_unblock_sysfs_write(a)
|
||||
|
||||
+#define PCI_EEPROM_WIDTH_93C86 8
|
||||
+
|
||||
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,36)) */
|
||||
|
||||
#endif /* LINUX_26_36_COMPAT_H */
|
@ -42,18 +42,16 @@
|
||||
#include <pcmcia/cs.h>
|
||||
--- a/include/linux/compat-2.6.33.h
|
||||
+++ b/include/linux/compat-2.6.33.h
|
||||
@@ -6,8 +6,8 @@
|
||||
@@ -6,7 +6,7 @@
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33))
|
||||
|
||||
#include <linux/skbuff.h>
|
||||
-#if defined(CONFIG_PCCARD) || defined(CONFIG_PCCARD_MODULE)
|
||||
-#if defined(CONFIG_PCMCIA) || defined(CONFIG_PCMCIA_MODULE)
|
||||
+#if 0
|
||||
+#if 0
|
||||
#include <pcmcia/cs_types.h>
|
||||
#include <pcmcia/cistpl.h>
|
||||
#include <pcmcia/ds.h>
|
||||
@@ -67,9 +67,9 @@ static inline struct sk_buff *netdev_all
|
||||
@@ -65,9 +65,9 @@ static inline struct sk_buff *netdev_all
|
||||
return skb;
|
||||
}
|
||||
|
||||
|
@ -11,7 +11,7 @@
|
||||
{
|
||||
--- a/compat/compat-2.6.29.c
|
||||
+++ b/compat/compat-2.6.29.c
|
||||
@@ -50,7 +50,7 @@ void netdev_attach_ops(struct net_device
|
||||
@@ -51,7 +51,7 @@ void netdev_attach_ops(struct net_device
|
||||
EXPORT_SYMBOL(netdev_attach_ops);
|
||||
|
||||
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23))
|
||||
|
61
package/mac80211/patches/120-pm_qos_params.patch
Normal file
61
package/mac80211/patches/120-pm_qos_params.patch
Normal file
@ -0,0 +1,61 @@
|
||||
--- a/drivers/net/wireless/ipw2x00/ipw2100.c
|
||||
+++ b/drivers/net/wireless/ipw2x00/ipw2100.c
|
||||
@@ -174,7 +174,9 @@ that only one external action is invoked
|
||||
#define DRV_DESCRIPTION "Intel(R) PRO/Wireless 2100 Network Driver"
|
||||
#define DRV_COPYRIGHT "Copyright(c) 2003-2006 Intel Corporation"
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
static struct pm_qos_request_list *ipw2100_pm_qos_req;
|
||||
+#endif
|
||||
|
||||
/* Debugging stuff */
|
||||
#ifdef CONFIG_IPW2100_DEBUG
|
||||
@@ -1741,7 +1743,11 @@ static int ipw2100_up(struct ipw2100_pri
|
||||
/* the ipw2100 hardware really doesn't want power management delays
|
||||
* longer than 175usec
|
||||
*/
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
pm_qos_update_request(ipw2100_pm_qos_req, 175);
|
||||
+#else
|
||||
+ pm_qos_update_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100", 175);
|
||||
+#endif
|
||||
|
||||
/* If the interrupt is enabled, turn it off... */
|
||||
spin_lock_irqsave(&priv->low_lock, flags);
|
||||
@@ -1889,7 +1895,12 @@ static void ipw2100_down(struct ipw2100_
|
||||
ipw2100_disable_interrupts(priv);
|
||||
spin_unlock_irqrestore(&priv->low_lock, flags);
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
pm_qos_update_request(ipw2100_pm_qos_req, PM_QOS_DEFAULT_VALUE);
|
||||
+#else
|
||||
+ pm_qos_update_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100",
|
||||
+ PM_QOS_DEFAULT_VALUE);
|
||||
+#endif
|
||||
|
||||
/* We have to signal any supplicant if we are disassociating */
|
||||
if (associated)
|
||||
@@ -6669,7 +6680,11 @@ static int __init ipw2100_init(void)
|
||||
if (ret)
|
||||
goto out;
|
||||
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
ipw2100_pm_qos_req = pm_qos_add_request(PM_QOS_CPU_DMA_LATENCY,
|
||||
+#else
|
||||
+ pm_qos_add_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100",
|
||||
+#endif
|
||||
PM_QOS_DEFAULT_VALUE);
|
||||
#ifdef CONFIG_IPW2100_DEBUG
|
||||
ipw2100_debug_level = debug;
|
||||
@@ -6692,7 +6707,11 @@ static void __exit ipw2100_exit(void)
|
||||
&driver_attr_debug_level);
|
||||
#endif
|
||||
pci_unregister_driver(&ipw2100_pci_driver);
|
||||
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,35))
|
||||
pm_qos_remove_request(ipw2100_pm_qos_req);
|
||||
+#else
|
||||
+ pm_qos_remove_requirement(PM_QOS_CPU_DMA_LATENCY, "ipw2100");
|
||||
+#endif
|
||||
}
|
||||
|
||||
module_init(ipw2100_init);
|
69
package/mac80211/patches/130-printk_debug_revert.patch
Normal file
69
package/mac80211/patches/130-printk_debug_revert.patch
Normal file
@ -0,0 +1,69 @@
|
||||
--- a/include/net/cfg80211.h
|
||||
+++ b/include/net/cfg80211.h
|
||||
@@ -2443,9 +2443,8 @@ void cfg80211_cqm_rssi_notify(struct net
|
||||
wiphy_printk(KERN_NOTICE, wiphy, format, ##args)
|
||||
#define wiphy_info(wiphy, format, args...) \
|
||||
wiphy_printk(KERN_INFO, wiphy, format, ##args)
|
||||
-
|
||||
-int wiphy_debug(const struct wiphy *wiphy, const char *format, ...)
|
||||
- __attribute__ ((format (printf, 2, 3)));
|
||||
+#define wiphy_debug(wiphy, format, args...) \
|
||||
+ wiphy_printk(KERN_DEBUG, wiphy, format, ##args)
|
||||
|
||||
#if defined(DEBUG)
|
||||
#define wiphy_dbg(wiphy, format, args...) \
|
||||
--- a/net/wireless/core.c
|
||||
+++ b/net/wireless/core.c
|
||||
@@ -921,52 +921,3 @@ static void __exit cfg80211_exit(void)
|
||||
destroy_workqueue(cfg80211_wq);
|
||||
}
|
||||
module_exit(cfg80211_exit);
|
||||
-
|
||||
-static int ___wiphy_printk(const char *level, const struct wiphy *wiphy,
|
||||
- struct va_format *vaf)
|
||||
-{
|
||||
- if (!wiphy)
|
||||
- return printk("%s(NULL wiphy *): %pV", level, vaf);
|
||||
-
|
||||
- return printk("%s%s: %pV", level, wiphy_name(wiphy), vaf);
|
||||
-}
|
||||
-
|
||||
-int __wiphy_printk(const char *level, const struct wiphy *wiphy,
|
||||
- const char *fmt, ...)
|
||||
-{
|
||||
- struct va_format vaf;
|
||||
- va_list args;
|
||||
- int r;
|
||||
-
|
||||
- va_start(args, fmt);
|
||||
-
|
||||
- vaf.fmt = fmt;
|
||||
- vaf.va = &args;
|
||||
-
|
||||
- r = ___wiphy_printk(level, wiphy, &vaf);
|
||||
- va_end(args);
|
||||
-
|
||||
- return r;
|
||||
-}
|
||||
-EXPORT_SYMBOL(__wiphy_printk);
|
||||
-
|
||||
-#define define_wiphy_printk_level(func, kern_level) \
|
||||
-int func(const struct wiphy *wiphy, const char *fmt, ...) \
|
||||
-{ \
|
||||
- struct va_format vaf; \
|
||||
- va_list args; \
|
||||
- int r; \
|
||||
- \
|
||||
- va_start(args, fmt); \
|
||||
- \
|
||||
- vaf.fmt = fmt; \
|
||||
- vaf.va = &args; \
|
||||
- \
|
||||
- r = ___wiphy_printk(kern_level, wiphy, &vaf); \
|
||||
- va_end(args); \
|
||||
- \
|
||||
- return r; \
|
||||
-} \
|
||||
-EXPORT_SYMBOL(func);
|
||||
-
|
||||
-define_wiphy_printk_level(wiphy_debug, KERN_DEBUG);
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath5k/reset.c
|
||||
+++ b/drivers/net/wireless/ath/ath5k/reset.c
|
||||
@@ -1374,10 +1374,18 @@ int ath5k_hw_reset(struct ath5k_hw *ah,
|
||||
@@ -1334,10 +1334,18 @@ int ath5k_hw_reset(struct ath5k_hw *ah,
|
||||
* guess we can tweak it and see how it goes ;-)
|
||||
*/
|
||||
if (ah->ah_version != AR5K_AR5210) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
@@ -119,6 +119,9 @@ static void ath_unregister_led(struct at
|
||||
@@ -120,6 +120,9 @@ static void ath_unregister_led(struct at
|
||||
|
||||
void ath_deinit_leds(struct ath_softc *sc)
|
||||
{
|
||||
@ -10,7 +10,7 @@
|
||||
ath_unregister_led(&sc->assoc_led);
|
||||
sc->sc_flags &= ~SC_OP_LED_ASSOCIATED;
|
||||
ath_unregister_led(&sc->tx_led);
|
||||
@@ -132,6 +135,9 @@ void ath_init_leds(struct ath_softc *sc)
|
||||
@@ -133,6 +136,9 @@ void ath_init_leds(struct ath_softc *sc)
|
||||
char *trigger;
|
||||
int ret;
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include <asm/unaligned.h>
|
||||
|
||||
#include "hw.h"
|
||||
@@ -456,8 +457,16 @@ static int ath9k_hw_init_macaddr(struct
|
||||
@@ -451,8 +452,16 @@ static int ath9k_hw_init_macaddr(struct
|
||||
common->macaddr[2 * i] = eeval >> 8;
|
||||
common->macaddr[2 * i + 1] = eeval & 0xff;
|
||||
}
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "ath9k.h"
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(ath_pci_id_table) = {
|
||||
@@ -52,21 +53,36 @@ static void ath_pci_read_cachesize(struc
|
||||
@@ -53,21 +54,36 @@ static void ath_pci_read_cachesize(struc
|
||||
|
||||
static bool ath_pci_eeprom_read(struct ath_common *common, u32 off, u16 *data)
|
||||
{
|
||||
|
@ -10,7 +10,7 @@
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -565,6 +565,7 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -538,6 +538,7 @@ static int ath9k_init_softc(u16 devid, s
|
||||
{
|
||||
struct ath_hw *ah = NULL;
|
||||
struct ath_common *common;
|
||||
@ -18,7 +18,7 @@
|
||||
int ret = 0, i;
|
||||
int csz = 0;
|
||||
|
||||
@@ -576,6 +577,10 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -549,6 +550,10 @@ static int ath9k_init_softc(u16 devid, s
|
||||
ah->hw_version.subsysid = subsysid;
|
||||
sc->sc_ah = ah;
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
common->bus_ops = bus_ops;
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -429,10 +429,6 @@ static void ath9k_hw_init_defaults(struc
|
||||
@@ -422,10 +422,6 @@ static void ath9k_hw_init_defaults(struc
|
||||
ah->hw_version.magic = AR5416_MAGIC;
|
||||
ah->hw_version.subvendorid = 0;
|
||||
|
||||
@ -40,5 +40,5 @@
|
||||
- ah->ah_flags = AH_USE_EEPROM;
|
||||
-
|
||||
ah->atim_window = 0;
|
||||
ah->sta_id1_defaults = AR_STA_ID1_CRPT_MIC_ENABLE;
|
||||
ah->beacon_interval = 100;
|
||||
ah->sta_id1_defaults =
|
||||
AR_STA_ID1_CRPT_MIC_ENABLE |
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include "hw.h"
|
||||
#include "hw-ops.h"
|
||||
#include "rc.h"
|
||||
@@ -441,18 +443,23 @@ static void ath9k_hw_init_defaults(struc
|
||||
@@ -436,18 +438,23 @@ static void ath9k_hw_init_defaults(struc
|
||||
static int ath9k_hw_init_macaddr(struct ath_hw *ah)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -1400,7 +1400,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
@@ -1418,7 +1418,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
|
||||
if (ah->config.rx_intr_mitigation) {
|
||||
REG_RMW_FIELD(ah, AR_RIMT, AR_RIMT_LAST, 500);
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "ath9k.h"
|
||||
|
||||
static char *dev_info = "ath9k";
|
||||
@@ -580,6 +581,8 @@ static int ath9k_init_softc(u16 devid, s
|
||||
@@ -553,6 +554,8 @@ static int ath9k_init_softc(u16 devid, s
|
||||
pdata = (struct ath9k_platform_data *) sc->dev->platform_data;
|
||||
if (!pdata)
|
||||
ah->ah_flags |= AH_USE_EEPROM;
|
||||
@ -17,7 +17,7 @@
|
||||
|
||||
common = ath9k_hw_common(ah);
|
||||
common->ops = &ath9k_common_ops;
|
||||
@@ -702,6 +705,24 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
@@ -675,6 +678,24 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
SET_IEEE80211_PERM_ADDR(hw, common->macaddr);
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
int ath9k_init_device(u16 devid, struct ath_softc *sc, u16 subsysid,
|
||||
const struct ath_bus_ops *bus_ops)
|
||||
{
|
||||
@@ -720,6 +741,9 @@ int ath9k_init_device(u16 devid, struct
|
||||
@@ -693,6 +714,9 @@ int ath9k_init_device(u16 devid, struct
|
||||
common = ath9k_hw_common(ah);
|
||||
ath9k_set_hw_capab(sc, hw);
|
||||
|
||||
@ -54,7 +54,7 @@
|
||||
ath9k_reg_notifier);
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -517,6 +517,8 @@ struct ath_softc {
|
||||
@@ -596,6 +596,8 @@ struct ath_softc {
|
||||
|
||||
int beacon_interval;
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/gpio.c
|
||||
@@ -138,7 +138,9 @@ void ath_init_leds(struct ath_softc *sc)
|
||||
@@ -139,7 +139,9 @@ void ath_init_leds(struct ath_softc *sc)
|
||||
if (AR_SREV_9100(sc->sc_ah))
|
||||
return;
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
sc->sc_ah->led_pin = ATH_LED_PIN_DEF;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -392,6 +392,7 @@ void ath9k_btcoex_timer_pause(struct ath
|
||||
@@ -467,6 +467,7 @@ void ath9k_btcoex_timer_pause(struct ath
|
||||
|
||||
#define ATH_LED_PIN_DEF 1
|
||||
#define ATH_LED_PIN_9287 8
|
||||
|
35
package/mac80211/patches/450-add-ath5k-platform.patch
Normal file
35
package/mac80211/patches/450-add-ath5k-platform.patch
Normal file
@ -0,0 +1,35 @@
|
||||
diff -Nur a/include/linux/ath5k_platform.h b/include/linux/ath5k_platform.h
|
||||
--- a/include/linux/ath5k_platform.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ b/include/linux/ath5k_platform.h 2010-06-21 00:19:52.000000000 +0200
|
||||
@@ -0,0 +1,30 @@
|
||||
+/*
|
||||
+ * Copyright (c) 2008 Atheros Communications Inc.
|
||||
+ * Copyright (c) 2009 Gabor Juhos <juhosg@openwrt.org>
|
||||
+ * Copyright (c) 2009 Imre Kaloz <kaloz@openwrt.org>
|
||||
+ * Copyright (c) 2010 Daniel Golle <daniel.golle@gmail.com>
|
||||
+ *
|
||||
+ * Permission to use, copy, modify, and/or distribute this software for any
|
||||
+ * purpose with or without fee is hereby granted, provided that the above
|
||||
+ * copyright notice and this permission notice appear in all copies.
|
||||
+ *
|
||||
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
+ */
|
||||
+
|
||||
+#ifndef _LINUX_ATH5K_PLATFORM_H
|
||||
+#define _LINUX_ATH5K_PLATFORM_H
|
||||
+
|
||||
+#define ATH5K_PLAT_EEP_MAX_WORDS 2048
|
||||
+
|
||||
+struct ath5k_platform_data {
|
||||
+ u16 *eeprom_data;
|
||||
+ u8 *macaddr;
|
||||
+};
|
||||
+
|
||||
+#endif /* _LINUX_ATH5K_PLATFORM_H */
|
||||
|
@ -0,0 +1,57 @@
|
||||
--- a/drivers/net/wireless/ath/ath5k/eeprom.c 2010-06-23 03:08:32.000000000 +0200
|
||||
+++ b/drivers/net/wireless/ath/ath5k/eeprom.c 2010-06-23 05:59:30.000000000 +0200
|
||||
@@ -22,6 +23,8 @@
|
||||
\*************************************/
|
||||
|
||||
#include <linux/slab.h>
|
||||
+#include <linux/ath5k_platform.h>
|
||||
+#include <linux/pci.h>
|
||||
|
||||
#include "ath5k.h"
|
||||
#include "reg.h"
|
||||
@@ -34,6 +37,18 @@
|
||||
static int ath5k_hw_eeprom_read(struct ath5k_hw *ah, u32 offset, u16 *data)
|
||||
{
|
||||
u32 status, timeout;
|
||||
+ struct ath5k_platform_data *pdata = NULL;
|
||||
+
|
||||
+ if (ah->ah_sc->pdev)
|
||||
+ pdata = ah->ah_sc->pdev->dev.platform_data;
|
||||
+
|
||||
+ if (pdata && pdata->eeprom_data && pdata->eeprom_data[0] == AR5K_EEPROM_MAGIC_VALUE)
|
||||
+ {
|
||||
+ ATH5K_INFO(ah->ah_sc, "using eeprom-content from platform_data\n");
|
||||
+ if (offset >= ATH5K_PLAT_EEP_MAX_WORDS) return -EIO;
|
||||
+ *data = pdata->eeprom_data[offset];
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
/*
|
||||
* Initialize EEPROM access
|
||||
@@ -1788,7 +1802,7 @@
|
||||
}
|
||||
|
||||
/*
|
||||
- * Read the MAC address from eeprom
|
||||
+ * Read the MAC address from eeprom or platform_data
|
||||
*/
|
||||
int ath5k_eeprom_read_mac(struct ath5k_hw *ah, u8 *mac)
|
||||
{
|
||||
@@ -1796,6 +1810,16 @@
|
||||
u32 total, offset;
|
||||
u16 data;
|
||||
int octet, ret;
|
||||
+ struct ath5k_platform_data *pdata = NULL;
|
||||
+
|
||||
+ if (ah->ah_sc->pdev)
|
||||
+ pdata = ah->ah_sc->pdev->dev.platform_data;
|
||||
+
|
||||
+ if (pdata && pdata->macaddr)
|
||||
+ {
|
||||
+ memcpy(mac, pdata->macaddr, ETH_ALEN);
|
||||
+ return 0;
|
||||
+ }
|
||||
|
||||
ret = ath5k_hw_eeprom_read(ah, 0x20, &data);
|
||||
if (ret)
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/init.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/init.c
|
||||
@@ -689,7 +689,11 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
@@ -659,7 +659,11 @@ void ath9k_set_hw_capab(struct ath_softc
|
||||
hw->sta_data_size = sizeof(struct ath_node);
|
||||
hw->vif_data_size = sizeof(struct ath_vif);
|
||||
|
File diff suppressed because it is too large
Load Diff
23
package/mac80211/patches/510-ath9k_handle_keymiss.patch
Normal file
23
package/mac80211/patches/510-ath9k_handle_keymiss.patch
Normal file
@ -0,0 +1,23 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/mac.c
|
||||
@@ -713,6 +713,8 @@ int ath9k_hw_rxprocdesc(struct ath_hw *a
|
||||
rs->rs_status |= ATH9K_RXERR_DECRYPT;
|
||||
else if (ads.ds_rxstatus8 & AR_MichaelErr)
|
||||
rs->rs_status |= ATH9K_RXERR_MIC;
|
||||
+ else if (ads.ds_rxstatus8 & AR_KeyMiss)
|
||||
+ rs->rs_status |= ATH9K_RXERR_DECRYPT;
|
||||
}
|
||||
|
||||
return 0;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_mac.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_mac.c
|
||||
@@ -616,7 +616,8 @@ int ath9k_hw_process_rxdesc_edma(struct
|
||||
rxs->rs_status |= ATH9K_RXERR_DECRYPT;
|
||||
} else if (rxsp->status11 & AR_MichaelErr) {
|
||||
rxs->rs_status |= ATH9K_RXERR_MIC;
|
||||
- }
|
||||
+ } else if (rxsp->status11 & AR_KeyMiss)
|
||||
+ rxs->rs_status |= ATH9K_RXERR_DECRYPT;
|
||||
}
|
||||
|
||||
return 0;
|
@ -1,36 +0,0 @@
|
||||
--- 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;
|
||||
}
|
993
package/mac80211/patches/520-pending_work.patch
Normal file
993
package/mac80211/patches/520-pending_work.patch
Normal file
@ -0,0 +1,993 @@
|
||||
--- a/net/mac80211/main.c
|
||||
+++ b/net/mac80211/main.c
|
||||
@@ -103,11 +103,13 @@ int ieee80211_hw_config(struct ieee80211
|
||||
int ret = 0;
|
||||
int power;
|
||||
enum nl80211_channel_type channel_type;
|
||||
+ u32 offchannel_flag;
|
||||
|
||||
might_sleep();
|
||||
|
||||
scan_chan = local->scan_channel;
|
||||
|
||||
+ offchannel_flag = local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
|
||||
if (scan_chan) {
|
||||
chan = scan_chan;
|
||||
channel_type = NL80211_CHAN_NO_HT;
|
||||
@@ -121,8 +123,9 @@ int ieee80211_hw_config(struct ieee80211
|
||||
channel_type = local->_oper_channel_type;
|
||||
local->hw.conf.flags &= ~IEEE80211_CONF_OFFCHANNEL;
|
||||
}
|
||||
+ offchannel_flag ^= local->hw.conf.flags & IEEE80211_CONF_OFFCHANNEL;
|
||||
|
||||
- if (chan != local->hw.conf.channel ||
|
||||
+ if (offchannel_flag || chan != local->hw.conf.channel ||
|
||||
channel_type != local->hw.conf.channel_type) {
|
||||
local->hw.conf.channel = chan;
|
||||
local->hw.conf.channel_type = channel_type;
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9002_calib.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9002_calib.c
|
||||
@@ -63,6 +63,7 @@ static bool ar9002_hw_per_calibration(st
|
||||
u8 rxchainmask,
|
||||
struct ath9k_cal_list *currCal)
|
||||
{
|
||||
+ struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
bool iscaldone = false;
|
||||
|
||||
if (currCal->calState == CAL_RUNNING) {
|
||||
@@ -81,14 +82,14 @@ static bool ar9002_hw_per_calibration(st
|
||||
}
|
||||
|
||||
currCal->calData->calPostProc(ah, numChains);
|
||||
- ichan->CalValid |= currCal->calData->calType;
|
||||
+ caldata->CalValid |= currCal->calData->calType;
|
||||
currCal->calState = CAL_DONE;
|
||||
iscaldone = true;
|
||||
} else {
|
||||
ar9002_hw_setup_calibration(ah, currCal);
|
||||
}
|
||||
}
|
||||
- } else if (!(ichan->CalValid & currCal->calData->calType)) {
|
||||
+ } else if (!(caldata->CalValid & currCal->calData->calType)) {
|
||||
ath9k_hw_reset_calibration(ah, currCal);
|
||||
}
|
||||
|
||||
@@ -686,8 +687,13 @@ static bool ar9002_hw_calibrate(struct a
|
||||
{
|
||||
bool iscaldone = true;
|
||||
struct ath9k_cal_list *currCal = ah->cal_list_curr;
|
||||
+ bool nfcal, nfcal_pending = false;
|
||||
|
||||
- if (currCal &&
|
||||
+ nfcal = !!(REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF);
|
||||
+ if (ah->caldata)
|
||||
+ nfcal_pending = ah->caldata->nfcal_pending;
|
||||
+
|
||||
+ if (currCal && !nfcal &&
|
||||
(currCal->calState == CAL_RUNNING ||
|
||||
currCal->calState == CAL_WAITING)) {
|
||||
iscaldone = ar9002_hw_per_calibration(ah, chan,
|
||||
@@ -703,7 +709,7 @@ static bool ar9002_hw_calibrate(struct a
|
||||
}
|
||||
|
||||
/* Do NF cal only at longer intervals */
|
||||
- if (longcal) {
|
||||
+ if (longcal || nfcal_pending) {
|
||||
/* Do periodic PAOffset Cal */
|
||||
ar9002_hw_pa_cal(ah, false);
|
||||
ar9002_hw_olc_temp_compensation(ah);
|
||||
@@ -712,16 +718,18 @@ static bool ar9002_hw_calibrate(struct a
|
||||
* Get the value from the previous NF cal and update
|
||||
* history buffer.
|
||||
*/
|
||||
- ath9k_hw_getnf(ah, chan);
|
||||
-
|
||||
- /*
|
||||
- * Load the NF from history buffer of the current channel.
|
||||
- * NF is slow time-variant, so it is OK to use a historical
|
||||
- * value.
|
||||
- */
|
||||
- ath9k_hw_loadnf(ah, ah->curchan);
|
||||
+ if (ath9k_hw_getnf(ah, chan)) {
|
||||
+ /*
|
||||
+ * Load the NF from history buffer of the current
|
||||
+ * channel.
|
||||
+ * NF is slow time-variant, so it is OK to use a
|
||||
+ * historical value.
|
||||
+ */
|
||||
+ ath9k_hw_loadnf(ah, ah->curchan);
|
||||
+ }
|
||||
|
||||
- ath9k_hw_start_nfcal(ah);
|
||||
+ if (longcal)
|
||||
+ ath9k_hw_start_nfcal(ah, false);
|
||||
}
|
||||
|
||||
return iscaldone;
|
||||
@@ -869,8 +877,10 @@ static bool ar9002_hw_init_cal(struct at
|
||||
ar9002_hw_pa_cal(ah, true);
|
||||
|
||||
/* Do NF Calibration after DC offset and other calibrations */
|
||||
- REG_WRITE(ah, AR_PHY_AGC_CONTROL,
|
||||
- REG_READ(ah, AR_PHY_AGC_CONTROL) | AR_PHY_AGC_CONTROL_NF);
|
||||
+ ath9k_hw_start_nfcal(ah, true);
|
||||
+
|
||||
+ if (ah->caldata)
|
||||
+ ah->caldata->nfcal_pending = true;
|
||||
|
||||
ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL;
|
||||
|
||||
@@ -901,7 +911,8 @@ static bool ar9002_hw_init_cal(struct at
|
||||
ath9k_hw_reset_calibration(ah, ah->cal_list_curr);
|
||||
}
|
||||
|
||||
- chan->CalValid = 0;
|
||||
+ if (ah->caldata)
|
||||
+ ah->caldata->CalValid = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_calib.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_calib.c
|
||||
@@ -68,6 +68,7 @@ static bool ar9003_hw_per_calibration(st
|
||||
u8 rxchainmask,
|
||||
struct ath9k_cal_list *currCal)
|
||||
{
|
||||
+ struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
/* Cal is assumed not done until explicitly set below */
|
||||
bool iscaldone = false;
|
||||
|
||||
@@ -95,7 +96,7 @@ static bool ar9003_hw_per_calibration(st
|
||||
currCal->calData->calPostProc(ah, numChains);
|
||||
|
||||
/* Calibration has finished. */
|
||||
- ichan->CalValid |= currCal->calData->calType;
|
||||
+ caldata->CalValid |= currCal->calData->calType;
|
||||
currCal->calState = CAL_DONE;
|
||||
iscaldone = true;
|
||||
} else {
|
||||
@@ -106,7 +107,7 @@ static bool ar9003_hw_per_calibration(st
|
||||
ar9003_hw_setup_calibration(ah, currCal);
|
||||
}
|
||||
}
|
||||
- } else if (!(ichan->CalValid & currCal->calData->calType)) {
|
||||
+ } else if (!(caldata->CalValid & currCal->calData->calType)) {
|
||||
/* If current cal is marked invalid in channel, kick it off */
|
||||
ath9k_hw_reset_calibration(ah, currCal);
|
||||
}
|
||||
@@ -149,6 +150,12 @@ static bool ar9003_hw_calibrate(struct a
|
||||
/* Do NF cal only at longer intervals */
|
||||
if (longcal) {
|
||||
/*
|
||||
+ * Get the value from the previous NF cal and update
|
||||
+ * history buffer.
|
||||
+ */
|
||||
+ ath9k_hw_getnf(ah, chan);
|
||||
+
|
||||
+ /*
|
||||
* Load the NF from history buffer of the current channel.
|
||||
* NF is slow time-variant, so it is OK to use a historical
|
||||
* value.
|
||||
@@ -156,7 +163,7 @@ static bool ar9003_hw_calibrate(struct a
|
||||
ath9k_hw_loadnf(ah, ah->curchan);
|
||||
|
||||
/* start NF calibration, without updating BB NF register */
|
||||
- ath9k_hw_start_nfcal(ah);
|
||||
+ ath9k_hw_start_nfcal(ah, false);
|
||||
}
|
||||
|
||||
return iscaldone;
|
||||
@@ -762,6 +769,8 @@ static bool ar9003_hw_init_cal(struct at
|
||||
/* Revert chainmasks to their original values before NF cal */
|
||||
ar9003_hw_set_chain_masks(ah, ah->rxchainmask, ah->txchainmask);
|
||||
|
||||
+ ath9k_hw_start_nfcal(ah, true);
|
||||
+
|
||||
/* Initialize list pointers */
|
||||
ah->cal_list = ah->cal_list_last = ah->cal_list_curr = NULL;
|
||||
|
||||
@@ -785,7 +794,8 @@ static bool ar9003_hw_init_cal(struct at
|
||||
if (ah->cal_list_curr)
|
||||
ath9k_hw_reset_calibration(ah, ah->cal_list_curr);
|
||||
|
||||
- chan->CalValid = 0;
|
||||
+ if (ah->caldata)
|
||||
+ ah->caldata->CalValid = 0;
|
||||
|
||||
return true;
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_phy.c
|
||||
@@ -542,7 +542,11 @@ static void ar9003_hw_prog_ini(struct at
|
||||
u32 reg = INI_RA(iniArr, i, 0);
|
||||
u32 val = INI_RA(iniArr, i, column);
|
||||
|
||||
- REG_WRITE(ah, reg, val);
|
||||
+ if (reg >= 0x16000 && reg < 0x17000)
|
||||
+ ath9k_hw_analog_shift_regwrite(ah, reg, val);
|
||||
+ else
|
||||
+ REG_WRITE(ah, reg, val);
|
||||
+
|
||||
DO_DELAY(regWrites);
|
||||
}
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/calib.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/calib.c
|
||||
@@ -22,23 +22,6 @@
|
||||
/* We can tune this as we go by monitoring really low values */
|
||||
#define ATH9K_NF_TOO_LOW -60
|
||||
|
||||
-/* AR5416 may return very high value (like -31 dBm), in those cases the nf
|
||||
- * is incorrect and we should use the static NF value. Later we can try to
|
||||
- * find out why they are reporting these values */
|
||||
-
|
||||
-static bool ath9k_hw_nf_in_range(struct ath_hw *ah, s16 nf)
|
||||
-{
|
||||
- if (nf > ATH9K_NF_TOO_LOW) {
|
||||
- ath_print(ath9k_hw_common(ah), ATH_DBG_CALIBRATE,
|
||||
- "noise floor value detected (%d) is "
|
||||
- "lower than what we think is a "
|
||||
- "reasonable value (%d)\n",
|
||||
- nf, ATH9K_NF_TOO_LOW);
|
||||
- return false;
|
||||
- }
|
||||
- return true;
|
||||
-}
|
||||
-
|
||||
static int16_t ath9k_hw_get_nf_hist_mid(int16_t *nfCalBuffer)
|
||||
{
|
||||
int16_t nfval;
|
||||
@@ -121,6 +104,19 @@ void ath9k_hw_reset_calibration(struct a
|
||||
ah->cal_samples = 0;
|
||||
}
|
||||
|
||||
+static s16 ath9k_hw_get_default_nf(struct ath_hw *ah,
|
||||
+ struct ath9k_channel *chan)
|
||||
+{
|
||||
+ struct ath_nf_limits *limit;
|
||||
+
|
||||
+ if (!chan || IS_CHAN_2GHZ(chan))
|
||||
+ limit = &ah->nf_2g;
|
||||
+ else
|
||||
+ limit = &ah->nf_5g;
|
||||
+
|
||||
+ return limit->nominal;
|
||||
+}
|
||||
+
|
||||
/* This is done for the currently configured channel */
|
||||
bool ath9k_hw_reset_calvalid(struct ath_hw *ah)
|
||||
{
|
||||
@@ -128,7 +124,7 @@ bool ath9k_hw_reset_calvalid(struct ath_
|
||||
struct ieee80211_conf *conf = &common->hw->conf;
|
||||
struct ath9k_cal_list *currCal = ah->cal_list_curr;
|
||||
|
||||
- if (!ah->curchan)
|
||||
+ if (!ah->caldata)
|
||||
return true;
|
||||
|
||||
if (!AR_SREV_9100(ah) && !AR_SREV_9160_10_OR_LATER(ah))
|
||||
@@ -151,37 +147,55 @@ bool ath9k_hw_reset_calvalid(struct ath_
|
||||
"Resetting Cal %d state for channel %u\n",
|
||||
currCal->calData->calType, conf->channel->center_freq);
|
||||
|
||||
- ah->curchan->CalValid &= ~currCal->calData->calType;
|
||||
+ ah->caldata->CalValid &= ~currCal->calData->calType;
|
||||
currCal->calState = CAL_WAITING;
|
||||
|
||||
return false;
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_reset_calvalid);
|
||||
|
||||
-void ath9k_hw_start_nfcal(struct ath_hw *ah)
|
||||
+void ath9k_hw_start_nfcal(struct ath_hw *ah, bool update)
|
||||
{
|
||||
+ if (ah->caldata)
|
||||
+ ah->caldata->nfcal_pending = true;
|
||||
+
|
||||
REG_SET_BIT(ah, AR_PHY_AGC_CONTROL,
|
||||
AR_PHY_AGC_CONTROL_ENABLE_NF);
|
||||
- REG_SET_BIT(ah, AR_PHY_AGC_CONTROL,
|
||||
+
|
||||
+ if (update)
|
||||
+ REG_CLR_BIT(ah, AR_PHY_AGC_CONTROL,
|
||||
+ AR_PHY_AGC_CONTROL_NO_UPDATE_NF);
|
||||
+ else
|
||||
+ REG_SET_BIT(ah, AR_PHY_AGC_CONTROL,
|
||||
AR_PHY_AGC_CONTROL_NO_UPDATE_NF);
|
||||
+
|
||||
REG_SET_BIT(ah, AR_PHY_AGC_CONTROL, AR_PHY_AGC_CONTROL_NF);
|
||||
}
|
||||
|
||||
void ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan)
|
||||
{
|
||||
- struct ath9k_nfcal_hist *h;
|
||||
+ struct ath9k_nfcal_hist *h = NULL;
|
||||
unsigned i, j;
|
||||
int32_t val;
|
||||
u8 chainmask = (ah->rxchainmask << 3) | ah->rxchainmask;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
+ s16 default_nf = ath9k_hw_get_default_nf(ah, chan);
|
||||
|
||||
- h = ah->nfCalHist;
|
||||
+ if (ah->caldata)
|
||||
+ h = ah->caldata->nfCalHist;
|
||||
|
||||
for (i = 0; i < NUM_NF_READINGS; i++) {
|
||||
if (chainmask & (1 << i)) {
|
||||
+ s16 nfval;
|
||||
+
|
||||
+ if (h)
|
||||
+ nfval = h[i].privNF;
|
||||
+ else
|
||||
+ nfval = default_nf;
|
||||
+
|
||||
val = REG_READ(ah, ah->nf_regs[i]);
|
||||
val &= 0xFFFFFE00;
|
||||
- val |= (((u32) (h[i].privNF) << 1) & 0x1ff);
|
||||
+ val |= (((u32) nfval << 1) & 0x1ff);
|
||||
REG_WRITE(ah, ah->nf_regs[i], val);
|
||||
}
|
||||
}
|
||||
@@ -277,22 +291,25 @@ static void ath9k_hw_nf_sanitize(struct
|
||||
}
|
||||
}
|
||||
|
||||
-int16_t ath9k_hw_getnf(struct ath_hw *ah,
|
||||
- struct ath9k_channel *chan)
|
||||
+bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
int16_t nf, nfThresh;
|
||||
int16_t nfarray[NUM_NF_READINGS] = { 0 };
|
||||
struct ath9k_nfcal_hist *h;
|
||||
struct ieee80211_channel *c = chan->chan;
|
||||
+ struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
+
|
||||
+ if (!caldata)
|
||||
+ return false;
|
||||
|
||||
chan->channelFlags &= (~CHANNEL_CW_INT);
|
||||
if (REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF) {
|
||||
ath_print(common, ATH_DBG_CALIBRATE,
|
||||
"NF did not complete in calibration window\n");
|
||||
nf = 0;
|
||||
- chan->rawNoiseFloor = nf;
|
||||
- return chan->rawNoiseFloor;
|
||||
+ caldata->rawNoiseFloor = nf;
|
||||
+ return false;
|
||||
} else {
|
||||
ath9k_hw_do_getnf(ah, nfarray);
|
||||
ath9k_hw_nf_sanitize(ah, nfarray);
|
||||
@@ -307,47 +324,40 @@ int16_t ath9k_hw_getnf(struct ath_hw *ah
|
||||
}
|
||||
}
|
||||
|
||||
- h = ah->nfCalHist;
|
||||
-
|
||||
+ h = caldata->nfCalHist;
|
||||
+ caldata->nfcal_pending = false;
|
||||
ath9k_hw_update_nfcal_hist_buffer(h, nfarray);
|
||||
- chan->rawNoiseFloor = h[0].privNF;
|
||||
-
|
||||
- return chan->rawNoiseFloor;
|
||||
+ caldata->rawNoiseFloor = h[0].privNF;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
-void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah)
|
||||
+void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah,
|
||||
+ struct ath9k_channel *chan)
|
||||
{
|
||||
- struct ath_nf_limits *limit;
|
||||
+ struct ath9k_nfcal_hist *h;
|
||||
+ s16 default_nf;
|
||||
int i, j;
|
||||
|
||||
- if (!ah->curchan || IS_CHAN_2GHZ(ah->curchan))
|
||||
- limit = &ah->nf_2g;
|
||||
- else
|
||||
- limit = &ah->nf_5g;
|
||||
+ if (!ah->caldata)
|
||||
+ return;
|
||||
|
||||
+ h = ah->caldata->nfCalHist;
|
||||
+ default_nf = ath9k_hw_get_default_nf(ah, chan);
|
||||
for (i = 0; i < NUM_NF_READINGS; i++) {
|
||||
- ah->nfCalHist[i].currIndex = 0;
|
||||
- ah->nfCalHist[i].privNF = limit->nominal;
|
||||
- ah->nfCalHist[i].invalidNFcount =
|
||||
- AR_PHY_CCA_FILTERWINDOW_LENGTH;
|
||||
+ h[i].currIndex = 0;
|
||||
+ h[i].privNF = default_nf;
|
||||
+ h[i].invalidNFcount = AR_PHY_CCA_FILTERWINDOW_LENGTH;
|
||||
for (j = 0; j < ATH9K_NF_CAL_HIST_MAX; j++) {
|
||||
- ah->nfCalHist[i].nfCalBuffer[j] = limit->nominal;
|
||||
+ h[i].nfCalBuffer[j] = default_nf;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
s16 ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan)
|
||||
{
|
||||
- s16 nf;
|
||||
-
|
||||
- if (chan->rawNoiseFloor == 0)
|
||||
- nf = -96;
|
||||
- else
|
||||
- nf = chan->rawNoiseFloor;
|
||||
-
|
||||
- if (!ath9k_hw_nf_in_range(ah, nf))
|
||||
- nf = ATH_DEFAULT_NOISE_FLOOR;
|
||||
+ if (!ah->caldata || !ah->caldata->rawNoiseFloor)
|
||||
+ return ath9k_hw_get_default_nf(ah, chan);
|
||||
|
||||
- return nf;
|
||||
+ return ah->caldata->rawNoiseFloor;
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_getchan_noise);
|
||||
--- a/drivers/net/wireless/ath/ath9k/calib.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/calib.h
|
||||
@@ -108,11 +108,11 @@ struct ath9k_pacal_info{
|
||||
};
|
||||
|
||||
bool ath9k_hw_reset_calvalid(struct ath_hw *ah);
|
||||
-void ath9k_hw_start_nfcal(struct ath_hw *ah);
|
||||
+void ath9k_hw_start_nfcal(struct ath_hw *ah, bool update);
|
||||
void ath9k_hw_loadnf(struct ath_hw *ah, struct ath9k_channel *chan);
|
||||
-int16_t ath9k_hw_getnf(struct ath_hw *ah,
|
||||
- struct ath9k_channel *chan);
|
||||
-void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah);
|
||||
+bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan);
|
||||
+void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah,
|
||||
+ struct ath9k_channel *chan);
|
||||
s16 ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan);
|
||||
void ath9k_hw_reset_calibration(struct ath_hw *ah,
|
||||
struct ath9k_cal_list *currCal);
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.c
|
||||
@@ -622,7 +622,6 @@ static int __ath9k_hw_init(struct ath_hw
|
||||
else
|
||||
ah->tx_trig_level = (AR_FTRIG_512B >> AR_FTRIG_S);
|
||||
|
||||
- ath9k_init_nfcal_hist_buffer(ah);
|
||||
ah->bb_watchdog_timeout_ms = 25;
|
||||
|
||||
common->state = ATH_HW_INITIALIZED;
|
||||
@@ -1195,9 +1194,6 @@ static bool ath9k_hw_channel_change(stru
|
||||
|
||||
ath9k_hw_spur_mitigate_freq(ah, chan);
|
||||
|
||||
- if (!chan->oneTimeCalsDone)
|
||||
- chan->oneTimeCalsDone = true;
|
||||
-
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1230,7 +1226,7 @@ bool ath9k_hw_check_alive(struct ath_hw
|
||||
EXPORT_SYMBOL(ath9k_hw_check_alive);
|
||||
|
||||
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
|
||||
- bool bChannelChange)
|
||||
+ struct ath9k_hw_cal_data *caldata, bool bChannelChange)
|
||||
{
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
u32 saveLedState;
|
||||
@@ -1255,9 +1251,19 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
if (!ath9k_hw_setpower(ah, ATH9K_PM_AWAKE))
|
||||
return -EIO;
|
||||
|
||||
- if (curchan && !ah->chip_fullsleep)
|
||||
+ if (curchan && !ah->chip_fullsleep && ah->caldata)
|
||||
ath9k_hw_getnf(ah, curchan);
|
||||
|
||||
+ ah->caldata = caldata;
|
||||
+ if (caldata &&
|
||||
+ (chan->channel != caldata->channel ||
|
||||
+ (chan->channelFlags & ~CHANNEL_CW_INT) !=
|
||||
+ (caldata->channelFlags & ~CHANNEL_CW_INT))) {
|
||||
+ /* Operating channel changed, reset channel calibration data */
|
||||
+ memset(caldata, 0, sizeof(*caldata));
|
||||
+ ath9k_init_nfcal_hist_buffer(ah, chan);
|
||||
+ }
|
||||
+
|
||||
if (bChannelChange &&
|
||||
(ah->chip_fullsleep != true) &&
|
||||
(ah->curchan != NULL) &&
|
||||
@@ -1268,7 +1274,7 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
|
||||
if (ath9k_hw_channel_change(ah, chan)) {
|
||||
ath9k_hw_loadnf(ah, ah->curchan);
|
||||
- ath9k_hw_start_nfcal(ah);
|
||||
+ ath9k_hw_start_nfcal(ah, true);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -1473,11 +1479,8 @@ int ath9k_hw_reset(struct ath_hw *ah, st
|
||||
if (ah->btcoex_hw.enabled)
|
||||
ath9k_hw_btcoex_enable(ah);
|
||||
|
||||
- if (AR_SREV_9300_20_OR_LATER(ah)) {
|
||||
- ath9k_hw_loadnf(ah, curchan);
|
||||
- ath9k_hw_start_nfcal(ah);
|
||||
+ if (AR_SREV_9300_20_OR_LATER(ah))
|
||||
ar9003_hw_bb_watchdog_config(ah);
|
||||
- }
|
||||
|
||||
return 0;
|
||||
}
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -155,6 +155,27 @@ void ath9k_ps_restore(struct ath_softc *
|
||||
spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
|
||||
}
|
||||
|
||||
+static void ath_start_ani(struct ath_common *common)
|
||||
+{
|
||||
+ struct ath_hw *ah = common->ah;
|
||||
+ unsigned long timestamp = jiffies_to_msecs(jiffies);
|
||||
+ struct ath_softc *sc = (struct ath_softc *) common->priv;
|
||||
+
|
||||
+ if (!(sc->sc_flags & SC_OP_ANI_RUN))
|
||||
+ return;
|
||||
+
|
||||
+ if (sc->sc_flags & SC_OP_OFFCHANNEL)
|
||||
+ return;
|
||||
+
|
||||
+ common->ani.longcal_timer = timestamp;
|
||||
+ common->ani.shortcal_timer = timestamp;
|
||||
+ common->ani.checkani_timer = timestamp;
|
||||
+
|
||||
+ mod_timer(&common->ani.timer,
|
||||
+ jiffies +
|
||||
+ msecs_to_jiffies((u32)ah->config.ani_poll_interval));
|
||||
+}
|
||||
+
|
||||
/*
|
||||
* Set/change channels. If the channel is really being changed, it's done
|
||||
* by reseting the chip. To accomplish this we must first cleanup any pending
|
||||
@@ -163,16 +184,23 @@ void ath9k_ps_restore(struct ath_softc *
|
||||
int ath_set_channel(struct ath_softc *sc, struct ieee80211_hw *hw,
|
||||
struct ath9k_channel *hchan)
|
||||
{
|
||||
+ struct ath_wiphy *aphy = hw->priv;
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ieee80211_conf *conf = &common->hw->conf;
|
||||
bool fastcc = true, stopped;
|
||||
struct ieee80211_channel *channel = hw->conf.channel;
|
||||
+ struct ath9k_hw_cal_data *caldata = NULL;
|
||||
int r;
|
||||
|
||||
if (sc->sc_flags & SC_OP_INVALID)
|
||||
return -EIO;
|
||||
|
||||
+ del_timer_sync(&common->ani.timer);
|
||||
+ cancel_work_sync(&sc->paprd_work);
|
||||
+ cancel_work_sync(&sc->hw_check_work);
|
||||
+ cancel_delayed_work_sync(&sc->tx_complete_work);
|
||||
+
|
||||
ath9k_ps_wakeup(sc);
|
||||
|
||||
/*
|
||||
@@ -192,9 +220,12 @@ int ath_set_channel(struct ath_softc *sc
|
||||
* to flush data frames already in queue because of
|
||||
* changing channel. */
|
||||
|
||||
- if (!stopped || (sc->sc_flags & SC_OP_FULL_RESET))
|
||||
+ if (!stopped || !(sc->sc_flags & SC_OP_OFFCHANNEL))
|
||||
fastcc = false;
|
||||
|
||||
+ if (!(sc->sc_flags & SC_OP_OFFCHANNEL))
|
||||
+ caldata = &aphy->caldata;
|
||||
+
|
||||
ath_print(common, ATH_DBG_CONFIG,
|
||||
"(%u MHz) -> (%u MHz), conf_is_ht40: %d\n",
|
||||
sc->sc_ah->curchan->channel,
|
||||
@@ -202,7 +233,7 @@ int ath_set_channel(struct ath_softc *sc
|
||||
|
||||
spin_lock_bh(&sc->sc_resetlock);
|
||||
|
||||
- r = ath9k_hw_reset(ah, hchan, fastcc);
|
||||
+ r = ath9k_hw_reset(ah, hchan, caldata, fastcc);
|
||||
if (r) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset channel (%u MHz), "
|
||||
@@ -213,8 +244,6 @@ int ath_set_channel(struct ath_softc *sc
|
||||
}
|
||||
spin_unlock_bh(&sc->sc_resetlock);
|
||||
|
||||
- sc->sc_flags &= ~SC_OP_FULL_RESET;
|
||||
-
|
||||
if (ath_startrecv(sc) != 0) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to restart recv logic\n");
|
||||
@@ -226,6 +255,12 @@ int ath_set_channel(struct ath_softc *sc
|
||||
ath_update_txpow(sc);
|
||||
ath9k_hw_set_interrupts(ah, ah->imask);
|
||||
|
||||
+ if (!(sc->sc_flags & (SC_OP_OFFCHANNEL | SC_OP_SCANNING))) {
|
||||
+ ath_start_ani(common);
|
||||
+ ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0);
|
||||
+ ath_beacon_config(sc, NULL);
|
||||
+ }
|
||||
+
|
||||
ps_restore:
|
||||
ath9k_ps_restore(sc);
|
||||
return r;
|
||||
@@ -234,17 +269,19 @@ int ath_set_channel(struct ath_softc *sc
|
||||
static void ath_paprd_activate(struct ath_softc *sc)
|
||||
{
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
+ struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
int chain;
|
||||
|
||||
- if (!ah->curchan->paprd_done)
|
||||
+ if (!caldata || !caldata->paprd_done)
|
||||
return;
|
||||
|
||||
ath9k_ps_wakeup(sc);
|
||||
+ ar9003_paprd_enable(ah, false);
|
||||
for (chain = 0; chain < AR9300_MAX_CHAINS; chain++) {
|
||||
if (!(ah->caps.tx_chainmask & BIT(chain)))
|
||||
continue;
|
||||
|
||||
- ar9003_paprd_populate_single_table(ah, ah->curchan, chain);
|
||||
+ ar9003_paprd_populate_single_table(ah, caldata, chain);
|
||||
}
|
||||
|
||||
ar9003_paprd_enable(ah, true);
|
||||
@@ -262,6 +299,7 @@ void ath_paprd_calibrate(struct work_str
|
||||
int band = hw->conf.channel->band;
|
||||
struct ieee80211_supported_band *sband = &sc->sbands[band];
|
||||
struct ath_tx_control txctl;
|
||||
+ struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
int qnum, ftype;
|
||||
int chain_ok = 0;
|
||||
int chain;
|
||||
@@ -269,6 +307,9 @@ void ath_paprd_calibrate(struct work_str
|
||||
int time_left;
|
||||
int i;
|
||||
|
||||
+ if (!caldata)
|
||||
+ return;
|
||||
+
|
||||
skb = alloc_skb(len, GFP_KERNEL);
|
||||
if (!skb)
|
||||
return;
|
||||
@@ -323,7 +364,7 @@ void ath_paprd_calibrate(struct work_str
|
||||
if (!ar9003_paprd_is_done(ah))
|
||||
break;
|
||||
|
||||
- if (ar9003_paprd_create_curve(ah, ah->curchan, chain) != 0)
|
||||
+ if (ar9003_paprd_create_curve(ah, caldata, chain) != 0)
|
||||
break;
|
||||
|
||||
chain_ok = 1;
|
||||
@@ -331,7 +372,7 @@ void ath_paprd_calibrate(struct work_str
|
||||
kfree_skb(skb);
|
||||
|
||||
if (chain_ok) {
|
||||
- ah->curchan->paprd_done = true;
|
||||
+ caldata->paprd_done = true;
|
||||
ath_paprd_activate(sc);
|
||||
}
|
||||
|
||||
@@ -440,33 +481,14 @@ set_timer:
|
||||
cal_interval = min(cal_interval, (u32)short_cal_interval);
|
||||
|
||||
mod_timer(&common->ani.timer, jiffies + msecs_to_jiffies(cal_interval));
|
||||
- if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_PAPRD) &&
|
||||
- !(sc->sc_flags & SC_OP_SCANNING)) {
|
||||
- if (!sc->sc_ah->curchan->paprd_done)
|
||||
+ if ((sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_PAPRD) && ah->caldata) {
|
||||
+ if (!ah->caldata->paprd_done)
|
||||
ieee80211_queue_work(sc->hw, &sc->paprd_work);
|
||||
else
|
||||
ath_paprd_activate(sc);
|
||||
}
|
||||
}
|
||||
|
||||
-static void ath_start_ani(struct ath_common *common)
|
||||
-{
|
||||
- struct ath_hw *ah = common->ah;
|
||||
- unsigned long timestamp = jiffies_to_msecs(jiffies);
|
||||
- struct ath_softc *sc = (struct ath_softc *) common->priv;
|
||||
-
|
||||
- if (!(sc->sc_flags & SC_OP_ANI_RUN))
|
||||
- return;
|
||||
-
|
||||
- common->ani.longcal_timer = timestamp;
|
||||
- common->ani.shortcal_timer = timestamp;
|
||||
- common->ani.checkani_timer = timestamp;
|
||||
-
|
||||
- mod_timer(&common->ani.timer,
|
||||
- jiffies +
|
||||
- msecs_to_jiffies((u32)ah->config.ani_poll_interval));
|
||||
-}
|
||||
-
|
||||
/*
|
||||
* Update tx/rx chainmask. For legacy association,
|
||||
* hard code chainmask to 1x1, for 11n association, use
|
||||
@@ -478,7 +500,7 @@ void ath_update_chainmask(struct ath_sof
|
||||
struct ath_hw *ah = sc->sc_ah;
|
||||
struct ath_common *common = ath9k_hw_common(ah);
|
||||
|
||||
- if ((sc->sc_flags & SC_OP_SCANNING) || is_ht ||
|
||||
+ if ((sc->sc_flags & SC_OP_OFFCHANNEL) || is_ht ||
|
||||
(ah->btcoex_hw.scheme != ATH_BTCOEX_CFG_NONE)) {
|
||||
common->tx_chainmask = ah->caps.tx_chainmask;
|
||||
common->rx_chainmask = ah->caps.rx_chainmask;
|
||||
@@ -818,7 +840,7 @@ void ath_radio_enable(struct ath_softc *
|
||||
ah->curchan = ath_get_curchannel(sc, sc->hw);
|
||||
|
||||
spin_lock_bh(&sc->sc_resetlock);
|
||||
- r = ath9k_hw_reset(ah, ah->curchan, false);
|
||||
+ r = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false);
|
||||
if (r) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset channel (%u MHz), "
|
||||
@@ -878,7 +900,7 @@ void ath_radio_disable(struct ath_softc
|
||||
ah->curchan = ath_get_curchannel(sc, hw);
|
||||
|
||||
spin_lock_bh(&sc->sc_resetlock);
|
||||
- r = ath9k_hw_reset(ah, ah->curchan, false);
|
||||
+ r = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false);
|
||||
if (r) {
|
||||
ath_print(ath9k_hw_common(sc->sc_ah), ATH_DBG_FATAL,
|
||||
"Unable to reset channel (%u MHz), "
|
||||
@@ -911,7 +933,7 @@ int ath_reset(struct ath_softc *sc, bool
|
||||
ath_flushrecv(sc);
|
||||
|
||||
spin_lock_bh(&sc->sc_resetlock);
|
||||
- r = ath9k_hw_reset(ah, sc->sc_ah->curchan, false);
|
||||
+ r = ath9k_hw_reset(ah, sc->sc_ah->curchan, ah->caldata, false);
|
||||
if (r)
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset hardware; reset status %d\n", r);
|
||||
@@ -1086,7 +1108,7 @@ static int ath9k_start(struct ieee80211_
|
||||
* and then setup of the interrupt mask.
|
||||
*/
|
||||
spin_lock_bh(&sc->sc_resetlock);
|
||||
- r = ath9k_hw_reset(ah, init_channel, false);
|
||||
+ r = ath9k_hw_reset(ah, init_channel, ah->caldata, false);
|
||||
if (r) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset hardware; reset status %d "
|
||||
@@ -1580,6 +1602,10 @@ static int ath9k_config(struct ieee80211
|
||||
|
||||
aphy->chan_idx = pos;
|
||||
aphy->chan_is_ht = conf_is_ht(conf);
|
||||
+ if (hw->conf.flags & IEEE80211_CONF_OFFCHANNEL)
|
||||
+ sc->sc_flags |= SC_OP_OFFCHANNEL;
|
||||
+ else
|
||||
+ sc->sc_flags &= ~SC_OP_OFFCHANNEL;
|
||||
|
||||
if (aphy->state == ATH_WIPHY_SCAN ||
|
||||
aphy->state == ATH_WIPHY_ACTIVE)
|
||||
@@ -1991,7 +2017,6 @@ static void ath9k_sw_scan_start(struct i
|
||||
{
|
||||
struct ath_wiphy *aphy = hw->priv;
|
||||
struct ath_softc *sc = aphy->sc;
|
||||
- struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
||||
|
||||
mutex_lock(&sc->mutex);
|
||||
if (ath9k_wiphy_scanning(sc)) {
|
||||
@@ -2009,10 +2034,6 @@ static void ath9k_sw_scan_start(struct i
|
||||
aphy->state = ATH_WIPHY_SCAN;
|
||||
ath9k_wiphy_pause_all_forced(sc, aphy);
|
||||
sc->sc_flags |= SC_OP_SCANNING;
|
||||
- del_timer_sync(&common->ani.timer);
|
||||
- cancel_work_sync(&sc->paprd_work);
|
||||
- cancel_work_sync(&sc->hw_check_work);
|
||||
- cancel_delayed_work_sync(&sc->tx_complete_work);
|
||||
mutex_unlock(&sc->mutex);
|
||||
}
|
||||
|
||||
@@ -2024,15 +2045,10 @@ static void ath9k_sw_scan_complete(struc
|
||||
{
|
||||
struct ath_wiphy *aphy = hw->priv;
|
||||
struct ath_softc *sc = aphy->sc;
|
||||
- struct ath_common *common = ath9k_hw_common(sc->sc_ah);
|
||||
|
||||
mutex_lock(&sc->mutex);
|
||||
aphy->state = ATH_WIPHY_ACTIVE;
|
||||
sc->sc_flags &= ~SC_OP_SCANNING;
|
||||
- sc->sc_flags |= SC_OP_FULL_RESET;
|
||||
- ath_start_ani(common);
|
||||
- ieee80211_queue_delayed_work(sc->hw, &sc->tx_complete_work, 0);
|
||||
- ath_beacon_config(sc, NULL);
|
||||
mutex_unlock(&sc->mutex);
|
||||
}
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ar9003_paprd.c
|
||||
@@ -577,10 +577,11 @@ static bool create_pa_curve(u32 *data_L,
|
||||
}
|
||||
|
||||
void ar9003_paprd_populate_single_table(struct ath_hw *ah,
|
||||
- struct ath9k_channel *chan, int chain)
|
||||
+ struct ath9k_hw_cal_data *caldata,
|
||||
+ int chain)
|
||||
{
|
||||
- u32 *paprd_table_val = chan->pa_table[chain];
|
||||
- u32 small_signal_gain = chan->small_signal_gain[chain];
|
||||
+ u32 *paprd_table_val = caldata->pa_table[chain];
|
||||
+ u32 small_signal_gain = caldata->small_signal_gain[chain];
|
||||
u32 training_power;
|
||||
u32 reg = 0;
|
||||
int i;
|
||||
@@ -654,17 +655,17 @@ int ar9003_paprd_setup_gain_table(struct
|
||||
}
|
||||
EXPORT_SYMBOL(ar9003_paprd_setup_gain_table);
|
||||
|
||||
-int ar9003_paprd_create_curve(struct ath_hw *ah, struct ath9k_channel *chan,
|
||||
- int chain)
|
||||
+int ar9003_paprd_create_curve(struct ath_hw *ah,
|
||||
+ struct ath9k_hw_cal_data *caldata, int chain)
|
||||
{
|
||||
- u16 *small_signal_gain = &chan->small_signal_gain[chain];
|
||||
- u32 *pa_table = chan->pa_table[chain];
|
||||
+ u16 *small_signal_gain = &caldata->small_signal_gain[chain];
|
||||
+ u32 *pa_table = caldata->pa_table[chain];
|
||||
u32 *data_L, *data_U;
|
||||
int i, status = 0;
|
||||
u32 *buf;
|
||||
u32 reg;
|
||||
|
||||
- memset(chan->pa_table[chain], 0, sizeof(chan->pa_table[chain]));
|
||||
+ memset(caldata->pa_table[chain], 0, sizeof(caldata->pa_table[chain]));
|
||||
|
||||
buf = kmalloc(2 * 48 * sizeof(u32), GFP_ATOMIC);
|
||||
if (!buf)
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -511,7 +511,7 @@ void ath_deinit_leds(struct ath_softc *s
|
||||
#define SC_OP_BEACONS BIT(1)
|
||||
#define SC_OP_RXAGGR BIT(2)
|
||||
#define SC_OP_TXAGGR BIT(3)
|
||||
-#define SC_OP_FULL_RESET BIT(4)
|
||||
+#define SC_OP_OFFCHANNEL BIT(4)
|
||||
#define SC_OP_PREAMBLE_SHORT BIT(5)
|
||||
#define SC_OP_PROTECT_ENABLE BIT(6)
|
||||
#define SC_OP_RXFLUSH BIT(7)
|
||||
@@ -612,6 +612,7 @@ struct ath_softc {
|
||||
struct ath_wiphy {
|
||||
struct ath_softc *sc; /* shared for all virtual wiphys */
|
||||
struct ieee80211_hw *hw;
|
||||
+ struct ath9k_hw_cal_data caldata;
|
||||
enum ath_wiphy_state {
|
||||
ATH_WIPHY_INACTIVE,
|
||||
ATH_WIPHY_ACTIVE,
|
||||
--- a/drivers/net/wireless/ath/ath9k/htc.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/htc.h
|
||||
@@ -353,6 +353,8 @@ struct ath9k_htc_priv {
|
||||
u16 seq_no;
|
||||
u32 bmiss_cnt;
|
||||
|
||||
+ struct ath9k_hw_cal_data caldata[38];
|
||||
+
|
||||
spinlock_t beacon_lock;
|
||||
|
||||
bool tx_queues_stop;
|
||||
--- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c
|
||||
@@ -125,6 +125,7 @@ static int ath9k_htc_set_channel(struct
|
||||
struct ieee80211_conf *conf = &common->hw->conf;
|
||||
bool fastcc = true;
|
||||
struct ieee80211_channel *channel = hw->conf.channel;
|
||||
+ struct ath9k_hw_cal_data *caldata;
|
||||
enum htc_phymode mode;
|
||||
__be16 htc_mode;
|
||||
u8 cmd_rsp;
|
||||
@@ -149,7 +150,8 @@ static int ath9k_htc_set_channel(struct
|
||||
priv->ah->curchan->channel,
|
||||
channel->center_freq, conf_is_ht(conf), conf_is_ht40(conf));
|
||||
|
||||
- ret = ath9k_hw_reset(ah, hchan, fastcc);
|
||||
+ caldata = &priv->caldata[channel->hw_value];
|
||||
+ ret = ath9k_hw_reset(ah, hchan, caldata, fastcc);
|
||||
if (ret) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset channel (%u Mhz) "
|
||||
@@ -1028,7 +1030,7 @@ static void ath9k_htc_radio_enable(struc
|
||||
ah->curchan = ath9k_cmn_get_curchannel(hw, ah);
|
||||
|
||||
/* Reset the HW */
|
||||
- ret = ath9k_hw_reset(ah, ah->curchan, false);
|
||||
+ ret = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false);
|
||||
if (ret) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset hardware; reset status %d "
|
||||
@@ -1091,7 +1093,7 @@ static void ath9k_htc_radio_disable(stru
|
||||
ah->curchan = ath9k_cmn_get_curchannel(hw, ah);
|
||||
|
||||
/* Reset the HW */
|
||||
- ret = ath9k_hw_reset(ah, ah->curchan, false);
|
||||
+ ret = ath9k_hw_reset(ah, ah->curchan, ah->caldata, false);
|
||||
if (ret) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset hardware; reset status %d "
|
||||
@@ -1179,7 +1181,7 @@ static int ath9k_htc_start(struct ieee80
|
||||
ath9k_hw_configpcipowersave(ah, 0, 0);
|
||||
|
||||
ath9k_hw_htc_resetinit(ah);
|
||||
- ret = ath9k_hw_reset(ah, init_channel, false);
|
||||
+ ret = ath9k_hw_reset(ah, init_channel, ah->caldata, false);
|
||||
if (ret) {
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset hardware; reset status %d "
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -346,19 +346,25 @@ enum ath9k_int {
|
||||
CHANNEL_HT40PLUS | \
|
||||
CHANNEL_HT40MINUS)
|
||||
|
||||
-struct ath9k_channel {
|
||||
- struct ieee80211_channel *chan;
|
||||
+struct ath9k_hw_cal_data {
|
||||
u16 channel;
|
||||
u32 channelFlags;
|
||||
- u32 chanmode;
|
||||
int32_t CalValid;
|
||||
- bool oneTimeCalsDone;
|
||||
int8_t iCoff;
|
||||
int8_t qCoff;
|
||||
int16_t rawNoiseFloor;
|
||||
bool paprd_done;
|
||||
+ bool nfcal_pending;
|
||||
u16 small_signal_gain[AR9300_MAX_CHAINS];
|
||||
u32 pa_table[AR9300_MAX_CHAINS][PAPRD_TABLE_SZ];
|
||||
+ struct ath9k_nfcal_hist nfCalHist[NUM_NF_READINGS];
|
||||
+};
|
||||
+
|
||||
+struct ath9k_channel {
|
||||
+ struct ieee80211_channel *chan;
|
||||
+ u16 channel;
|
||||
+ u32 channelFlags;
|
||||
+ u32 chanmode;
|
||||
};
|
||||
|
||||
#define IS_CHAN_G(_c) ((((_c)->channelFlags & (CHANNEL_G)) == CHANNEL_G) || \
|
||||
@@ -669,7 +675,7 @@ struct ath_hw {
|
||||
enum nl80211_iftype opmode;
|
||||
enum ath9k_power_mode power_mode;
|
||||
|
||||
- struct ath9k_nfcal_hist nfCalHist[NUM_NF_READINGS];
|
||||
+ struct ath9k_hw_cal_data *caldata;
|
||||
struct ath9k_pacal_info pacal_info;
|
||||
struct ar5416Stats stats;
|
||||
struct ath9k_tx_queue_info txq[ATH9K_NUM_TX_QUEUES];
|
||||
@@ -863,7 +869,7 @@ const char *ath9k_hw_probe(u16 vendorid,
|
||||
void ath9k_hw_deinit(struct ath_hw *ah);
|
||||
int ath9k_hw_init(struct ath_hw *ah);
|
||||
int ath9k_hw_reset(struct ath_hw *ah, struct ath9k_channel *chan,
|
||||
- bool bChannelChange);
|
||||
+ struct ath9k_hw_cal_data *caldata, bool bChannelChange);
|
||||
int ath9k_hw_fill_cap_info(struct ath_hw *ah);
|
||||
u32 ath9k_regd_get_ctl(struct ath_regulatory *reg, struct ath9k_channel *chan);
|
||||
|
||||
@@ -958,9 +964,10 @@ void ar9003_hw_bb_watchdog_read(struct a
|
||||
void ar9003_hw_bb_watchdog_dbg_info(struct ath_hw *ah);
|
||||
void ar9003_paprd_enable(struct ath_hw *ah, bool val);
|
||||
void ar9003_paprd_populate_single_table(struct ath_hw *ah,
|
||||
- struct ath9k_channel *chan, int chain);
|
||||
-int ar9003_paprd_create_curve(struct ath_hw *ah, struct ath9k_channel *chan,
|
||||
- int chain);
|
||||
+ struct ath9k_hw_cal_data *caldata,
|
||||
+ int chain);
|
||||
+int ar9003_paprd_create_curve(struct ath_hw *ah,
|
||||
+ struct ath9k_hw_cal_data *caldata, int chain);
|
||||
int ar9003_paprd_setup_gain_table(struct ath_hw *ah, int chain);
|
||||
int ar9003_paprd_init_table(struct ath_hw *ah);
|
||||
bool ar9003_paprd_is_done(struct ath_hw *ah);
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -1181,7 +1181,7 @@ void ath_drain_all_txq(struct ath_softc
|
||||
"Failed to stop TX DMA. Resetting hardware!\n");
|
||||
|
||||
spin_lock_bh(&sc->sc_resetlock);
|
||||
- r = ath9k_hw_reset(ah, sc->sc_ah->curchan, false);
|
||||
+ r = ath9k_hw_reset(ah, sc->sc_ah->curchan, ah->caldata, false);
|
||||
if (r)
|
||||
ath_print(common, ATH_DBG_FATAL,
|
||||
"Unable to reset hardware; reset status %d\n",
|
@ -1,72 +0,0 @@
|
||||
--- 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);
|
@ -1,255 +0,0 @@
|
||||
--- 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;
|
72
package/mac80211/patches/530-ath9k_aggr_state_fix.patch
Normal file
72
package/mac80211/patches/530-ath9k_aggr_state_fix.patch
Normal file
@ -0,0 +1,72 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/xmit.c
|
||||
@@ -120,26 +120,14 @@ static void ath_tx_queue_tid(struct ath_
|
||||
list_add_tail(&ac->list, &txq->axq_acq);
|
||||
}
|
||||
|
||||
-static void ath_tx_pause_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
|
||||
-{
|
||||
- struct ath_txq *txq = &sc->tx.txq[tid->ac->qnum];
|
||||
-
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
- tid->paused++;
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
-}
|
||||
-
|
||||
static void ath_tx_resume_tid(struct ath_softc *sc, struct ath_atx_tid *tid)
|
||||
{
|
||||
struct ath_txq *txq = &sc->tx.txq[tid->ac->qnum];
|
||||
|
||||
- BUG_ON(tid->paused <= 0);
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
-
|
||||
- tid->paused--;
|
||||
+ WARN_ON(!tid->paused);
|
||||
|
||||
- if (tid->paused > 0)
|
||||
- goto unlock;
|
||||
+ spin_lock_bh(&txq->axq_lock);
|
||||
+ tid->paused = false;
|
||||
|
||||
if (list_empty(&tid->buf_q))
|
||||
goto unlock;
|
||||
@@ -157,15 +145,10 @@ static void ath_tx_flush_tid(struct ath_
|
||||
struct list_head bf_head;
|
||||
INIT_LIST_HEAD(&bf_head);
|
||||
|
||||
- BUG_ON(tid->paused <= 0);
|
||||
- spin_lock_bh(&txq->axq_lock);
|
||||
+ WARN_ON(!tid->paused);
|
||||
|
||||
- tid->paused--;
|
||||
-
|
||||
- if (tid->paused > 0) {
|
||||
- spin_unlock_bh(&txq->axq_lock);
|
||||
- return;
|
||||
- }
|
||||
+ spin_lock_bh(&txq->axq_lock);
|
||||
+ tid->paused = false;
|
||||
|
||||
while (!list_empty(&tid->buf_q)) {
|
||||
bf = list_first_entry(&tid->buf_q, struct ath_buf, list);
|
||||
@@ -811,7 +794,7 @@ void ath_tx_aggr_start(struct ath_softc
|
||||
an = (struct ath_node *)sta->drv_priv;
|
||||
txtid = ATH_AN_2_TID(an, tid);
|
||||
txtid->state |= AGGR_ADDBA_PROGRESS;
|
||||
- ath_tx_pause_tid(sc, txtid);
|
||||
+ txtid->paused = true;
|
||||
*ssn = txtid->seq_start;
|
||||
}
|
||||
|
||||
@@ -835,10 +818,9 @@ void ath_tx_aggr_stop(struct ath_softc *
|
||||
return;
|
||||
}
|
||||
|
||||
- ath_tx_pause_tid(sc, txtid);
|
||||
-
|
||||
/* drop all software retried frames and mark this TID */
|
||||
spin_lock_bh(&txq->axq_lock);
|
||||
+ txtid->paused = true;
|
||||
while (!list_empty(&txtid->buf_q)) {
|
||||
bf = list_first_entry(&txtid->buf_q, struct ath_buf, list);
|
||||
if (!bf_isretried(bf)) {
|
43
package/mac80211/patches/540-ath9k_bstuck_debug.patch
Normal file
43
package/mac80211/patches/540-ath9k_bstuck_debug.patch
Normal file
@ -0,0 +1,43 @@
|
||||
--- a/drivers/net/wireless/ath/debug.h
|
||||
+++ b/drivers/net/wireless/ath/debug.h
|
||||
@@ -36,6 +36,7 @@
|
||||
* @ATH_DBG_PS: power save processing
|
||||
* @ATH_DBG_HWTIMER: hardware timer handling
|
||||
* @ATH_DBG_BTCOEX: bluetooth coexistance
|
||||
+ * @ATH_DBG_BSTUCK: stuck beacons
|
||||
* @ATH_DBG_ANY: enable all debugging
|
||||
*
|
||||
* The debug level is used to control the amount and type of debugging output
|
||||
@@ -60,6 +61,7 @@ enum ATH_DEBUG {
|
||||
ATH_DBG_HWTIMER = 0x00001000,
|
||||
ATH_DBG_BTCOEX = 0x00002000,
|
||||
ATH_DBG_WMI = 0x00004000,
|
||||
+ ATH_DBG_BSTUCK = 0x00008000,
|
||||
ATH_DBG_ANY = 0xffffffff
|
||||
};
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/beacon.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
|
||||
@@ -359,11 +359,11 @@ void ath_beacon_tasklet(unsigned long da
|
||||
sc->beacon.bmisscnt++;
|
||||
|
||||
if (sc->beacon.bmisscnt < BSTUCK_THRESH) {
|
||||
- ath_print(common, ATH_DBG_BEACON,
|
||||
+ ath_print(common, ATH_DBG_BSTUCK,
|
||||
"missed %u consecutive beacons\n",
|
||||
sc->beacon.bmisscnt);
|
||||
} else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) {
|
||||
- ath_print(common, ATH_DBG_BEACON,
|
||||
+ ath_print(common, ATH_DBG_BSTUCK,
|
||||
"beacon is officially stuck\n");
|
||||
sc->sc_flags |= SC_OP_TSF_RESET;
|
||||
ath_reset(sc, false);
|
||||
@@ -373,7 +373,7 @@ void ath_beacon_tasklet(unsigned long da
|
||||
}
|
||||
|
||||
if (sc->beacon.bmisscnt != 0) {
|
||||
- ath_print(common, ATH_DBG_BEACON,
|
||||
+ ath_print(common, ATH_DBG_BSTUCK,
|
||||
"resume beacon xmit after %u misses\n",
|
||||
sc->beacon.bmisscnt);
|
||||
sc->beacon.bmisscnt = 0;
|
101
package/mac80211/patches/541-ath9k_nf_validate.patch
Normal file
101
package/mac80211/patches/541-ath9k_nf_validate.patch
Normal file
@ -0,0 +1,101 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/calib.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/calib.c
|
||||
@@ -19,8 +19,7 @@
|
||||
|
||||
/* Common calibration code */
|
||||
|
||||
-/* We can tune this as we go by monitoring really low values */
|
||||
-#define ATH9K_NF_TOO_LOW -60
|
||||
+#define ATH9K_NF_TOO_HIGH -60
|
||||
|
||||
static int16_t ath9k_hw_get_nf_hist_mid(int16_t *nfCalBuffer)
|
||||
{
|
||||
@@ -45,11 +44,35 @@ static int16_t ath9k_hw_get_nf_hist_mid(
|
||||
return nfval;
|
||||
}
|
||||
|
||||
-static void ath9k_hw_update_nfcal_hist_buffer(struct ath9k_nfcal_hist *h,
|
||||
+static struct ath_nf_limits *ath9k_hw_get_nf_limits(struct ath_hw *ah,
|
||||
+ struct ath9k_channel *chan)
|
||||
+{
|
||||
+ struct ath_nf_limits *limit;
|
||||
+
|
||||
+ if (!chan || IS_CHAN_2GHZ(chan))
|
||||
+ limit = &ah->nf_2g;
|
||||
+ else
|
||||
+ limit = &ah->nf_5g;
|
||||
+
|
||||
+ return limit;
|
||||
+}
|
||||
+
|
||||
+static s16 ath9k_hw_get_default_nf(struct ath_hw *ah,
|
||||
+ struct ath9k_channel *chan)
|
||||
+{
|
||||
+ return ath9k_hw_get_nf_limits(ah, chan)->nominal;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+static void ath9k_hw_update_nfcal_hist_buffer(struct ath_hw *ah,
|
||||
+ struct ath9k_nfcal_hist *h,
|
||||
int16_t *nfarray)
|
||||
{
|
||||
+ struct ath_nf_limits *limit;
|
||||
int i;
|
||||
|
||||
+ limit = ath9k_hw_get_nf_limits(ah, ah->curchan);
|
||||
+
|
||||
for (i = 0; i < NUM_NF_READINGS; i++) {
|
||||
h[i].nfCalBuffer[h[i].currIndex] = nfarray[i];
|
||||
|
||||
@@ -63,6 +86,9 @@ static void ath9k_hw_update_nfcal_hist_b
|
||||
h[i].privNF =
|
||||
ath9k_hw_get_nf_hist_mid(h[i].nfCalBuffer);
|
||||
}
|
||||
+
|
||||
+ if (h[i].privNF > limit->max)
|
||||
+ h[i].privNF = limit->max;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -104,19 +130,6 @@ void ath9k_hw_reset_calibration(struct a
|
||||
ah->cal_samples = 0;
|
||||
}
|
||||
|
||||
-static s16 ath9k_hw_get_default_nf(struct ath_hw *ah,
|
||||
- struct ath9k_channel *chan)
|
||||
-{
|
||||
- struct ath_nf_limits *limit;
|
||||
-
|
||||
- if (!chan || IS_CHAN_2GHZ(chan))
|
||||
- limit = &ah->nf_2g;
|
||||
- else
|
||||
- limit = &ah->nf_5g;
|
||||
-
|
||||
- return limit->nominal;
|
||||
-}
|
||||
-
|
||||
/* This is done for the currently configured channel */
|
||||
bool ath9k_hw_reset_calvalid(struct ath_hw *ah)
|
||||
{
|
||||
@@ -277,10 +290,10 @@ static void ath9k_hw_nf_sanitize(struct
|
||||
"NF calibrated [%s] [chain %d] is %d\n",
|
||||
(i >= 3 ? "ext" : "ctl"), i % 3, nf[i]);
|
||||
|
||||
- if (nf[i] > limit->max) {
|
||||
+ if (nf[i] > ATH9K_NF_TOO_HIGH) {
|
||||
ath_print(common, ATH_DBG_CALIBRATE,
|
||||
"NF[%d] (%d) > MAX (%d), correcting to MAX",
|
||||
- i, nf[i], limit->max);
|
||||
+ i, nf[i], ATH9K_NF_TOO_HIGH);
|
||||
nf[i] = limit->max;
|
||||
} else if (nf[i] < limit->min) {
|
||||
ath_print(common, ATH_DBG_CALIBRATE,
|
||||
@@ -326,7 +339,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, s
|
||||
|
||||
h = caldata->nfCalHist;
|
||||
caldata->nfcal_pending = false;
|
||||
- ath9k_hw_update_nfcal_hist_buffer(h, nfarray);
|
||||
+ ath9k_hw_update_nfcal_hist_buffer(ah, h, nfarray);
|
||||
caldata->rawNoiseFloor = h[0].privNF;
|
||||
return true;
|
||||
}
|
129
package/mac80211/patches/542-ath9k_bstuck_nf_calibrate.patch
Normal file
129
package/mac80211/patches/542-ath9k_bstuck_nf_calibrate.patch
Normal file
@ -0,0 +1,129 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/beacon.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/beacon.c
|
||||
@@ -362,6 +362,7 @@ void ath_beacon_tasklet(unsigned long da
|
||||
ath_print(common, ATH_DBG_BSTUCK,
|
||||
"missed %u consecutive beacons\n",
|
||||
sc->beacon.bmisscnt);
|
||||
+ ath9k_hw_bstuck_nfcal(ah);
|
||||
} else if (sc->beacon.bmisscnt >= BSTUCK_THRESH) {
|
||||
ath_print(common, ATH_DBG_BSTUCK,
|
||||
"beacon is officially stuck\n");
|
||||
--- a/drivers/net/wireless/ath/ath9k/calib.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/calib.c
|
||||
@@ -65,12 +65,16 @@ static s16 ath9k_hw_get_default_nf(struc
|
||||
|
||||
|
||||
static void ath9k_hw_update_nfcal_hist_buffer(struct ath_hw *ah,
|
||||
- struct ath9k_nfcal_hist *h,
|
||||
+ struct ath9k_hw_cal_data *cal,
|
||||
int16_t *nfarray)
|
||||
{
|
||||
+ struct ath_common *common = ath9k_hw_common(ah);
|
||||
struct ath_nf_limits *limit;
|
||||
+ struct ath9k_nfcal_hist *h;
|
||||
+ bool high_nf_mid = false;
|
||||
int i;
|
||||
|
||||
+ h = cal->nfCalHist;
|
||||
limit = ath9k_hw_get_nf_limits(ah, ah->curchan);
|
||||
|
||||
for (i = 0; i < NUM_NF_READINGS; i++) {
|
||||
@@ -87,9 +91,38 @@ static void ath9k_hw_update_nfcal_hist_b
|
||||
ath9k_hw_get_nf_hist_mid(h[i].nfCalBuffer);
|
||||
}
|
||||
|
||||
- if (h[i].privNF > limit->max)
|
||||
- h[i].privNF = limit->max;
|
||||
+ if (!h[i].privNF)
|
||||
+ continue;
|
||||
+
|
||||
+ if (h[i].privNF > limit->max) {
|
||||
+ high_nf_mid = true;
|
||||
+
|
||||
+ ath_print(common, ATH_DBG_CALIBRATE,
|
||||
+ "NFmid[%d] (%d) > MAX (%d), %s\n",
|
||||
+ i, h[i].privNF, limit->max,
|
||||
+ (cal->nfcal_interference ?
|
||||
+ "not corrected (due to interference)" :
|
||||
+ "correcting to MAX"));
|
||||
+
|
||||
+ /*
|
||||
+ * Normally we limit the average noise floor by the
|
||||
+ * hardware specific maximum here. However if we have
|
||||
+ * encountered stuck beacons because of interference,
|
||||
+ * we bypass this limit here in order to better deal
|
||||
+ * with our environment.
|
||||
+ */
|
||||
+ if (!cal->nfcal_interference)
|
||||
+ h[i].privNF = limit->max;
|
||||
+ }
|
||||
}
|
||||
+
|
||||
+ /*
|
||||
+ * If the noise floor seems normal for all chains, assume that
|
||||
+ * there is no significant interference in the environment anymore.
|
||||
+ * Re-enable the enforcement of the NF maximum again.
|
||||
+ */
|
||||
+ if (!high_nf_mid)
|
||||
+ cal->nfcal_interference = false;
|
||||
}
|
||||
|
||||
static bool ath9k_hw_get_nf_thresh(struct ath_hw *ah,
|
||||
@@ -339,7 +372,7 @@ bool ath9k_hw_getnf(struct ath_hw *ah, s
|
||||
|
||||
h = caldata->nfCalHist;
|
||||
caldata->nfcal_pending = false;
|
||||
- ath9k_hw_update_nfcal_hist_buffer(ah, h, nfarray);
|
||||
+ ath9k_hw_update_nfcal_hist_buffer(ah, caldata, nfarray);
|
||||
caldata->rawNoiseFloor = h[0].privNF;
|
||||
return true;
|
||||
}
|
||||
@@ -374,3 +407,28 @@ s16 ath9k_hw_getchan_noise(struct ath_hw
|
||||
return ah->caldata->rawNoiseFloor;
|
||||
}
|
||||
EXPORT_SYMBOL(ath9k_hw_getchan_noise);
|
||||
+
|
||||
+void ath9k_hw_bstuck_nfcal(struct ath_hw *ah)
|
||||
+{
|
||||
+ struct ath9k_hw_cal_data *caldata = ah->caldata;
|
||||
+
|
||||
+ if (unlikely(!caldata))
|
||||
+ return;
|
||||
+
|
||||
+ /*
|
||||
+ * If beacons are stuck, the most likely cause is interference.
|
||||
+ * Triggering a noise floor calibration at this point helps the
|
||||
+ * hardware adapt to a noisy environment much faster.
|
||||
+ * To ensure that we recover from stuck beacons quickly, let
|
||||
+ * the baseband update the internal NF value itself, similar to
|
||||
+ * what is being done after a full reset.
|
||||
+ */
|
||||
+ if (!caldata->nfcal_pending)
|
||||
+ ath9k_hw_start_nfcal(ah, true);
|
||||
+ else if (!(REG_READ(ah, AR_PHY_AGC_CONTROL) & AR_PHY_AGC_CONTROL_NF))
|
||||
+ ath9k_hw_getnf(ah, ah->curchan);
|
||||
+
|
||||
+ caldata->nfcal_interference = true;
|
||||
+}
|
||||
+EXPORT_SYMBOL(ath9k_hw_bstuck_nfcal);
|
||||
+
|
||||
--- a/drivers/net/wireless/ath/ath9k/calib.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/calib.h
|
||||
@@ -113,6 +113,7 @@ void ath9k_hw_loadnf(struct ath_hw *ah,
|
||||
bool ath9k_hw_getnf(struct ath_hw *ah, struct ath9k_channel *chan);
|
||||
void ath9k_init_nfcal_hist_buffer(struct ath_hw *ah,
|
||||
struct ath9k_channel *chan);
|
||||
+void ath9k_hw_bstuck_nfcal(struct ath_hw *ah);
|
||||
s16 ath9k_hw_getchan_noise(struct ath_hw *ah, struct ath9k_channel *chan);
|
||||
void ath9k_hw_reset_calibration(struct ath_hw *ah,
|
||||
struct ath9k_cal_list *currCal);
|
||||
--- a/drivers/net/wireless/ath/ath9k/hw.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/hw.h
|
||||
@@ -355,6 +355,7 @@ struct ath9k_hw_cal_data {
|
||||
int16_t rawNoiseFloor;
|
||||
bool paprd_done;
|
||||
bool nfcal_pending;
|
||||
+ bool nfcal_interference;
|
||||
u16 small_signal_gain[AR9300_MAX_CHAINS];
|
||||
u32 pa_table[AR9300_MAX_CHAINS][PAPRD_TABLE_SZ];
|
||||
struct ath9k_nfcal_hist nfCalHist[NUM_NF_READINGS];
|
35
package/mac80211/patches/543-ath9k_interference_nf_cal.patch
Normal file
35
package/mac80211/patches/543-ath9k_interference_nf_cal.patch
Normal file
@ -0,0 +1,35 @@
|
||||
--- a/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
+++ b/drivers/net/wireless/ath/ath9k/ath9k.h
|
||||
@@ -423,6 +423,7 @@ int ath_beaconq_config(struct ath_softc
|
||||
#define ATH_AP_SHORT_CALINTERVAL 100 /* 100 ms */
|
||||
#define ATH_ANI_POLLINTERVAL_OLD 100 /* 100 ms */
|
||||
#define ATH_ANI_POLLINTERVAL_NEW 1000 /* 1000 ms */
|
||||
+#define ATH_LONG_CALINTERVAL_INT 1000 /* 1000 ms */
|
||||
#define ATH_LONG_CALINTERVAL 30000 /* 30 seconds */
|
||||
#define ATH_RESTART_CALINTERVAL 1200000 /* 20 minutes */
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/main.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/main.c
|
||||
@@ -396,7 +396,12 @@ void ath_ani_calibrate(unsigned long dat
|
||||
bool shortcal = false;
|
||||
bool aniflag = false;
|
||||
unsigned int timestamp = jiffies_to_msecs(jiffies);
|
||||
- u32 cal_interval, short_cal_interval;
|
||||
+ u32 cal_interval, short_cal_interval, long_cal_interval;
|
||||
+
|
||||
+ if (ah->caldata && ah->caldata->nfcal_interference)
|
||||
+ long_cal_interval = ATH_LONG_CALINTERVAL_INT;
|
||||
+ else
|
||||
+ long_cal_interval = ATH_LONG_CALINTERVAL;
|
||||
|
||||
short_cal_interval = (ah->opmode == NL80211_IFTYPE_AP) ?
|
||||
ATH_AP_SHORT_CALINTERVAL : ATH_STA_SHORT_CALINTERVAL;
|
||||
@@ -408,7 +413,7 @@ void ath_ani_calibrate(unsigned long dat
|
||||
ath9k_ps_wakeup(sc);
|
||||
|
||||
/* Long calibration runs independently of short calibration. */
|
||||
- if ((timestamp - common->ani.longcal_timer) >= ATH_LONG_CALINTERVAL) {
|
||||
+ if ((timestamp - common->ani.longcal_timer) >= long_cal_interval) {
|
||||
longcal = true;
|
||||
ath_print(common, ATH_DBG_ANI, "longcal @%lu\n", jiffies);
|
||||
common->ani.longcal_timer = timestamp;
|
44
package/mac80211/patches/550-ath9k_tsf_fix.patch
Normal file
44
package/mac80211/patches/550-ath9k_tsf_fix.patch
Normal file
@ -0,0 +1,44 @@
|
||||
ath9k_rx_skb_preprocess nulls rxs and the mactime is never set again -
|
||||
mactime is always 0. This causes problems in IBSS mode.
|
||||
|
||||
ieee80211_rx_bss_info uses mactime to decide if an IBSS merge is needed.
|
||||
Without this patch the merge is triggered by each beacon received.
|
||||
|
||||
This can be recognized by the "beacon TSF higher than local TSF - IBSS
|
||||
merge with BSSID" log message accompanying each beacon.
|
||||
|
||||
This problem was not completely fixed in commit
|
||||
a6d2055b02dde1067075795274672720baadd3ca and is not a stable kernel fix.
|
||||
It is solely intended for wireless-testing.
|
||||
|
||||
Signed-off-by: Jan Friedrich <jft@dev2day.de>
|
||||
---
|
||||
drivers/net/wireless/ath/ath9k/recv.c | 10 +++++-----
|
||||
1 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/ath/ath9k/recv.c
|
||||
+++ b/drivers/net/wireless/ath/ath9k/recv.c
|
||||
@@ -1140,6 +1140,11 @@ int ath_rx_tasklet(struct ath_softc *sc,
|
||||
if (flush)
|
||||
goto requeue;
|
||||
|
||||
+ retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs,
|
||||
+ rxs, &decrypt_error);
|
||||
+ if (retval)
|
||||
+ goto requeue;
|
||||
+
|
||||
rxs->mactime = (tsf & ~0xffffffffULL) | rs.rs_tstamp;
|
||||
if (rs.rs_tstamp > tsf_lower &&
|
||||
unlikely(rs.rs_tstamp - tsf_lower > 0x10000000))
|
||||
@@ -1149,11 +1154,6 @@ int ath_rx_tasklet(struct ath_softc *sc,
|
||||
unlikely(tsf_lower - rs.rs_tstamp > 0x10000000))
|
||||
rxs->mactime += 0x100000000ULL;
|
||||
|
||||
- retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs,
|
||||
- rxs, &decrypt_error);
|
||||
- if (retval)
|
||||
- goto requeue;
|
||||
-
|
||||
/* Ensure we always have an skb to requeue once we are done
|
||||
* processing the current buffer's skb */
|
||||
requeue_skb = ath_rxbuf_alloc(common, common->rx_bufsize, GFP_ATOMIC);
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
@@ -216,6 +216,7 @@ void rt2x00pci_uninitialize(struct rt2x0
|
||||
@@ -202,6 +202,7 @@ void rt2x00pci_uninitialize(struct rt2x0
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2x00pci_uninitialize);
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
/*
|
||||
* PCI driver handlers.
|
||||
*/
|
||||
@@ -390,6 +391,7 @@ int rt2x00pci_resume(struct pci_dev *pci
|
||||
@@ -382,6 +383,7 @@ int rt2x00pci_resume(struct pci_dev *pci
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(rt2x00pci_resume);
|
||||
#endif /* CONFIG_PM */
|
||||
|
@ -1,29 +0,0 @@
|
||||
From f18d4463d092162f34a8bd226505627ceeac3e8a Mon Sep 17 00:00:00 2001
|
||||
From: Luis Correia <luis.f.correia@gmail.com>
|
||||
Date: Sat, 3 Apr 2010 12:49:53 +0100
|
||||
Subject: [PATCH] rt2x00: remove MCU requests for SoC platforms
|
||||
|
||||
The ralink SoC platforms do not have an MCU.
|
||||
|
||||
Signed-off-by: Luis Correia <luis.f.correia@gmail.com>
|
||||
Acked-by: Ivo van Doorn <IvDoorn@gmail.com>
|
||||
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
|
||||
---
|
||||
drivers/net/wireless/rt2x00/rt2800pci.c | 6 ++++++
|
||||
1 files changed, 6 insertions(+), 0 deletions(-)
|
||||
|
||||
--- a/drivers/net/wireless/rt2x00/rt2800pci.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2800pci.c
|
||||
@@ -66,6 +66,12 @@ static void rt2800pci_mcu_status(struct
|
||||
if (rt2x00_is_soc(rt2x00dev))
|
||||
return;
|
||||
|
||||
+ /*
|
||||
+ * SOC devices don't support MCU requests.
|
||||
+ */
|
||||
+ if (rt2x00_is_soc(rt2x00dev))
|
||||
+ return;
|
||||
+
|
||||
for (i = 0; i < 200; i++) {
|
||||
rt2800_register_read(rt2x00dev, H2M_MAILBOX_CID, ®);
|
||||
|
13
package/mac80211/patches/610-set_pci_mwi.patch
Normal file
13
package/mac80211/patches/610-set_pci_mwi.patch
Normal file
@ -0,0 +1,13 @@
|
||||
--- a/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
+++ b/drivers/net/wireless/rt2x00/rt2x00pci.c
|
||||
@@ -270,8 +270,10 @@ int rt2x00pci_probe(struct pci_dev *pci_
|
||||
|
||||
pci_set_master(pci_dev);
|
||||
|
||||
+#ifdef CONFIG_PCI_SET_MWI
|
||||
if (pci_set_mwi(pci_dev))
|
||||
ERROR_PROBE("MWI not available.\n");
|
||||
+#endif
|
||||
|
||||
if (dma_set_mask(&pci_dev->dev, DMA_BIT_MASK(32))) {
|
||||
ERROR_PROBE("PCI DMA not supported.\n");
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/wireless/mwl8k.c
|
||||
+++ b/drivers/net/wireless/mwl8k.c
|
||||
@@ -3882,6 +3882,7 @@ MODULE_FIRMWARE("mwl8k/helper_8366.fw");
|
||||
@@ -3884,6 +3884,7 @@ MODULE_FIRMWARE("mwl8k/helper_8366.fw");
|
||||
MODULE_FIRMWARE("mwl8k/fmimage_8366.fw");
|
||||
|
||||
static DEFINE_PCI_DEVICE_TABLE(mwl8k_pci_id_table) = {
|
||||
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mtd
|
||||
PKG_RELEASE:=12
|
||||
PKG_RELEASE:=13
|
||||
|
||||
PKG_BUILD_DIR := $(KERNEL_BUILD_DIR)/$(PKG_NAME)
|
||||
STAMP_PREPARED := $(STAMP_PREPARED)_$(call confvar,CONFIG_MTD_REDBOOT_PARTS)
|
||||
|
@ -77,7 +77,7 @@ fis_open(void)
|
||||
goto error;
|
||||
|
||||
fis_erasesize = erasesize;
|
||||
desc = mmap(NULL, erasesize, PROT_READ|PROT_WRITE, MAP_SHARED, fis_fd, 0);
|
||||
desc = mmap(NULL, erasesize, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_LOCKED, fis_fd, 0);
|
||||
if (desc == MAP_FAILED)
|
||||
goto error;
|
||||
|
||||
|
@ -0,0 +1,23 @@
|
||||
--- a/libopkg/opkg_install.c
|
||||
+++ b/libopkg/opkg_install.c
|
||||
@@ -271,6 +271,7 @@ unpack_pkg_control_files(pkg_t *pkg)
|
||||
while (1) {
|
||||
char *cf_name;
|
||||
char *cf_name_in_dest;
|
||||
+ int i;
|
||||
|
||||
cf_name = file_read_line_alloc(conffiles_file);
|
||||
if (cf_name == NULL) {
|
||||
@@ -279,6 +280,12 @@ unpack_pkg_control_files(pkg_t *pkg)
|
||||
if (cf_name[0] == '\0') {
|
||||
continue;
|
||||
}
|
||||
+ for (i = strlen(cf_name) - 1;
|
||||
+ (i >= 0) && (cf_name[i] == ' ' || cf_name[i] == '\t');
|
||||
+ i--
|
||||
+ ) {
|
||||
+ cf_name[i] = '\0';
|
||||
+ }
|
||||
|
||||
/* Prepend dest->root_dir to conffile name.
|
||||
Take pains to avoid multiple slashes. */
|
@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ppp
|
||||
PKG_VERSION:=2.4.4
|
||||
PKG_RELEASE:=7
|
||||
PKG_RELEASE:=9
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
|
||||
|
@ -92,11 +92,11 @@ start_pppd() {
|
||||
}
|
||||
|
||||
local demand
|
||||
config_get_bool demand "$cfg" demand 0
|
||||
config_get demand "$cfg" demand 0
|
||||
|
||||
local demandargs
|
||||
[ "$demand" -eq 1 ] && {
|
||||
demandargs="precompiled-active-filter /etc/ppp/filter demand idle"
|
||||
[ "$demand" -gt 0 ] && {
|
||||
demandargs="precompiled-active-filter /etc/ppp/filter demand idle $demand"
|
||||
[ "$has_dns" -eq 0 ] && add_dns "$cfg" 1.1.1.1
|
||||
} || {
|
||||
demandargs="persist"
|
||||
|
@ -78,7 +78,7 @@
|
||||
|
||||
if (ppp_dev_fd >= 0) {
|
||||
dbglog("in make_ppp_unit, already had /dev/ppp open?");
|
||||
@@ -645,6 +650,32 @@ static int make_ppp_unit()
|
||||
@@ -645,6 +650,30 @@ static int make_ppp_unit()
|
||||
}
|
||||
if (x < 0)
|
||||
error("Couldn't create new ppp unit: %m");
|
||||
@ -103,8 +103,6 @@
|
||||
+ 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);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
|
10
package/ppp/patches/330-retain_foreign_default_routes.patch
Normal file
10
package/ppp/patches/330-retain_foreign_default_routes.patch
Normal file
@ -0,0 +1,10 @@
|
||||
--- a/pppd/sys-linux.c
|
||||
+++ b/pppd/sys-linux.c
|
||||
@@ -1717,6 +1717,7 @@ int cifdefaultroute (int unit, u_int32_t
|
||||
SIN_ADDR(rt.rt_genmask) = 0L;
|
||||
}
|
||||
|
||||
+ rt.rt_dev = ifname;
|
||||
rt.rt_flags = RTF_UP;
|
||||
if (ioctl(sock_fd, SIOCDELRT, &rt) < 0 && errno != ESRCH) {
|
||||
if (still_ppp()) {
|
@ -8,7 +8,7 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=uhttpd
|
||||
PKG_RELEASE:=9
|
||||
PKG_RELEASE:=11
|
||||
|
||||
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
|
||||
|
||||
|
@ -35,12 +35,22 @@ SSL_CTX * uh_tls_ctx_init()
|
||||
|
||||
int uh_tls_ctx_cert(SSL_CTX *c, const char *file)
|
||||
{
|
||||
return SSL_CTX_use_certificate_file(c, file, SSL_FILETYPE_ASN1);
|
||||
int rv;
|
||||
|
||||
if( (rv = SSL_CTX_use_certificate_file(c, file, SSL_FILETYPE_PEM)) < 1 )
|
||||
rv = SSL_CTX_use_certificate_file(c, file, SSL_FILETYPE_ASN1);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
int uh_tls_ctx_key(SSL_CTX *c, const char *file)
|
||||
{
|
||||
return SSL_CTX_use_PrivateKey_file(c, file, SSL_FILETYPE_ASN1);
|
||||
int rv;
|
||||
|
||||
if( (rv = SSL_CTX_use_PrivateKey_file(c, file, SSL_FILETYPE_PEM)) < 1 )
|
||||
rv = SSL_CTX_use_PrivateKey_file(c, file, SSL_FILETYPE_ASN1);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
void uh_tls_ctx_free(struct listener *l)
|
||||
|
@ -550,6 +550,7 @@ int main (int argc, char **argv)
|
||||
&hints, (opt == 's'), &conf
|
||||
);
|
||||
|
||||
memset(bind, 0, sizeof(bind));
|
||||
break;
|
||||
|
||||
#ifdef HAVE_TLS
|
||||
|
@ -192,7 +192,8 @@ env_new() {
|
||||
if [ -f "$BASEDIR/.config" -o -d "$BASEDIR/files" ]; then
|
||||
if ask_bool 1 "Do you want to keep your current config and files?"; then
|
||||
[ -d "$BASEDIR/files" -a \! -L "$BASEDIR/files" ] && {
|
||||
mv "$BASEDIR/files/"* "$ENVDIR/" 2>/dev/null
|
||||
mkdir -p "$ENVDIR/files"
|
||||
mv "$BASEDIR/files/*" "$ENVDIR/files/" 2>/dev/null
|
||||
rmdir "$BASEDIR/files"
|
||||
}
|
||||
env_sync
|
||||
|
@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
BOARD:=adm5120
|
||||
BOARDNAME:=Infineon/ADMtek ADM5120
|
||||
LINUX_VERSION:=2.6.32.10
|
||||
LINUX_VERSION:=2.6.32.16
|
||||
SUBTARGETS:=router_le router_be
|
||||
INITRAMFS_EXTRA_FILES:=
|
||||
|
||||
|
@ -11,7 +11,7 @@ BOARD:=ar7
|
||||
BOARDNAME:=TI AR7
|
||||
FEATURES:=squashfs jffs2 atm
|
||||
|
||||
LINUX_VERSION:=2.6.32.10
|
||||
LINUX_VERSION:=2.6.32.16
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
|
@ -12,7 +12,7 @@ BOARDNAME:=Atheros AR71xx/AR7240/AR913x
|
||||
FEATURES:=squashfs jffs2 targz
|
||||
CFLAGS:=-Os -pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time
|
||||
|
||||
LINUX_VERSION:=2.6.32.10
|
||||
LINUX_VERSION:=2.6.32.16
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
|
@ -22,5 +22,5 @@ config switch
|
||||
|
||||
config switch_vlan
|
||||
option device rtl8366s
|
||||
option vlan 0
|
||||
option vlan 1
|
||||
option ports "0 1 2 3 5"
|
||||
|
@ -24,7 +24,7 @@ config switch
|
||||
|
||||
config switch_vlan
|
||||
option device rtl8366s
|
||||
option vlan 0
|
||||
option vlan 1
|
||||
option ports "0 1 2 3 5"
|
||||
|
||||
config switch_port
|
||||
|
@ -22,5 +22,5 @@ config switch
|
||||
|
||||
config switch_vlan
|
||||
option device rtl8366s
|
||||
option vlan 0
|
||||
option vlan 1
|
||||
option ports "0 1 2 3 5"
|
||||
|
@ -68,7 +68,7 @@ platform_check_image() {
|
||||
[ "$ARGC" -gt 1 ] && return 1
|
||||
|
||||
case "$board" in
|
||||
ap81 | ap83 | dir-600-a1 | dir-615-c1 | dir-825-b1 | mzk-w04nu | mzk-w300nh | tew-632brp | wrt400n | bullet-m | nano-m | rocket-m | wzr-hp-g300nh)
|
||||
ap81 | ap83 | dir-600-a1 | dir-615-c1 | dir-825-b1 | mzk-w04nu | mzk-w300nh | tew-632brp | wrt400n | bullet-m | nanostation-m | rocket-m | wzr-hp-g300nh )
|
||||
[ "$magic" != "2705" ] && {
|
||||
echo "Invalid image type."
|
||||
return 1
|
||||
|
@ -435,6 +435,12 @@ static void ag71xx_dma_reset(struct ag71xx *ag)
|
||||
ag71xx_wr(ag, AG71XX_REG_RX_CTRL, 0);
|
||||
ag71xx_wr(ag, AG71XX_REG_TX_CTRL, 0);
|
||||
|
||||
/*
|
||||
* give the hardware some time to really stop all rx/tx activity
|
||||
* clearing the descriptors too early causes random memory corruption
|
||||
*/
|
||||
mdelay(1);
|
||||
|
||||
/* clear descriptor addresses */
|
||||
ag71xx_wr(ag, AG71XX_REG_TX_DESC, 0);
|
||||
ag71xx_wr(ag, AG71XX_REG_RX_DESC, 0);
|
||||
@ -548,12 +554,16 @@ static void ag71xx_hw_stop(struct ag71xx *ag)
|
||||
static int ag71xx_open(struct net_device *dev)
|
||||
{
|
||||
struct ag71xx *ag = netdev_priv(dev);
|
||||
struct ag71xx_platform_data *pdata = ag71xx_get_pdata(ag);
|
||||
int ret;
|
||||
|
||||
ret = ag71xx_rings_init(ag);
|
||||
if (ret)
|
||||
goto err;
|
||||
|
||||
if (pdata->is_ar724x)
|
||||
ag71xx_hw_init(ag);
|
||||
|
||||
napi_enable(&ag->napi);
|
||||
|
||||
netif_carrier_off(dev);
|
||||
|
@ -1,5 +1,8 @@
|
||||
#!/bin/sh
|
||||
if [ -e "/sys/bus/mdio_bus/drivers/IC+ IP175C/0:00" -a -x /sbin/swconfig ]; then
|
||||
if [ -e "/sys/bus/mdio_bus/drivers/IC+ IP175C/0:00" -o \
|
||||
-e "/sys/bus/mdio_bus/drivers/IC+ IP17xx/0:00" ] && \
|
||||
[ -x /sbin/swconfig ];
|
||||
then
|
||||
uci batch <<EOF
|
||||
set network.eth0=switch
|
||||
set network.eth0.name=eth0
|
||||
|
@ -12,7 +12,7 @@ BOARDNAME:=RMI/AMD AU1x00
|
||||
FEATURES:=jffs2 usb pci
|
||||
SUBTARGETS=au1500 au1550
|
||||
|
||||
LINUX_VERSION:=2.6.32.10
|
||||
LINUX_VERSION:=2.6.32.16
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
DEFAULT_PACKAGES += wpad-mini yamonenv
|
||||
|
35
target/linux/au1000/patches-2.6.32/005-mtx1_fix_pci.patch
Normal file
35
target/linux/au1000/patches-2.6.32/005-mtx1_fix_pci.patch
Normal file
@ -0,0 +1,35 @@
|
||||
diff --git a/arch/mips/alchemy/mtx-1/board_setup.c b/arch/mips/alchemy/mtx-1/board_setup.c
|
||||
index 45b61c9..17140ac 100644
|
||||
--- a/arch/mips/alchemy/mtx-1/board_setup.c
|
||||
+++ b/arch/mips/alchemy/mtx-1/board_setup.c
|
||||
@@ -56,8 +56,6 @@ void __init board_setup(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
- alchemy_gpio2_enable();
|
||||
-
|
||||
#if defined(CONFIG_USB_OHCI_HCD) || defined(CONFIG_USB_OHCI_HCD_MODULE)
|
||||
/* Enable USB power switch */
|
||||
alchemy_gpio_direction_output(204, 0);
|
||||
@@ -92,20 +90,12 @@ void __init board_setup(void)
|
||||
int
|
||||
mtx1_pci_idsel(unsigned int devsel, int assert)
|
||||
{
|
||||
-#define MTX_IDSEL_ONLY_0_AND_3 0
|
||||
-#if MTX_IDSEL_ONLY_0_AND_3
|
||||
- if (devsel != 0 && devsel != 3) {
|
||||
- printk(KERN_ERR "*** not 0 or 3\n");
|
||||
- return 0;
|
||||
- }
|
||||
-#endif
|
||||
-
|
||||
if (assert && devsel != 0)
|
||||
/* Suppress signal to Cardbus */
|
||||
gpio_set_value(1, 0); /* set EXT_IO3 OFF */
|
||||
else
|
||||
gpio_set_value(1, 1); /* set EXT_IO3 ON */
|
||||
|
||||
- au_sync_udelay(1);
|
||||
+ udelay(1);
|
||||
return 1;
|
||||
}
|
@ -10,7 +10,7 @@ ARCH:=avr32
|
||||
BOARD:=avr32
|
||||
BOARDNAME:=Atmel AVR32
|
||||
FEATURES:=squashfs
|
||||
LINUX_VERSION:=2.6.32.10
|
||||
LINUX_VERSION:=2.6.32.16
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
|
@ -11,7 +11,7 @@ BOARD:=brcm47xx
|
||||
BOARDNAME:=Broadcom BCM947xx/953xx
|
||||
FEATURES:=squashfs usb pcmcia
|
||||
|
||||
LINUX_VERSION:=2.6.32.10
|
||||
LINUX_VERSION:=2.6.32.16
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
DEFAULT_PACKAGES += wpad-mini kmod-switch kmod-diag nvram
|
||||
|
@ -0,0 +1,17 @@
|
||||
--- a/drivers/net/b44.c
|
||||
+++ b/drivers/net/b44.c
|
||||
@@ -189,11 +189,13 @@ static int b44_wait_bit(struct b44 *bp,
|
||||
udelay(10);
|
||||
}
|
||||
if (i == timeout) {
|
||||
- printk(KERN_ERR PFX "%s: BUG! Timeout waiting for bit %08x of register "
|
||||
+#if 0
|
||||
+ printk(KERN_DEBUG PFX "%s: BUG! Timeout waiting for bit %08x of register "
|
||||
"%lx to %s.\n",
|
||||
bp->dev->name,
|
||||
bit, reg,
|
||||
(clear ? "clear" : "set"));
|
||||
+#endif
|
||||
return -ENODEV;
|
||||
}
|
||||
return 0;
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/net/b44.c
|
||||
+++ b/drivers/net/b44.c
|
||||
@@ -848,7 +848,7 @@ static int b44_rx(struct b44 *bp, int bu
|
||||
@@ -850,7 +850,7 @@ static int b44_rx(struct b44 *bp, int bu
|
||||
struct sk_buff *copy_skb;
|
||||
|
||||
b44_recycle_rx(bp, cons, bp->rx_prod);
|
||||
|
@ -10,7 +10,7 @@ ARCH:=mips
|
||||
BOARD:=brcm63xx
|
||||
BOARDNAME:=Broadcom BCM63xx
|
||||
FEATURES:=squashfs jffs2 usb atm pci pcmcia
|
||||
LINUX_VERSION:=2.6.32.10
|
||||
LINUX_VERSION:=2.6.32.16
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
|
@ -12,7 +12,7 @@ BOARDNAME:=Cobalt Microservers
|
||||
FEATURES:=targz pci ext2
|
||||
CFLAGS:=-O2 -pipe -mtune=r5000 -funit-at-a-time
|
||||
|
||||
LINUX_VERSION:=2.6.32.10
|
||||
LINUX_VERSION:=2.6.32.16
|
||||
|
||||
include $(INCLUDE_DIR)/target.mk
|
||||
|
||||
|
@ -336,6 +336,7 @@ CONFIG_COMPAT_NET_DEV_OPS=y
|
||||
# CONFIG_CPU_FREQ is not set
|
||||
# CONFIG_CPU_IDLE is not set
|
||||
# CONFIG_CRAMFS is not set
|
||||
CONFIG_CRASHLOG=y
|
||||
# CONFIG_CRASH_DUMP is not set
|
||||
# CONFIG_CRC16 is not set
|
||||
CONFIG_CRC32=y
|
||||
@ -1008,6 +1009,7 @@ CONFIG_IPW2200_MONITOR=y
|
||||
# CONFIG_ISCSI_TCP is not set
|
||||
CONFIG_ISDN=y
|
||||
# CONFIG_ISDN_AUDIO is not set
|
||||
# CONFIG_ISDN_CAPI is not set
|
||||
# CONFIG_ISDN_CAPI_CAPIDRV is not set
|
||||
# CONFIG_ISDN_DIVERSION is not set
|
||||
# CONFIG_ISDN_DRV_ACT2000 is not set
|
||||
@ -1019,6 +1021,7 @@ CONFIG_ISDN=y
|
||||
# CONFIG_ISDN_DRV_PCBIT is not set
|
||||
# CONFIG_ISDN_DRV_SC is not set
|
||||
# CONFIG_ISDN_DRV_TPAM is not set
|
||||
# CONFIG_ISDN_I4L is not set
|
||||
# CONFIG_ISDN_WITH_ABC is not set
|
||||
# CONFIG_ISL29003 is not set
|
||||
# CONFIG_ISO9660_FS is not set
|
||||
@ -1054,6 +1057,7 @@ CONFIG_JFFS2_ZLIB=y
|
||||
# CONFIG_JFS_STATISTICS is not set
|
||||
# CONFIG_JME is not set
|
||||
CONFIG_JOLIET=y
|
||||
# CONFIG_KALLSYMS_ALL is not set
|
||||
# CONFIG_KALLSYMS_EXTRA_PASS is not set
|
||||
# CONFIG_KALLSYMS is not set
|
||||
# CONFIG_KARMA_PARTITION is not set
|
||||
@ -2229,6 +2233,7 @@ CONFIG_TEXTSEARCH=y
|
||||
CONFIG_TICK_ONESHOT=y
|
||||
# CONFIG_TIFM_CORE is not set
|
||||
# CONFIG_TIGON3 is not set
|
||||
# CONFIG_TIMER_STATS is not set
|
||||
CONFIG_TIMERFD=y
|
||||
# CONFIG_TINY_SHMEM is not set
|
||||
# CONFIG_TIPC is not set
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user