aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/atm/firestream.c4
-rw-r--r--drivers/net/tg3.c98
-rw-r--r--include/net/ax25.h2
-rw-r--r--include/net/ip6_tunnel.h2
-rw-r--r--include/net/irda/discovery.h2
-rw-r--r--include/net/sctp/structs.h6
-rw-r--r--net/ax25/ax25_in.c2
-rw-r--r--net/compat.c2
-rw-r--r--net/core/dev.c2
-rw-r--r--net/core/scm.c2
-rw-r--r--net/dccp/ackvec.h2
-rw-r--r--net/dccp/ccids/ccid3.c2
-rw-r--r--net/ipv4/arp.c3
-rw-r--r--net/ipv4/fib_frontend.c9
-rw-r--r--net/ipv4/ip_gre.c2
-rw-r--r--net/ipv4/netfilter/nf_nat_sip.c2
-rw-r--r--net/ipv6/ndisc.c2
-rw-r--r--net/irda/ircomm/ircomm_param.c2
-rw-r--r--net/irda/irlan/irlan_eth.c2
-rw-r--r--net/irda/irlap_frame.c2
-rw-r--r--net/irda/parameters.c12
-rw-r--r--net/irda/wrapper.c2
-rw-r--r--net/key/af_key.c14
-rw-r--r--net/mac80211/ieee80211.c1
-rw-r--r--net/mac80211/ieee80211_rate.c2
-rw-r--r--net/mac80211/ieee80211_sta.c8
-rw-r--r--net/netfilter/nf_conntrack_sip.c4
-rw-r--r--net/netlabel/netlabel_mgmt.c2
-rw-r--r--net/netrom/nr_dev.c2
-rw-r--r--net/sched/sch_hfsc.c2
-rw-r--r--net/sctp/sm_make_chunk.c8
-rw-r--r--net/xfrm/xfrm_policy.c4
-rw-r--r--net/xfrm/xfrm_state.c4
33 files changed, 118 insertions, 97 deletions
diff --git a/drivers/atm/firestream.c b/drivers/atm/firestream.c
index f8f7139c07c1..c662d686154a 100644
--- a/drivers/atm/firestream.c
+++ b/drivers/atm/firestream.c
@@ -171,8 +171,8 @@ static char *res_strings[] = {
171 "packet purged", 171 "packet purged",
172 "packet ageing timeout", 172 "packet ageing timeout",
173 "channel ageing timeout", 173 "channel ageing timeout",
174 "calculated lenght error", 174 "calculated length error",
175 "programmed lenght limit error", 175 "programmed length limit error",
176 "aal5 crc32 error", 176 "aal5 crc32 error",
177 "oam transp or transpc crc10 error", 177 "oam transp or transpc crc10 error",
178 "reserved 25", 178 "reserved 25",
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c
index 4942f7d18937..22eb7c8c1a25 100644
--- a/drivers/net/tg3.c
+++ b/drivers/net/tg3.c
@@ -8189,6 +8189,7 @@ static int tg3_get_eeprom_len(struct net_device *dev)
8189} 8189}
8190 8190
8191static int tg3_nvram_read(struct tg3 *tp, u32 offset, u32 *val); 8191static int tg3_nvram_read(struct tg3 *tp, u32 offset, u32 *val);
8192static int tg3_nvram_read_le(struct tg3 *tp, u32 offset, __le32 *val);
8192static int tg3_nvram_read_swab(struct tg3 *tp, u32 offset, u32 *val); 8193static int tg3_nvram_read_swab(struct tg3 *tp, u32 offset, u32 *val);
8193 8194
8194static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 *data) 8195static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom, u8 *data)
@@ -8196,7 +8197,8 @@ static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
8196 struct tg3 *tp = netdev_priv(dev); 8197 struct tg3 *tp = netdev_priv(dev);
8197 int ret; 8198 int ret;
8198 u8 *pd; 8199 u8 *pd;
8199 u32 i, offset, len, val, b_offset, b_count; 8200 u32 i, offset, len, b_offset, b_count;
8201 __le32 val;
8200 8202
8201 if (tp->link_config.phy_is_low_power) 8203 if (tp->link_config.phy_is_low_power)
8202 return -EAGAIN; 8204 return -EAGAIN;
@@ -8215,10 +8217,9 @@ static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
8215 /* i.e. offset=1 len=2 */ 8217 /* i.e. offset=1 len=2 */
8216 b_count = len; 8218 b_count = len;
8217 } 8219 }
8218 ret = tg3_nvram_read(tp, offset-b_offset, &val); 8220 ret = tg3_nvram_read_le(tp, offset-b_offset, &val);
8219 if (ret) 8221 if (ret)
8220 return ret; 8222 return ret;
8221 val = cpu_to_le32(val);
8222 memcpy(data, ((char*)&val) + b_offset, b_count); 8223 memcpy(data, ((char*)&val) + b_offset, b_count);
8223 len -= b_count; 8224 len -= b_count;
8224 offset += b_count; 8225 offset += b_count;
@@ -8228,12 +8229,11 @@ static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
8228 /* read bytes upto the last 4 byte boundary */ 8229 /* read bytes upto the last 4 byte boundary */
8229 pd = &data[eeprom->len]; 8230 pd = &data[eeprom->len];
8230 for (i = 0; i < (len - (len & 3)); i += 4) { 8231 for (i = 0; i < (len - (len & 3)); i += 4) {
8231 ret = tg3_nvram_read(tp, offset + i, &val); 8232 ret = tg3_nvram_read_le(tp, offset + i, &val);
8232 if (ret) { 8233 if (ret) {
8233 eeprom->len += i; 8234 eeprom->len += i;
8234 return ret; 8235 return ret;
8235 } 8236 }
8236 val = cpu_to_le32(val);
8237 memcpy(pd + i, &val, 4); 8237 memcpy(pd + i, &val, 4);
8238 } 8238 }
8239 eeprom->len += i; 8239 eeprom->len += i;
@@ -8243,11 +8243,10 @@ static int tg3_get_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
8243 pd = &data[eeprom->len]; 8243 pd = &data[eeprom->len];
8244 b_count = len & 3; 8244 b_count = len & 3;
8245 b_offset = offset + len - b_count; 8245 b_offset = offset + len - b_count;
8246 ret = tg3_nvram_read(tp, b_offset, &val); 8246 ret = tg3_nvram_read_le(tp, b_offset, &val);
8247 if (ret) 8247 if (ret)
8248 return ret; 8248 return ret;
8249 val = cpu_to_le32(val); 8249 memcpy(pd, &val, b_count);
8250 memcpy(pd, ((char*)&val), b_count);
8251 eeprom->len += b_count; 8250 eeprom->len += b_count;
8252 } 8251 }
8253 return 0; 8252 return 0;
@@ -8259,8 +8258,9 @@ static int tg3_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
8259{ 8258{
8260 struct tg3 *tp = netdev_priv(dev); 8259 struct tg3 *tp = netdev_priv(dev);
8261 int ret; 8260 int ret;
8262 u32 offset, len, b_offset, odd_len, start, end; 8261 u32 offset, len, b_offset, odd_len;
8263 u8 *buf; 8262 u8 *buf;
8263 __le32 start, end;
8264 8264
8265 if (tp->link_config.phy_is_low_power) 8265 if (tp->link_config.phy_is_low_power)
8266 return -EAGAIN; 8266 return -EAGAIN;
@@ -8273,10 +8273,9 @@ static int tg3_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
8273 8273
8274 if ((b_offset = (offset & 3))) { 8274 if ((b_offset = (offset & 3))) {
8275 /* adjustments to start on required 4 byte boundary */ 8275 /* adjustments to start on required 4 byte boundary */
8276 ret = tg3_nvram_read(tp, offset-b_offset, &start); 8276 ret = tg3_nvram_read_le(tp, offset-b_offset, &start);
8277 if (ret) 8277 if (ret)
8278 return ret; 8278 return ret;
8279 start = cpu_to_le32(start);
8280 len += b_offset; 8279 len += b_offset;
8281 offset &= ~3; 8280 offset &= ~3;
8282 if (len < 4) 8281 if (len < 4)
@@ -8288,10 +8287,9 @@ static int tg3_set_eeprom(struct net_device *dev, struct ethtool_eeprom *eeprom,
8288 /* adjustments to end on required 4 byte boundary */ 8287 /* adjustments to end on required 4 byte boundary */
8289 odd_len = 1; 8288 odd_len = 1;
8290 len = (len + 3) & ~3; 8289 len = (len + 3) & ~3;
8291 ret = tg3_nvram_read(tp, offset+len-4, &end); 8290 ret = tg3_nvram_read_le(tp, offset+len-4, &end);
8292 if (ret) 8291 if (ret)
8293 return ret; 8292 return ret;
8294 end = cpu_to_le32(end);
8295 } 8293 }
8296 8294
8297 buf = data; 8295 buf = data;
@@ -8734,7 +8732,8 @@ static void tg3_get_ethtool_stats (struct net_device *dev,
8734 8732
8735static int tg3_test_nvram(struct tg3 *tp) 8733static int tg3_test_nvram(struct tg3 *tp)
8736{ 8734{
8737 u32 *buf, csum, magic; 8735 u32 csum, magic;
8736 __le32 *buf;
8738 int i, j, k, err = 0, size; 8737 int i, j, k, err = 0, size;
8739 8738
8740 if (tg3_nvram_read_swab(tp, 0, &magic) != 0) 8739 if (tg3_nvram_read_swab(tp, 0, &magic) != 0)
@@ -8771,21 +8770,19 @@ static int tg3_test_nvram(struct tg3 *tp)
8771 8770
8772 err = -EIO; 8771 err = -EIO;
8773 for (i = 0, j = 0; i < size; i += 4, j++) { 8772 for (i = 0, j = 0; i < size; i += 4, j++) {
8774 u32 val; 8773 if ((err = tg3_nvram_read_le(tp, i, &buf[j])) != 0)
8775
8776 if ((err = tg3_nvram_read(tp, i, &val)) != 0)
8777 break; 8774 break;
8778 buf[j] = cpu_to_le32(val);
8779 } 8775 }
8780 if (i < size) 8776 if (i < size)
8781 goto out; 8777 goto out;
8782 8778
8783 /* Selfboot format */ 8779 /* Selfboot format */
8784 if ((cpu_to_be32(buf[0]) & TG3_EEPROM_MAGIC_FW_MSK) == 8780 magic = swab32(le32_to_cpu(buf[0]));
8781 if ((magic & TG3_EEPROM_MAGIC_FW_MSK) ==
8785 TG3_EEPROM_MAGIC_FW) { 8782 TG3_EEPROM_MAGIC_FW) {
8786 u8 *buf8 = (u8 *) buf, csum8 = 0; 8783 u8 *buf8 = (u8 *) buf, csum8 = 0;
8787 8784
8788 if ((cpu_to_be32(buf[0]) & TG3_EEPROM_SB_REVISION_MASK) == 8785 if ((magic & TG3_EEPROM_SB_REVISION_MASK) ==
8789 TG3_EEPROM_SB_REVISION_2) { 8786 TG3_EEPROM_SB_REVISION_2) {
8790 /* For rev 2, the csum doesn't include the MBA. */ 8787 /* For rev 2, the csum doesn't include the MBA. */
8791 for (i = 0; i < TG3_EEPROM_SB_F1R2_MBA_OFF; i++) 8788 for (i = 0; i < TG3_EEPROM_SB_F1R2_MBA_OFF; i++)
@@ -8806,7 +8803,7 @@ static int tg3_test_nvram(struct tg3 *tp)
8806 goto out; 8803 goto out;
8807 } 8804 }
8808 8805
8809 if ((cpu_to_be32(buf[0]) & TG3_EEPROM_MAGIC_HW_MSK) == 8806 if ((magic & TG3_EEPROM_MAGIC_HW_MSK) ==
8810 TG3_EEPROM_MAGIC_HW) { 8807 TG3_EEPROM_MAGIC_HW) {
8811 u8 data[NVRAM_SELFBOOT_DATA_SIZE]; 8808 u8 data[NVRAM_SELFBOOT_DATA_SIZE];
8812 u8 parity[NVRAM_SELFBOOT_DATA_SIZE]; 8809 u8 parity[NVRAM_SELFBOOT_DATA_SIZE];
@@ -8852,12 +8849,12 @@ static int tg3_test_nvram(struct tg3 *tp)
8852 8849
8853 /* Bootstrap checksum at offset 0x10 */ 8850 /* Bootstrap checksum at offset 0x10 */
8854 csum = calc_crc((unsigned char *) buf, 0x10); 8851 csum = calc_crc((unsigned char *) buf, 0x10);
8855 if(csum != cpu_to_le32(buf[0x10/4])) 8852 if(csum != le32_to_cpu(buf[0x10/4]))
8856 goto out; 8853 goto out;
8857 8854
8858 /* Manufacturing block starts at offset 0x74, checksum at 0xfc */ 8855 /* Manufacturing block starts at offset 0x74, checksum at 0xfc */
8859 csum = calc_crc((unsigned char *) &buf[0x74/4], 0x88); 8856 csum = calc_crc((unsigned char *) &buf[0x74/4], 0x88);
8860 if (csum != cpu_to_le32(buf[0xfc/4])) 8857 if (csum != le32_to_cpu(buf[0xfc/4]))
8861 goto out; 8858 goto out;
8862 8859
8863 err = 0; 8860 err = 0;
@@ -10171,6 +10168,15 @@ static int tg3_nvram_read(struct tg3 *tp, u32 offset, u32 *val)
10171 return ret; 10168 return ret;
10172} 10169}
10173 10170
10171static int tg3_nvram_read_le(struct tg3 *tp, u32 offset, __le32 *val)
10172{
10173 u32 v;
10174 int res = tg3_nvram_read(tp, offset, &v);
10175 if (!res)
10176 *val = cpu_to_le32(v);
10177 return res;
10178}
10179
10174static int tg3_nvram_read_swab(struct tg3 *tp, u32 offset, u32 *val) 10180static int tg3_nvram_read_swab(struct tg3 *tp, u32 offset, u32 *val)
10175{ 10181{
10176 int err; 10182 int err;
@@ -10188,13 +10194,14 @@ static int tg3_nvram_write_block_using_eeprom(struct tg3 *tp,
10188 u32 val; 10194 u32 val;
10189 10195
10190 for (i = 0; i < len; i += 4) { 10196 for (i = 0; i < len; i += 4) {
10191 u32 addr, data; 10197 u32 addr;
10198 __le32 data;
10192 10199
10193 addr = offset + i; 10200 addr = offset + i;
10194 10201
10195 memcpy(&data, buf + i, 4); 10202 memcpy(&data, buf + i, 4);
10196 10203
10197 tw32(GRC_EEPROM_DATA, cpu_to_le32(data)); 10204 tw32(GRC_EEPROM_DATA, le32_to_cpu(data));
10198 10205
10199 val = tr32(GRC_EEPROM_ADDR); 10206 val = tr32(GRC_EEPROM_ADDR);
10200 tw32(GRC_EEPROM_ADDR, val | EEPROM_ADDR_COMPLETE); 10207 tw32(GRC_EEPROM_ADDR, val | EEPROM_ADDR_COMPLETE);
@@ -10244,8 +10251,8 @@ static int tg3_nvram_write_block_unbuffered(struct tg3 *tp, u32 offset, u32 len,
10244 phy_addr = offset & ~pagemask; 10251 phy_addr = offset & ~pagemask;
10245 10252
10246 for (j = 0; j < pagesize; j += 4) { 10253 for (j = 0; j < pagesize; j += 4) {
10247 if ((ret = tg3_nvram_read(tp, phy_addr + j, 10254 if ((ret = tg3_nvram_read_le(tp, phy_addr + j,
10248 (u32 *) (tmp + j)))) 10255 (__le32 *) (tmp + j))))
10249 break; 10256 break;
10250 } 10257 }
10251 if (ret) 10258 if (ret)
@@ -10289,10 +10296,11 @@ static int tg3_nvram_write_block_unbuffered(struct tg3 *tp, u32 offset, u32 len,
10289 break; 10296 break;
10290 10297
10291 for (j = 0; j < pagesize; j += 4) { 10298 for (j = 0; j < pagesize; j += 4) {
10292 u32 data; 10299 __be32 data;
10293 10300
10294 data = *((u32 *) (tmp + j)); 10301 data = *((__be32 *) (tmp + j));
10295 tw32(NVRAM_WRDATA, cpu_to_be32(data)); 10302 /* swab32(le32_to_cpu(data)), actually */
10303 tw32(NVRAM_WRDATA, be32_to_cpu(data));
10296 10304
10297 tw32(NVRAM_ADDR, phy_addr + j); 10305 tw32(NVRAM_ADDR, phy_addr + j);
10298 10306
@@ -10326,10 +10334,11 @@ static int tg3_nvram_write_block_buffered(struct tg3 *tp, u32 offset, u32 len,
10326 int i, ret = 0; 10334 int i, ret = 0;
10327 10335
10328 for (i = 0; i < len; i += 4, offset += 4) { 10336 for (i = 0; i < len; i += 4, offset += 4) {
10329 u32 data, page_off, phy_addr, nvram_cmd; 10337 u32 page_off, phy_addr, nvram_cmd;
10338 __be32 data;
10330 10339
10331 memcpy(&data, buf + i, 4); 10340 memcpy(&data, buf + i, 4);
10332 tw32(NVRAM_WRDATA, cpu_to_be32(data)); 10341 tw32(NVRAM_WRDATA, be32_to_cpu(data));
10333 10342
10334 page_off = offset % tp->nvram_pagesize; 10343 page_off = offset % tp->nvram_pagesize;
10335 10344
@@ -10831,6 +10840,7 @@ static void __devinit tg3_read_partno(struct tg3 *tp)
10831 vpd_cap = pci_find_capability(tp->pdev, PCI_CAP_ID_VPD); 10840 vpd_cap = pci_find_capability(tp->pdev, PCI_CAP_ID_VPD);
10832 for (i = 0; i < 256; i += 4) { 10841 for (i = 0; i < 256; i += 4) {
10833 u32 tmp, j = 0; 10842 u32 tmp, j = 0;
10843 __le32 v;
10834 u16 tmp16; 10844 u16 tmp16;
10835 10845
10836 pci_write_config_word(tp->pdev, vpd_cap + PCI_VPD_ADDR, 10846 pci_write_config_word(tp->pdev, vpd_cap + PCI_VPD_ADDR,
@@ -10847,8 +10857,8 @@ static void __devinit tg3_read_partno(struct tg3 *tp)
10847 10857
10848 pci_read_config_dword(tp->pdev, vpd_cap + PCI_VPD_DATA, 10858 pci_read_config_dword(tp->pdev, vpd_cap + PCI_VPD_DATA,
10849 &tmp); 10859 &tmp);
10850 tmp = cpu_to_le32(tmp); 10860 v = cpu_to_le32(tmp);
10851 memcpy(&vpd_data[i], &tmp, 4); 10861 memcpy(&vpd_data[i], &v, 4);
10852 } 10862 }
10853 } 10863 }
10854 10864
@@ -10941,11 +10951,11 @@ static void __devinit tg3_read_fw_ver(struct tg3 *tp)
10941 10951
10942 offset = offset + ver_offset - start; 10952 offset = offset + ver_offset - start;
10943 for (i = 0; i < 16; i += 4) { 10953 for (i = 0; i < 16; i += 4) {
10944 if (tg3_nvram_read(tp, offset + i, &val)) 10954 __le32 v;
10955 if (tg3_nvram_read_le(tp, offset + i, &v))
10945 return; 10956 return;
10946 10957
10947 val = le32_to_cpu(val); 10958 memcpy(tp->fw_ver + i, &v, 4);
10948 memcpy(tp->fw_ver + i, &val, 4);
10949 } 10959 }
10950 10960
10951 if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF) || 10961 if (!(tp->tg3_flags & TG3_FLAG_ENABLE_ASF) ||
@@ -10983,19 +10993,19 @@ static void __devinit tg3_read_fw_ver(struct tg3 *tp)
10983 tp->fw_ver[bcnt++] = ' '; 10993 tp->fw_ver[bcnt++] = ' ';
10984 10994
10985 for (i = 0; i < 4; i++) { 10995 for (i = 0; i < 4; i++) {
10986 if (tg3_nvram_read(tp, offset, &val)) 10996 __le32 v;
10997 if (tg3_nvram_read_le(tp, offset, &v))
10987 return; 10998 return;
10988 10999
10989 val = le32_to_cpu(val); 11000 offset += sizeof(v);
10990 offset += sizeof(val);
10991 11001
10992 if (bcnt > TG3_VER_SIZE - sizeof(val)) { 11002 if (bcnt > TG3_VER_SIZE - sizeof(v)) {
10993 memcpy(&tp->fw_ver[bcnt], &val, TG3_VER_SIZE - bcnt); 11003 memcpy(&tp->fw_ver[bcnt], &v, TG3_VER_SIZE - bcnt);
10994 break; 11004 break;
10995 } 11005 }
10996 11006
10997 memcpy(&tp->fw_ver[bcnt], &val, sizeof(val)); 11007 memcpy(&tp->fw_ver[bcnt], &v, sizeof(v));
10998 bcnt += sizeof(val); 11008 bcnt += sizeof(v);
10999 } 11009 }
11000 11010
11001 tp->fw_ver[TG3_VER_SIZE - 1] = 0; 11011 tp->fw_ver[TG3_VER_SIZE - 1] = 0;
diff --git a/include/net/ax25.h b/include/net/ax25.h
index 4e3cd93f81fc..32a57e1dee3a 100644
--- a/include/net/ax25.h
+++ b/include/net/ax25.h
@@ -35,7 +35,7 @@
35#define AX25_P_ATALK 0xca /* Appletalk */ 35#define AX25_P_ATALK 0xca /* Appletalk */
36#define AX25_P_ATALK_ARP 0xcb /* Appletalk ARP */ 36#define AX25_P_ATALK_ARP 0xcb /* Appletalk ARP */
37#define AX25_P_IP 0xcc /* ARPA Internet Protocol */ 37#define AX25_P_IP 0xcc /* ARPA Internet Protocol */
38#define AX25_P_ARP 0xcd /* ARPA Adress Resolution */ 38#define AX25_P_ARP 0xcd /* ARPA Address Resolution */
39#define AX25_P_FLEXNET 0xce /* FlexNet */ 39#define AX25_P_FLEXNET 0xce /* FlexNet */
40#define AX25_P_NETROM 0xcf /* NET/ROM */ 40#define AX25_P_NETROM 0xcf /* NET/ROM */
41#define AX25_P_TEXT 0xF0 /* No layer 3 protocol impl. */ 41#define AX25_P_TEXT 0xF0 /* No layer 3 protocol impl. */
diff --git a/include/net/ip6_tunnel.h b/include/net/ip6_tunnel.h
index 29c9da707c7a..c17fa1fdc356 100644
--- a/include/net/ip6_tunnel.h
+++ b/include/net/ip6_tunnel.h
@@ -23,7 +23,7 @@ struct ip6_tnl {
23 struct net_device *dev; /* virtual device associated with tunnel */ 23 struct net_device *dev; /* virtual device associated with tunnel */
24 struct net_device_stats stat; /* statistics for tunnel device */ 24 struct net_device_stats stat; /* statistics for tunnel device */
25 int recursion; /* depth of hard_start_xmit recursion */ 25 int recursion; /* depth of hard_start_xmit recursion */
26 struct ip6_tnl_parm parms; /* tunnel configuration paramters */ 26 struct ip6_tnl_parm parms; /* tunnel configuration parameters */
27 struct flowi fl; /* flowi template for xmit */ 27 struct flowi fl; /* flowi template for xmit */
28 struct dst_entry *dst_cache; /* cached dst */ 28 struct dst_entry *dst_cache; /* cached dst */
29 u32 dst_cookie; 29 u32 dst_cookie;
diff --git a/include/net/irda/discovery.h b/include/net/irda/discovery.h
index eb0f9de47294..e4efad1f9eff 100644
--- a/include/net/irda/discovery.h
+++ b/include/net/irda/discovery.h
@@ -80,7 +80,7 @@ typedef struct discovery_t {
80 irda_queue_t q; /* Must be first! */ 80 irda_queue_t q; /* Must be first! */
81 81
82 discinfo_t data; /* Basic discovery information */ 82 discinfo_t data; /* Basic discovery information */
83 int name_len; /* Lenght of nickname */ 83 int name_len; /* Length of nickname */
84 84
85 LAP_REASON condition; /* More info about the discovery */ 85 LAP_REASON condition; /* More info about the discovery */
86 int gen_addr_bit; /* Need to generate a new device 86 int gen_addr_bit; /* Need to generate a new device
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 002a00a4e6be..bb965742b64e 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -301,7 +301,7 @@ struct sctp_sock {
301 /* The default SACK delay timeout for new associations. */ 301 /* The default SACK delay timeout for new associations. */
302 __u32 sackdelay; 302 __u32 sackdelay;
303 303
304 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ 304 /* Flags controlling Heartbeat, SACK delay, and Path MTU Discovery. */
305 __u32 param_flags; 305 __u32 param_flags;
306 306
307 struct sctp_initmsg initmsg; 307 struct sctp_initmsg initmsg;
@@ -955,7 +955,7 @@ struct sctp_transport {
955 /* PMTU : The current known path MTU. */ 955 /* PMTU : The current known path MTU. */
956 __u32 pathmtu; 956 __u32 pathmtu;
957 957
958 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ 958 /* Flags controlling Heartbeat, SACK delay, and Path MTU Discovery. */
959 __u32 param_flags; 959 __u32 param_flags;
960 960
961 /* The number of times INIT has been sent on this transport. */ 961 /* The number of times INIT has been sent on this transport. */
@@ -1638,7 +1638,7 @@ struct sctp_association {
1638 */ 1638 */
1639 __u32 pathmtu; 1639 __u32 pathmtu;
1640 1640
1641 /* Flags controling Heartbeat, SACK delay, and Path MTU Discovery. */ 1641 /* Flags controlling Heartbeat, SACK delay, and Path MTU Discovery. */
1642 __u32 param_flags; 1642 __u32 param_flags;
1643 1643
1644 /* SACK delay timeout */ 1644 /* SACK delay timeout */
diff --git a/net/ax25/ax25_in.c b/net/ax25/ax25_in.c
index 3b7d1720c2ee..d1be080dcb25 100644
--- a/net/ax25/ax25_in.c
+++ b/net/ax25/ax25_in.c
@@ -124,7 +124,7 @@ int ax25_rx_iframe(ax25_cb *ax25, struct sk_buff *skb)
124 } 124 }
125 125
126 skb_pull(skb, 1); /* Remove PID */ 126 skb_pull(skb, 1); /* Remove PID */
127 skb_reset_mac_header(skb); 127 skb->mac_header = skb->network_header;
128 skb_reset_network_header(skb); 128 skb_reset_network_header(skb);
129 skb->dev = ax25->ax25_dev->dev; 129 skb->dev = ax25->ax25_dev->dev;
130 skb->pkt_type = PACKET_HOST; 130 skb->pkt_type = PACKET_HOST;
diff --git a/net/compat.c b/net/compat.c
index d74d82155d78..377e560ab5c9 100644
--- a/net/compat.c
+++ b/net/compat.c
@@ -254,6 +254,8 @@ int put_cmsg_compat(struct msghdr *kmsg, int level, int type, int len, void *dat
254 if (copy_to_user(CMSG_COMPAT_DATA(cm), data, cmlen - sizeof(struct compat_cmsghdr))) 254 if (copy_to_user(CMSG_COMPAT_DATA(cm), data, cmlen - sizeof(struct compat_cmsghdr)))
255 return -EFAULT; 255 return -EFAULT;
256 cmlen = CMSG_COMPAT_SPACE(len); 256 cmlen = CMSG_COMPAT_SPACE(len);
257 if (kmsg->msg_controllen < cmlen)
258 cmlen = kmsg->msg_controllen;
257 kmsg->msg_control += cmlen; 259 kmsg->msg_control += cmlen;
258 kmsg->msg_controllen -= cmlen; 260 kmsg->msg_controllen -= cmlen;
259 return 0; 261 return 0;
diff --git a/net/core/dev.c b/net/core/dev.c
index 26a3a3a15be0..be9d3015beaa 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -2819,7 +2819,7 @@ void dev_set_allmulti(struct net_device *dev, int inc)
2819/* 2819/*
2820 * Upload unicast and multicast address lists to device and 2820 * Upload unicast and multicast address lists to device and
2821 * configure RX filtering. When the device doesn't support unicast 2821 * configure RX filtering. When the device doesn't support unicast
2822 * filtering it is put in promiscous mode while unicast addresses 2822 * filtering it is put in promiscuous mode while unicast addresses
2823 * are present. 2823 * are present.
2824 */ 2824 */
2825void __dev_set_rx_mode(struct net_device *dev) 2825void __dev_set_rx_mode(struct net_device *dev)
diff --git a/net/core/scm.c b/net/core/scm.c
index 100ba6d9d478..10f5c65f6a47 100644
--- a/net/core/scm.c
+++ b/net/core/scm.c
@@ -196,6 +196,8 @@ int put_cmsg(struct msghdr * msg, int level, int type, int len, void *data)
196 if (copy_to_user(CMSG_DATA(cm), data, cmlen - sizeof(struct cmsghdr))) 196 if (copy_to_user(CMSG_DATA(cm), data, cmlen - sizeof(struct cmsghdr)))
197 goto out; 197 goto out;
198 cmlen = CMSG_SPACE(len); 198 cmlen = CMSG_SPACE(len);
199 if (msg->msg_controllen < cmlen)
200 cmlen = msg->msg_controllen;
199 msg->msg_control += cmlen; 201 msg->msg_control += cmlen;
200 msg->msg_controllen -= cmlen; 202 msg->msg_controllen -= cmlen;
201 err = 0; 203 err = 0;
diff --git a/net/dccp/ackvec.h b/net/dccp/ackvec.h
index 9ef0737043ee..9671ecd17e00 100644
--- a/net/dccp/ackvec.h
+++ b/net/dccp/ackvec.h
@@ -71,7 +71,7 @@ struct dccp_ackvec {
71 * @dccpavr_ack_ackno - sequence number being acknowledged 71 * @dccpavr_ack_ackno - sequence number being acknowledged
72 * @dccpavr_ack_ptr - pointer into dccpav_buf where this record starts 72 * @dccpavr_ack_ptr - pointer into dccpav_buf where this record starts
73 * @dccpavr_ack_nonce - dccpav_ack_nonce at the time this record was sent 73 * @dccpavr_ack_nonce - dccpav_ack_nonce at the time this record was sent
74 * @dccpavr_sent_len - lenght of the record in dccpav_buf 74 * @dccpavr_sent_len - length of the record in dccpav_buf
75 */ 75 */
76struct dccp_ackvec_record { 76struct dccp_ackvec_record {
77 struct list_head dccpavr_node; 77 struct list_head dccpavr_node;
diff --git a/net/dccp/ccids/ccid3.c b/net/dccp/ccids/ccid3.c
index 19b33586333d..d133416d3970 100644
--- a/net/dccp/ccids/ccid3.c
+++ b/net/dccp/ccids/ccid3.c
@@ -239,7 +239,7 @@ static void ccid3_hc_tx_no_feedback_timer(unsigned long data)
239 ccid3_tx_state_name(hctx->ccid3hctx_state), 239 ccid3_tx_state_name(hctx->ccid3hctx_state),
240 (unsigned)(hctx->ccid3hctx_x >> 6)); 240 (unsigned)(hctx->ccid3hctx_x >> 6));
241 /* The value of R is still undefined and so we can not recompute 241 /* The value of R is still undefined and so we can not recompute
242 * the timout value. Keep initial value as per [RFC 4342, 5]. */ 242 * the timeout value. Keep initial value as per [RFC 4342, 5]. */
243 t_nfb = TFRC_INITIAL_TIMEOUT; 243 t_nfb = TFRC_INITIAL_TIMEOUT;
244 ccid3_update_send_interval(hctx); 244 ccid3_update_send_interval(hctx);
245 break; 245 break;
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index b3f366a33a5c..08174a2aa878 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -706,7 +706,7 @@ static int arp_process(struct sk_buff *skb)
706 struct arphdr *arp; 706 struct arphdr *arp;
707 unsigned char *arp_ptr; 707 unsigned char *arp_ptr;
708 struct rtable *rt; 708 struct rtable *rt;
709 unsigned char *sha, *tha; 709 unsigned char *sha;
710 __be32 sip, tip; 710 __be32 sip, tip;
711 u16 dev_type = dev->type; 711 u16 dev_type = dev->type;
712 int addr_type; 712 int addr_type;
@@ -771,7 +771,6 @@ static int arp_process(struct sk_buff *skb)
771 arp_ptr += dev->addr_len; 771 arp_ptr += dev->addr_len;
772 memcpy(&sip, arp_ptr, 4); 772 memcpy(&sip, arp_ptr, 4);
773 arp_ptr += 4; 773 arp_ptr += 4;
774 tha = arp_ptr;
775 arp_ptr += dev->addr_len; 774 arp_ptr += dev->addr_len;
776 memcpy(&tip, arp_ptr, 4); 775 memcpy(&tip, arp_ptr, 4);
777/* 776/*
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 732d8f088b13..97abf934d185 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -804,10 +804,13 @@ static void nl_fib_input(struct sk_buff *skb)
804 804
805 nlh = nlmsg_hdr(skb); 805 nlh = nlmsg_hdr(skb);
806 if (skb->len < NLMSG_SPACE(0) || skb->len < nlh->nlmsg_len || 806 if (skb->len < NLMSG_SPACE(0) || skb->len < nlh->nlmsg_len ||
807 nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*frn))) { 807 nlh->nlmsg_len < NLMSG_LENGTH(sizeof(*frn)))
808 kfree_skb(skb);
809 return; 808 return;
810 } 809
810 skb = skb_clone(skb, GFP_KERNEL);
811 if (skb == NULL)
812 return;
813 nlh = nlmsg_hdr(skb);
811 814
812 frn = (struct fib_result_nl *) NLMSG_DATA(nlh); 815 frn = (struct fib_result_nl *) NLMSG_DATA(nlh);
813 tb = fib_get_table(frn->tb_id_in); 816 tb = fib_get_table(frn->tb_id_in);
diff --git a/net/ipv4/ip_gre.c b/net/ipv4/ip_gre.c
index 02b02a8d681c..4b93f32de10d 100644
--- a/net/ipv4/ip_gre.c
+++ b/net/ipv4/ip_gre.c
@@ -613,7 +613,7 @@ static int ipgre_rcv(struct sk_buff *skb)
613 offset += 4; 613 offset += 4;
614 } 614 }
615 615
616 skb_reset_mac_header(skb); 616 skb->mac_header = skb->network_header;
617 __pskb_pull(skb, offset); 617 __pskb_pull(skb, offset);
618 skb_reset_network_header(skb); 618 skb_reset_network_header(skb);
619 skb_postpull_rcsum(skb, skb_transport_header(skb), offset); 619 skb_postpull_rcsum(skb, skb_transport_header(skb), offset);
diff --git a/net/ipv4/netfilter/nf_nat_sip.c b/net/ipv4/netfilter/nf_nat_sip.c
index 3ca98971a1e9..8996ccb757db 100644
--- a/net/ipv4/netfilter/nf_nat_sip.c
+++ b/net/ipv4/netfilter/nf_nat_sip.c
@@ -165,7 +165,7 @@ static int mangle_content_len(struct sk_buff *skb,
165 165
166 dataoff = ip_hdrlen(skb) + sizeof(struct udphdr); 166 dataoff = ip_hdrlen(skb) + sizeof(struct udphdr);
167 167
168 /* Get actual SDP lenght */ 168 /* Get actual SDP length */
169 if (ct_sip_get_info(ct, dptr, skb->len - dataoff, &matchoff, 169 if (ct_sip_get_info(ct, dptr, skb->len - dataoff, &matchoff,
170 &matchlen, POS_SDP_HEADER) > 0) { 170 &matchlen, POS_SDP_HEADER) > 0) {
171 171
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c
index 67997a74ddce..777ed733b2d7 100644
--- a/net/ipv6/ndisc.c
+++ b/net/ipv6/ndisc.c
@@ -612,7 +612,7 @@ void ndisc_send_rs(struct net_device *dev, struct in6_addr *saddr,
612 * optimistic addresses, but we may send the solicitation 612 * optimistic addresses, but we may send the solicitation
613 * if we don't include the sllao. So here we check 613 * if we don't include the sllao. So here we check
614 * if our address is optimistic, and if so, we 614 * if our address is optimistic, and if so, we
615 * supress the inclusion of the sllao. 615 * suppress the inclusion of the sllao.
616 */ 616 */
617 if (send_sllao) { 617 if (send_sllao) {
618 struct inet6_ifaddr *ifp = ipv6_get_ifaddr(saddr, dev, 1); 618 struct inet6_ifaddr *ifp = ipv6_get_ifaddr(saddr, dev, 1);
diff --git a/net/irda/ircomm/ircomm_param.c b/net/irda/ircomm/ircomm_param.c
index e5e4792a0314..598dcbe4a501 100644
--- a/net/irda/ircomm/ircomm_param.c
+++ b/net/irda/ircomm/ircomm_param.c
@@ -496,7 +496,7 @@ static int ircomm_param_poll(void *instance, irda_param_t *param, int get)
496 IRDA_ASSERT(self != NULL, return -1;); 496 IRDA_ASSERT(self != NULL, return -1;);
497 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;); 497 IRDA_ASSERT(self->magic == IRCOMM_TTY_MAGIC, return -1;);
498 498
499 /* Poll parameters are always of lenght 0 (just a signal) */ 499 /* Poll parameters are always of length 0 (just a signal) */
500 if (!get) { 500 if (!get) {
501 /* Respond with DTE line settings */ 501 /* Respond with DTE line settings */
502 ircomm_param_request(self, IRCOMM_DTE, TRUE); 502 ircomm_param_request(self, IRCOMM_DTE, TRUE);
diff --git a/net/irda/irlan/irlan_eth.c b/net/irda/irlan/irlan_eth.c
index c68220773d28..1ab91f787cc1 100644
--- a/net/irda/irlan/irlan_eth.c
+++ b/net/irda/irlan/irlan_eth.c
@@ -342,7 +342,7 @@ static void irlan_eth_set_multicast_list(struct net_device *dev)
342 342
343 if (dev->flags & IFF_PROMISC) { 343 if (dev->flags & IFF_PROMISC) {
344 /* Enable promiscuous mode */ 344 /* Enable promiscuous mode */
345 IRDA_WARNING("Promiscous mode not implemented by IrLAN!\n"); 345 IRDA_WARNING("Promiscuous mode not implemented by IrLAN!\n");
346 } 346 }
347 else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) { 347 else if ((dev->flags & IFF_ALLMULTI) || dev->mc_count > HW_MAX_ADDRS) {
348 /* Disable promiscuous mode, use normal mode. */ 348 /* Disable promiscuous mode, use normal mode. */
diff --git a/net/irda/irlap_frame.c b/net/irda/irlap_frame.c
index 4f3764546b2f..7c132d6342af 100644
--- a/net/irda/irlap_frame.c
+++ b/net/irda/irlap_frame.c
@@ -144,7 +144,7 @@ void irlap_send_snrm_frame(struct irlap_cb *self, struct qos_info *qos)
144 frame->control = SNRM_CMD | PF_BIT; 144 frame->control = SNRM_CMD | PF_BIT;
145 145
146 /* 146 /*
147 * If we are establishing a connection then insert QoS paramerters 147 * If we are establishing a connection then insert QoS parameters
148 */ 148 */
149 if (qos) { 149 if (qos) {
150 skb_put(tx_skb, 9); /* 25 left */ 150 skb_put(tx_skb, 9); /* 25 left */
diff --git a/net/irda/parameters.c b/net/irda/parameters.c
index 7183e9ef7996..722bbe044d9c 100644
--- a/net/irda/parameters.c
+++ b/net/irda/parameters.c
@@ -133,7 +133,7 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
133 int err; 133 int err;
134 134
135 p.pi = pi; /* In case handler needs to know */ 135 p.pi = pi; /* In case handler needs to know */
136 p.pl = type & PV_MASK; /* The integer type codes the lenght as well */ 136 p.pl = type & PV_MASK; /* The integer type codes the length as well */
137 p.pv.i = 0; /* Clear value */ 137 p.pv.i = 0; /* Clear value */
138 138
139 /* Call handler for this parameter */ 139 /* Call handler for this parameter */
@@ -142,7 +142,7 @@ static int irda_insert_integer(void *self, __u8 *buf, int len, __u8 pi,
142 return err; 142 return err;
143 143
144 /* 144 /*
145 * If parameter lenght is still 0, then (1) this is an any length 145 * If parameter length is still 0, then (1) this is an any length
146 * integer, and (2) the handler function does not care which length 146 * integer, and (2) the handler function does not care which length
147 * we choose to use, so we pick the one the gives the fewest bytes. 147 * we choose to use, so we pick the one the gives the fewest bytes.
148 */ 148 */
@@ -206,11 +206,11 @@ static int irda_extract_integer(void *self, __u8 *buf, int len, __u8 pi,
206{ 206{
207 irda_param_t p; 207 irda_param_t p;
208 int n = 0; 208 int n = 0;
209 int extract_len; /* Real lenght we extract */ 209 int extract_len; /* Real length we extract */
210 int err; 210 int err;
211 211
212 p.pi = pi; /* In case handler needs to know */ 212 p.pi = pi; /* In case handler needs to know */
213 p.pl = buf[1]; /* Extract lenght of value */ 213 p.pl = buf[1]; /* Extract length of value */
214 p.pv.i = 0; /* Clear value */ 214 p.pv.i = 0; /* Clear value */
215 extract_len = p.pl; /* Default : extract all */ 215 extract_len = p.pl; /* Default : extract all */
216 216
@@ -297,7 +297,7 @@ static int irda_extract_string(void *self, __u8 *buf, int len, __u8 pi,
297 IRDA_DEBUG(2, "%s()\n", __FUNCTION__); 297 IRDA_DEBUG(2, "%s()\n", __FUNCTION__);
298 298
299 p.pi = pi; /* In case handler needs to know */ 299 p.pi = pi; /* In case handler needs to know */
300 p.pl = buf[1]; /* Extract lenght of value */ 300 p.pl = buf[1]; /* Extract length of value */
301 301
302 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d\n", __FUNCTION__, 302 IRDA_DEBUG(2, "%s(), pi=%#x, pl=%d\n", __FUNCTION__,
303 p.pi, p.pl); 303 p.pi, p.pl);
@@ -339,7 +339,7 @@ static int irda_extract_octseq(void *self, __u8 *buf, int len, __u8 pi,
339 irda_param_t p; 339 irda_param_t p;
340 340
341 p.pi = pi; /* In case handler needs to know */ 341 p.pi = pi; /* In case handler needs to know */
342 p.pl = buf[1]; /* Extract lenght of value */ 342 p.pl = buf[1]; /* Extract length of value */
343 343
344 /* Check if buffer is long enough for parsing */ 344 /* Check if buffer is long enough for parsing */
345 if (len < (2+p.pl)) { 345 if (len < (2+p.pl)) {
diff --git a/net/irda/wrapper.c b/net/irda/wrapper.c
index e71286768a48..c246983308b8 100644
--- a/net/irda/wrapper.c
+++ b/net/irda/wrapper.c
@@ -238,7 +238,7 @@ async_bump(struct net_device *dev,
238 skb_reserve(newskb, 1); 238 skb_reserve(newskb, 1);
239 239
240 if(docopy) { 240 if(docopy) {
241 /* Copy data without CRC (lenght already checked) */ 241 /* Copy data without CRC (length already checked) */
242 skb_copy_to_linear_data(newskb, rx_buff->data, 242 skb_copy_to_linear_data(newskb, rx_buff->data,
243 rx_buff->len - 2); 243 rx_buff->len - 2);
244 /* Deliver this skb */ 244 /* Deliver this skb */
diff --git a/net/key/af_key.c b/net/key/af_key.c
index 878039b9557d..26d5e63c4cc5 100644
--- a/net/key/af_key.c
+++ b/net/key/af_key.c
@@ -2784,12 +2784,22 @@ static struct sadb_msg *pfkey_get_base_msg(struct sk_buff *skb, int *errp)
2784 2784
2785static inline int aalg_tmpl_set(struct xfrm_tmpl *t, struct xfrm_algo_desc *d) 2785static inline int aalg_tmpl_set(struct xfrm_tmpl *t, struct xfrm_algo_desc *d)
2786{ 2786{
2787 return t->aalgos & (1 << d->desc.sadb_alg_id); 2787 unsigned int id = d->desc.sadb_alg_id;
2788
2789 if (id >= sizeof(t->aalgos) * 8)
2790 return 0;
2791
2792 return (t->aalgos >> id) & 1;
2788} 2793}
2789 2794
2790static inline int ealg_tmpl_set(struct xfrm_tmpl *t, struct xfrm_algo_desc *d) 2795static inline int ealg_tmpl_set(struct xfrm_tmpl *t, struct xfrm_algo_desc *d)
2791{ 2796{
2792 return t->ealgos & (1 << d->desc.sadb_alg_id); 2797 unsigned int id = d->desc.sadb_alg_id;
2798
2799 if (id >= sizeof(t->ealgos) * 8)
2800 return 0;
2801
2802 return (t->ealgos >> id) & 1;
2793} 2803}
2794 2804
2795static int count_ah_combs(struct xfrm_tmpl *t) 2805static int count_ah_combs(struct xfrm_tmpl *t)
diff --git a/net/mac80211/ieee80211.c b/net/mac80211/ieee80211.c
index 505af1f067ab..6378850d8580 100644
--- a/net/mac80211/ieee80211.c
+++ b/net/mac80211/ieee80211.c
@@ -427,7 +427,6 @@ static const struct header_ops ieee80211_header_ops = {
427void ieee80211_if_setup(struct net_device *dev) 427void ieee80211_if_setup(struct net_device *dev)
428{ 428{
429 ether_setup(dev); 429 ether_setup(dev);
430 dev->header_ops = &ieee80211_header_ops;
431 dev->hard_start_xmit = ieee80211_subif_start_xmit; 430 dev->hard_start_xmit = ieee80211_subif_start_xmit;
432 dev->wireless_handlers = &ieee80211_iw_handler_def; 431 dev->wireless_handlers = &ieee80211_iw_handler_def;
433 dev->set_multicast_list = ieee80211_set_multicast_list; 432 dev->set_multicast_list = ieee80211_set_multicast_list;
diff --git a/net/mac80211/ieee80211_rate.c b/net/mac80211/ieee80211_rate.c
index 3260a4a0ecc5..c3f278393741 100644
--- a/net/mac80211/ieee80211_rate.c
+++ b/net/mac80211/ieee80211_rate.c
@@ -60,11 +60,11 @@ void ieee80211_rate_control_unregister(struct rate_control_ops *ops)
60 list_for_each_entry(alg, &rate_ctrl_algs, list) { 60 list_for_each_entry(alg, &rate_ctrl_algs, list) {
61 if (alg->ops == ops) { 61 if (alg->ops == ops) {
62 list_del(&alg->list); 62 list_del(&alg->list);
63 kfree(alg);
63 break; 64 break;
64 } 65 }
65 } 66 }
66 mutex_unlock(&rate_ctrl_mutex); 67 mutex_unlock(&rate_ctrl_mutex);
67 kfree(alg);
68} 68}
69EXPORT_SYMBOL(ieee80211_rate_control_unregister); 69EXPORT_SYMBOL(ieee80211_rate_control_unregister);
70 70
diff --git a/net/mac80211/ieee80211_sta.c b/net/mac80211/ieee80211_sta.c
index 16afd24d4f6b..bee8080f2249 100644
--- a/net/mac80211/ieee80211_sta.c
+++ b/net/mac80211/ieee80211_sta.c
@@ -808,12 +808,8 @@ static void ieee80211_associated(struct net_device *dev,
808 sta_info_put(sta); 808 sta_info_put(sta);
809 } 809 }
810 if (disassoc) { 810 if (disassoc) {
811 union iwreq_data wrqu; 811 ifsta->state = IEEE80211_DISABLED;
812 memset(wrqu.ap_addr.sa_data, 0, ETH_ALEN); 812 ieee80211_set_associated(dev, ifsta, 0);
813 wrqu.ap_addr.sa_family = ARPHRD_ETHER;
814 wireless_send_event(dev, SIOCGIWAP, &wrqu, NULL);
815 mod_timer(&ifsta->timer, jiffies +
816 IEEE80211_MONITORING_INTERVAL + 30 * HZ);
817 } else { 813 } else {
818 mod_timer(&ifsta->timer, jiffies + 814 mod_timer(&ifsta->timer, jiffies +
819 IEEE80211_MONITORING_INTERVAL); 815 IEEE80211_MONITORING_INTERVAL);
diff --git a/net/netfilter/nf_conntrack_sip.c b/net/netfilter/nf_conntrack_sip.c
index 8f8b5a48df38..515abffc4a09 100644
--- a/net/netfilter/nf_conntrack_sip.c
+++ b/net/netfilter/nf_conntrack_sip.c
@@ -187,7 +187,7 @@ static const struct sip_header_nfo ct_sip_hdrs[] = {
187 } 187 }
188}; 188};
189 189
190/* get line lenght until first CR or LF seen. */ 190/* get line length until first CR or LF seen. */
191int ct_sip_lnlen(const char *line, const char *limit) 191int ct_sip_lnlen(const char *line, const char *limit)
192{ 192{
193 const char *k = line; 193 const char *k = line;
@@ -236,7 +236,7 @@ static int digits_len(struct nf_conn *ct, const char *dptr,
236 return len; 236 return len;
237} 237}
238 238
239/* get digits lenght, skiping blank spaces. */ 239/* get digits length, skipping blank spaces. */
240static int skp_digits_len(struct nf_conn *ct, const char *dptr, 240static int skp_digits_len(struct nf_conn *ct, const char *dptr,
241 const char *limit, int *shift) 241 const char *limit, int *shift)
242{ 242{
diff --git a/net/netlabel/netlabel_mgmt.c b/net/netlabel/netlabel_mgmt.c
index 56483377997a..9c41464d58d1 100644
--- a/net/netlabel/netlabel_mgmt.c
+++ b/net/netlabel/netlabel_mgmt.c
@@ -71,7 +71,7 @@ static const struct nla_policy netlbl_mgmt_genl_policy[NLBL_MGMT_A_MAX + 1] = {
71}; 71};
72 72
73/* 73/*
74 * NetLabel Misc Managment Functions 74 * NetLabel Misc Management Functions
75 */ 75 */
76 76
77/** 77/**
diff --git a/net/netrom/nr_dev.c b/net/netrom/nr_dev.c
index 8c68da5ef0a1..6caf459665f2 100644
--- a/net/netrom/nr_dev.c
+++ b/net/netrom/nr_dev.c
@@ -56,7 +56,7 @@ int nr_rx_ip(struct sk_buff *skb, struct net_device *dev)
56 56
57 /* Spoof incoming device */ 57 /* Spoof incoming device */
58 skb->dev = dev; 58 skb->dev = dev;
59 skb_reset_mac_header(skb); 59 skb->mac_header = skb->network_header;
60 skb_reset_network_header(skb); 60 skb_reset_network_header(skb);
61 skb->pkt_type = PACKET_HOST; 61 skb->pkt_type = PACKET_HOST;
62 62
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index 55e7e4530f43..a6ad491e434b 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -160,7 +160,7 @@ struct hfsc_class
160 u64 cl_vtoff; /* inter-period cumulative vt offset */ 160 u64 cl_vtoff; /* inter-period cumulative vt offset */
161 u64 cl_cvtmax; /* max child's vt in the last period */ 161 u64 cl_cvtmax; /* max child's vt in the last period */
162 u64 cl_cvtoff; /* cumulative cvtmax of all periods */ 162 u64 cl_cvtoff; /* cumulative cvtmax of all periods */
163 u64 cl_pcvtoff; /* parent's cvtoff at initalization 163 u64 cl_pcvtoff; /* parent's cvtoff at initialization
164 time */ 164 time */
165 165
166 struct internal_sc cl_rsc; /* internal real-time service curve */ 166 struct internal_sc cl_rsc; /* internal real-time service curve */
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index f4876291bb5e..ed7c9e30ebc9 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -286,7 +286,7 @@ struct sctp_chunk *sctp_make_init(const struct sctp_association *asoc,
286 286
287 sctp_addto_chunk(retval, sizeof(ecap_param), &ecap_param); 287 sctp_addto_chunk(retval, sizeof(ecap_param), &ecap_param);
288 288
289 /* Add the supported extensions paramter. Be nice and add this 289 /* Add the supported extensions parameter. Be nice and add this
290 * fist before addiding the parameters for the extensions themselves 290 * fist before addiding the parameters for the extensions themselves
291 */ 291 */
292 if (num_ext) { 292 if (num_ext) {
@@ -2859,7 +2859,7 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc,
2859 chunk_len -= length; 2859 chunk_len -= length;
2860 2860
2861 /* Skip the address parameter and store a pointer to the first 2861 /* Skip the address parameter and store a pointer to the first
2862 * asconf paramter. 2862 * asconf parameter.
2863 */ 2863 */
2864 length = ntohs(addr_param->v4.param_hdr.length); 2864 length = ntohs(addr_param->v4.param_hdr.length);
2865 asconf_param = (sctp_addip_param_t *)((void *)addr_param + length); 2865 asconf_param = (sctp_addip_param_t *)((void *)addr_param + length);
@@ -2868,7 +2868,7 @@ struct sctp_chunk *sctp_process_asconf(struct sctp_association *asoc,
2868 /* create an ASCONF_ACK chunk. 2868 /* create an ASCONF_ACK chunk.
2869 * Based on the definitions of parameters, we know that the size of 2869 * Based on the definitions of parameters, we know that the size of
2870 * ASCONF_ACK parameters are less than or equal to the twice of ASCONF 2870 * ASCONF_ACK parameters are less than or equal to the twice of ASCONF
2871 * paramters. 2871 * parameters.
2872 */ 2872 */
2873 asconf_ack = sctp_make_asconf_ack(asoc, serial, chunk_len * 2); 2873 asconf_ack = sctp_make_asconf_ack(asoc, serial, chunk_len * 2);
2874 if (!asconf_ack) 2874 if (!asconf_ack)
@@ -3062,7 +3062,7 @@ int sctp_process_asconf_ack(struct sctp_association *asoc,
3062 asconf_len -= length; 3062 asconf_len -= length;
3063 3063
3064 /* Skip the address parameter in the last asconf sent and store a 3064 /* Skip the address parameter in the last asconf sent and store a
3065 * pointer to the first asconf paramter. 3065 * pointer to the first asconf parameter.
3066 */ 3066 */
3067 length = ntohs(addr_param->v4.param_hdr.length); 3067 length = ntohs(addr_param->v4.param_hdr.length);
3068 asconf_param = (sctp_addip_param_t *)((void *)addr_param + length); 3068 asconf_param = (sctp_addip_param_t *)((void *)addr_param + length);
diff --git a/net/xfrm/xfrm_policy.c b/net/xfrm/xfrm_policy.c
index b91b16671c1e..26b846e11bfb 100644
--- a/net/xfrm/xfrm_policy.c
+++ b/net/xfrm/xfrm_policy.c
@@ -2162,7 +2162,7 @@ xfrm_audit_policy_add(struct xfrm_policy *xp, int result, u32 auid, u32 sid)
2162 2162
2163 if (audit_enabled == 0) 2163 if (audit_enabled == 0)
2164 return; 2164 return;
2165 audit_buf = xfrm_audit_start(sid, auid); 2165 audit_buf = xfrm_audit_start(auid, sid);
2166 if (audit_buf == NULL) 2166 if (audit_buf == NULL)
2167 return; 2167 return;
2168 audit_log_format(audit_buf, " op=SPD-add res=%u", result); 2168 audit_log_format(audit_buf, " op=SPD-add res=%u", result);
@@ -2179,7 +2179,7 @@ xfrm_audit_policy_delete(struct xfrm_policy *xp, int result, u32 auid, u32 sid)
2179 2179
2180 if (audit_enabled == 0) 2180 if (audit_enabled == 0)
2181 return; 2181 return;
2182 audit_buf = xfrm_audit_start(sid, auid); 2182 audit_buf = xfrm_audit_start(auid, sid);
2183 if (audit_buf == NULL) 2183 if (audit_buf == NULL)
2184 return; 2184 return;
2185 audit_log_format(audit_buf, " op=SPD-delete res=%u", result); 2185 audit_log_format(audit_buf, " op=SPD-delete res=%u", result);
diff --git a/net/xfrm/xfrm_state.c b/net/xfrm/xfrm_state.c
index 1af522bf12ca..ee1e69753932 100644
--- a/net/xfrm/xfrm_state.c
+++ b/net/xfrm/xfrm_state.c
@@ -2033,7 +2033,7 @@ xfrm_audit_state_add(struct xfrm_state *x, int result, u32 auid, u32 sid)
2033 2033
2034 if (audit_enabled == 0) 2034 if (audit_enabled == 0)
2035 return; 2035 return;
2036 audit_buf = xfrm_audit_start(sid, auid); 2036 audit_buf = xfrm_audit_start(auid, sid);
2037 if (audit_buf == NULL) 2037 if (audit_buf == NULL)
2038 return; 2038 return;
2039 audit_log_format(audit_buf, " op=SAD-add res=%u",result); 2039 audit_log_format(audit_buf, " op=SAD-add res=%u",result);
@@ -2053,7 +2053,7 @@ xfrm_audit_state_delete(struct xfrm_state *x, int result, u32 auid, u32 sid)
2053 2053
2054 if (audit_enabled == 0) 2054 if (audit_enabled == 0)
2055 return; 2055 return;
2056 audit_buf = xfrm_audit_start(sid, auid); 2056 audit_buf = xfrm_audit_start(auid, sid);
2057 if (audit_buf == NULL) 2057 if (audit_buf == NULL)
2058 return; 2058 return;
2059 audit_log_format(audit_buf, " op=SAD-delete res=%u",result); 2059 audit_log_format(audit_buf, " op=SAD-delete res=%u",result);