Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323174
b: refs/heads/master
c: 40a3eb3
h: refs/heads/master
v: v3
  • Loading branch information
Def authored and Antonio Quartulli committed Sep 23, 2012
1 parent a76fcc7 commit dfe715d
Show file tree
Hide file tree
Showing 12 changed files with 35 additions and 97 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b05c4b50edbddbdde715c4a7350629819f6655e
refs/heads/master: 40a3eb33e307616567f4b81792f405a7f3f0abee
2 changes: 1 addition & 1 deletion trunk/arch/arm/mach-mxs/mach-mxs.c
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ static void __init apx4devkit_init(void)
enable_clk_enet_out();

if (IS_BUILTIN(CONFIG_PHYLIB))
phy_register_fixup_for_uid(PHY_ID_KSZ8051, MICREL_PHY_ID_MASK,
phy_register_fixup_for_uid(PHY_ID_KS8051, MICREL_PHY_ID_MASK,
apx4devkit_phy_fixup);

mxsfb_pdata.mode_list = apx4devkit_video_modes;
Expand Down
45 changes: 9 additions & 36 deletions trunk/drivers/net/phy/micrel.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@
#include <linux/phy.h>
#include <linux/micrel_phy.h>

/* Operation Mode Strap Override */
#define MII_KSZPHY_OMSO 0x16
#define KSZPHY_OMSO_B_CAST_OFF (1 << 9)
#define KSZPHY_OMSO_RMII_OVERRIDE (1 << 1)
#define KSZPHY_OMSO_MII_OVERRIDE (1 << 0)

/* general Interrupt control/status reg in vendor specific block. */
#define MII_KSZPHY_INTCS 0x1B
#define KSZPHY_INTCS_JABBER (1 << 15)
Expand Down Expand Up @@ -107,13 +101,6 @@ static int kszphy_config_init(struct phy_device *phydev)
return 0;
}

static int ksz8021_config_init(struct phy_device *phydev)
{
const u16 val = KSZPHY_OMSO_B_CAST_OFF | KSZPHY_OMSO_RMII_OVERRIDE;
phy_write(phydev, MII_KSZPHY_OMSO, val);
return 0;
}

static int ks8051_config_init(struct phy_device *phydev)
{
int regval;
Expand Down Expand Up @@ -141,22 +128,9 @@ static struct phy_driver ksphy_driver[] = {
.config_intr = ks8737_config_intr,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8021,
.phy_id_mask = 0x00ffffff,
.name = "Micrel KSZ8021",
.features = (PHY_BASIC_FEATURES | SUPPORTED_Pause |
SUPPORTED_Asym_Pause),
.flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
.config_init = ksz8021_config_init,
.config_aneg = genphy_config_aneg,
.read_status = genphy_read_status,
.ack_interrupt = kszphy_ack_interrupt,
.config_intr = kszphy_config_intr,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8041,
.phy_id = PHY_ID_KS8041,
.phy_id_mask = 0x00fffff0,
.name = "Micrel KSZ8041",
.name = "Micrel KS8041",
.features = (PHY_BASIC_FEATURES | SUPPORTED_Pause
| SUPPORTED_Asym_Pause),
.flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
Expand All @@ -167,9 +141,9 @@ static struct phy_driver ksphy_driver[] = {
.config_intr = kszphy_config_intr,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8051,
.phy_id = PHY_ID_KS8051,
.phy_id_mask = 0x00fffff0,
.name = "Micrel KSZ8051",
.name = "Micrel KS8051",
.features = (PHY_BASIC_FEATURES | SUPPORTED_Pause
| SUPPORTED_Asym_Pause),
.flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
Expand All @@ -180,8 +154,8 @@ static struct phy_driver ksphy_driver[] = {
.config_intr = kszphy_config_intr,
.driver = { .owner = THIS_MODULE,},
}, {
.phy_id = PHY_ID_KSZ8001,
.name = "Micrel KSZ8001 or KS8721",
.phy_id = PHY_ID_KS8001,
.name = "Micrel KS8001 or KS8721",
.phy_id_mask = 0x00ffffff,
.features = (PHY_BASIC_FEATURES | SUPPORTED_Pause),
.flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
Expand Down Expand Up @@ -227,11 +201,10 @@ MODULE_LICENSE("GPL");

static struct mdio_device_id __maybe_unused micrel_tbl[] = {
{ PHY_ID_KSZ9021, 0x000ffffe },
{ PHY_ID_KSZ8001, 0x00ffffff },
{ PHY_ID_KS8001, 0x00ffffff },
{ PHY_ID_KS8737, 0x00fffff0 },
{ PHY_ID_KSZ8021, 0x00ffffff },
{ PHY_ID_KSZ8041, 0x00fffff0 },
{ PHY_ID_KSZ8051, 0x00fffff0 },
{ PHY_ID_KS8041, 0x00fffff0 },
{ PHY_ID_KS8051, 0x00fffff0 },
{ }
};

Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/net/wireless/iwlwifi/pcie/trans.c
Original file line number Diff line number Diff line change
Expand Up @@ -1442,7 +1442,6 @@ static int iwl_trans_pcie_start_hw(struct iwl_trans *trans)
return err;

err_free_irq:
trans_pcie->irq_requested = false;
free_irq(trans_pcie->irq, trans);
error:
iwl_free_isr_ict(trans);
Expand Down
19 changes: 3 additions & 16 deletions trunk/include/linux/micrel_phy.h
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
/*
* include/linux/micrel_phy.h
*
* Micrel PHY IDs
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
*/

#ifndef _MICREL_PHY_H
#define _MICREL_PHY_H

#define MICREL_PHY_ID_MASK 0x00fffff0

#define PHY_ID_KSZ9021 0x00221610
#define PHY_ID_KS8737 0x00221720
#define PHY_ID_KSZ8021 0x00221555
#define PHY_ID_KSZ8041 0x00221510
#define PHY_ID_KSZ8051 0x00221550
#define PHY_ID_KS8041 0x00221510
#define PHY_ID_KS8051 0x00221550
/* both for ks8001 Rev. A/B, and for ks8721 Rev 3. */
#define PHY_ID_KSZ8001 0x0022161A
#define PHY_ID_KS8001 0x0022161A

/* struct phy_device dev_flags definitions */
#define MICREL_PHY_50MHZ_CLK 0x00000001
Expand Down
7 changes: 5 additions & 2 deletions trunk/net/batman-adv/soft-interface.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,21 @@ static int batadv_interface_set_mac_addr(struct net_device *dev, void *p)
{
struct batadv_priv *bat_priv = netdev_priv(dev);
struct sockaddr *addr = p;
uint8_t old_addr[ETH_ALEN];

if (!is_valid_ether_addr(addr->sa_data))
return -EADDRNOTAVAIL;

memcpy(old_addr, dev->dev_addr, ETH_ALEN);
memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);

/* only modify transtable if it has been initialized before */
if (atomic_read(&bat_priv->mesh_state) == BATADV_MESH_ACTIVE) {
batadv_tt_local_remove(bat_priv, dev->dev_addr,
batadv_tt_local_remove(bat_priv, old_addr,
"mac address changed", false);
batadv_tt_local_add(dev, addr->sa_data, BATADV_NULL_IFINDEX);
}

memcpy(dev->dev_addr, addr->sa_data, ETH_ALEN);
dev->addr_assign_type &= ~NET_ADDR_RANDOM;
return 0;
}
Expand Down
2 changes: 0 additions & 2 deletions trunk/net/bluetooth/hci_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,8 +734,6 @@ static int hci_dev_do_close(struct hci_dev *hdev)

cancel_work_sync(&hdev->le_scan);

cancel_delayed_work(&hdev->power_off);

hci_req_cancel(hdev, ENODEV);
hci_req_lock(hdev);

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/bluetooth/l2cap_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ static void l2cap_send_disconn_req(struct l2cap_conn *conn, struct l2cap_chan *c
if (!conn)
return;

if (chan->mode == L2CAP_MODE_ERTM && chan->state == BT_CONNECTED) {
if (chan->mode == L2CAP_MODE_ERTM) {
__clear_retrans_timer(chan);
__clear_monitor_timer(chan);
__clear_ack_timer(chan);
Expand Down
16 changes: 0 additions & 16 deletions trunk/net/bluetooth/mgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2875,22 +2875,6 @@ int mgmt_powered(struct hci_dev *hdev, u8 powered)
if (scan)
hci_send_cmd(hdev, HCI_OP_WRITE_SCAN_ENABLE, 1, &scan);

if (test_bit(HCI_SSP_ENABLED, &hdev->dev_flags)) {
u8 ssp = 1;

hci_send_cmd(hdev, HCI_OP_WRITE_SSP_MODE, 1, &ssp);
}

if (test_bit(HCI_LE_ENABLED, &hdev->dev_flags)) {
struct hci_cp_write_le_host_supported cp;

cp.le = 1;
cp.simul = !!(hdev->features[6] & LMP_SIMUL_LE_BR);

hci_send_cmd(hdev, HCI_OP_WRITE_LE_HOST_SUPPORTED,
sizeof(cp), &cp);
}

update_class(hdev);
update_name(hdev, hdev->dev_name);
update_eir(hdev);
Expand Down
3 changes: 1 addition & 2 deletions trunk/net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -691,8 +691,7 @@ int sock_setsockopt(struct socket *sock, int level, int optname,

case SO_KEEPALIVE:
#ifdef CONFIG_INET
if (sk->sk_protocol == IPPROTO_TCP &&
sk->sk_type == SOCK_STREAM)
if (sk->sk_protocol == IPPROTO_TCP)
tcp_set_keepalive(sk, valbool);
#endif
sock_valbool_flag(sk, SOCK_KEEPOPEN, valbool);
Expand Down
21 changes: 11 additions & 10 deletions trunk/net/ipv6/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,20 +107,21 @@ static struct sock *__raw_v6_lookup(struct net *net, struct sock *sk,
* 0 - deliver
* 1 - block
*/
static int icmpv6_filter(const struct sock *sk, const struct sk_buff *skb)
static __inline__ int icmpv6_filter(struct sock *sk, struct sk_buff *skb)
{
struct icmp6hdr *_hdr;
const struct icmp6hdr *hdr;
struct icmp6hdr *icmph;
struct raw6_sock *rp = raw6_sk(sk);

if (pskb_may_pull(skb, sizeof(struct icmp6hdr))) {
__u32 *data = &rp->filter.data[0];
int bit_nr;

hdr = skb_header_pointer(skb, skb_transport_offset(skb),
sizeof(_hdr), &_hdr);
if (hdr) {
const __u32 *data = &raw6_sk(sk)->filter.data[0];
unsigned int type = hdr->icmp6_type;
icmph = (struct icmp6hdr *) skb->data;
bit_nr = icmph->icmp6_type;

return (data[type >> 5] & (1U << (type & 31))) != 0;
return (data[bit_nr >> 5] & (1 << (bit_nr & 31))) != 0;
}
return 1;
return 0;
}

#if defined(CONFIG_IPV6_MIP6) || defined(CONFIG_IPV6_MIP6_MODULE)
Expand Down
12 changes: 3 additions & 9 deletions trunk/net/wireless/reg.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,6 @@ static void reg_regdb_search(struct work_struct *work)
struct reg_regdb_search_request *request;
const struct ieee80211_regdomain *curdom, *regdom;
int i, r;
bool set_reg = false;

mutex_lock(&cfg80211_mutex);

mutex_lock(&reg_regdb_search_mutex);
while (!list_empty(&reg_regdb_search_list)) {
Expand All @@ -368,19 +365,16 @@ static void reg_regdb_search(struct work_struct *work)
r = reg_copy_regd(&regdom, curdom);
if (r)
break;
set_reg = true;
mutex_lock(&cfg80211_mutex);
set_regdom(regdom);
mutex_unlock(&cfg80211_mutex);
break;
}
}

kfree(request);
}
mutex_unlock(&reg_regdb_search_mutex);

if (set_reg)
set_regdom(regdom);

mutex_unlock(&cfg80211_mutex);
}

static DECLARE_WORK(reg_regdb_work, reg_regdb_search);
Expand Down

0 comments on commit dfe715d

Please sign in to comment.