mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
smc91x: let smc91x work well under netpoll
pxaficp-ir: remove incorrect net_device_ops
NET: llc, zero sockaddr_llc struct
drivers/net: fixed drivers that support netpoll use ndo_start_xmit()
netpoll: warning for ndo_start_xmit returns with interrupts enabled
net: Fix Micrel KSZ8842 Kconfig description
netfilter: xt_quota: fix wrong return value (error case)
ipv6: Fix commit 63d9950b08 (ipv6: Make v4-mapped bindings consistent with IPv4)
E100: fix interaction with swiotlb on X86.
pkt_sched: Convert CBQ to tasklet_hrtimer.
pkt_sched: Convert qdisc_watchdog to tasklet_hrtimer
rtl8187: always set MSR_LINK_ENEDCA flag with RTL8187B
ibm_newemac: emac_close() needs to call netif_carrier_off()
net: fix ks8851 build errors
net: Rename MAC platform driver for w90p910 platform
yellowfin: Fix buffer underrun after dev_alloc_skb() failure
orinoco: correct key bounds check in orinoco_hw_get_tkip_iv
mac80211: fix todo lock
This commit is contained in:
commit
1cac6ec9b7
21 changed files with 117 additions and 80 deletions
|
|
@ -319,6 +319,11 @@ static void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)
|
|||
|
||||
udelay(USEC_PER_POLL);
|
||||
}
|
||||
|
||||
WARN_ONCE(!irqs_disabled(),
|
||||
"netpoll_send_skb(): %s enabled interrupts in poll (%pF)\n",
|
||||
dev->name, ops->ndo_start_xmit);
|
||||
|
||||
local_irq_restore(flags);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -306,8 +306,10 @@ int inet6_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
|
|||
v4addr != htonl(INADDR_ANY) &&
|
||||
chk_addr_ret != RTN_LOCAL &&
|
||||
chk_addr_ret != RTN_MULTICAST &&
|
||||
chk_addr_ret != RTN_BROADCAST)
|
||||
chk_addr_ret != RTN_BROADCAST) {
|
||||
err = -EADDRNOTAVAIL;
|
||||
goto out;
|
||||
}
|
||||
} else {
|
||||
if (addr_type != IPV6_ADDR_ANY) {
|
||||
struct net_device *dev = NULL;
|
||||
|
|
|
|||
|
|
@ -914,6 +914,7 @@ static int llc_ui_getname(struct socket *sock, struct sockaddr *uaddr,
|
|||
struct llc_sock *llc = llc_sk(sk);
|
||||
int rc = 0;
|
||||
|
||||
memset(&sllc, 0, sizeof(sllc));
|
||||
lock_sock(sk);
|
||||
if (sock_flag(sk, SOCK_ZAPPED))
|
||||
goto out;
|
||||
|
|
|
|||
|
|
@ -67,6 +67,8 @@ static DECLARE_WORK(todo_work, key_todo);
|
|||
*
|
||||
* @key: key to add to do item for
|
||||
* @flag: todo flag(s)
|
||||
*
|
||||
* Must be called with IRQs or softirqs disabled.
|
||||
*/
|
||||
static void add_todo(struct ieee80211_key *key, u32 flag)
|
||||
{
|
||||
|
|
@ -140,9 +142,9 @@ static void ieee80211_key_enable_hw_accel(struct ieee80211_key *key)
|
|||
ret = drv_set_key(key->local, SET_KEY, &sdata->vif, sta, &key->conf);
|
||||
|
||||
if (!ret) {
|
||||
spin_lock(&todo_lock);
|
||||
spin_lock_bh(&todo_lock);
|
||||
key->flags |= KEY_FLAG_UPLOADED_TO_HARDWARE;
|
||||
spin_unlock(&todo_lock);
|
||||
spin_unlock_bh(&todo_lock);
|
||||
}
|
||||
|
||||
if (ret && ret != -ENOSPC && ret != -EOPNOTSUPP)
|
||||
|
|
@ -164,12 +166,12 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
|
|||
if (!key || !key->local->ops->set_key)
|
||||
return;
|
||||
|
||||
spin_lock(&todo_lock);
|
||||
spin_lock_bh(&todo_lock);
|
||||
if (!(key->flags & KEY_FLAG_UPLOADED_TO_HARDWARE)) {
|
||||
spin_unlock(&todo_lock);
|
||||
spin_unlock_bh(&todo_lock);
|
||||
return;
|
||||
}
|
||||
spin_unlock(&todo_lock);
|
||||
spin_unlock_bh(&todo_lock);
|
||||
|
||||
sta = get_sta_for_key(key);
|
||||
sdata = key->sdata;
|
||||
|
|
@ -188,9 +190,9 @@ static void ieee80211_key_disable_hw_accel(struct ieee80211_key *key)
|
|||
wiphy_name(key->local->hw.wiphy),
|
||||
key->conf.keyidx, sta ? sta->addr : bcast_addr, ret);
|
||||
|
||||
spin_lock(&todo_lock);
|
||||
spin_lock_bh(&todo_lock);
|
||||
key->flags &= ~KEY_FLAG_UPLOADED_TO_HARDWARE;
|
||||
spin_unlock(&todo_lock);
|
||||
spin_unlock_bh(&todo_lock);
|
||||
}
|
||||
|
||||
static void __ieee80211_set_default_key(struct ieee80211_sub_if_data *sdata,
|
||||
|
|
@ -437,14 +439,14 @@ void ieee80211_key_link(struct ieee80211_key *key,
|
|||
|
||||
__ieee80211_key_replace(sdata, sta, old_key, key);
|
||||
|
||||
spin_unlock_irqrestore(&sdata->local->key_lock, flags);
|
||||
|
||||
/* free old key later */
|
||||
add_todo(old_key, KEY_FLAG_TODO_DELETE);
|
||||
|
||||
add_todo(key, KEY_FLAG_TODO_ADD_DEBUGFS);
|
||||
if (netif_running(sdata->dev))
|
||||
add_todo(key, KEY_FLAG_TODO_HWACCEL_ADD);
|
||||
|
||||
spin_unlock_irqrestore(&sdata->local->key_lock, flags);
|
||||
}
|
||||
|
||||
static void __ieee80211_key_free(struct ieee80211_key *key)
|
||||
|
|
@ -547,7 +549,7 @@ static void __ieee80211_key_todo(void)
|
|||
*/
|
||||
synchronize_rcu();
|
||||
|
||||
spin_lock(&todo_lock);
|
||||
spin_lock_bh(&todo_lock);
|
||||
while (!list_empty(&todo_list)) {
|
||||
key = list_first_entry(&todo_list, struct ieee80211_key, todo);
|
||||
list_del_init(&key->todo);
|
||||
|
|
@ -558,7 +560,7 @@ static void __ieee80211_key_todo(void)
|
|||
KEY_FLAG_TODO_HWACCEL_REMOVE |
|
||||
KEY_FLAG_TODO_DELETE);
|
||||
key->flags &= ~todoflags;
|
||||
spin_unlock(&todo_lock);
|
||||
spin_unlock_bh(&todo_lock);
|
||||
|
||||
work_done = false;
|
||||
|
||||
|
|
@ -591,9 +593,9 @@ static void __ieee80211_key_todo(void)
|
|||
|
||||
WARN_ON(!work_done);
|
||||
|
||||
spin_lock(&todo_lock);
|
||||
spin_lock_bh(&todo_lock);
|
||||
}
|
||||
spin_unlock(&todo_lock);
|
||||
spin_unlock_bh(&todo_lock);
|
||||
}
|
||||
|
||||
void ieee80211_key_todo(void)
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ static bool quota_mt_check(const struct xt_mtchk_param *par)
|
|||
|
||||
q->master = kmalloc(sizeof(*q->master), GFP_KERNEL);
|
||||
if (q->master == NULL)
|
||||
return -ENOMEM;
|
||||
return false;
|
||||
|
||||
q->master->quota = q->quota;
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -468,8 +468,8 @@ static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer)
|
|||
|
||||
void qdisc_watchdog_init(struct qdisc_watchdog *wd, struct Qdisc *qdisc)
|
||||
{
|
||||
hrtimer_init(&wd->timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
wd->timer.function = qdisc_watchdog;
|
||||
tasklet_hrtimer_init(&wd->timer, qdisc_watchdog,
|
||||
CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
wd->qdisc = qdisc;
|
||||
}
|
||||
EXPORT_SYMBOL(qdisc_watchdog_init);
|
||||
|
|
@ -485,13 +485,13 @@ void qdisc_watchdog_schedule(struct qdisc_watchdog *wd, psched_time_t expires)
|
|||
wd->qdisc->flags |= TCQ_F_THROTTLED;
|
||||
time = ktime_set(0, 0);
|
||||
time = ktime_add_ns(time, PSCHED_TICKS2NS(expires));
|
||||
hrtimer_start(&wd->timer, time, HRTIMER_MODE_ABS);
|
||||
tasklet_hrtimer_start(&wd->timer, time, HRTIMER_MODE_ABS);
|
||||
}
|
||||
EXPORT_SYMBOL(qdisc_watchdog_schedule);
|
||||
|
||||
void qdisc_watchdog_cancel(struct qdisc_watchdog *wd)
|
||||
{
|
||||
hrtimer_cancel(&wd->timer);
|
||||
tasklet_hrtimer_cancel(&wd->timer);
|
||||
wd->qdisc->flags &= ~TCQ_F_THROTTLED;
|
||||
}
|
||||
EXPORT_SYMBOL(qdisc_watchdog_cancel);
|
||||
|
|
|
|||
|
|
@ -163,7 +163,7 @@ struct cbq_sched_data
|
|||
psched_time_t now_rt; /* Cached real time */
|
||||
unsigned pmask;
|
||||
|
||||
struct hrtimer delay_timer;
|
||||
struct tasklet_hrtimer delay_timer;
|
||||
struct qdisc_watchdog watchdog; /* Watchdog timer,
|
||||
started when CBQ has
|
||||
backlog, but cannot
|
||||
|
|
@ -503,6 +503,8 @@ static void cbq_ovl_delay(struct cbq_class *cl)
|
|||
cl->undertime = q->now + delay;
|
||||
|
||||
if (delay > 0) {
|
||||
struct hrtimer *ht;
|
||||
|
||||
sched += delay + cl->penalty;
|
||||
cl->penalized = sched;
|
||||
cl->cpriority = TC_CBQ_MAXPRIO;
|
||||
|
|
@ -510,12 +512,12 @@ static void cbq_ovl_delay(struct cbq_class *cl)
|
|||
|
||||
expires = ktime_set(0, 0);
|
||||
expires = ktime_add_ns(expires, PSCHED_TICKS2NS(sched));
|
||||
if (hrtimer_try_to_cancel(&q->delay_timer) &&
|
||||
ktime_to_ns(ktime_sub(
|
||||
hrtimer_get_expires(&q->delay_timer),
|
||||
expires)) > 0)
|
||||
hrtimer_set_expires(&q->delay_timer, expires);
|
||||
hrtimer_restart(&q->delay_timer);
|
||||
ht = &q->delay_timer.timer;
|
||||
if (hrtimer_try_to_cancel(ht) &&
|
||||
ktime_to_ns(ktime_sub(hrtimer_get_expires(ht),
|
||||
expires)) > 0)
|
||||
hrtimer_set_expires(ht, expires);
|
||||
hrtimer_restart(ht);
|
||||
cl->delayed = 1;
|
||||
cl->xstats.overactions++;
|
||||
return;
|
||||
|
|
@ -621,7 +623,7 @@ static enum hrtimer_restart cbq_undelay(struct hrtimer *timer)
|
|||
|
||||
time = ktime_set(0, 0);
|
||||
time = ktime_add_ns(time, PSCHED_TICKS2NS(now + delay));
|
||||
hrtimer_start(&q->delay_timer, time, HRTIMER_MODE_ABS);
|
||||
tasklet_hrtimer_start(&q->delay_timer, time, HRTIMER_MODE_ABS);
|
||||
}
|
||||
|
||||
sch->flags &= ~TCQ_F_THROTTLED;
|
||||
|
|
@ -1214,7 +1216,7 @@ cbq_reset(struct Qdisc* sch)
|
|||
q->tx_class = NULL;
|
||||
q->tx_borrowed = NULL;
|
||||
qdisc_watchdog_cancel(&q->watchdog);
|
||||
hrtimer_cancel(&q->delay_timer);
|
||||
tasklet_hrtimer_cancel(&q->delay_timer);
|
||||
q->toplevel = TC_CBQ_MAXLEVEL;
|
||||
q->now = psched_get_time();
|
||||
q->now_rt = q->now;
|
||||
|
|
@ -1397,7 +1399,8 @@ static int cbq_init(struct Qdisc *sch, struct nlattr *opt)
|
|||
q->link.minidle = -0x7FFFFFFF;
|
||||
|
||||
qdisc_watchdog_init(&q->watchdog, sch);
|
||||
hrtimer_init(&q->delay_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
tasklet_hrtimer_init(&q->delay_timer, cbq_undelay,
|
||||
CLOCK_MONOTONIC, HRTIMER_MODE_ABS);
|
||||
q->delay_timer.function = cbq_undelay;
|
||||
q->toplevel = TC_CBQ_MAXLEVEL;
|
||||
q->now = psched_get_time();
|
||||
|
|
|
|||
Loading…
Reference in a new issue