mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-12-29 01:54:35 +02:00
Merge commit 'nbd/master' into xburst
This commit is contained in:
commit
ff1b83c5bd
@ -10,12 +10,12 @@ include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=mac80211
|
||||
|
||||
PKG_VERSION:=2010-01-07
|
||||
PKG_RELEASE:=8
|
||||
PKG_SOURCE_URL:= \
|
||||
http://www.orbit-lab.org/kernel/compat-wireless-2.6/2009/12 \
|
||||
http://wireless.kernel.org/download/compat-wireless-2.6
|
||||
PKG_MD5SUM:=f783d3d4a140a76855916b54fa18be47
|
||||
PKG_VERSION:=2010-01-11
|
||||
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:=78a36bb7d28be7028f640a10eaa4692b
|
||||
|
||||
PKG_SOURCE:=compat-wireless-$(PKG_VERSION).tar.bz2
|
||||
PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/compat-wireless-$(PKG_VERSION)
|
||||
|
@ -1,69 +0,0 @@
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -329,7 +329,7 @@ static int ieee80211_open(struct net_dev
|
||||
if (sdata->vif.type == NL80211_IFTYPE_STATION)
|
||||
ieee80211_queue_work(&local->hw, &sdata->u.mgd.work);
|
||||
|
||||
- netif_start_queue(dev);
|
||||
+ netif_tx_start_all_queues(dev);
|
||||
|
||||
return 0;
|
||||
err_del_interface:
|
||||
@@ -357,7 +357,7 @@ static int ieee80211_stop(struct net_dev
|
||||
/*
|
||||
* Stop TX on this interface first.
|
||||
*/
|
||||
- netif_stop_queue(dev);
|
||||
+ netif_tx_stop_all_queues(dev);
|
||||
|
||||
/*
|
||||
* Purge work for this interface.
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -723,7 +723,7 @@ static void ieee80211_set_associated(str
|
||||
ieee80211_recalc_smps(local, sdata);
|
||||
mutex_unlock(&local->iflist_mtx);
|
||||
|
||||
- netif_start_queue(sdata->dev);
|
||||
+ netif_tx_start_all_queues(sdata->dev);
|
||||
netif_carrier_on(sdata->dev);
|
||||
}
|
||||
|
||||
@@ -759,7 +759,7 @@ static void ieee80211_set_disassoc(struc
|
||||
* time -- we don't want the scan code to enable queues.
|
||||
*/
|
||||
|
||||
- netif_stop_queue(sdata->dev);
|
||||
+ netif_tx_stop_all_queues(sdata->dev);
|
||||
netif_carrier_off(sdata->dev);
|
||||
|
||||
rcu_read_lock();
|
||||
--- a/net/mac80211/offchannel.c
|
||||
+++ b/net/mac80211/offchannel.c
|
||||
@@ -113,7 +113,7 @@ void ieee80211_offchannel_stop_beaconing
|
||||
*/
|
||||
if (sdata->vif.type != NL80211_IFTYPE_STATION &&
|
||||
sdata->vif.type != NL80211_IFTYPE_MONITOR)
|
||||
- netif_stop_queue(sdata->dev);
|
||||
+ netif_tx_stop_all_queues(sdata->dev);
|
||||
}
|
||||
mutex_unlock(&local->iflist_mtx);
|
||||
}
|
||||
@@ -131,7 +131,7 @@ void ieee80211_offchannel_stop_station(s
|
||||
continue;
|
||||
|
||||
if (sdata->vif.type == NL80211_IFTYPE_STATION) {
|
||||
- netif_stop_queue(sdata->dev);
|
||||
+ netif_tx_stop_all_queues(sdata->dev);
|
||||
if (sdata->u.mgd.associated)
|
||||
ieee80211_offchannel_ps_enable(sdata);
|
||||
}
|
||||
@@ -153,7 +153,7 @@ void ieee80211_offchannel_return(struct
|
||||
if (sdata->vif.type == NL80211_IFTYPE_STATION) {
|
||||
if (sdata->u.mgd.associated)
|
||||
ieee80211_offchannel_ps_disable(sdata);
|
||||
- netif_wake_queue(sdata->dev);
|
||||
+ netif_tx_wake_all_queues(sdata->dev);
|
||||
}
|
||||
|
||||
/* re-enable beaconing */
|
@ -1,26 +0,0 @@
|
||||
--- a/net/mac80211/mlme.c
|
||||
+++ b/net/mac80211/mlme.c
|
||||
@@ -1451,7 +1451,9 @@ static void ieee80211_sta_rx_queued_mgmt
|
||||
rma = ieee80211_rx_mgmt_disassoc(sdata, mgmt, skb->len);
|
||||
break;
|
||||
case IEEE80211_STYPE_ACTION:
|
||||
- /* XXX: differentiate, can only happen for CSA now! */
|
||||
+ if (mgmt->u.action.category != WLAN_CATEGORY_SPECTRUM_MGMT)
|
||||
+ break;
|
||||
+
|
||||
ieee80211_sta_process_chanswitch(sdata,
|
||||
&mgmt->u.action.u.chan_switch.sw_elem,
|
||||
(void *)ifmgd->associated->priv);
|
||||
--- a/net/mac80211/rx.c
|
||||
+++ b/net/mac80211/rx.c
|
||||
@@ -1934,6 +1934,10 @@ ieee80211_rx_h_action(struct ieee80211_r
|
||||
}
|
||||
break;
|
||||
default:
|
||||
+ /* do not process rejected action frames */
|
||||
+ if (mgmt->u.action.category & 0x80)
|
||||
+ return RX_DROP_MONITOR;
|
||||
+
|
||||
return RX_CONTINUE;
|
||||
}
|
||||
|
18
package/mac80211/patches/570-monitor_queue_select_fix.patch
Normal file
18
package/mac80211/patches/570-monitor_queue_select_fix.patch
Normal file
@ -0,0 +1,18 @@
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -696,10 +696,14 @@ static u16 ieee80211_monitor_select_queu
|
||||
|
||||
hdr = (void *)((u8 *)skb->data + le16_to_cpu(rtap->it_len));
|
||||
|
||||
- if (!ieee80211_is_data_qos(hdr->frame_control)) {
|
||||
+ if (!ieee80211_is_data(hdr->frame_control)) {
|
||||
skb->priority = 7;
|
||||
return ieee802_1d_to_ac[skb->priority];
|
||||
}
|
||||
+ if (!ieee80211_is_data_qos(hdr->frame_control)) {
|
||||
+ skb->priority = 0;
|
||||
+ return ieee802_1d_to_ac[skb->priority];
|
||||
+ }
|
||||
|
||||
p = ieee80211_get_qos_ctl(hdr);
|
||||
skb->priority = *p & IEEE80211_QOS_CTL_TAG1D_MASK;
|
@ -1,15 +0,0 @@
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -690,10 +690,10 @@ static u16 ieee80211_monitor_select_queu
|
||||
return 0;
|
||||
|
||||
if (skb->len < 4 ||
|
||||
- skb->len < rtap->it_len + 2 /* frame control */)
|
||||
+ skb->len < le16_to_cpu(rtap->it_len) + 2 /* frame control */)
|
||||
return 0; /* doesn't matter, frame will be dropped */
|
||||
|
||||
- hdr = (void *)((u8 *)skb->data + rtap->it_len);
|
||||
+ hdr = (void *)((u8 *)skb->data + le16_to_cpu(rtap->it_len));
|
||||
|
||||
if (!ieee80211_is_data(hdr->frame_control)) {
|
||||
skb->priority = 7;
|
@ -1,26 +0,0 @@
|
||||
--- a/net/mac80211/iface.c
|
||||
+++ b/net/mac80211/iface.c
|
||||
@@ -685,6 +685,7 @@ static u16 ieee80211_monitor_select_queu
|
||||
struct ieee80211_local *local = sdata->local;
|
||||
struct ieee80211_hdr *hdr;
|
||||
struct ieee80211_radiotap_header *rtap = (void *)skb->data;
|
||||
+ u8 *p;
|
||||
|
||||
if (local->hw.queues < 4)
|
||||
return 0;
|
||||
@@ -695,11 +696,14 @@ static u16 ieee80211_monitor_select_queu
|
||||
|
||||
hdr = (void *)((u8 *)skb->data + le16_to_cpu(rtap->it_len));
|
||||
|
||||
- if (!ieee80211_is_data(hdr->frame_control)) {
|
||||
+ if (!ieee80211_is_data_qos(hdr->frame_control)) {
|
||||
skb->priority = 7;
|
||||
return ieee802_1d_to_ac[skb->priority];
|
||||
}
|
||||
|
||||
+ p = ieee80211_get_qos_ctl(hdr);
|
||||
+ skb->priority = *p & IEEE80211_QOS_CTL_TAG1D_MASK;
|
||||
+
|
||||
return ieee80211_downgrade_queue(local, skb);
|
||||
}
|
||||
|
@ -92,14 +92,14 @@ static struct gpio_button ap81_gpio_buttons[] __initdata = {
|
||||
.desc = "sw1",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = AP81_GPIO_BTN_SW1,
|
||||
.active_low = 1,
|
||||
} , {
|
||||
.desc = "sw4",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = AP81_GPIO_BTN_SW4,
|
||||
.active_low = 1,
|
||||
}
|
||||
|
@ -120,14 +120,14 @@ static struct gpio_button ap83_gpio_buttons[] __initdata = {
|
||||
.desc = "soft_reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = AP83_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
} , {
|
||||
.desc = "jumpstart",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = AP83_GPIO_BTN_JUMPSTART,
|
||||
.active_low = 1,
|
||||
}
|
||||
|
@ -62,14 +62,14 @@ static struct gpio_button aw_nr580_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = AW_NR580_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
}, {
|
||||
.desc = "wps",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = AW_NR580_GPIO_BTN_WPS,
|
||||
.active_low = 1,
|
||||
}
|
||||
|
@ -92,14 +92,14 @@ static struct gpio_button dir_600_a1_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = DIR_600_A1_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
}, {
|
||||
.desc = "wps",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = DIR_600_A1_GPIO_BTN_WPS,
|
||||
.active_low = 1,
|
||||
}
|
||||
|
@ -117,13 +117,13 @@ static struct gpio_button dir_615c1_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = DIR_615C1_GPIO_BTN_RESET,
|
||||
}, {
|
||||
.desc = "wps",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = DIR_615C1_GPIO_BTN_WPS,
|
||||
}
|
||||
};
|
||||
|
@ -117,14 +117,14 @@ static struct gpio_button dir825b1_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = DIR825B1_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
} , {
|
||||
.desc = "powersave",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = DIR825B1_GPIO_BTN_POWERSAVE,
|
||||
.active_low = 1,
|
||||
}
|
||||
|
@ -106,21 +106,21 @@ static struct gpio_button mzk_w04nu_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = MZK_W04NU_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
}, {
|
||||
.desc = "wps",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = MZK_W04NU_GPIO_BTN_WPS,
|
||||
.active_low = 1,
|
||||
}, {
|
||||
.desc = "aprouter",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_2,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = MZK_W04NU_GPIO_BTN_APROUTER,
|
||||
.active_low = 0,
|
||||
}
|
||||
|
@ -105,21 +105,21 @@ static struct gpio_button mzk_w300nh_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = MZK_W300NH_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
}, {
|
||||
.desc = "wps",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = MZK_W300NH_GPIO_BTN_WPS,
|
||||
.active_low = 1,
|
||||
}, {
|
||||
.desc = "aprouter",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_2,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = MZK_W300NH_GPIO_BTN_APROUTER,
|
||||
.active_low = 0,
|
||||
}
|
||||
|
@ -28,14 +28,14 @@ static struct gpio_button pb42_gpio_buttons[] __initdata = {
|
||||
.desc = "sw4",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = PB42_GPIO_BTN_SW4,
|
||||
.active_low = 1,
|
||||
} , {
|
||||
.desc = "sw5",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = PB42_GPIO_BTN_SW5,
|
||||
.active_low = 1,
|
||||
}
|
||||
|
@ -95,14 +95,14 @@ static struct gpio_button pb44_gpio_buttons[] __initdata = {
|
||||
.desc = "soft_reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = PB44_GPIO_SW_RESET,
|
||||
.active_low = 1,
|
||||
} , {
|
||||
.desc = "jumpstart",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = PB44_GPIO_SW_JUMP,
|
||||
.active_low = 1,
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ static struct gpio_button rb4xx_gpio_buttons[] __initdata = {
|
||||
.desc = "reset_switch",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = RB4XX_GPIO_RESET_SWITCH,
|
||||
.active_low = 1,
|
||||
}
|
||||
|
@ -93,13 +93,13 @@ static struct gpio_button tew_632brp_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = TEW_632BRP_GPIO_BTN_RESET,
|
||||
}, {
|
||||
.desc = "wps",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = TEW_632BRP_GPIO_BTN_WPS,
|
||||
}
|
||||
};
|
||||
|
@ -91,14 +91,14 @@ static struct gpio_button tl_wr1043nd_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = TL_WR1043ND_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
}, {
|
||||
.desc = "qss",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = TL_WR1043ND_GPIO_BTN_QSS,
|
||||
.active_low = 1,
|
||||
}
|
||||
|
@ -80,14 +80,14 @@ static struct gpio_button tl_wr741nd_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = TL_WR741ND_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
}, {
|
||||
.desc = "qss",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = TL_WR741ND_GPIO_BTN_QSS,
|
||||
.active_low = 1,
|
||||
}
|
||||
|
@ -84,14 +84,14 @@ static struct gpio_button tl_wr841n_v1_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = TL_WR841ND_V1_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
}, {
|
||||
.desc = "qss",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = TL_WR841ND_V1_GPIO_BTN_QSS,
|
||||
.active_low = 1,
|
||||
}
|
||||
|
@ -84,14 +84,14 @@ static struct gpio_button tl_wr941nd_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = TL_WR941ND_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
}, {
|
||||
.desc = "qss",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = TL_WR941ND_GPIO_BTN_QSS,
|
||||
.active_low = 1,
|
||||
}
|
||||
|
@ -105,7 +105,7 @@ static struct gpio_button ubnt_gpio_buttons[] __initdata = {
|
||||
.desc = "sw4",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = UBNT_RS_GPIO_SW4,
|
||||
.active_low = 1,
|
||||
}
|
||||
@ -116,7 +116,7 @@ static struct gpio_button ubnt_m_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = UBNT_M_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
}
|
||||
|
@ -126,19 +126,19 @@ static struct gpio_button wndr3700_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = WNDR3700_GPIO_BTN_RESET,
|
||||
}, {
|
||||
.desc = "wps",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = WNDR3700_GPIO_BTN_WPS,
|
||||
} , {
|
||||
.desc = "wifi",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_2,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = WNDR3700_GPIO_BTN_WIFI,
|
||||
}
|
||||
};
|
||||
|
@ -103,13 +103,13 @@ static struct gpio_button wnr2000_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = WNR2000_GPIO_BTN_RESET,
|
||||
}, {
|
||||
.desc = "wps",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = WNR2000_GPIO_BTN_WPS,
|
||||
}
|
||||
};
|
||||
|
@ -61,13 +61,13 @@ static struct gpio_button wp543_gpio_buttons[] __initdata = {
|
||||
.desc = "sw6",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = WP543_GPIO_SW6,
|
||||
}, {
|
||||
.desc = "sw4",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = WP543_GPIO_SW4,
|
||||
}
|
||||
};
|
||||
|
@ -101,14 +101,14 @@ static struct gpio_button wrt160nl_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = WRT160NL_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
}, {
|
||||
.desc = "wps",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = WRT160NL_GPIO_BTN_WPS,
|
||||
.active_low = 1,
|
||||
}
|
||||
|
@ -115,14 +115,14 @@ static struct gpio_button wrt400n_gpio_buttons[] __initdata = {
|
||||
.desc = "reset",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_0,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = WRT400N_GPIO_BTN_RESET,
|
||||
.active_low = 1,
|
||||
} , {
|
||||
.desc = "wlsec",
|
||||
.type = EV_KEY,
|
||||
.code = BTN_1,
|
||||
.threshold = 5,
|
||||
.threshold = 3,
|
||||
.gpio = WRT400N_GPIO_BTN_WLSEC,
|
||||
.active_low = 1,
|
||||
}
|
||||
|
@ -12,3 +12,18 @@
|
||||
/* PMC -- pm25x "blocks" are 32K, sectors are 4K */
|
||||
{ "pm25lv512", 0, 32 * 1024, 2, SECT_4K },
|
||||
{ "pm25lv010", 0, 32 * 1024, 4, SECT_4K },
|
||||
@@ -656,11 +661,12 @@ static int __devinit m25p_probe(struct s
|
||||
dev_set_drvdata(&spi->dev, flash);
|
||||
|
||||
/*
|
||||
- * Atmel serial flash tend to power up
|
||||
+ * Atmel and Intel/Numonyx serial flash tend to power up
|
||||
* with the software protection bits set
|
||||
*/
|
||||
|
||||
- if (info->jedec_id >> 16 == 0x1f) {
|
||||
+ if (info->jedec_id >> 16 == 0x1f ||
|
||||
+ info->jedec_id >> 16 == 0x89) {
|
||||
write_enable(flash);
|
||||
write_sr(flash, 0);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/mtd/devices/m25p80.c
|
||||
+++ b/drivers/mtd/devices/m25p80.c
|
||||
@@ -751,6 +751,16 @@ static int __devinit m25p_probe(struct s
|
||||
@@ -752,6 +752,16 @@ static int __devinit m25p_probe(struct s
|
||||
part_probes, &parts, 0);
|
||||
}
|
||||
#endif
|
||||
|
@ -12,3 +12,18 @@
|
||||
/* PMC -- pm25x "blocks" are 32K, sectors are 4K */
|
||||
{ "pm25lv512", 0, 32 * 1024, 2, SECT_4K },
|
||||
{ "pm25lv010", 0, 32 * 1024, 4, SECT_4K },
|
||||
@@ -660,11 +665,12 @@ static int __devinit m25p_probe(struct s
|
||||
dev_set_drvdata(&spi->dev, flash);
|
||||
|
||||
/*
|
||||
- * Atmel serial flash tend to power up
|
||||
+ * Atmel and Intel/Numonyx serial flash tend to power up
|
||||
* with the software protection bits set
|
||||
*/
|
||||
|
||||
- if (info->jedec_id >> 16 == 0x1f) {
|
||||
+ if (info->jedec_id >> 16 == 0x1f ||
|
||||
+ info->jedec_id >> 16 == 0x89) {
|
||||
write_enable(flash);
|
||||
write_sr(flash, 0);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/mtd/devices/m25p80.c
|
||||
+++ b/drivers/mtd/devices/m25p80.c
|
||||
@@ -755,6 +755,16 @@ static int __devinit m25p_probe(struct s
|
||||
@@ -756,6 +756,16 @@ static int __devinit m25p_probe(struct s
|
||||
part_probes, &parts, 0);
|
||||
}
|
||||
#endif
|
||||
|
@ -12,3 +12,18 @@
|
||||
/* PMC -- pm25x "blocks" are 32K, sectors are 4K */
|
||||
{ "pm25lv512", 0, 32 * 1024, 2, SECT_4K },
|
||||
{ "pm25lv010", 0, 32 * 1024, 4, SECT_4K },
|
||||
@@ -789,11 +794,12 @@ static int __devinit m25p_probe(struct s
|
||||
dev_set_drvdata(&spi->dev, flash);
|
||||
|
||||
/*
|
||||
- * Atmel serial flash tend to power up
|
||||
+ * Atmel and Intel/Numonyx serial flash tend to power up
|
||||
* with the software protection bits set
|
||||
*/
|
||||
|
||||
- if (info->jedec_id >> 16 == 0x1f) {
|
||||
+ if (info->jedec_id >> 16 == 0x1f ||
|
||||
+ info->jedec_id >> 16 == 0x89) {
|
||||
write_enable(flash);
|
||||
write_sr(flash, 0);
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
--- a/drivers/mtd/devices/m25p80.c
|
||||
+++ b/drivers/mtd/devices/m25p80.c
|
||||
@@ -889,6 +889,16 @@ static int __devinit m25p_probe(struct s
|
||||
@@ -890,6 +890,16 @@ static int __devinit m25p_probe(struct s
|
||||
part_probes, &parts, 0);
|
||||
}
|
||||
#endif
|
||||
|
@ -1,7 +1,8 @@
|
||||
/*
|
||||
* Driver for buttons on GPIO lines not capable of generating interrupts
|
||||
*
|
||||
* Copyright (C) 2007,2008 Gabor Juhos <juhosg at openwrt.org>
|
||||
* Copyright (C) 2007-2010 Gabor Juhos <juhosg@openwrt.org>
|
||||
* Copyright (C) 2010 Nuno Goncalves <nunojpg@gmail.com>
|
||||
*
|
||||
* This file was based on: /drivers/input/misc/cobalt_btns.c
|
||||
* Copyright (C) 2007 Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>
|
||||
@ -29,12 +30,18 @@
|
||||
#include <asm/gpio.h>
|
||||
|
||||
#define DRV_NAME "gpio-buttons"
|
||||
#define DRV_VERSION "0.1.1"
|
||||
#define DRV_VERSION "0.1.2"
|
||||
#define PFX DRV_NAME ": "
|
||||
|
||||
struct gpio_button_data {
|
||||
int last_state;
|
||||
int count;
|
||||
};
|
||||
|
||||
struct gpio_buttons_dev {
|
||||
struct input_polled_dev *poll_dev;
|
||||
struct gpio_buttons_platform_data *pdata;
|
||||
struct gpio_button_data *data;
|
||||
};
|
||||
|
||||
static void gpio_buttons_poll(struct input_polled_dev *dev)
|
||||
@ -49,22 +56,18 @@ static void gpio_buttons_poll(struct input_polled_dev *dev)
|
||||
unsigned int type = button->type ?: EV_KEY;
|
||||
int state;
|
||||
|
||||
state = gpio_get_value(button->gpio) ? 1 : 0;
|
||||
state ^= button->active_low;
|
||||
|
||||
if (state) {
|
||||
button->count++;
|
||||
} else {
|
||||
if (button->count >= button->threshold) {
|
||||
input_event(input, type, button->code, 1);
|
||||
input_sync(input);
|
||||
}
|
||||
button->count = 0;
|
||||
if (bdev->data[i].count < button->threshold) {
|
||||
bdev->data[i].count++;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (button->count == button->threshold) {
|
||||
input_event(input, type, button->code, 0);
|
||||
state = gpio_get_value(button->gpio) ? 1 : 0;
|
||||
if (state != bdev->data[i].last_state) {
|
||||
input_event(input, type, button->code,
|
||||
!!(state ^ button->active_low));
|
||||
input_sync(input);
|
||||
bdev->data[i].count = 0;
|
||||
bdev->data[i].last_state = state;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -77,16 +80,19 @@ static int __devinit gpio_buttons_probe(struct platform_device *pdev)
|
||||
struct input_dev *input;
|
||||
int error, i;
|
||||
|
||||
|
||||
if (!pdata)
|
||||
return -ENXIO;
|
||||
|
||||
bdev = kzalloc(sizeof(*bdev), GFP_KERNEL);
|
||||
bdev = kzalloc(sizeof(struct gpio_buttons_dev) +
|
||||
sizeof(struct gpio_button_data) * pdata->nbuttons,
|
||||
GFP_KERNEL);
|
||||
if (!bdev) {
|
||||
printk(KERN_ERR DRV_NAME "no memory for device\n");
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
bdev->data = (struct gpio_button_data *) &bdev[1];
|
||||
|
||||
poll_dev = input_allocate_polled_device();
|
||||
if (!poll_dev) {
|
||||
printk(KERN_ERR DRV_NAME "no memory for polled device\n");
|
||||
@ -131,7 +137,7 @@ static int __devinit gpio_buttons_probe(struct platform_device *pdev)
|
||||
}
|
||||
|
||||
input_set_capability(input, type, button->code);
|
||||
button->count = 0;
|
||||
bdev->data[i].last_state = gpio_get_value(button->gpio) ? 1 : 0;
|
||||
}
|
||||
|
||||
bdev->poll_dev = poll_dev;
|
||||
|
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Definitions for the GPIO buttons interface driver
|
||||
*
|
||||
* Copyright (C) 2007,2008 Gabor Juhos <juhosg at openwrt.org>
|
||||
* Copyright (C) 2007-2010 Gabor Juhos <juhosg@openwrt.org>
|
||||
*
|
||||
* This file was based on: /include/linux/gpio_keys.h
|
||||
* The original gpio_keys.h seems not to have a license.
|
||||
@ -21,7 +21,6 @@ struct gpio_button {
|
||||
char *desc; /* button description */
|
||||
int type; /* input event type (EV_KEY, EV_SW) */
|
||||
int code; /* input event code (KEY_*, SW_*) */
|
||||
int count;
|
||||
int threshold; /* count threshold */
|
||||
};
|
||||
|
||||
@ -32,4 +31,3 @@ struct gpio_buttons_platform_data {
|
||||
};
|
||||
|
||||
#endif /* _GPIO_BUTTONS_H_ */
|
||||
|
||||
|
@ -41,6 +41,7 @@ $(curdir)/dtc/compile := $(curdir)/bison/install
|
||||
$(curdir)/autoconf/compile := $(curdir)/m4/install
|
||||
$(curdir)/automake/compile := $(curdir)/m4/install $(curdir)/autoconf/install
|
||||
$(curdir)/mpfr/compile := $(curdir)/gmp/install
|
||||
$(curdir)/mtd-utils/compile := $(curdir)/libuuid/install
|
||||
|
||||
$(curdir)/builddirs := $(tools-y) $(tools-dep) $(tools-)
|
||||
$(curdir)/builddirs-default := $(tools-y)
|
||||
|
@ -36,13 +36,13 @@ define Host/Compile
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOST)/{lib,include}
|
||||
$(CP) $(HOST_BUILD_DIR)/lib/uuid/uuid.h $(STAGING_DIR_HOST)/include/
|
||||
$(INSTALL_DIR) $(STAGING_DIR_HOST)/{lib,include/uuid}
|
||||
$(CP) $(HOST_BUILD_DIR)/lib/uuid/uuid.h $(STAGING_DIR_HOST)/include/uuid/
|
||||
$(CP) $(HOST_BUILD_DIR)/lib/uuid/libuuid.{so*,a} $(STAGING_DIR_HOST)/lib/
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
rm -f $(STAGING_DIR_HOST)/include/uuid.h
|
||||
rm -f $(STAGING_DIR_HOST)/include/uuid/uuid.h
|
||||
rm -f $(STAGING_DIR_HOST)/lib/uuid/libuuid.{so*,a}
|
||||
$(call Host/Clean/Default)
|
||||
endef
|
||||
|
@ -21,7 +21,7 @@ HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
CFLAGS := $(HOST_CFLAGS) -I$(HOST_BUILD_DIR)/include -L$(HOST_BUILD_DIR)
|
||||
CFLAGS := $(HOST_CFLAGS) -I$(HOST_BUILD_DIR)/include -L$(HOST_BUILD_DIR) -L$(STAGING_DIR_HOST)/lib
|
||||
ifneq ($(HOST_OS),Linux)
|
||||
CFLAGS += -Dloff_t=off_t -D__BYTE_ORDER=BYTE_ORDER -include getline.h -include endian.h
|
||||
endif
|
||||
@ -39,17 +39,21 @@ define Host/Compile
|
||||
$(MAKE) -C $(HOST_BUILD_DIR)/ubi-utils \
|
||||
$(MTD_MAKEOPTS) \
|
||||
TARGETS=ubinize
|
||||
$(MAKE) -C $(HOST_BUILD_DIR)/mkfs.ubifs \
|
||||
$(MTD_MAKEOPTS) \
|
||||
BUILDDIR="$(HOST_BUILD_DIR)/mkfs.ubifs"
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(CP) \
|
||||
$(HOST_BUILD_DIR)/mkfs.jffs2 \
|
||||
$(HOST_BUILD_DIR)/mkfs.ubifs/mkfs.ubifs \
|
||||
$(HOST_BUILD_DIR)/ubinize \
|
||||
$(STAGING_DIR_HOST)/bin/
|
||||
endef
|
||||
|
||||
define Host/Clean
|
||||
rm -f $(STAGING_DIR_HOST)/bin/{mkfs.jffs2,ubinize}
|
||||
rm -f $(STAGING_DIR_HOST)/bin/{mkfs.jffs2,mkfs.ubifs,ubinize}
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
Loading…
Reference in New Issue
Block a user