diff options
36 files changed, 319 insertions, 274 deletions
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index ac79bd143da8..346cae5ac423 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c | |||
| @@ -122,15 +122,75 @@ static u64 tsc_read_refs(u64 *pm, u64 *hpet) | |||
| 122 | return ULLONG_MAX; | 122 | return ULLONG_MAX; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | /* | ||
| 126 | * Try to calibrate the TSC against the Programmable | ||
| 127 | * Interrupt Timer and return the frequency of the TSC | ||
| 128 | * in kHz. | ||
| 129 | * | ||
| 130 | * Return ULONG_MAX on failure to calibrate. | ||
| 131 | */ | ||
| 132 | static unsigned long pit_calibrate_tsc(void) | ||
| 133 | { | ||
| 134 | u64 tsc, t1, t2, delta; | ||
| 135 | unsigned long tscmin, tscmax; | ||
| 136 | int pitcnt; | ||
| 137 | |||
| 138 | /* Set the Gate high, disable speaker */ | ||
| 139 | outb((inb(0x61) & ~0x02) | 0x01, 0x61); | ||
| 140 | |||
| 141 | /* | ||
| 142 | * Setup CTC channel 2* for mode 0, (interrupt on terminal | ||
| 143 | * count mode), binary count. Set the latch register to 50ms | ||
| 144 | * (LSB then MSB) to begin countdown. | ||
| 145 | */ | ||
| 146 | outb(0xb0, 0x43); | ||
| 147 | outb((CLOCK_TICK_RATE / (1000 / 50)) & 0xff, 0x42); | ||
| 148 | outb((CLOCK_TICK_RATE / (1000 / 50)) >> 8, 0x42); | ||
| 149 | |||
| 150 | tsc = t1 = t2 = get_cycles(); | ||
| 151 | |||
| 152 | pitcnt = 0; | ||
| 153 | tscmax = 0; | ||
| 154 | tscmin = ULONG_MAX; | ||
| 155 | while ((inb(0x61) & 0x20) == 0) { | ||
| 156 | t2 = get_cycles(); | ||
| 157 | delta = t2 - tsc; | ||
| 158 | tsc = t2; | ||
| 159 | if ((unsigned long) delta < tscmin) | ||
| 160 | tscmin = (unsigned int) delta; | ||
| 161 | if ((unsigned long) delta > tscmax) | ||
| 162 | tscmax = (unsigned int) delta; | ||
| 163 | pitcnt++; | ||
| 164 | } | ||
| 165 | |||
| 166 | /* | ||
| 167 | * Sanity checks: | ||
| 168 | * | ||
| 169 | * If we were not able to read the PIT more than 5000 | ||
| 170 | * times, then we have been hit by a massive SMI | ||
| 171 | * | ||
| 172 | * If the maximum is 10 times larger than the minimum, | ||
| 173 | * then we got hit by an SMI as well. | ||
| 174 | */ | ||
| 175 | if (pitcnt < 5000 || tscmax > 10 * tscmin) | ||
| 176 | return ULONG_MAX; | ||
| 177 | |||
| 178 | /* Calculate the PIT value */ | ||
| 179 | delta = t2 - t1; | ||
| 180 | do_div(delta, 50); | ||
| 181 | return delta; | ||
| 182 | } | ||
| 183 | |||
| 184 | |||
| 125 | /** | 185 | /** |
| 126 | * native_calibrate_tsc - calibrate the tsc on boot | 186 | * native_calibrate_tsc - calibrate the tsc on boot |
| 127 | */ | 187 | */ |
| 128 | unsigned long native_calibrate_tsc(void) | 188 | unsigned long native_calibrate_tsc(void) |
| 129 | { | 189 | { |
| 130 | u64 tsc1, tsc2, tr1, tr2, tsc, delta, pm1, pm2, hpet1, hpet2; | 190 | u64 tsc1, tsc2, delta, pm1, pm2, hpet1, hpet2; |
| 131 | unsigned long tsc_pit_min = ULONG_MAX, tsc_ref_min = ULONG_MAX; | 191 | unsigned long tsc_pit_min = ULONG_MAX, tsc_ref_min = ULONG_MAX; |
| 132 | unsigned long flags, tscmin, tscmax; | 192 | unsigned long flags; |
| 133 | int hpet = is_hpet_enabled(), pitcnt, i; | 193 | int hpet = is_hpet_enabled(), i; |
| 134 | 194 | ||
| 135 | /* | 195 | /* |
| 136 | * Run 5 calibration loops to get the lowest frequency value | 196 | * Run 5 calibration loops to get the lowest frequency value |
| @@ -157,72 +217,22 @@ unsigned long native_calibrate_tsc(void) | |||
| 157 | * amount of time anyway. | 217 | * amount of time anyway. |
| 158 | */ | 218 | */ |
| 159 | for (i = 0; i < 5; i++) { | 219 | for (i = 0; i < 5; i++) { |
| 160 | 220 | unsigned long tsc_pit_khz; | |
| 161 | tscmin = ULONG_MAX; | ||
| 162 | tscmax = 0; | ||
| 163 | pitcnt = 0; | ||
| 164 | |||
| 165 | local_irq_save(flags); | ||
| 166 | 221 | ||
| 167 | /* | 222 | /* |
| 168 | * Read the start value and the reference count of | 223 | * Read the start value and the reference count of |
| 169 | * hpet/pmtimer when available: | 224 | * hpet/pmtimer when available. Then do the PIT |
| 225 | * calibration, which will take at least 50ms, and | ||
| 226 | * read the end value. | ||
| 170 | */ | 227 | */ |
| 228 | local_irq_save(flags); | ||
| 171 | tsc1 = tsc_read_refs(&pm1, hpet ? &hpet1 : NULL); | 229 | tsc1 = tsc_read_refs(&pm1, hpet ? &hpet1 : NULL); |
| 172 | 230 | tsc_pit_khz = pit_calibrate_tsc(); | |
| 173 | /* Set the Gate high, disable speaker */ | ||
| 174 | outb((inb(0x61) & ~0x02) | 0x01, 0x61); | ||
| 175 | |||
| 176 | /* | ||
| 177 | * Setup CTC channel 2* for mode 0, (interrupt on terminal | ||
| 178 | * count mode), binary count. Set the latch register to 50ms | ||
| 179 | * (LSB then MSB) to begin countdown. | ||
| 180 | * | ||
| 181 | * Some devices need a delay here. | ||
| 182 | */ | ||
| 183 | outb(0xb0, 0x43); | ||
| 184 | outb((CLOCK_TICK_RATE / (1000 / 50)) & 0xff, 0x42); | ||
| 185 | outb((CLOCK_TICK_RATE / (1000 / 50)) >> 8, 0x42); | ||
| 186 | |||
| 187 | tsc = tr1 = tr2 = get_cycles(); | ||
| 188 | |||
| 189 | while ((inb(0x61) & 0x20) == 0) { | ||
| 190 | tr2 = get_cycles(); | ||
| 191 | delta = tr2 - tsc; | ||
| 192 | tsc = tr2; | ||
| 193 | if ((unsigned int) delta < tscmin) | ||
| 194 | tscmin = (unsigned int) delta; | ||
| 195 | if ((unsigned int) delta > tscmax) | ||
| 196 | tscmax = (unsigned int) delta; | ||
| 197 | pitcnt++; | ||
| 198 | } | ||
| 199 | |||
| 200 | /* | ||
| 201 | * We waited at least 50ms above. Now read | ||
| 202 | * pmtimer/hpet reference again | ||
| 203 | */ | ||
| 204 | tsc2 = tsc_read_refs(&pm2, hpet ? &hpet2 : NULL); | 231 | tsc2 = tsc_read_refs(&pm2, hpet ? &hpet2 : NULL); |
| 205 | |||
| 206 | local_irq_restore(flags); | 232 | local_irq_restore(flags); |
| 207 | 233 | ||
| 208 | /* | 234 | /* Pick the lowest PIT TSC calibration so far */ |
| 209 | * Sanity checks: | 235 | tsc_pit_min = min(tsc_pit_min, tsc_pit_khz); |
| 210 | * | ||
| 211 | * If we were not able to read the PIT more than 5000 | ||
| 212 | * times, then we have been hit by a massive SMI | ||
| 213 | * | ||
| 214 | * If the maximum is 10 times larger than the minimum, | ||
| 215 | * then we got hit by an SMI as well. | ||
| 216 | */ | ||
| 217 | if (pitcnt > 5000 && tscmax < 10 * tscmin) { | ||
| 218 | |||
| 219 | /* Calculate the PIT value */ | ||
| 220 | delta = tr2 - tr1; | ||
| 221 | do_div(delta, 50); | ||
| 222 | |||
| 223 | /* We take the smallest value into account */ | ||
| 224 | tsc_pit_min = min(tsc_pit_min, (unsigned long) delta); | ||
| 225 | } | ||
| 226 | 236 | ||
| 227 | /* hpet or pmtimer available ? */ | 237 | /* hpet or pmtimer available ? */ |
| 228 | if (!hpet && !pm1 && !pm2) | 238 | if (!hpet && !pm1 && !pm2) |
diff --git a/drivers/net/bnx2x.h b/drivers/net/bnx2x.h index a14dba1afcc5..fd705d1295a7 100644 --- a/drivers/net/bnx2x.h +++ b/drivers/net/bnx2x.h | |||
| @@ -151,6 +151,8 @@ struct sw_rx_page { | |||
| 151 | #define PAGES_PER_SGE_SHIFT 0 | 151 | #define PAGES_PER_SGE_SHIFT 0 |
| 152 | #define PAGES_PER_SGE (1 << PAGES_PER_SGE_SHIFT) | 152 | #define PAGES_PER_SGE (1 << PAGES_PER_SGE_SHIFT) |
| 153 | 153 | ||
| 154 | #define BCM_RX_ETH_PAYLOAD_ALIGN 64 | ||
| 155 | |||
| 154 | /* SGE ring related macros */ | 156 | /* SGE ring related macros */ |
| 155 | #define NUM_RX_SGE_PAGES 2 | 157 | #define NUM_RX_SGE_PAGES 2 |
| 156 | #define RX_SGE_CNT (BCM_PAGE_SIZE / sizeof(struct eth_rx_sge)) | 158 | #define RX_SGE_CNT (BCM_PAGE_SIZE / sizeof(struct eth_rx_sge)) |
| @@ -750,8 +752,7 @@ struct bnx2x { | |||
| 750 | 752 | ||
| 751 | u32 rx_csum; | 753 | u32 rx_csum; |
| 752 | u32 rx_offset; | 754 | u32 rx_offset; |
| 753 | u32 rx_buf_use_size; /* useable size */ | 755 | u32 rx_buf_size; |
| 754 | u32 rx_buf_size; /* with alignment */ | ||
| 755 | #define ETH_OVREHEAD (ETH_HLEN + 8) /* 8 for CRC + VLAN */ | 756 | #define ETH_OVREHEAD (ETH_HLEN + 8) /* 8 for CRC + VLAN */ |
| 756 | #define ETH_MIN_PACKET_SIZE 60 | 757 | #define ETH_MIN_PACKET_SIZE 60 |
| 757 | #define ETH_MAX_PACKET_SIZE 1500 | 758 | #define ETH_MAX_PACKET_SIZE 1500 |
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 82deea0a63f5..a8eb3c4a47c8 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
| @@ -59,8 +59,8 @@ | |||
| 59 | #include "bnx2x.h" | 59 | #include "bnx2x.h" |
| 60 | #include "bnx2x_init.h" | 60 | #include "bnx2x_init.h" |
| 61 | 61 | ||
| 62 | #define DRV_MODULE_VERSION "1.45.20" | 62 | #define DRV_MODULE_VERSION "1.45.21" |
| 63 | #define DRV_MODULE_RELDATE "2008/08/25" | 63 | #define DRV_MODULE_RELDATE "2008/09/03" |
| 64 | #define BNX2X_BC_VER 0x040200 | 64 | #define BNX2X_BC_VER 0x040200 |
| 65 | 65 | ||
| 66 | /* Time in jiffies before concluding the transmitter is hung */ | 66 | /* Time in jiffies before concluding the transmitter is hung */ |
| @@ -1027,7 +1027,7 @@ static inline int bnx2x_alloc_rx_skb(struct bnx2x *bp, | |||
| 1027 | if (unlikely(skb == NULL)) | 1027 | if (unlikely(skb == NULL)) |
| 1028 | return -ENOMEM; | 1028 | return -ENOMEM; |
| 1029 | 1029 | ||
| 1030 | mapping = pci_map_single(bp->pdev, skb->data, bp->rx_buf_use_size, | 1030 | mapping = pci_map_single(bp->pdev, skb->data, bp->rx_buf_size, |
| 1031 | PCI_DMA_FROMDEVICE); | 1031 | PCI_DMA_FROMDEVICE); |
| 1032 | if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) { | 1032 | if (unlikely(dma_mapping_error(&bp->pdev->dev, mapping))) { |
| 1033 | dev_kfree_skb(skb); | 1033 | dev_kfree_skb(skb); |
| @@ -1169,7 +1169,7 @@ static void bnx2x_tpa_start(struct bnx2x_fastpath *fp, u16 queue, | |||
| 1169 | /* move empty skb from pool to prod and map it */ | 1169 | /* move empty skb from pool to prod and map it */ |
| 1170 | prod_rx_buf->skb = fp->tpa_pool[queue].skb; | 1170 | prod_rx_buf->skb = fp->tpa_pool[queue].skb; |
| 1171 | mapping = pci_map_single(bp->pdev, fp->tpa_pool[queue].skb->data, | 1171 | mapping = pci_map_single(bp->pdev, fp->tpa_pool[queue].skb->data, |
| 1172 | bp->rx_buf_use_size, PCI_DMA_FROMDEVICE); | 1172 | bp->rx_buf_size, PCI_DMA_FROMDEVICE); |
| 1173 | pci_unmap_addr_set(prod_rx_buf, mapping, mapping); | 1173 | pci_unmap_addr_set(prod_rx_buf, mapping, mapping); |
| 1174 | 1174 | ||
| 1175 | /* move partial skb from cons to pool (don't unmap yet) */ | 1175 | /* move partial skb from cons to pool (don't unmap yet) */ |
| @@ -1276,7 +1276,7 @@ static void bnx2x_tpa_stop(struct bnx2x *bp, struct bnx2x_fastpath *fp, | |||
| 1276 | pool entry status to BNX2X_TPA_STOP even if new skb allocation | 1276 | pool entry status to BNX2X_TPA_STOP even if new skb allocation |
| 1277 | fails. */ | 1277 | fails. */ |
| 1278 | pci_unmap_single(bp->pdev, pci_unmap_addr(rx_buf, mapping), | 1278 | pci_unmap_single(bp->pdev, pci_unmap_addr(rx_buf, mapping), |
| 1279 | bp->rx_buf_use_size, PCI_DMA_FROMDEVICE); | 1279 | bp->rx_buf_size, PCI_DMA_FROMDEVICE); |
| 1280 | 1280 | ||
| 1281 | if (likely(new_skb)) { | 1281 | if (likely(new_skb)) { |
| 1282 | /* fix ip xsum and give it to the stack */ | 1282 | /* fix ip xsum and give it to the stack */ |
| @@ -1520,7 +1520,7 @@ static int bnx2x_rx_int(struct bnx2x_fastpath *fp, int budget) | |||
| 1520 | } else if (bnx2x_alloc_rx_skb(bp, fp, bd_prod) == 0) { | 1520 | } else if (bnx2x_alloc_rx_skb(bp, fp, bd_prod) == 0) { |
| 1521 | pci_unmap_single(bp->pdev, | 1521 | pci_unmap_single(bp->pdev, |
| 1522 | pci_unmap_addr(rx_buf, mapping), | 1522 | pci_unmap_addr(rx_buf, mapping), |
| 1523 | bp->rx_buf_use_size, | 1523 | bp->rx_buf_size, |
| 1524 | PCI_DMA_FROMDEVICE); | 1524 | PCI_DMA_FROMDEVICE); |
| 1525 | skb_reserve(skb, pad); | 1525 | skb_reserve(skb, pad); |
| 1526 | skb_put(skb, len); | 1526 | skb_put(skb, len); |
| @@ -4229,7 +4229,7 @@ static inline void bnx2x_free_tpa_pool(struct bnx2x *bp, | |||
| 4229 | if (fp->tpa_state[i] == BNX2X_TPA_START) | 4229 | if (fp->tpa_state[i] == BNX2X_TPA_START) |
| 4230 | pci_unmap_single(bp->pdev, | 4230 | pci_unmap_single(bp->pdev, |
| 4231 | pci_unmap_addr(rx_buf, mapping), | 4231 | pci_unmap_addr(rx_buf, mapping), |
| 4232 | bp->rx_buf_use_size, | 4232 | bp->rx_buf_size, |
| 4233 | PCI_DMA_FROMDEVICE); | 4233 | PCI_DMA_FROMDEVICE); |
| 4234 | 4234 | ||
| 4235 | dev_kfree_skb(skb); | 4235 | dev_kfree_skb(skb); |
| @@ -4245,15 +4245,14 @@ static void bnx2x_init_rx_rings(struct bnx2x *bp) | |||
| 4245 | u16 ring_prod, cqe_ring_prod; | 4245 | u16 ring_prod, cqe_ring_prod; |
| 4246 | int i, j; | 4246 | int i, j; |
| 4247 | 4247 | ||
| 4248 | bp->rx_buf_use_size = bp->dev->mtu; | 4248 | bp->rx_buf_size = bp->dev->mtu; |
| 4249 | bp->rx_buf_use_size += bp->rx_offset + ETH_OVREHEAD; | 4249 | bp->rx_buf_size += bp->rx_offset + ETH_OVREHEAD + |
| 4250 | bp->rx_buf_size = bp->rx_buf_use_size + 64; | 4250 | BCM_RX_ETH_PAYLOAD_ALIGN; |
| 4251 | 4251 | ||
| 4252 | if (bp->flags & TPA_ENABLE_FLAG) { | 4252 | if (bp->flags & TPA_ENABLE_FLAG) { |
| 4253 | DP(NETIF_MSG_IFUP, | 4253 | DP(NETIF_MSG_IFUP, |
| 4254 | "rx_buf_use_size %d rx_buf_size %d effective_mtu %d\n", | 4254 | "rx_buf_size %d effective_mtu %d\n", |
| 4255 | bp->rx_buf_use_size, bp->rx_buf_size, | 4255 | bp->rx_buf_size, bp->dev->mtu + ETH_OVREHEAD); |
| 4256 | bp->dev->mtu + ETH_OVREHEAD); | ||
| 4257 | 4256 | ||
| 4258 | for_each_queue(bp, j) { | 4257 | for_each_queue(bp, j) { |
| 4259 | struct bnx2x_fastpath *fp = &bp->fp[j]; | 4258 | struct bnx2x_fastpath *fp = &bp->fp[j]; |
| @@ -4462,9 +4461,10 @@ static void bnx2x_init_context(struct bnx2x *bp) | |||
| 4462 | context->ustorm_st_context.common.status_block_id = sb_id; | 4461 | context->ustorm_st_context.common.status_block_id = sb_id; |
| 4463 | context->ustorm_st_context.common.flags = | 4462 | context->ustorm_st_context.common.flags = |
| 4464 | USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_MC_ALIGNMENT; | 4463 | USTORM_ETH_ST_CONTEXT_CONFIG_ENABLE_MC_ALIGNMENT; |
| 4465 | context->ustorm_st_context.common.mc_alignment_size = 64; | 4464 | context->ustorm_st_context.common.mc_alignment_size = |
| 4465 | BCM_RX_ETH_PAYLOAD_ALIGN; | ||
| 4466 | context->ustorm_st_context.common.bd_buff_size = | 4466 | context->ustorm_st_context.common.bd_buff_size = |
| 4467 | bp->rx_buf_use_size; | 4467 | bp->rx_buf_size; |
| 4468 | context->ustorm_st_context.common.bd_page_base_hi = | 4468 | context->ustorm_st_context.common.bd_page_base_hi = |
| 4469 | U64_HI(fp->rx_desc_mapping); | 4469 | U64_HI(fp->rx_desc_mapping); |
| 4470 | context->ustorm_st_context.common.bd_page_base_lo = | 4470 | context->ustorm_st_context.common.bd_page_base_lo = |
| @@ -4717,7 +4717,7 @@ static void bnx2x_init_internal_func(struct bnx2x *bp) | |||
| 4717 | } | 4717 | } |
| 4718 | 4718 | ||
| 4719 | /* Init CQ ring mapping and aggregation size */ | 4719 | /* Init CQ ring mapping and aggregation size */ |
| 4720 | max_agg_size = min((u32)(bp->rx_buf_use_size + | 4720 | max_agg_size = min((u32)(bp->rx_buf_size + |
| 4721 | 8*BCM_PAGE_SIZE*PAGES_PER_SGE), | 4721 | 8*BCM_PAGE_SIZE*PAGES_PER_SGE), |
| 4722 | (u32)0xffff); | 4722 | (u32)0xffff); |
| 4723 | for_each_queue(bp, i) { | 4723 | for_each_queue(bp, i) { |
| @@ -5940,7 +5940,7 @@ static void bnx2x_free_rx_skbs(struct bnx2x *bp) | |||
| 5940 | 5940 | ||
| 5941 | pci_unmap_single(bp->pdev, | 5941 | pci_unmap_single(bp->pdev, |
| 5942 | pci_unmap_addr(rx_buf, mapping), | 5942 | pci_unmap_addr(rx_buf, mapping), |
| 5943 | bp->rx_buf_use_size, | 5943 | bp->rx_buf_size, |
| 5944 | PCI_DMA_FROMDEVICE); | 5944 | PCI_DMA_FROMDEVICE); |
| 5945 | 5945 | ||
| 5946 | rx_buf->skb = NULL; | 5946 | rx_buf->skb = NULL; |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index 53f41b649f03..a417be7f8be5 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
| @@ -2304,6 +2304,12 @@ static int __devinit ixgbe_set_interrupt_capability(struct ixgbe_adapter | |||
| 2304 | int vector, v_budget; | 2304 | int vector, v_budget; |
| 2305 | 2305 | ||
| 2306 | /* | 2306 | /* |
| 2307 | * Set the default interrupt throttle rate. | ||
| 2308 | */ | ||
| 2309 | adapter->rx_eitr = (1000000 / IXGBE_DEFAULT_ITR_RX_USECS); | ||
| 2310 | adapter->tx_eitr = (1000000 / IXGBE_DEFAULT_ITR_TX_USECS); | ||
| 2311 | |||
| 2312 | /* | ||
| 2307 | * It's easy to be greedy for MSI-X vectors, but it really | 2313 | * It's easy to be greedy for MSI-X vectors, but it really |
| 2308 | * doesn't do us much good if we have a lot more vectors | 2314 | * doesn't do us much good if we have a lot more vectors |
| 2309 | * than CPU's. So let's be conservative and only ask for | 2315 | * than CPU's. So let's be conservative and only ask for |
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 32bb47adbe39..008fd6618a5f 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
| @@ -359,16 +359,6 @@ static void netxen_pcie_strap_init(struct netxen_adapter *adapter) | |||
| 359 | int i, pos; | 359 | int i, pos; |
| 360 | struct pci_dev *pdev; | 360 | struct pci_dev *pdev; |
| 361 | 361 | ||
| 362 | pdev = pci_get_device(0x1166, 0x0140, NULL); | ||
| 363 | if (pdev) { | ||
| 364 | pci_dev_put(pdev); | ||
| 365 | adapter->hw_read_wx(adapter, | ||
| 366 | NETXEN_PCIE_REG(PCIE_TGT_SPLIT_CHICKEN), &chicken, 4); | ||
| 367 | chicken |= 0x4000; | ||
| 368 | adapter->hw_write_wx(adapter, | ||
| 369 | NETXEN_PCIE_REG(PCIE_TGT_SPLIT_CHICKEN), &chicken, 4); | ||
| 370 | } | ||
| 371 | |||
| 372 | pdev = adapter->pdev; | 362 | pdev = adapter->pdev; |
| 373 | 363 | ||
| 374 | adapter->hw_read_wx(adapter, | 364 | adapter->hw_read_wx(adapter, |
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index 3f682d49a4e6..52bf11b73c6e 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
| @@ -784,6 +784,7 @@ static struct pcmcia_device_id axnet_ids[] = { | |||
| 784 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FEther PCC-TXD", 0x5261440f, 0x436768c5), | 784 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FEther PCC-TXD", 0x5261440f, 0x436768c5), |
| 785 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FEtherII PCC-TXD", 0x5261440f, 0x730df72e), | 785 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FEtherII PCC-TXD", 0x5261440f, 0x730df72e), |
| 786 | PCMCIA_DEVICE_PROD_ID12("Dynalink", "L100C16", 0x55632fd5, 0x66bc2a90), | 786 | PCMCIA_DEVICE_PROD_ID12("Dynalink", "L100C16", 0x55632fd5, 0x66bc2a90), |
| 787 | PCMCIA_DEVICE_PROD_ID12("IO DATA", "ETXPCM", 0x547e66dc, 0x233adac2), | ||
| 787 | PCMCIA_DEVICE_PROD_ID12("Linksys", "EtherFast 10/100 PC Card (PCMPC100 V3)", 0x0733cc81, 0x232019a8), | 788 | PCMCIA_DEVICE_PROD_ID12("Linksys", "EtherFast 10/100 PC Card (PCMPC100 V3)", 0x0733cc81, 0x232019a8), |
| 788 | PCMCIA_DEVICE_PROD_ID12("MELCO", "LPC3-TX", 0x481e0094, 0xf91af609), | 789 | PCMCIA_DEVICE_PROD_ID12("MELCO", "LPC3-TX", 0x481e0094, 0xf91af609), |
| 789 | PCMCIA_DEVICE_PROD_ID12("PCMCIA", "100BASE", 0x281f1c5d, 0x7c2add04), | 790 | PCMCIA_DEVICE_PROD_ID12("PCMCIA", "100BASE", 0x281f1c5d, 0x7c2add04), |
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c index 2d4c4ad89b8d..ebc1ae6bcbe5 100644 --- a/drivers/net/pcmcia/pcnet_cs.c +++ b/drivers/net/pcmcia/pcnet_cs.c | |||
| @@ -1626,6 +1626,7 @@ static struct pcmcia_device_id pcnet_ids[] = { | |||
| 1626 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega EtherII PCC-TD", 0x5261440f, 0xc49bd73d), | 1626 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega EtherII PCC-TD", 0x5261440f, 0xc49bd73d), |
| 1627 | PCMCIA_DEVICE_PROD_ID12("Corega K.K.", "corega EtherII PCC-TD", 0xd4fdcbd8, 0xc49bd73d), | 1627 | PCMCIA_DEVICE_PROD_ID12("Corega K.K.", "corega EtherII PCC-TD", 0xd4fdcbd8, 0xc49bd73d), |
| 1628 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega Ether PCC-T", 0x5261440f, 0x6705fcaa), | 1628 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega Ether PCC-T", 0x5261440f, 0x6705fcaa), |
| 1629 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega Ether PCC-TD", 0x5261440f, 0x47d5ca83), | ||
| 1629 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FastEther PCC-TX", 0x5261440f, 0x485e85d9), | 1630 | PCMCIA_DEVICE_PROD_ID12("corega K.K.", "corega FastEther PCC-TX", 0x5261440f, 0x485e85d9), |
| 1630 | PCMCIA_DEVICE_PROD_ID12("Corega,K.K.", "Ethernet LAN Card", 0x110d26d9, 0x9fd2f0a2), | 1631 | PCMCIA_DEVICE_PROD_ID12("Corega,K.K.", "Ethernet LAN Card", 0x110d26d9, 0x9fd2f0a2), |
| 1631 | PCMCIA_DEVICE_PROD_ID12("corega,K.K.", "Ethernet LAN Card", 0x9791a90e, 0x9fd2f0a2), | 1632 | PCMCIA_DEVICE_PROD_ID12("corega,K.K.", "Ethernet LAN Card", 0x9791a90e, 0x9fd2f0a2), |
| @@ -1737,7 +1738,6 @@ static struct pcmcia_device_id pcnet_ids[] = { | |||
| 1737 | PCMCIA_DEVICE_PROD_ID1("CyQ've 10 Base-T LAN CARD", 0x94faf360), | 1738 | PCMCIA_DEVICE_PROD_ID1("CyQ've 10 Base-T LAN CARD", 0x94faf360), |
| 1738 | PCMCIA_DEVICE_PROD_ID1("EP-210 PCMCIA LAN CARD.", 0x8850b4de), | 1739 | PCMCIA_DEVICE_PROD_ID1("EP-210 PCMCIA LAN CARD.", 0x8850b4de), |
| 1739 | PCMCIA_DEVICE_PROD_ID1("ETHER-C16", 0x06a8514f), | 1740 | PCMCIA_DEVICE_PROD_ID1("ETHER-C16", 0x06a8514f), |
| 1740 | PCMCIA_DEVICE_PROD_ID1("IC-CARD", 0x60cb09a6), | ||
| 1741 | PCMCIA_DEVICE_PROD_ID1("NE2000 Compatible", 0x75b8ad5a), | 1741 | PCMCIA_DEVICE_PROD_ID1("NE2000 Compatible", 0x75b8ad5a), |
| 1742 | PCMCIA_DEVICE_PROD_ID2("EN-6200P2", 0xa996d078), | 1742 | PCMCIA_DEVICE_PROD_ID2("EN-6200P2", 0xa996d078), |
| 1743 | /* too generic! */ | 1743 | /* too generic! */ |
diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index a84ba487c713..8c19307e5040 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c | |||
| @@ -117,7 +117,7 @@ static void ctrl_callback(struct urb *urb) | |||
| 117 | case -ENOENT: | 117 | case -ENOENT: |
| 118 | break; | 118 | break; |
| 119 | default: | 119 | default: |
| 120 | if (netif_msg_drv(pegasus)) | 120 | if (netif_msg_drv(pegasus) && printk_ratelimit()) |
| 121 | dev_dbg(&pegasus->intf->dev, "%s, status %d\n", | 121 | dev_dbg(&pegasus->intf->dev, "%s, status %d\n", |
| 122 | __FUNCTION__, urb->status); | 122 | __FUNCTION__, urb->status); |
| 123 | } | 123 | } |
| @@ -166,7 +166,7 @@ static int get_registers(pegasus_t * pegasus, __u16 indx, __u16 size, | |||
| 166 | set_current_state(TASK_RUNNING); | 166 | set_current_state(TASK_RUNNING); |
| 167 | if (ret == -ENODEV) | 167 | if (ret == -ENODEV) |
| 168 | netif_device_detach(pegasus->net); | 168 | netif_device_detach(pegasus->net); |
| 169 | if (netif_msg_drv(pegasus)) | 169 | if (netif_msg_drv(pegasus) && printk_ratelimit()) |
| 170 | dev_err(&pegasus->intf->dev, "%s, status %d\n", | 170 | dev_err(&pegasus->intf->dev, "%s, status %d\n", |
| 171 | __FUNCTION__, ret); | 171 | __FUNCTION__, ret); |
| 172 | goto out; | 172 | goto out; |
| @@ -275,7 +275,7 @@ static int set_register(pegasus_t * pegasus, __u16 indx, __u8 data) | |||
| 275 | if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { | 275 | if ((ret = usb_submit_urb(pegasus->ctrl_urb, GFP_ATOMIC))) { |
| 276 | if (ret == -ENODEV) | 276 | if (ret == -ENODEV) |
| 277 | netif_device_detach(pegasus->net); | 277 | netif_device_detach(pegasus->net); |
| 278 | if (netif_msg_drv(pegasus)) | 278 | if (netif_msg_drv(pegasus) && printk_ratelimit()) |
| 279 | dev_err(&pegasus->intf->dev, "%s, status %d\n", | 279 | dev_err(&pegasus->intf->dev, "%s, status %d\n", |
| 280 | __FUNCTION__, ret); | 280 | __FUNCTION__, ret); |
| 281 | goto out; | 281 | goto out; |
| @@ -1209,8 +1209,7 @@ static void pegasus_set_multicast(struct net_device *net) | |||
| 1209 | pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; | 1209 | pegasus->eth_regs[EthCtrl2] |= RX_PROMISCUOUS; |
| 1210 | if (netif_msg_link(pegasus)) | 1210 | if (netif_msg_link(pegasus)) |
| 1211 | pr_info("%s: Promiscuous mode enabled.\n", net->name); | 1211 | pr_info("%s: Promiscuous mode enabled.\n", net->name); |
| 1212 | } else if (net->mc_count || | 1212 | } else if (net->mc_count || (net->flags & IFF_ALLMULTI)) { |
| 1213 | (net->flags & IFF_ALLMULTI)) { | ||
| 1214 | pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST; | 1213 | pegasus->eth_regs[EthCtrl0] |= RX_MULTICAST; |
| 1215 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; | 1214 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; |
| 1216 | if (netif_msg_link(pegasus)) | 1215 | if (netif_msg_link(pegasus)) |
| @@ -1220,6 +1219,8 @@ static void pegasus_set_multicast(struct net_device *net) | |||
| 1220 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; | 1219 | pegasus->eth_regs[EthCtrl2] &= ~RX_PROMISCUOUS; |
| 1221 | } | 1220 | } |
| 1222 | 1221 | ||
| 1222 | pegasus->ctrl_urb->status = 0; | ||
| 1223 | |||
| 1223 | pegasus->flags |= ETH_REGS_CHANGE; | 1224 | pegasus->flags |= ETH_REGS_CHANGE; |
| 1224 | ctrl_callback(pegasus->ctrl_urb); | 1225 | ctrl_callback(pegasus->ctrl_urb); |
| 1225 | } | 1226 | } |
diff --git a/drivers/net/wireless/ath9k/main.c b/drivers/net/wireless/ath9k/main.c index 95b337149484..c5107f269f24 100644 --- a/drivers/net/wireless/ath9k/main.c +++ b/drivers/net/wireless/ath9k/main.c | |||
| @@ -1067,8 +1067,16 @@ void ath_tx_complete(struct ath_softc *sc, struct sk_buff *skb, | |||
| 1067 | tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK; | 1067 | tx_info->flags |= IEEE80211_TX_STAT_AMPDU_NO_BACK; |
| 1068 | tx_status->flags &= ~ATH_TX_BAR; | 1068 | tx_status->flags &= ~ATH_TX_BAR; |
| 1069 | } | 1069 | } |
| 1070 | if (tx_status->flags) | 1070 | |
| 1071 | tx_info->status.excessive_retries = 1; | 1071 | if (tx_status->flags & (ATH_TX_ERROR | ATH_TX_XRETRY)) { |
| 1072 | if (!(tx_info->flags & IEEE80211_TX_CTL_NO_ACK)) { | ||
| 1073 | /* Frame was not ACKed, but an ACK was expected */ | ||
| 1074 | tx_info->status.excessive_retries = 1; | ||
| 1075 | } | ||
| 1076 | } else { | ||
| 1077 | /* Frame was ACKed */ | ||
| 1078 | tx_info->flags |= IEEE80211_TX_STAT_ACK; | ||
| 1079 | } | ||
| 1072 | 1080 | ||
| 1073 | tx_info->status.retry_count = tx_status->retries; | 1081 | tx_info->status.retry_count = tx_status->retries; |
| 1074 | 1082 | ||
diff --git a/drivers/net/wireless/ath9k/xmit.c b/drivers/net/wireless/ath9k/xmit.c index 157f830ee6b8..550129f717e2 100644 --- a/drivers/net/wireless/ath9k/xmit.c +++ b/drivers/net/wireless/ath9k/xmit.c | |||
| @@ -357,9 +357,9 @@ static int ath_tx_prepare(struct ath_softc *sc, | |||
| 357 | txctl->flags = ATH9K_TXDESC_CLRDMASK; /* needed for crypto errors */ | 357 | txctl->flags = ATH9K_TXDESC_CLRDMASK; /* needed for crypto errors */ |
| 358 | 358 | ||
| 359 | if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK) | 359 | if (tx_info->flags & IEEE80211_TX_CTL_NO_ACK) |
| 360 | tx_info->flags |= ATH9K_TXDESC_NOACK; | 360 | txctl->flags |= ATH9K_TXDESC_NOACK; |
| 361 | if (tx_info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) | 361 | if (tx_info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) |
| 362 | tx_info->flags |= ATH9K_TXDESC_RTSENA; | 362 | txctl->flags |= ATH9K_TXDESC_RTSENA; |
| 363 | 363 | ||
| 364 | /* | 364 | /* |
| 365 | * Setup for rate calculations. | 365 | * Setup for rate calculations. |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c index 754fef5b592f..90a2b6dee7c0 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn-rs.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn-rs.c | |||
| @@ -1153,7 +1153,8 @@ static int rs_switch_to_mimo2(struct iwl_priv *priv, | |||
| 1153 | !sta->ht_info.ht_supported) | 1153 | !sta->ht_info.ht_supported) |
| 1154 | return -1; | 1154 | return -1; |
| 1155 | 1155 | ||
| 1156 | if (priv->current_ht_config.tx_mimo_ps_mode == IWL_MIMO_PS_STATIC) | 1156 | if (((sta->ht_info.cap & IEEE80211_HT_CAP_MIMO_PS) >> 2) |
| 1157 | == IWL_MIMO_PS_STATIC) | ||
| 1157 | return -1; | 1158 | return -1; |
| 1158 | 1159 | ||
| 1159 | /* Need both Tx chains/antennas to support MIMO */ | 1160 | /* Need both Tx chains/antennas to support MIMO */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index c0b73c4d6f44..e01f048a02dd 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
| @@ -181,14 +181,14 @@ static int iwl4965_check_rxon_cmd(struct iwl_rxon_cmd *rxon) | |||
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | /** | 183 | /** |
| 184 | * iwl4965_full_rxon_required - check if full RXON (vs RXON_ASSOC) cmd is needed | 184 | * iwl_full_rxon_required - check if full RXON (vs RXON_ASSOC) cmd is needed |
| 185 | * @priv: staging_rxon is compared to active_rxon | 185 | * @priv: staging_rxon is compared to active_rxon |
| 186 | * | 186 | * |
| 187 | * If the RXON structure is changing enough to require a new tune, | 187 | * If the RXON structure is changing enough to require a new tune, |
| 188 | * or is clearing the RXON_FILTER_ASSOC_MSK, then return 1 to indicate that | 188 | * or is clearing the RXON_FILTER_ASSOC_MSK, then return 1 to indicate that |
| 189 | * a new tune (full RXON command, rather than RXON_ASSOC cmd) is required. | 189 | * a new tune (full RXON command, rather than RXON_ASSOC cmd) is required. |
| 190 | */ | 190 | */ |
| 191 | static int iwl4965_full_rxon_required(struct iwl_priv *priv) | 191 | static int iwl_full_rxon_required(struct iwl_priv *priv) |
| 192 | { | 192 | { |
| 193 | 193 | ||
| 194 | /* These items are only settable from the full RXON command */ | 194 | /* These items are only settable from the full RXON command */ |
| @@ -207,7 +207,6 @@ static int iwl4965_full_rxon_required(struct iwl_priv *priv) | |||
| 207 | priv->active_rxon.ofdm_ht_single_stream_basic_rates) || | 207 | priv->active_rxon.ofdm_ht_single_stream_basic_rates) || |
| 208 | (priv->staging_rxon.ofdm_ht_dual_stream_basic_rates != | 208 | (priv->staging_rxon.ofdm_ht_dual_stream_basic_rates != |
| 209 | priv->active_rxon.ofdm_ht_dual_stream_basic_rates) || | 209 | priv->active_rxon.ofdm_ht_dual_stream_basic_rates) || |
| 210 | (priv->staging_rxon.rx_chain != priv->active_rxon.rx_chain) || | ||
| 211 | (priv->staging_rxon.assoc_id != priv->active_rxon.assoc_id)) | 210 | (priv->staging_rxon.assoc_id != priv->active_rxon.assoc_id)) |
| 212 | return 1; | 211 | return 1; |
| 213 | 212 | ||
| @@ -263,7 +262,7 @@ static int iwl4965_commit_rxon(struct iwl_priv *priv) | |||
| 263 | /* If we don't need to send a full RXON, we can use | 262 | /* If we don't need to send a full RXON, we can use |
| 264 | * iwl4965_rxon_assoc_cmd which is used to reconfigure filter | 263 | * iwl4965_rxon_assoc_cmd which is used to reconfigure filter |
| 265 | * and other flags for the current radio configuration. */ | 264 | * and other flags for the current radio configuration. */ |
| 266 | if (!iwl4965_full_rxon_required(priv)) { | 265 | if (!iwl_full_rxon_required(priv)) { |
| 267 | ret = iwl_send_rxon_assoc(priv); | 266 | ret = iwl_send_rxon_assoc(priv); |
| 268 | if (ret) { | 267 | if (ret) { |
| 269 | IWL_ERROR("Error setting RXON_ASSOC (%d)\n", ret); | 268 | IWL_ERROR("Error setting RXON_ASSOC (%d)\n", ret); |
| @@ -587,8 +586,6 @@ static void iwl4965_ht_conf(struct iwl_priv *priv, | |||
| 587 | iwl_conf->supported_chan_width = 0; | 586 | iwl_conf->supported_chan_width = 0; |
| 588 | } | 587 | } |
| 589 | 588 | ||
| 590 | iwl_conf->tx_mimo_ps_mode = | ||
| 591 | (u8)((ht_conf->cap & IEEE80211_HT_CAP_MIMO_PS) >> 2); | ||
| 592 | memcpy(iwl_conf->supp_mcs_set, ht_conf->supp_mcs_set, 16); | 589 | memcpy(iwl_conf->supp_mcs_set, ht_conf->supp_mcs_set, 16); |
| 593 | 590 | ||
| 594 | iwl_conf->control_channel = ht_bss_conf->primary_channel; | 591 | iwl_conf->control_channel = ht_bss_conf->primary_channel; |
| @@ -2190,7 +2187,10 @@ static void __iwl4965_down(struct iwl_priv *priv) | |||
| 2190 | udelay(5); | 2187 | udelay(5); |
| 2191 | 2188 | ||
| 2192 | /* FIXME: apm_ops.suspend(priv) */ | 2189 | /* FIXME: apm_ops.suspend(priv) */ |
| 2193 | priv->cfg->ops->lib->apm_ops.reset(priv); | 2190 | if (exit_pending || test_bit(STATUS_IN_SUSPEND, &priv->status)) |
| 2191 | priv->cfg->ops->lib->apm_ops.stop(priv); | ||
| 2192 | else | ||
| 2193 | priv->cfg->ops->lib->apm_ops.reset(priv); | ||
| 2194 | priv->cfg->ops->lib->free_shared_mem(priv); | 2194 | priv->cfg->ops->lib->free_shared_mem(priv); |
| 2195 | 2195 | ||
| 2196 | exit: | 2196 | exit: |
| @@ -3588,7 +3588,7 @@ static int iwl4965_mac_beacon_update(struct ieee80211_hw *hw, struct sk_buff *sk | |||
| 3588 | 3588 | ||
| 3589 | priv->assoc_id = 0; | 3589 | priv->assoc_id = 0; |
| 3590 | timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp; | 3590 | timestamp = ((struct ieee80211_mgmt *)skb->data)->u.beacon.timestamp; |
| 3591 | priv->timestamp = le64_to_cpu(timestamp) + (priv->beacon_int * 1000); | 3591 | priv->timestamp = le64_to_cpu(timestamp); |
| 3592 | 3592 | ||
| 3593 | IWL_DEBUG_MAC80211("leave\n"); | 3593 | IWL_DEBUG_MAC80211("leave\n"); |
| 3594 | spin_unlock_irqrestore(&priv->lock, flags); | 3594 | spin_unlock_irqrestore(&priv->lock, flags); |
| @@ -4372,15 +4372,18 @@ static void __devexit iwl4965_pci_remove(struct pci_dev *pdev) | |||
| 4372 | iwl_dbgfs_unregister(priv); | 4372 | iwl_dbgfs_unregister(priv); |
| 4373 | sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group); | 4373 | sysfs_remove_group(&pdev->dev.kobj, &iwl4965_attribute_group); |
| 4374 | 4374 | ||
| 4375 | /* ieee80211_unregister_hw call wil cause iwl4965_mac_stop to | ||
| 4376 | * to be called and iwl4965_down since we are removing the device | ||
| 4377 | * we need to set STATUS_EXIT_PENDING bit. | ||
| 4378 | */ | ||
| 4379 | set_bit(STATUS_EXIT_PENDING, &priv->status); | ||
| 4375 | if (priv->mac80211_registered) { | 4380 | if (priv->mac80211_registered) { |
| 4376 | ieee80211_unregister_hw(priv->hw); | 4381 | ieee80211_unregister_hw(priv->hw); |
| 4377 | priv->mac80211_registered = 0; | 4382 | priv->mac80211_registered = 0; |
| 4383 | } else { | ||
| 4384 | iwl4965_down(priv); | ||
| 4378 | } | 4385 | } |
| 4379 | 4386 | ||
| 4380 | set_bit(STATUS_EXIT_PENDING, &priv->status); | ||
| 4381 | |||
| 4382 | iwl4965_down(priv); | ||
| 4383 | |||
| 4384 | /* make sure we flush any pending irq or | 4387 | /* make sure we flush any pending irq or |
| 4385 | * tasklet for the driver | 4388 | * tasklet for the driver |
| 4386 | */ | 4389 | */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index c72f72579bea..80f2f84defa8 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
| @@ -592,12 +592,11 @@ static void iwlcore_free_geos(struct iwl_priv *priv) | |||
| 592 | clear_bit(STATUS_GEO_CONFIGURED, &priv->status); | 592 | clear_bit(STATUS_GEO_CONFIGURED, &priv->status); |
| 593 | } | 593 | } |
| 594 | 594 | ||
| 595 | static u8 is_single_rx_stream(struct iwl_priv *priv) | 595 | static bool is_single_rx_stream(struct iwl_priv *priv) |
| 596 | { | 596 | { |
| 597 | return !priv->current_ht_config.is_ht || | 597 | return !priv->current_ht_config.is_ht || |
| 598 | ((priv->current_ht_config.supp_mcs_set[1] == 0) && | 598 | ((priv->current_ht_config.supp_mcs_set[1] == 0) && |
| 599 | (priv->current_ht_config.supp_mcs_set[2] == 0)) || | 599 | (priv->current_ht_config.supp_mcs_set[2] == 0)); |
| 600 | priv->ps_mode == IWL_MIMO_PS_STATIC; | ||
| 601 | } | 600 | } |
| 602 | 601 | ||
| 603 | static u8 iwl_is_channel_extension(struct iwl_priv *priv, | 602 | static u8 iwl_is_channel_extension(struct iwl_priv *priv, |
| @@ -704,33 +703,39 @@ EXPORT_SYMBOL(iwl_set_rxon_ht); | |||
| 704 | * MIMO (dual stream) requires at least 2, but works better with 3. | 703 | * MIMO (dual stream) requires at least 2, but works better with 3. |
| 705 | * This does not determine *which* chains to use, just how many. | 704 | * This does not determine *which* chains to use, just how many. |
| 706 | */ | 705 | */ |
| 707 | static int iwlcore_get_rx_chain_counter(struct iwl_priv *priv, | 706 | static int iwl_get_active_rx_chain_count(struct iwl_priv *priv) |
| 708 | u8 *idle_state, u8 *rx_state) | ||
| 709 | { | 707 | { |
| 710 | u8 is_single = is_single_rx_stream(priv); | 708 | bool is_single = is_single_rx_stream(priv); |
| 711 | u8 is_cam = test_bit(STATUS_POWER_PMI, &priv->status) ? 0 : 1; | 709 | bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status); |
| 712 | 710 | ||
| 713 | /* # of Rx chains to use when expecting MIMO. */ | 711 | /* # of Rx chains to use when expecting MIMO. */ |
| 714 | if (is_single || (!is_cam && (priv->ps_mode == IWL_MIMO_PS_STATIC))) | 712 | if (is_single || (!is_cam && (priv->ps_mode == IWL_MIMO_PS_STATIC))) |
| 715 | *rx_state = 2; | 713 | return 2; |
| 716 | else | 714 | else |
| 717 | *rx_state = 3; | 715 | return 3; |
| 716 | } | ||
| 718 | 717 | ||
| 718 | static int iwl_get_idle_rx_chain_count(struct iwl_priv *priv, int active_cnt) | ||
| 719 | { | ||
| 720 | int idle_cnt; | ||
| 721 | bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status); | ||
| 719 | /* # Rx chains when idling and maybe trying to save power */ | 722 | /* # Rx chains when idling and maybe trying to save power */ |
| 720 | switch (priv->ps_mode) { | 723 | switch (priv->ps_mode) { |
| 721 | case IWL_MIMO_PS_STATIC: | 724 | case IWL_MIMO_PS_STATIC: |
| 722 | case IWL_MIMO_PS_DYNAMIC: | 725 | case IWL_MIMO_PS_DYNAMIC: |
| 723 | *idle_state = (is_cam) ? 2 : 1; | 726 | idle_cnt = (is_cam) ? 2 : 1; |
| 724 | break; | 727 | break; |
| 725 | case IWL_MIMO_PS_NONE: | 728 | case IWL_MIMO_PS_NONE: |
| 726 | *idle_state = (is_cam) ? *rx_state : 1; | 729 | idle_cnt = (is_cam) ? active_cnt : 1; |
| 727 | break; | 730 | break; |
| 731 | case IWL_MIMO_PS_INVALID: | ||
| 728 | default: | 732 | default: |
| 729 | *idle_state = 1; | 733 | IWL_ERROR("invalide mimo ps mode %d\n", priv->ps_mode); |
| 734 | WARN_ON(1); | ||
| 735 | idle_cnt = -1; | ||
| 730 | break; | 736 | break; |
| 731 | } | 737 | } |
| 732 | 738 | return idle_cnt; | |
| 733 | return 0; | ||
| 734 | } | 739 | } |
| 735 | 740 | ||
| 736 | /** | 741 | /** |
| @@ -741,34 +746,44 @@ static int iwlcore_get_rx_chain_counter(struct iwl_priv *priv, | |||
| 741 | */ | 746 | */ |
| 742 | void iwl_set_rxon_chain(struct iwl_priv *priv) | 747 | void iwl_set_rxon_chain(struct iwl_priv *priv) |
| 743 | { | 748 | { |
| 744 | u8 is_single = is_single_rx_stream(priv); | 749 | bool is_single = is_single_rx_stream(priv); |
| 745 | u8 idle_state, rx_state; | 750 | bool is_cam = !test_bit(STATUS_POWER_PMI, &priv->status); |
| 746 | 751 | u8 idle_rx_cnt, active_rx_cnt; | |
| 747 | priv->staging_rxon.rx_chain = 0; | 752 | u16 rx_chain; |
| 748 | rx_state = idle_state = 3; | ||
| 749 | 753 | ||
| 750 | /* Tell uCode which antennas are actually connected. | 754 | /* Tell uCode which antennas are actually connected. |
| 751 | * Before first association, we assume all antennas are connected. | 755 | * Before first association, we assume all antennas are connected. |
| 752 | * Just after first association, iwl_chain_noise_calibration() | 756 | * Just after first association, iwl_chain_noise_calibration() |
| 753 | * checks which antennas actually *are* connected. */ | 757 | * checks which antennas actually *are* connected. */ |
| 754 | priv->staging_rxon.rx_chain |= | 758 | rx_chain = priv->hw_params.valid_rx_ant << RXON_RX_CHAIN_VALID_POS; |
| 755 | cpu_to_le16(priv->hw_params.valid_rx_ant << | ||
| 756 | RXON_RX_CHAIN_VALID_POS); | ||
| 757 | 759 | ||
| 758 | /* How many receivers should we use? */ | 760 | /* How many receivers should we use? */ |
| 759 | iwlcore_get_rx_chain_counter(priv, &idle_state, &rx_state); | 761 | active_rx_cnt = iwl_get_active_rx_chain_count(priv); |
| 760 | priv->staging_rxon.rx_chain |= | 762 | idle_rx_cnt = iwl_get_idle_rx_chain_count(priv, active_rx_cnt); |
| 761 | cpu_to_le16(rx_state << RXON_RX_CHAIN_MIMO_CNT_POS); | 763 | |
| 762 | priv->staging_rxon.rx_chain |= | 764 | /* correct rx chain count accoridng hw settings */ |
| 763 | cpu_to_le16(idle_state << RXON_RX_CHAIN_CNT_POS); | 765 | if (priv->hw_params.rx_chains_num < active_rx_cnt) |
| 764 | 766 | active_rx_cnt = priv->hw_params.rx_chains_num; | |
| 765 | if (!is_single && (rx_state >= 2) && | 767 | |
| 766 | !test_bit(STATUS_POWER_PMI, &priv->status)) | 768 | if (priv->hw_params.rx_chains_num < idle_rx_cnt) |
| 769 | idle_rx_cnt = priv->hw_params.rx_chains_num; | ||
| 770 | |||
| 771 | rx_chain |= active_rx_cnt << RXON_RX_CHAIN_MIMO_CNT_POS; | ||
| 772 | rx_chain |= idle_rx_cnt << RXON_RX_CHAIN_CNT_POS; | ||
| 773 | |||
| 774 | priv->staging_rxon.rx_chain = cpu_to_le16(rx_chain); | ||
| 775 | |||
| 776 | if (!is_single && (active_rx_cnt >= 2) && is_cam) | ||
| 767 | priv->staging_rxon.rx_chain |= RXON_RX_CHAIN_MIMO_FORCE_MSK; | 777 | priv->staging_rxon.rx_chain |= RXON_RX_CHAIN_MIMO_FORCE_MSK; |
| 768 | else | 778 | else |
| 769 | priv->staging_rxon.rx_chain &= ~RXON_RX_CHAIN_MIMO_FORCE_MSK; | 779 | priv->staging_rxon.rx_chain &= ~RXON_RX_CHAIN_MIMO_FORCE_MSK; |
| 770 | 780 | ||
| 771 | IWL_DEBUG_ASSOC("rx chain %X\n", priv->staging_rxon.rx_chain); | 781 | IWL_DEBUG_ASSOC("rx_chain=0x%Xi active=%d idle=%d\n", |
| 782 | priv->staging_rxon.rx_chain, | ||
| 783 | active_rx_cnt, idle_rx_cnt); | ||
| 784 | |||
| 785 | WARN_ON(active_rx_cnt == 0 || idle_rx_cnt == 0 || | ||
| 786 | active_rx_cnt < idle_rx_cnt); | ||
| 772 | } | 787 | } |
| 773 | EXPORT_SYMBOL(iwl_set_rxon_chain); | 788 | EXPORT_SYMBOL(iwl_set_rxon_chain); |
| 774 | 789 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-dev.h b/drivers/net/wireless/iwlwifi/iwl-dev.h index c19db438306c..cdfb343c7ec6 100644 --- a/drivers/net/wireless/iwlwifi/iwl-dev.h +++ b/drivers/net/wireless/iwlwifi/iwl-dev.h | |||
| @@ -412,7 +412,6 @@ struct iwl_ht_info { | |||
| 412 | /* self configuration data */ | 412 | /* self configuration data */ |
| 413 | u8 is_ht; | 413 | u8 is_ht; |
| 414 | u8 supported_chan_width; | 414 | u8 supported_chan_width; |
| 415 | u16 tx_mimo_ps_mode; | ||
| 416 | u8 is_green_field; | 415 | u8 is_green_field; |
| 417 | u8 sgf; /* HT_SHORT_GI_* short guard interval */ | 416 | u8 sgf; /* HT_SHORT_GI_* short guard interval */ |
| 418 | u8 max_amsdu_size; | 417 | u8 max_amsdu_size; |
diff --git a/drivers/net/wireless/iwlwifi/iwl-rx.c b/drivers/net/wireless/iwlwifi/iwl-rx.c index f3f6ea49fdd2..e81bfc42a7cb 100644 --- a/drivers/net/wireless/iwlwifi/iwl-rx.c +++ b/drivers/net/wireless/iwlwifi/iwl-rx.c | |||
| @@ -1173,7 +1173,10 @@ void iwl_rx_reply_rx(struct iwl_priv *priv, | |||
| 1173 | 1173 | ||
| 1174 | rx_status.antenna = 0; | 1174 | rx_status.antenna = 0; |
| 1175 | rx_status.flag = 0; | 1175 | rx_status.flag = 0; |
| 1176 | rx_status.flag |= RX_FLAG_TSFT; | 1176 | |
| 1177 | /* TSF isn't reliable. In order to allow smooth user experience, | ||
| 1178 | * this W/A doesn't propagate it to the mac80211 */ | ||
| 1179 | /*rx_status.flag |= RX_FLAG_TSFT;*/ | ||
| 1177 | 1180 | ||
| 1178 | if ((unlikely(rx_start->cfg_phy_cnt > 20))) { | 1181 | if ((unlikely(rx_start->cfg_phy_cnt > 20))) { |
| 1179 | IWL_DEBUG_DROP("dsp size out of range [0,20]: %d/n", | 1182 | IWL_DEBUG_DROP("dsp size out of range [0,20]: %d/n", |
diff --git a/drivers/net/wireless/iwlwifi/iwl-scan.c b/drivers/net/wireless/iwlwifi/iwl-scan.c index 9bb6adb28b73..6c8ac3a87d54 100644 --- a/drivers/net/wireless/iwlwifi/iwl-scan.c +++ b/drivers/net/wireless/iwlwifi/iwl-scan.c | |||
| @@ -421,7 +421,7 @@ static int iwl_get_channels_for_scan(struct iwl_priv *priv, | |||
| 421 | else | 421 | else |
| 422 | scan_ch->type = SCAN_CHANNEL_TYPE_ACTIVE; | 422 | scan_ch->type = SCAN_CHANNEL_TYPE_ACTIVE; |
| 423 | 423 | ||
| 424 | if ((scan_ch->type & SCAN_CHANNEL_TYPE_ACTIVE) && n_probes) | 424 | if (n_probes) |
| 425 | scan_ch->type |= IWL_SCAN_PROBE_MASK(n_probes); | 425 | scan_ch->type |= IWL_SCAN_PROBE_MASK(n_probes); |
| 426 | 426 | ||
| 427 | scan_ch->active_dwell = cpu_to_le16(active_dwell); | 427 | scan_ch->active_dwell = cpu_to_le16(active_dwell); |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index ff879d46624a..78b1a7a4ca40 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
| @@ -402,12 +402,11 @@ static int iwl_hw_tx_queue_init(struct iwl_priv *priv, | |||
| 402 | /** | 402 | /** |
| 403 | * iwl_tx_queue_init - Allocate and initialize one tx/cmd queue | 403 | * iwl_tx_queue_init - Allocate and initialize one tx/cmd queue |
| 404 | */ | 404 | */ |
| 405 | static int iwl_tx_queue_init(struct iwl_priv *priv, | 405 | static int iwl_tx_queue_init(struct iwl_priv *priv, struct iwl_tx_queue *txq, |
| 406 | struct iwl_tx_queue *txq, | ||
| 407 | int slots_num, u32 txq_id) | 406 | int slots_num, u32 txq_id) |
| 408 | { | 407 | { |
| 409 | int i, len; | 408 | int i, len; |
| 410 | int rc = 0; | 409 | int ret; |
| 411 | 410 | ||
| 412 | /* | 411 | /* |
| 413 | * Alloc buffer array for commands (Tx or other types of commands). | 412 | * Alloc buffer array for commands (Tx or other types of commands). |
| @@ -428,17 +427,14 @@ static int iwl_tx_queue_init(struct iwl_priv *priv, | |||
| 428 | 427 | ||
| 429 | txq->cmd[i] = kmalloc(len, GFP_KERNEL); | 428 | txq->cmd[i] = kmalloc(len, GFP_KERNEL); |
| 430 | if (!txq->cmd[i]) | 429 | if (!txq->cmd[i]) |
| 431 | return -ENOMEM; | 430 | goto err; |
| 432 | } | 431 | } |
| 433 | 432 | ||
| 434 | /* Alloc driver data array and TFD circular buffer */ | 433 | /* Alloc driver data array and TFD circular buffer */ |
| 435 | rc = iwl_tx_queue_alloc(priv, txq, txq_id); | 434 | ret = iwl_tx_queue_alloc(priv, txq, txq_id); |
| 436 | if (rc) { | 435 | if (ret) |
| 437 | for (i = 0; i < slots_num; i++) | 436 | goto err; |
| 438 | kfree(txq->cmd[i]); | ||
| 439 | 437 | ||
| 440 | return -ENOMEM; | ||
| 441 | } | ||
| 442 | txq->need_update = 0; | 438 | txq->need_update = 0; |
| 443 | 439 | ||
| 444 | /* TFD_QUEUE_SIZE_MAX must be power-of-two size, otherwise | 440 | /* TFD_QUEUE_SIZE_MAX must be power-of-two size, otherwise |
| @@ -452,6 +448,17 @@ static int iwl_tx_queue_init(struct iwl_priv *priv, | |||
| 452 | iwl_hw_tx_queue_init(priv, txq); | 448 | iwl_hw_tx_queue_init(priv, txq); |
| 453 | 449 | ||
| 454 | return 0; | 450 | return 0; |
| 451 | err: | ||
| 452 | for (i = 0; i < slots_num; i++) { | ||
| 453 | kfree(txq->cmd[i]); | ||
| 454 | txq->cmd[i] = NULL; | ||
| 455 | } | ||
| 456 | |||
| 457 | if (txq_id == IWL_CMD_QUEUE_NUM) { | ||
| 458 | kfree(txq->cmd[slots_num]); | ||
| 459 | txq->cmd[slots_num] = NULL; | ||
| 460 | } | ||
| 461 | return -ENOMEM; | ||
| 455 | } | 462 | } |
| 456 | /** | 463 | /** |
| 457 | * iwl_hw_txq_ctx_free - Free TXQ Context | 464 | * iwl_hw_txq_ctx_free - Free TXQ Context |
diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c index b1ff16aa4bdb..3ddaff42d1bb 100644 --- a/net/tipc/bcast.c +++ b/net/tipc/bcast.c | |||
| @@ -96,8 +96,8 @@ struct bcbearer { | |||
| 96 | struct media media; | 96 | struct media media; |
| 97 | struct bcbearer_pair bpairs[MAX_BEARERS]; | 97 | struct bcbearer_pair bpairs[MAX_BEARERS]; |
| 98 | struct bcbearer_pair bpairs_temp[TIPC_MAX_LINK_PRI + 1]; | 98 | struct bcbearer_pair bpairs_temp[TIPC_MAX_LINK_PRI + 1]; |
| 99 | struct node_map remains; | 99 | struct tipc_node_map remains; |
| 100 | struct node_map remains_new; | 100 | struct tipc_node_map remains_new; |
| 101 | }; | 101 | }; |
| 102 | 102 | ||
| 103 | /** | 103 | /** |
| @@ -110,7 +110,7 @@ struct bcbearer { | |||
| 110 | 110 | ||
| 111 | struct bclink { | 111 | struct bclink { |
| 112 | struct link link; | 112 | struct link link; |
| 113 | struct node node; | 113 | struct tipc_node node; |
| 114 | }; | 114 | }; |
| 115 | 115 | ||
| 116 | 116 | ||
| @@ -149,7 +149,7 @@ static void bcbuf_decr_acks(struct sk_buff *buf) | |||
| 149 | * Called with 'node' locked, bc_lock unlocked | 149 | * Called with 'node' locked, bc_lock unlocked |
| 150 | */ | 150 | */ |
| 151 | 151 | ||
| 152 | static void bclink_set_gap(struct node *n_ptr) | 152 | static void bclink_set_gap(struct tipc_node *n_ptr) |
| 153 | { | 153 | { |
| 154 | struct sk_buff *buf = n_ptr->bclink.deferred_head; | 154 | struct sk_buff *buf = n_ptr->bclink.deferred_head; |
| 155 | 155 | ||
| @@ -202,7 +202,7 @@ static void bclink_retransmit_pkt(u32 after, u32 to) | |||
| 202 | * Node is locked, bc_lock unlocked. | 202 | * Node is locked, bc_lock unlocked. |
| 203 | */ | 203 | */ |
| 204 | 204 | ||
| 205 | void tipc_bclink_acknowledge(struct node *n_ptr, u32 acked) | 205 | void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked) |
| 206 | { | 206 | { |
| 207 | struct sk_buff *crs; | 207 | struct sk_buff *crs; |
| 208 | struct sk_buff *next; | 208 | struct sk_buff *next; |
| @@ -250,7 +250,7 @@ void tipc_bclink_acknowledge(struct node *n_ptr, u32 acked) | |||
| 250 | * tipc_net_lock and node lock set | 250 | * tipc_net_lock and node lock set |
| 251 | */ | 251 | */ |
| 252 | 252 | ||
| 253 | static void bclink_send_ack(struct node *n_ptr) | 253 | static void bclink_send_ack(struct tipc_node *n_ptr) |
| 254 | { | 254 | { |
| 255 | struct link *l_ptr = n_ptr->active_links[n_ptr->addr & 1]; | 255 | struct link *l_ptr = n_ptr->active_links[n_ptr->addr & 1]; |
| 256 | 256 | ||
| @@ -264,7 +264,7 @@ static void bclink_send_ack(struct node *n_ptr) | |||
| 264 | * tipc_net_lock and node lock set | 264 | * tipc_net_lock and node lock set |
| 265 | */ | 265 | */ |
| 266 | 266 | ||
| 267 | static void bclink_send_nack(struct node *n_ptr) | 267 | static void bclink_send_nack(struct tipc_node *n_ptr) |
| 268 | { | 268 | { |
| 269 | struct sk_buff *buf; | 269 | struct sk_buff *buf; |
| 270 | struct tipc_msg *msg; | 270 | struct tipc_msg *msg; |
| @@ -308,7 +308,7 @@ static void bclink_send_nack(struct node *n_ptr) | |||
| 308 | * tipc_net_lock and node lock set | 308 | * tipc_net_lock and node lock set |
| 309 | */ | 309 | */ |
| 310 | 310 | ||
| 311 | void tipc_bclink_check_gap(struct node *n_ptr, u32 last_sent) | 311 | void tipc_bclink_check_gap(struct tipc_node *n_ptr, u32 last_sent) |
| 312 | { | 312 | { |
| 313 | if (!n_ptr->bclink.supported || | 313 | if (!n_ptr->bclink.supported || |
| 314 | less_eq(last_sent, mod(n_ptr->bclink.last_in))) | 314 | less_eq(last_sent, mod(n_ptr->bclink.last_in))) |
| @@ -328,7 +328,7 @@ void tipc_bclink_check_gap(struct node *n_ptr, u32 last_sent) | |||
| 328 | 328 | ||
| 329 | static void tipc_bclink_peek_nack(u32 dest, u32 sender_tag, u32 gap_after, u32 gap_to) | 329 | static void tipc_bclink_peek_nack(u32 dest, u32 sender_tag, u32 gap_after, u32 gap_to) |
| 330 | { | 330 | { |
| 331 | struct node *n_ptr = tipc_node_find(dest); | 331 | struct tipc_node *n_ptr = tipc_node_find(dest); |
| 332 | u32 my_after, my_to; | 332 | u32 my_after, my_to; |
| 333 | 333 | ||
| 334 | if (unlikely(!n_ptr || !tipc_node_is_up(n_ptr))) | 334 | if (unlikely(!n_ptr || !tipc_node_is_up(n_ptr))) |
| @@ -418,7 +418,7 @@ void tipc_bclink_recv_pkt(struct sk_buff *buf) | |||
| 418 | static int rx_count = 0; | 418 | static int rx_count = 0; |
| 419 | #endif | 419 | #endif |
| 420 | struct tipc_msg *msg = buf_msg(buf); | 420 | struct tipc_msg *msg = buf_msg(buf); |
| 421 | struct node* node = tipc_node_find(msg_prevnode(msg)); | 421 | struct tipc_node* node = tipc_node_find(msg_prevnode(msg)); |
| 422 | u32 next_in; | 422 | u32 next_in; |
| 423 | u32 seqno; | 423 | u32 seqno; |
| 424 | struct sk_buff *deferred; | 424 | struct sk_buff *deferred; |
| @@ -538,7 +538,7 @@ u32 tipc_bclink_get_last_sent(void) | |||
| 538 | return last_sent; | 538 | return last_sent; |
| 539 | } | 539 | } |
| 540 | 540 | ||
| 541 | u32 tipc_bclink_acks_missing(struct node *n_ptr) | 541 | u32 tipc_bclink_acks_missing(struct tipc_node *n_ptr) |
| 542 | { | 542 | { |
| 543 | return (n_ptr->bclink.supported && | 543 | return (n_ptr->bclink.supported && |
| 544 | (tipc_bclink_get_last_sent() != n_ptr->bclink.acked)); | 544 | (tipc_bclink_get_last_sent() != n_ptr->bclink.acked)); |
diff --git a/net/tipc/bcast.h b/net/tipc/bcast.h index a2416fa6b906..5aa024b99c55 100644 --- a/net/tipc/bcast.h +++ b/net/tipc/bcast.h | |||
| @@ -41,12 +41,12 @@ | |||
| 41 | #define WSIZE 32 | 41 | #define WSIZE 32 |
| 42 | 42 | ||
| 43 | /** | 43 | /** |
| 44 | * struct node_map - set of node identifiers | 44 | * struct tipc_node_map - set of node identifiers |
| 45 | * @count: # of nodes in set | 45 | * @count: # of nodes in set |
| 46 | * @map: bitmap of node identifiers that are in the set | 46 | * @map: bitmap of node identifiers that are in the set |
| 47 | */ | 47 | */ |
| 48 | 48 | ||
| 49 | struct node_map { | 49 | struct tipc_node_map { |
| 50 | u32 count; | 50 | u32 count; |
| 51 | u32 map[MAX_NODES / WSIZE]; | 51 | u32 map[MAX_NODES / WSIZE]; |
| 52 | }; | 52 | }; |
| @@ -68,7 +68,7 @@ struct port_list { | |||
| 68 | }; | 68 | }; |
| 69 | 69 | ||
| 70 | 70 | ||
| 71 | struct node; | 71 | struct tipc_node; |
| 72 | 72 | ||
| 73 | extern char tipc_bclink_name[]; | 73 | extern char tipc_bclink_name[]; |
| 74 | 74 | ||
| @@ -77,7 +77,7 @@ extern char tipc_bclink_name[]; | |||
| 77 | * nmap_add - add a node to a node map | 77 | * nmap_add - add a node to a node map |
| 78 | */ | 78 | */ |
| 79 | 79 | ||
| 80 | static inline void tipc_nmap_add(struct node_map *nm_ptr, u32 node) | 80 | static inline void tipc_nmap_add(struct tipc_node_map *nm_ptr, u32 node) |
| 81 | { | 81 | { |
| 82 | int n = tipc_node(node); | 82 | int n = tipc_node(node); |
| 83 | int w = n / WSIZE; | 83 | int w = n / WSIZE; |
| @@ -93,7 +93,7 @@ static inline void tipc_nmap_add(struct node_map *nm_ptr, u32 node) | |||
| 93 | * nmap_remove - remove a node from a node map | 93 | * nmap_remove - remove a node from a node map |
| 94 | */ | 94 | */ |
| 95 | 95 | ||
| 96 | static inline void tipc_nmap_remove(struct node_map *nm_ptr, u32 node) | 96 | static inline void tipc_nmap_remove(struct tipc_node_map *nm_ptr, u32 node) |
| 97 | { | 97 | { |
| 98 | int n = tipc_node(node); | 98 | int n = tipc_node(node); |
| 99 | int w = n / WSIZE; | 99 | int w = n / WSIZE; |
| @@ -109,7 +109,7 @@ static inline void tipc_nmap_remove(struct node_map *nm_ptr, u32 node) | |||
| 109 | * nmap_equal - test for equality of node maps | 109 | * nmap_equal - test for equality of node maps |
| 110 | */ | 110 | */ |
| 111 | 111 | ||
| 112 | static inline int tipc_nmap_equal(struct node_map *nm_a, struct node_map *nm_b) | 112 | static inline int tipc_nmap_equal(struct tipc_node_map *nm_a, struct tipc_node_map *nm_b) |
| 113 | { | 113 | { |
| 114 | return !memcmp(nm_a, nm_b, sizeof(*nm_a)); | 114 | return !memcmp(nm_a, nm_b, sizeof(*nm_a)); |
| 115 | } | 115 | } |
| @@ -121,8 +121,8 @@ static inline int tipc_nmap_equal(struct node_map *nm_a, struct node_map *nm_b) | |||
| 121 | * @nm_diff: output node map A-B (i.e. nodes of A that are not in B) | 121 | * @nm_diff: output node map A-B (i.e. nodes of A that are not in B) |
| 122 | */ | 122 | */ |
| 123 | 123 | ||
| 124 | static inline void tipc_nmap_diff(struct node_map *nm_a, struct node_map *nm_b, | 124 | static inline void tipc_nmap_diff(struct tipc_node_map *nm_a, struct tipc_node_map *nm_b, |
| 125 | struct node_map *nm_diff) | 125 | struct tipc_node_map *nm_diff) |
| 126 | { | 126 | { |
| 127 | int stop = sizeof(nm_a->map) / sizeof(u32); | 127 | int stop = sizeof(nm_a->map) / sizeof(u32); |
| 128 | int w; | 128 | int w; |
| @@ -195,12 +195,12 @@ static inline void tipc_port_list_free(struct port_list *pl_ptr) | |||
| 195 | 195 | ||
| 196 | int tipc_bclink_init(void); | 196 | int tipc_bclink_init(void); |
| 197 | void tipc_bclink_stop(void); | 197 | void tipc_bclink_stop(void); |
| 198 | void tipc_bclink_acknowledge(struct node *n_ptr, u32 acked); | 198 | void tipc_bclink_acknowledge(struct tipc_node *n_ptr, u32 acked); |
| 199 | int tipc_bclink_send_msg(struct sk_buff *buf); | 199 | int tipc_bclink_send_msg(struct sk_buff *buf); |
| 200 | void tipc_bclink_recv_pkt(struct sk_buff *buf); | 200 | void tipc_bclink_recv_pkt(struct sk_buff *buf); |
| 201 | u32 tipc_bclink_get_last_sent(void); | 201 | u32 tipc_bclink_get_last_sent(void); |
| 202 | u32 tipc_bclink_acks_missing(struct node *n_ptr); | 202 | u32 tipc_bclink_acks_missing(struct tipc_node *n_ptr); |
| 203 | void tipc_bclink_check_gap(struct node *n_ptr, u32 seqno); | 203 | void tipc_bclink_check_gap(struct tipc_node *n_ptr, u32 seqno); |
| 204 | int tipc_bclink_stats(char *stats_buf, const u32 buf_size); | 204 | int tipc_bclink_stats(char *stats_buf, const u32 buf_size); |
| 205 | int tipc_bclink_reset_stats(void); | 205 | int tipc_bclink_reset_stats(void); |
| 206 | int tipc_bclink_set_queue_limits(u32 limit); | 206 | int tipc_bclink_set_queue_limits(u32 limit); |
diff --git a/net/tipc/bearer.c b/net/tipc/bearer.c index 6a9aba3edd08..a7a36779b9b3 100644 --- a/net/tipc/bearer.c +++ b/net/tipc/bearer.c | |||
| @@ -599,7 +599,7 @@ int tipc_block_bearer(const char *name) | |||
| 599 | spin_lock_bh(&b_ptr->publ.lock); | 599 | spin_lock_bh(&b_ptr->publ.lock); |
| 600 | b_ptr->publ.blocked = 1; | 600 | b_ptr->publ.blocked = 1; |
| 601 | list_for_each_entry_safe(l_ptr, temp_l_ptr, &b_ptr->links, link_list) { | 601 | list_for_each_entry_safe(l_ptr, temp_l_ptr, &b_ptr->links, link_list) { |
| 602 | struct node *n_ptr = l_ptr->owner; | 602 | struct tipc_node *n_ptr = l_ptr->owner; |
| 603 | 603 | ||
| 604 | spin_lock_bh(&n_ptr->lock); | 604 | spin_lock_bh(&n_ptr->lock); |
| 605 | tipc_link_reset(l_ptr); | 605 | tipc_link_reset(l_ptr); |
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h index 6a36b6600e6c..ca5734892713 100644 --- a/net/tipc/bearer.h +++ b/net/tipc/bearer.h | |||
| @@ -104,7 +104,7 @@ struct bearer { | |||
| 104 | u32 continue_count; | 104 | u32 continue_count; |
| 105 | int active; | 105 | int active; |
| 106 | char net_plane; | 106 | char net_plane; |
| 107 | struct node_map nodes; | 107 | struct tipc_node_map nodes; |
| 108 | }; | 108 | }; |
| 109 | 109 | ||
| 110 | struct bearer_name { | 110 | struct bearer_name { |
diff --git a/net/tipc/cluster.c b/net/tipc/cluster.c index 46ee6c58532d..689fdefe9d04 100644 --- a/net/tipc/cluster.c +++ b/net/tipc/cluster.c | |||
| @@ -48,8 +48,8 @@ static void tipc_cltr_multicast(struct cluster *c_ptr, struct sk_buff *buf, | |||
| 48 | u32 lower, u32 upper); | 48 | u32 lower, u32 upper); |
| 49 | static struct sk_buff *tipc_cltr_prepare_routing_msg(u32 data_size, u32 dest); | 49 | static struct sk_buff *tipc_cltr_prepare_routing_msg(u32 data_size, u32 dest); |
| 50 | 50 | ||
| 51 | struct node **tipc_local_nodes = NULL; | 51 | struct tipc_node **tipc_local_nodes = NULL; |
| 52 | struct node_map tipc_cltr_bcast_nodes = {0,{0,}}; | 52 | struct tipc_node_map tipc_cltr_bcast_nodes = {0,{0,}}; |
| 53 | u32 tipc_highest_allowed_slave = 0; | 53 | u32 tipc_highest_allowed_slave = 0; |
| 54 | 54 | ||
| 55 | struct cluster *tipc_cltr_create(u32 addr) | 55 | struct cluster *tipc_cltr_create(u32 addr) |
| @@ -115,7 +115,7 @@ void tipc_cltr_delete(struct cluster *c_ptr) | |||
| 115 | 115 | ||
| 116 | u32 tipc_cltr_next_node(struct cluster *c_ptr, u32 addr) | 116 | u32 tipc_cltr_next_node(struct cluster *c_ptr, u32 addr) |
| 117 | { | 117 | { |
| 118 | struct node *n_ptr; | 118 | struct tipc_node *n_ptr; |
| 119 | u32 n_num = tipc_node(addr) + 1; | 119 | u32 n_num = tipc_node(addr) + 1; |
| 120 | 120 | ||
| 121 | if (!c_ptr) | 121 | if (!c_ptr) |
| @@ -133,7 +133,7 @@ u32 tipc_cltr_next_node(struct cluster *c_ptr, u32 addr) | |||
| 133 | return 0; | 133 | return 0; |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | void tipc_cltr_attach_node(struct cluster *c_ptr, struct node *n_ptr) | 136 | void tipc_cltr_attach_node(struct cluster *c_ptr, struct tipc_node *n_ptr) |
| 137 | { | 137 | { |
| 138 | u32 n_num = tipc_node(n_ptr->addr); | 138 | u32 n_num = tipc_node(n_ptr->addr); |
| 139 | u32 max_n_num = tipc_max_nodes; | 139 | u32 max_n_num = tipc_max_nodes; |
| @@ -196,7 +196,7 @@ u32 tipc_cltr_select_router(struct cluster *c_ptr, u32 ref) | |||
| 196 | * Uses deterministic and fair algorithm. | 196 | * Uses deterministic and fair algorithm. |
| 197 | */ | 197 | */ |
| 198 | 198 | ||
| 199 | struct node *tipc_cltr_select_node(struct cluster *c_ptr, u32 selector) | 199 | struct tipc_node *tipc_cltr_select_node(struct cluster *c_ptr, u32 selector) |
| 200 | { | 200 | { |
| 201 | u32 n_num; | 201 | u32 n_num; |
| 202 | u32 mask = tipc_max_nodes; | 202 | u32 mask = tipc_max_nodes; |
| @@ -379,7 +379,7 @@ void tipc_cltr_recv_routing_table(struct sk_buff *buf) | |||
| 379 | { | 379 | { |
| 380 | struct tipc_msg *msg = buf_msg(buf); | 380 | struct tipc_msg *msg = buf_msg(buf); |
| 381 | struct cluster *c_ptr; | 381 | struct cluster *c_ptr; |
| 382 | struct node *n_ptr; | 382 | struct tipc_node *n_ptr; |
| 383 | unchar *node_table; | 383 | unchar *node_table; |
| 384 | u32 table_size; | 384 | u32 table_size; |
| 385 | u32 router; | 385 | u32 router; |
| @@ -499,7 +499,7 @@ static void tipc_cltr_multicast(struct cluster *c_ptr, struct sk_buff *buf, | |||
| 499 | u32 lower, u32 upper) | 499 | u32 lower, u32 upper) |
| 500 | { | 500 | { |
| 501 | struct sk_buff *buf_copy; | 501 | struct sk_buff *buf_copy; |
| 502 | struct node *n_ptr; | 502 | struct tipc_node *n_ptr; |
| 503 | u32 n_num; | 503 | u32 n_num; |
| 504 | u32 tstop; | 504 | u32 tstop; |
| 505 | 505 | ||
| @@ -534,7 +534,7 @@ void tipc_cltr_broadcast(struct sk_buff *buf) | |||
| 534 | { | 534 | { |
| 535 | struct sk_buff *buf_copy; | 535 | struct sk_buff *buf_copy; |
| 536 | struct cluster *c_ptr; | 536 | struct cluster *c_ptr; |
| 537 | struct node *n_ptr; | 537 | struct tipc_node *n_ptr; |
| 538 | u32 n_num; | 538 | u32 n_num; |
| 539 | u32 tstart; | 539 | u32 tstart; |
| 540 | u32 tstop; | 540 | u32 tstop; |
diff --git a/net/tipc/cluster.h b/net/tipc/cluster.h index 62df074afaec..333efb0b9c44 100644 --- a/net/tipc/cluster.h +++ b/net/tipc/cluster.h | |||
| @@ -54,24 +54,24 @@ | |||
| 54 | struct cluster { | 54 | struct cluster { |
| 55 | u32 addr; | 55 | u32 addr; |
| 56 | struct _zone *owner; | 56 | struct _zone *owner; |
| 57 | struct node **nodes; | 57 | struct tipc_node **nodes; |
| 58 | u32 highest_node; | 58 | u32 highest_node; |
| 59 | u32 highest_slave; | 59 | u32 highest_slave; |
| 60 | }; | 60 | }; |
| 61 | 61 | ||
| 62 | 62 | ||
| 63 | extern struct node **tipc_local_nodes; | 63 | extern struct tipc_node **tipc_local_nodes; |
| 64 | extern u32 tipc_highest_allowed_slave; | 64 | extern u32 tipc_highest_allowed_slave; |
| 65 | extern struct node_map tipc_cltr_bcast_nodes; | 65 | extern struct tipc_node_map tipc_cltr_bcast_nodes; |
| 66 | 66 | ||
| 67 | void tipc_cltr_remove_as_router(struct cluster *c_ptr, u32 router); | 67 | void tipc_cltr_remove_as_router(struct cluster *c_ptr, u32 router); |
| 68 | void tipc_cltr_send_ext_routes(struct cluster *c_ptr, u32 dest); | 68 | void tipc_cltr_send_ext_routes(struct cluster *c_ptr, u32 dest); |
| 69 | struct node *tipc_cltr_select_node(struct cluster *c_ptr, u32 selector); | 69 | struct tipc_node *tipc_cltr_select_node(struct cluster *c_ptr, u32 selector); |
| 70 | u32 tipc_cltr_select_router(struct cluster *c_ptr, u32 ref); | 70 | u32 tipc_cltr_select_router(struct cluster *c_ptr, u32 ref); |
| 71 | void tipc_cltr_recv_routing_table(struct sk_buff *buf); | 71 | void tipc_cltr_recv_routing_table(struct sk_buff *buf); |
| 72 | struct cluster *tipc_cltr_create(u32 addr); | 72 | struct cluster *tipc_cltr_create(u32 addr); |
| 73 | void tipc_cltr_delete(struct cluster *c_ptr); | 73 | void tipc_cltr_delete(struct cluster *c_ptr); |
| 74 | void tipc_cltr_attach_node(struct cluster *c_ptr, struct node *n_ptr); | 74 | void tipc_cltr_attach_node(struct cluster *c_ptr, struct tipc_node *n_ptr); |
| 75 | void tipc_cltr_send_slave_routes(struct cluster *c_ptr, u32 dest); | 75 | void tipc_cltr_send_slave_routes(struct cluster *c_ptr, u32 dest); |
| 76 | void tipc_cltr_broadcast(struct sk_buff *buf); | 76 | void tipc_cltr_broadcast(struct sk_buff *buf); |
| 77 | int tipc_cltr_init(void); | 77 | int tipc_cltr_init(void); |
diff --git a/net/tipc/discover.c b/net/tipc/discover.c index 1657f0e795ff..74b7d1e28aec 100644 --- a/net/tipc/discover.c +++ b/net/tipc/discover.c | |||
| @@ -193,7 +193,7 @@ void tipc_disc_recv_msg(struct sk_buff *buf, struct bearer *b_ptr) | |||
| 193 | /* Always accept link here */ | 193 | /* Always accept link here */ |
| 194 | struct sk_buff *rbuf; | 194 | struct sk_buff *rbuf; |
| 195 | struct tipc_media_addr *addr; | 195 | struct tipc_media_addr *addr; |
| 196 | struct node *n_ptr = tipc_node_find(orig); | 196 | struct tipc_node *n_ptr = tipc_node_find(orig); |
| 197 | int link_fully_up; | 197 | int link_fully_up; |
| 198 | 198 | ||
| 199 | dbg(" in own cluster\n"); | 199 | dbg(" in own cluster\n"); |
diff --git a/net/tipc/link.c b/net/tipc/link.c index d60113ba4b1b..dd4c18b9a35b 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c | |||
| @@ -1155,7 +1155,7 @@ int tipc_link_send_buf(struct link *l_ptr, struct sk_buff *buf) | |||
| 1155 | int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector) | 1155 | int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector) |
| 1156 | { | 1156 | { |
| 1157 | struct link *l_ptr; | 1157 | struct link *l_ptr; |
| 1158 | struct node *n_ptr; | 1158 | struct tipc_node *n_ptr; |
| 1159 | int res = -ELINKCONG; | 1159 | int res = -ELINKCONG; |
| 1160 | 1160 | ||
| 1161 | read_lock_bh(&tipc_net_lock); | 1161 | read_lock_bh(&tipc_net_lock); |
| @@ -1226,7 +1226,7 @@ static int link_send_buf_fast(struct link *l_ptr, struct sk_buff *buf, | |||
| 1226 | int tipc_send_buf_fast(struct sk_buff *buf, u32 destnode) | 1226 | int tipc_send_buf_fast(struct sk_buff *buf, u32 destnode) |
| 1227 | { | 1227 | { |
| 1228 | struct link *l_ptr; | 1228 | struct link *l_ptr; |
| 1229 | struct node *n_ptr; | 1229 | struct tipc_node *n_ptr; |
| 1230 | int res; | 1230 | int res; |
| 1231 | u32 selector = msg_origport(buf_msg(buf)) & 1; | 1231 | u32 selector = msg_origport(buf_msg(buf)) & 1; |
| 1232 | u32 dummy; | 1232 | u32 dummy; |
| @@ -1270,7 +1270,7 @@ int tipc_link_send_sections_fast(struct port *sender, | |||
| 1270 | struct tipc_msg *hdr = &sender->publ.phdr; | 1270 | struct tipc_msg *hdr = &sender->publ.phdr; |
| 1271 | struct link *l_ptr; | 1271 | struct link *l_ptr; |
| 1272 | struct sk_buff *buf; | 1272 | struct sk_buff *buf; |
| 1273 | struct node *node; | 1273 | struct tipc_node *node; |
| 1274 | int res; | 1274 | int res; |
| 1275 | u32 selector = msg_origport(hdr) & 1; | 1275 | u32 selector = msg_origport(hdr) & 1; |
| 1276 | 1276 | ||
| @@ -1364,7 +1364,7 @@ static int link_send_sections_long(struct port *sender, | |||
| 1364 | u32 destaddr) | 1364 | u32 destaddr) |
| 1365 | { | 1365 | { |
| 1366 | struct link *l_ptr; | 1366 | struct link *l_ptr; |
| 1367 | struct node *node; | 1367 | struct tipc_node *node; |
| 1368 | struct tipc_msg *hdr = &sender->publ.phdr; | 1368 | struct tipc_msg *hdr = &sender->publ.phdr; |
| 1369 | u32 dsz = msg_data_sz(hdr); | 1369 | u32 dsz = msg_data_sz(hdr); |
| 1370 | u32 max_pkt,fragm_sz,rest; | 1370 | u32 max_pkt,fragm_sz,rest; |
| @@ -1636,7 +1636,7 @@ void tipc_link_push_queue(struct link *l_ptr) | |||
| 1636 | 1636 | ||
| 1637 | static void link_reset_all(unsigned long addr) | 1637 | static void link_reset_all(unsigned long addr) |
| 1638 | { | 1638 | { |
| 1639 | struct node *n_ptr; | 1639 | struct tipc_node *n_ptr; |
| 1640 | char addr_string[16]; | 1640 | char addr_string[16]; |
| 1641 | u32 i; | 1641 | u32 i; |
| 1642 | 1642 | ||
| @@ -1682,7 +1682,7 @@ static void link_retransmit_failure(struct link *l_ptr, struct sk_buff *buf) | |||
| 1682 | 1682 | ||
| 1683 | /* Handle failure on broadcast link */ | 1683 | /* Handle failure on broadcast link */ |
| 1684 | 1684 | ||
| 1685 | struct node *n_ptr; | 1685 | struct tipc_node *n_ptr; |
| 1686 | char addr_string[16]; | 1686 | char addr_string[16]; |
| 1687 | 1687 | ||
| 1688 | tipc_printf(TIPC_OUTPUT, "Msg seq number: %u, ", msg_seqno(msg)); | 1688 | tipc_printf(TIPC_OUTPUT, "Msg seq number: %u, ", msg_seqno(msg)); |
| @@ -1843,7 +1843,7 @@ void tipc_recv_msg(struct sk_buff *head, struct tipc_bearer *tb_ptr) | |||
| 1843 | read_lock_bh(&tipc_net_lock); | 1843 | read_lock_bh(&tipc_net_lock); |
| 1844 | while (head) { | 1844 | while (head) { |
| 1845 | struct bearer *b_ptr = (struct bearer *)tb_ptr; | 1845 | struct bearer *b_ptr = (struct bearer *)tb_ptr; |
| 1846 | struct node *n_ptr; | 1846 | struct tipc_node *n_ptr; |
| 1847 | struct link *l_ptr; | 1847 | struct link *l_ptr; |
| 1848 | struct sk_buff *crs; | 1848 | struct sk_buff *crs; |
| 1849 | struct sk_buff *buf = head; | 1849 | struct sk_buff *buf = head; |
| @@ -2935,7 +2935,7 @@ void tipc_link_set_queue_limits(struct link *l_ptr, u32 window) | |||
| 2935 | * Returns pointer to link (or 0 if invalid link name). | 2935 | * Returns pointer to link (or 0 if invalid link name). |
| 2936 | */ | 2936 | */ |
| 2937 | 2937 | ||
| 2938 | static struct link *link_find_link(const char *name, struct node **node) | 2938 | static struct link *link_find_link(const char *name, struct tipc_node **node) |
| 2939 | { | 2939 | { |
| 2940 | struct link_name link_name_parts; | 2940 | struct link_name link_name_parts; |
| 2941 | struct bearer *b_ptr; | 2941 | struct bearer *b_ptr; |
| @@ -2965,7 +2965,7 @@ struct sk_buff *tipc_link_cmd_config(const void *req_tlv_area, int req_tlv_space | |||
| 2965 | struct tipc_link_config *args; | 2965 | struct tipc_link_config *args; |
| 2966 | u32 new_value; | 2966 | u32 new_value; |
| 2967 | struct link *l_ptr; | 2967 | struct link *l_ptr; |
| 2968 | struct node *node; | 2968 | struct tipc_node *node; |
| 2969 | int res; | 2969 | int res; |
| 2970 | 2970 | ||
| 2971 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_LINK_CONFIG)) | 2971 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_LINK_CONFIG)) |
| @@ -3043,7 +3043,7 @@ struct sk_buff *tipc_link_cmd_reset_stats(const void *req_tlv_area, int req_tlv_ | |||
| 3043 | { | 3043 | { |
| 3044 | char *link_name; | 3044 | char *link_name; |
| 3045 | struct link *l_ptr; | 3045 | struct link *l_ptr; |
| 3046 | struct node *node; | 3046 | struct tipc_node *node; |
| 3047 | 3047 | ||
| 3048 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_LINK_NAME)) | 3048 | if (!TLV_CHECK(req_tlv_area, req_tlv_space, TIPC_TLV_LINK_NAME)) |
| 3049 | return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); | 3049 | return tipc_cfg_reply_error_string(TIPC_CFG_TLV_ERROR); |
| @@ -3091,7 +3091,7 @@ static int tipc_link_stats(const char *name, char *buf, const u32 buf_size) | |||
| 3091 | { | 3091 | { |
| 3092 | struct print_buf pb; | 3092 | struct print_buf pb; |
| 3093 | struct link *l_ptr; | 3093 | struct link *l_ptr; |
| 3094 | struct node *node; | 3094 | struct tipc_node *node; |
| 3095 | char *status; | 3095 | char *status; |
| 3096 | u32 profile_total = 0; | 3096 | u32 profile_total = 0; |
| 3097 | 3097 | ||
| @@ -3207,7 +3207,7 @@ int link_control(const char *name, u32 op, u32 val) | |||
| 3207 | int res = -EINVAL; | 3207 | int res = -EINVAL; |
| 3208 | struct link *l_ptr; | 3208 | struct link *l_ptr; |
| 3209 | u32 bearer_id; | 3209 | u32 bearer_id; |
| 3210 | struct node * node; | 3210 | struct tipc_node * node; |
| 3211 | u32 a; | 3211 | u32 a; |
| 3212 | 3212 | ||
| 3213 | a = link_name2addr(name, &bearer_id); | 3213 | a = link_name2addr(name, &bearer_id); |
| @@ -3249,7 +3249,7 @@ int link_control(const char *name, u32 op, u32 val) | |||
| 3249 | 3249 | ||
| 3250 | u32 tipc_link_get_max_pkt(u32 dest, u32 selector) | 3250 | u32 tipc_link_get_max_pkt(u32 dest, u32 selector) |
| 3251 | { | 3251 | { |
| 3252 | struct node *n_ptr; | 3252 | struct tipc_node *n_ptr; |
| 3253 | struct link *l_ptr; | 3253 | struct link *l_ptr; |
| 3254 | u32 res = MAX_PKT_DEFAULT; | 3254 | u32 res = MAX_PKT_DEFAULT; |
| 3255 | 3255 | ||
diff --git a/net/tipc/link.h b/net/tipc/link.h index 52f3e7c1871f..6a51e38ad25c 100644 --- a/net/tipc/link.h +++ b/net/tipc/link.h | |||
| @@ -116,7 +116,7 @@ struct link { | |||
| 116 | char name[TIPC_MAX_LINK_NAME]; | 116 | char name[TIPC_MAX_LINK_NAME]; |
| 117 | struct tipc_media_addr media_addr; | 117 | struct tipc_media_addr media_addr; |
| 118 | struct timer_list timer; | 118 | struct timer_list timer; |
| 119 | struct node *owner; | 119 | struct tipc_node *owner; |
| 120 | struct list_head link_list; | 120 | struct list_head link_list; |
| 121 | 121 | ||
| 122 | /* Management and link supervision data */ | 122 | /* Management and link supervision data */ |
diff --git a/net/tipc/name_table.h b/net/tipc/name_table.h index b9e7cd336d76..139882d4ed00 100644 --- a/net/tipc/name_table.h +++ b/net/tipc/name_table.h | |||
| @@ -76,7 +76,7 @@ struct publication { | |||
| 76 | u32 node; | 76 | u32 node; |
| 77 | u32 ref; | 77 | u32 ref; |
| 78 | u32 key; | 78 | u32 key; |
| 79 | struct node_subscr subscr; | 79 | struct tipc_node_subscr subscr; |
| 80 | struct list_head local_list; | 80 | struct list_head local_list; |
| 81 | struct list_head pport_list; | 81 | struct list_head pport_list; |
| 82 | struct publication *node_list_next; | 82 | struct publication *node_list_next; |
diff --git a/net/tipc/net.c b/net/tipc/net.c index ec7b04fbdc43..7906608bf510 100644 --- a/net/tipc/net.c +++ b/net/tipc/net.c | |||
| @@ -118,7 +118,7 @@ | |||
| 118 | DEFINE_RWLOCK(tipc_net_lock); | 118 | DEFINE_RWLOCK(tipc_net_lock); |
| 119 | struct network tipc_net = { NULL }; | 119 | struct network tipc_net = { NULL }; |
| 120 | 120 | ||
| 121 | struct node *tipc_net_select_remote_node(u32 addr, u32 ref) | 121 | struct tipc_node *tipc_net_select_remote_node(u32 addr, u32 ref) |
| 122 | { | 122 | { |
| 123 | return tipc_zone_select_remote_node(tipc_net.zones[tipc_zone(addr)], addr, ref); | 123 | return tipc_zone_select_remote_node(tipc_net.zones[tipc_zone(addr)], addr, ref); |
| 124 | } | 124 | } |
diff --git a/net/tipc/net.h b/net/tipc/net.h index d154ac2bda9a..de2b9ad8f646 100644 --- a/net/tipc/net.h +++ b/net/tipc/net.h | |||
| @@ -55,7 +55,7 @@ extern rwlock_t tipc_net_lock; | |||
| 55 | void tipc_net_remove_as_router(u32 router); | 55 | void tipc_net_remove_as_router(u32 router); |
| 56 | void tipc_net_send_external_routes(u32 dest); | 56 | void tipc_net_send_external_routes(u32 dest); |
| 57 | void tipc_net_route_msg(struct sk_buff *buf); | 57 | void tipc_net_route_msg(struct sk_buff *buf); |
| 58 | struct node *tipc_net_select_remote_node(u32 addr, u32 ref); | 58 | struct tipc_node *tipc_net_select_remote_node(u32 addr, u32 ref); |
| 59 | u32 tipc_net_select_router(u32 addr, u32 ref); | 59 | u32 tipc_net_select_router(u32 addr, u32 ref); |
| 60 | 60 | ||
| 61 | int tipc_net_start(u32 addr); | 61 | int tipc_net_start(u32 addr); |
diff --git a/net/tipc/node.c b/net/tipc/node.c index ee952ad60218..20d98c56e152 100644 --- a/net/tipc/node.c +++ b/net/tipc/node.c | |||
| @@ -46,11 +46,11 @@ | |||
| 46 | #include "bearer.h" | 46 | #include "bearer.h" |
| 47 | #include "name_distr.h" | 47 | #include "name_distr.h" |
| 48 | 48 | ||
| 49 | void node_print(struct print_buf *buf, struct node *n_ptr, char *str); | 49 | void node_print(struct print_buf *buf, struct tipc_node *n_ptr, char *str); |
| 50 | static void node_lost_contact(struct node *n_ptr); | 50 | static void node_lost_contact(struct tipc_node *n_ptr); |
| 51 | static void node_established_contact(struct node *n_ptr); | 51 | static void node_established_contact(struct tipc_node *n_ptr); |
| 52 | 52 | ||
| 53 | struct node *tipc_nodes = NULL; /* sorted list of nodes within cluster */ | 53 | struct tipc_node *tipc_nodes = NULL; /* sorted list of nodes within cluster */ |
| 54 | 54 | ||
| 55 | static DEFINE_SPINLOCK(node_create_lock); | 55 | static DEFINE_SPINLOCK(node_create_lock); |
| 56 | 56 | ||
| @@ -66,11 +66,11 @@ u32 tipc_own_tag = 0; | |||
| 66 | * but this is a non-trivial change.) | 66 | * but this is a non-trivial change.) |
| 67 | */ | 67 | */ |
| 68 | 68 | ||
| 69 | struct node *tipc_node_create(u32 addr) | 69 | struct tipc_node *tipc_node_create(u32 addr) |
| 70 | { | 70 | { |
| 71 | struct cluster *c_ptr; | 71 | struct cluster *c_ptr; |
| 72 | struct node *n_ptr; | 72 | struct tipc_node *n_ptr; |
| 73 | struct node **curr_node; | 73 | struct tipc_node **curr_node; |
| 74 | 74 | ||
| 75 | spin_lock_bh(&node_create_lock); | 75 | spin_lock_bh(&node_create_lock); |
| 76 | 76 | ||
| @@ -120,7 +120,7 @@ struct node *tipc_node_create(u32 addr) | |||
| 120 | return n_ptr; | 120 | return n_ptr; |
| 121 | } | 121 | } |
| 122 | 122 | ||
| 123 | void tipc_node_delete(struct node *n_ptr) | 123 | void tipc_node_delete(struct tipc_node *n_ptr) |
| 124 | { | 124 | { |
| 125 | if (!n_ptr) | 125 | if (!n_ptr) |
| 126 | return; | 126 | return; |
| @@ -146,7 +146,7 @@ void tipc_node_delete(struct node *n_ptr) | |||
| 146 | * Link becomes active (alone or shared) or standby, depending on its priority. | 146 | * Link becomes active (alone or shared) or standby, depending on its priority. |
| 147 | */ | 147 | */ |
| 148 | 148 | ||
| 149 | void tipc_node_link_up(struct node *n_ptr, struct link *l_ptr) | 149 | void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr) |
| 150 | { | 150 | { |
| 151 | struct link **active = &n_ptr->active_links[0]; | 151 | struct link **active = &n_ptr->active_links[0]; |
| 152 | 152 | ||
| @@ -180,7 +180,7 @@ void tipc_node_link_up(struct node *n_ptr, struct link *l_ptr) | |||
| 180 | * node_select_active_links - select active link | 180 | * node_select_active_links - select active link |
| 181 | */ | 181 | */ |
| 182 | 182 | ||
| 183 | static void node_select_active_links(struct node *n_ptr) | 183 | static void node_select_active_links(struct tipc_node *n_ptr) |
| 184 | { | 184 | { |
| 185 | struct link **active = &n_ptr->active_links[0]; | 185 | struct link **active = &n_ptr->active_links[0]; |
| 186 | u32 i; | 186 | u32 i; |
| @@ -208,7 +208,7 @@ static void node_select_active_links(struct node *n_ptr) | |||
| 208 | * tipc_node_link_down - handle loss of link | 208 | * tipc_node_link_down - handle loss of link |
| 209 | */ | 209 | */ |
| 210 | 210 | ||
| 211 | void tipc_node_link_down(struct node *n_ptr, struct link *l_ptr) | 211 | void tipc_node_link_down(struct tipc_node *n_ptr, struct link *l_ptr) |
| 212 | { | 212 | { |
| 213 | struct link **active; | 213 | struct link **active; |
| 214 | 214 | ||
| @@ -235,30 +235,30 @@ void tipc_node_link_down(struct node *n_ptr, struct link *l_ptr) | |||
| 235 | node_lost_contact(n_ptr); | 235 | node_lost_contact(n_ptr); |
| 236 | } | 236 | } |
| 237 | 237 | ||
| 238 | int tipc_node_has_active_links(struct node *n_ptr) | 238 | int tipc_node_has_active_links(struct tipc_node *n_ptr) |
| 239 | { | 239 | { |
| 240 | return (n_ptr && | 240 | return (n_ptr && |
| 241 | ((n_ptr->active_links[0]) || (n_ptr->active_links[1]))); | 241 | ((n_ptr->active_links[0]) || (n_ptr->active_links[1]))); |
| 242 | } | 242 | } |
| 243 | 243 | ||
| 244 | int tipc_node_has_redundant_links(struct node *n_ptr) | 244 | int tipc_node_has_redundant_links(struct tipc_node *n_ptr) |
| 245 | { | 245 | { |
| 246 | return (n_ptr->working_links > 1); | 246 | return (n_ptr->working_links > 1); |
| 247 | } | 247 | } |
| 248 | 248 | ||
| 249 | static int tipc_node_has_active_routes(struct node *n_ptr) | 249 | static int tipc_node_has_active_routes(struct tipc_node *n_ptr) |
| 250 | { | 250 | { |
| 251 | return (n_ptr && (n_ptr->last_router >= 0)); | 251 | return (n_ptr && (n_ptr->last_router >= 0)); |
| 252 | } | 252 | } |
| 253 | 253 | ||
| 254 | int tipc_node_is_up(struct node *n_ptr) | 254 | int tipc_node_is_up(struct tipc_node *n_ptr) |
| 255 | { | 255 | { |
| 256 | return (tipc_node_has_active_links(n_ptr) || tipc_node_has_active_routes(n_ptr)); | 256 | return (tipc_node_has_active_links(n_ptr) || tipc_node_has_active_routes(n_ptr)); |
| 257 | } | 257 | } |
| 258 | 258 | ||
| 259 | struct node *tipc_node_attach_link(struct link *l_ptr) | 259 | struct tipc_node *tipc_node_attach_link(struct link *l_ptr) |
| 260 | { | 260 | { |
| 261 | struct node *n_ptr = tipc_node_find(l_ptr->addr); | 261 | struct tipc_node *n_ptr = tipc_node_find(l_ptr->addr); |
| 262 | 262 | ||
| 263 | if (!n_ptr) | 263 | if (!n_ptr) |
| 264 | n_ptr = tipc_node_create(l_ptr->addr); | 264 | n_ptr = tipc_node_create(l_ptr->addr); |
| @@ -285,7 +285,7 @@ struct node *tipc_node_attach_link(struct link *l_ptr) | |||
| 285 | return NULL; | 285 | return NULL; |
| 286 | } | 286 | } |
| 287 | 287 | ||
| 288 | void tipc_node_detach_link(struct node *n_ptr, struct link *l_ptr) | 288 | void tipc_node_detach_link(struct tipc_node *n_ptr, struct link *l_ptr) |
| 289 | { | 289 | { |
| 290 | n_ptr->links[l_ptr->b_ptr->identity] = NULL; | 290 | n_ptr->links[l_ptr->b_ptr->identity] = NULL; |
| 291 | tipc_net.zones[tipc_zone(l_ptr->addr)]->links--; | 291 | tipc_net.zones[tipc_zone(l_ptr->addr)]->links--; |
| @@ -338,7 +338,7 @@ void tipc_node_detach_link(struct node *n_ptr, struct link *l_ptr) | |||
| 338 | * | 338 | * |
| 339 | */ | 339 | */ |
| 340 | 340 | ||
| 341 | static void node_established_contact(struct node *n_ptr) | 341 | static void node_established_contact(struct tipc_node *n_ptr) |
| 342 | { | 342 | { |
| 343 | struct cluster *c_ptr; | 343 | struct cluster *c_ptr; |
| 344 | 344 | ||
| @@ -384,10 +384,10 @@ static void node_established_contact(struct node *n_ptr) | |||
| 384 | tipc_highest_allowed_slave); | 384 | tipc_highest_allowed_slave); |
| 385 | } | 385 | } |
| 386 | 386 | ||
| 387 | static void node_lost_contact(struct node *n_ptr) | 387 | static void node_lost_contact(struct tipc_node *n_ptr) |
| 388 | { | 388 | { |
| 389 | struct cluster *c_ptr; | 389 | struct cluster *c_ptr; |
| 390 | struct node_subscr *ns, *tns; | 390 | struct tipc_node_subscr *ns, *tns; |
| 391 | char addr_string[16]; | 391 | char addr_string[16]; |
| 392 | u32 i; | 392 | u32 i; |
| 393 | 393 | ||
| @@ -466,9 +466,9 @@ static void node_lost_contact(struct node *n_ptr) | |||
| 466 | * Called by when cluster local lookup has failed. | 466 | * Called by when cluster local lookup has failed. |
| 467 | */ | 467 | */ |
| 468 | 468 | ||
| 469 | struct node *tipc_node_select_next_hop(u32 addr, u32 selector) | 469 | struct tipc_node *tipc_node_select_next_hop(u32 addr, u32 selector) |
| 470 | { | 470 | { |
| 471 | struct node *n_ptr; | 471 | struct tipc_node *n_ptr; |
| 472 | u32 router_addr; | 472 | u32 router_addr; |
| 473 | 473 | ||
| 474 | if (!tipc_addr_domain_valid(addr)) | 474 | if (!tipc_addr_domain_valid(addr)) |
| @@ -513,7 +513,7 @@ struct node *tipc_node_select_next_hop(u32 addr, u32 selector) | |||
| 513 | * Uses a deterministic and fair algorithm for selecting router node. | 513 | * Uses a deterministic and fair algorithm for selecting router node. |
| 514 | */ | 514 | */ |
| 515 | 515 | ||
| 516 | u32 tipc_node_select_router(struct node *n_ptr, u32 ref) | 516 | u32 tipc_node_select_router(struct tipc_node *n_ptr, u32 ref) |
| 517 | { | 517 | { |
| 518 | u32 ulim; | 518 | u32 ulim; |
| 519 | u32 mask; | 519 | u32 mask; |
| @@ -551,7 +551,7 @@ u32 tipc_node_select_router(struct node *n_ptr, u32 ref) | |||
| 551 | return tipc_addr(own_zone(), own_cluster(), r); | 551 | return tipc_addr(own_zone(), own_cluster(), r); |
| 552 | } | 552 | } |
| 553 | 553 | ||
| 554 | void tipc_node_add_router(struct node *n_ptr, u32 router) | 554 | void tipc_node_add_router(struct tipc_node *n_ptr, u32 router) |
| 555 | { | 555 | { |
| 556 | u32 r_num = tipc_node(router); | 556 | u32 r_num = tipc_node(router); |
| 557 | 557 | ||
| @@ -562,7 +562,7 @@ void tipc_node_add_router(struct node *n_ptr, u32 router) | |||
| 562 | !n_ptr->routers[n_ptr->last_router]); | 562 | !n_ptr->routers[n_ptr->last_router]); |
| 563 | } | 563 | } |
| 564 | 564 | ||
| 565 | void tipc_node_remove_router(struct node *n_ptr, u32 router) | 565 | void tipc_node_remove_router(struct tipc_node *n_ptr, u32 router) |
| 566 | { | 566 | { |
| 567 | u32 r_num = tipc_node(router); | 567 | u32 r_num = tipc_node(router); |
| 568 | 568 | ||
| @@ -580,7 +580,7 @@ void tipc_node_remove_router(struct node *n_ptr, u32 router) | |||
| 580 | } | 580 | } |
| 581 | 581 | ||
| 582 | #if 0 | 582 | #if 0 |
| 583 | void node_print(struct print_buf *buf, struct node *n_ptr, char *str) | 583 | void node_print(struct print_buf *buf, struct tipc_node *n_ptr, char *str) |
| 584 | { | 584 | { |
| 585 | u32 i; | 585 | u32 i; |
| 586 | 586 | ||
| @@ -597,7 +597,7 @@ void node_print(struct print_buf *buf, struct node *n_ptr, char *str) | |||
| 597 | 597 | ||
| 598 | u32 tipc_available_nodes(const u32 domain) | 598 | u32 tipc_available_nodes(const u32 domain) |
| 599 | { | 599 | { |
| 600 | struct node *n_ptr; | 600 | struct tipc_node *n_ptr; |
| 601 | u32 cnt = 0; | 601 | u32 cnt = 0; |
| 602 | 602 | ||
| 603 | read_lock_bh(&tipc_net_lock); | 603 | read_lock_bh(&tipc_net_lock); |
| @@ -615,7 +615,7 @@ struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space) | |||
| 615 | { | 615 | { |
| 616 | u32 domain; | 616 | u32 domain; |
| 617 | struct sk_buff *buf; | 617 | struct sk_buff *buf; |
| 618 | struct node *n_ptr; | 618 | struct tipc_node *n_ptr; |
| 619 | struct tipc_node_info node_info; | 619 | struct tipc_node_info node_info; |
| 620 | u32 payload_size; | 620 | u32 payload_size; |
| 621 | 621 | ||
| @@ -667,7 +667,7 @@ struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space) | |||
| 667 | { | 667 | { |
| 668 | u32 domain; | 668 | u32 domain; |
| 669 | struct sk_buff *buf; | 669 | struct sk_buff *buf; |
| 670 | struct node *n_ptr; | 670 | struct tipc_node *n_ptr; |
| 671 | struct tipc_link_info link_info; | 671 | struct tipc_link_info link_info; |
| 672 | u32 payload_size; | 672 | u32 payload_size; |
| 673 | 673 | ||
diff --git a/net/tipc/node.h b/net/tipc/node.h index cd1882654bbb..6f990da5d143 100644 --- a/net/tipc/node.h +++ b/net/tipc/node.h | |||
| @@ -43,7 +43,7 @@ | |||
| 43 | #include "bearer.h" | 43 | #include "bearer.h" |
| 44 | 44 | ||
| 45 | /** | 45 | /** |
| 46 | * struct node - TIPC node structure | 46 | * struct tipc_node - TIPC node structure |
| 47 | * @addr: network address of node | 47 | * @addr: network address of node |
| 48 | * @lock: spinlock governing access to structure | 48 | * @lock: spinlock governing access to structure |
| 49 | * @owner: pointer to cluster that node belongs to | 49 | * @owner: pointer to cluster that node belongs to |
| @@ -68,11 +68,11 @@ | |||
| 68 | * @defragm: list of partially reassembled b'cast message fragments from node | 68 | * @defragm: list of partially reassembled b'cast message fragments from node |
| 69 | */ | 69 | */ |
| 70 | 70 | ||
| 71 | struct node { | 71 | struct tipc_node { |
| 72 | u32 addr; | 72 | u32 addr; |
| 73 | spinlock_t lock; | 73 | spinlock_t lock; |
| 74 | struct cluster *owner; | 74 | struct cluster *owner; |
| 75 | struct node *next; | 75 | struct tipc_node *next; |
| 76 | struct list_head nsub; | 76 | struct list_head nsub; |
| 77 | struct link *active_links[2]; | 77 | struct link *active_links[2]; |
| 78 | struct link *links[MAX_BEARERS]; | 78 | struct link *links[MAX_BEARERS]; |
| @@ -94,26 +94,26 @@ struct node { | |||
| 94 | } bclink; | 94 | } bclink; |
| 95 | }; | 95 | }; |
| 96 | 96 | ||
| 97 | extern struct node *tipc_nodes; | 97 | extern struct tipc_node *tipc_nodes; |
| 98 | extern u32 tipc_own_tag; | 98 | extern u32 tipc_own_tag; |
| 99 | 99 | ||
| 100 | struct node *tipc_node_create(u32 addr); | 100 | struct tipc_node *tipc_node_create(u32 addr); |
| 101 | void tipc_node_delete(struct node *n_ptr); | 101 | void tipc_node_delete(struct tipc_node *n_ptr); |
| 102 | struct node *tipc_node_attach_link(struct link *l_ptr); | 102 | struct tipc_node *tipc_node_attach_link(struct link *l_ptr); |
| 103 | void tipc_node_detach_link(struct node *n_ptr, struct link *l_ptr); | 103 | void tipc_node_detach_link(struct tipc_node *n_ptr, struct link *l_ptr); |
| 104 | void tipc_node_link_down(struct node *n_ptr, struct link *l_ptr); | 104 | void tipc_node_link_down(struct tipc_node *n_ptr, struct link *l_ptr); |
| 105 | void tipc_node_link_up(struct node *n_ptr, struct link *l_ptr); | 105 | void tipc_node_link_up(struct tipc_node *n_ptr, struct link *l_ptr); |
| 106 | int tipc_node_has_active_links(struct node *n_ptr); | 106 | int tipc_node_has_active_links(struct tipc_node *n_ptr); |
| 107 | int tipc_node_has_redundant_links(struct node *n_ptr); | 107 | int tipc_node_has_redundant_links(struct tipc_node *n_ptr); |
| 108 | u32 tipc_node_select_router(struct node *n_ptr, u32 ref); | 108 | u32 tipc_node_select_router(struct tipc_node *n_ptr, u32 ref); |
| 109 | struct node *tipc_node_select_next_hop(u32 addr, u32 selector); | 109 | struct tipc_node *tipc_node_select_next_hop(u32 addr, u32 selector); |
| 110 | int tipc_node_is_up(struct node *n_ptr); | 110 | int tipc_node_is_up(struct tipc_node *n_ptr); |
| 111 | void tipc_node_add_router(struct node *n_ptr, u32 router); | 111 | void tipc_node_add_router(struct tipc_node *n_ptr, u32 router); |
| 112 | void tipc_node_remove_router(struct node *n_ptr, u32 router); | 112 | void tipc_node_remove_router(struct tipc_node *n_ptr, u32 router); |
| 113 | struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space); | 113 | struct sk_buff *tipc_node_get_links(const void *req_tlv_area, int req_tlv_space); |
| 114 | struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space); | 114 | struct sk_buff *tipc_node_get_nodes(const void *req_tlv_area, int req_tlv_space); |
| 115 | 115 | ||
| 116 | static inline struct node *tipc_node_find(u32 addr) | 116 | static inline struct tipc_node *tipc_node_find(u32 addr) |
| 117 | { | 117 | { |
| 118 | if (likely(in_own_cluster(addr))) | 118 | if (likely(in_own_cluster(addr))) |
| 119 | return tipc_local_nodes[tipc_node(addr)]; | 119 | return tipc_local_nodes[tipc_node(addr)]; |
| @@ -126,19 +126,19 @@ static inline struct node *tipc_node_find(u32 addr) | |||
| 126 | return NULL; | 126 | return NULL; |
| 127 | } | 127 | } |
| 128 | 128 | ||
| 129 | static inline struct node *tipc_node_select(u32 addr, u32 selector) | 129 | static inline struct tipc_node *tipc_node_select(u32 addr, u32 selector) |
| 130 | { | 130 | { |
| 131 | if (likely(in_own_cluster(addr))) | 131 | if (likely(in_own_cluster(addr))) |
| 132 | return tipc_local_nodes[tipc_node(addr)]; | 132 | return tipc_local_nodes[tipc_node(addr)]; |
| 133 | return tipc_node_select_next_hop(addr, selector); | 133 | return tipc_node_select_next_hop(addr, selector); |
| 134 | } | 134 | } |
| 135 | 135 | ||
| 136 | static inline void tipc_node_lock(struct node *n_ptr) | 136 | static inline void tipc_node_lock(struct tipc_node *n_ptr) |
| 137 | { | 137 | { |
| 138 | spin_lock_bh(&n_ptr->lock); | 138 | spin_lock_bh(&n_ptr->lock); |
| 139 | } | 139 | } |
| 140 | 140 | ||
| 141 | static inline void tipc_node_unlock(struct node *n_ptr) | 141 | static inline void tipc_node_unlock(struct tipc_node *n_ptr) |
| 142 | { | 142 | { |
| 143 | spin_unlock_bh(&n_ptr->lock); | 143 | spin_unlock_bh(&n_ptr->lock); |
| 144 | } | 144 | } |
diff --git a/net/tipc/node_subscr.c b/net/tipc/node_subscr.c index 8ecbd0fb6103..19194d476a9e 100644 --- a/net/tipc/node_subscr.c +++ b/net/tipc/node_subscr.c | |||
| @@ -44,7 +44,7 @@ | |||
| 44 | * tipc_nodesub_subscribe - create "node down" subscription for specified node | 44 | * tipc_nodesub_subscribe - create "node down" subscription for specified node |
| 45 | */ | 45 | */ |
| 46 | 46 | ||
| 47 | void tipc_nodesub_subscribe(struct node_subscr *node_sub, u32 addr, | 47 | void tipc_nodesub_subscribe(struct tipc_node_subscr *node_sub, u32 addr, |
| 48 | void *usr_handle, net_ev_handler handle_down) | 48 | void *usr_handle, net_ev_handler handle_down) |
| 49 | { | 49 | { |
| 50 | if (addr == tipc_own_addr) { | 50 | if (addr == tipc_own_addr) { |
| @@ -69,7 +69,7 @@ void tipc_nodesub_subscribe(struct node_subscr *node_sub, u32 addr, | |||
| 69 | * tipc_nodesub_unsubscribe - cancel "node down" subscription (if any) | 69 | * tipc_nodesub_unsubscribe - cancel "node down" subscription (if any) |
| 70 | */ | 70 | */ |
| 71 | 71 | ||
| 72 | void tipc_nodesub_unsubscribe(struct node_subscr *node_sub) | 72 | void tipc_nodesub_unsubscribe(struct tipc_node_subscr *node_sub) |
| 73 | { | 73 | { |
| 74 | if (!node_sub->node) | 74 | if (!node_sub->node) |
| 75 | return; | 75 | return; |
diff --git a/net/tipc/node_subscr.h b/net/tipc/node_subscr.h index 5f3f5859b84c..006ed739f515 100644 --- a/net/tipc/node_subscr.h +++ b/net/tipc/node_subscr.h | |||
| @@ -42,22 +42,22 @@ | |||
| 42 | typedef void (*net_ev_handler) (void *usr_handle); | 42 | typedef void (*net_ev_handler) (void *usr_handle); |
| 43 | 43 | ||
| 44 | /** | 44 | /** |
| 45 | * struct node_subscr - "node down" subscription entry | 45 | * struct tipc_node_subscr - "node down" subscription entry |
| 46 | * @node: ptr to node structure of interest (or NULL, if none) | 46 | * @node: ptr to node structure of interest (or NULL, if none) |
| 47 | * @handle_node_down: routine to invoke when node fails | 47 | * @handle_node_down: routine to invoke when node fails |
| 48 | * @usr_handle: argument to pass to routine when node fails | 48 | * @usr_handle: argument to pass to routine when node fails |
| 49 | * @nodesub_list: adjacent entries in list of subscriptions for the node | 49 | * @nodesub_list: adjacent entries in list of subscriptions for the node |
| 50 | */ | 50 | */ |
| 51 | 51 | ||
| 52 | struct node_subscr { | 52 | struct tipc_node_subscr { |
| 53 | struct node *node; | 53 | struct tipc_node *node; |
| 54 | net_ev_handler handle_node_down; | 54 | net_ev_handler handle_node_down; |
| 55 | void *usr_handle; | 55 | void *usr_handle; |
| 56 | struct list_head nodesub_list; | 56 | struct list_head nodesub_list; |
| 57 | }; | 57 | }; |
| 58 | 58 | ||
| 59 | void tipc_nodesub_subscribe(struct node_subscr *node_sub, u32 addr, | 59 | void tipc_nodesub_subscribe(struct tipc_node_subscr *node_sub, u32 addr, |
| 60 | void *usr_handle, net_ev_handler handle_down); | 60 | void *usr_handle, net_ev_handler handle_down); |
| 61 | void tipc_nodesub_unsubscribe(struct node_subscr *node_sub); | 61 | void tipc_nodesub_unsubscribe(struct tipc_node_subscr *node_sub); |
| 62 | 62 | ||
| 63 | #endif | 63 | #endif |
diff --git a/net/tipc/port.h b/net/tipc/port.h index e5f8c16429bd..ff31ee4a1dc3 100644 --- a/net/tipc/port.h +++ b/net/tipc/port.h | |||
| @@ -105,7 +105,7 @@ struct port { | |||
| 105 | u32 probing_interval; | 105 | u32 probing_interval; |
| 106 | u32 last_in_seqno; | 106 | u32 last_in_seqno; |
| 107 | struct timer_list timer; | 107 | struct timer_list timer; |
| 108 | struct node_subscr subscription; | 108 | struct tipc_node_subscr subscription; |
| 109 | }; | 109 | }; |
| 110 | 110 | ||
| 111 | extern spinlock_t tipc_port_list_lock; | 111 | extern spinlock_t tipc_port_list_lock; |
diff --git a/net/tipc/zone.c b/net/tipc/zone.c index 3506f8563441..2c01ba2d86bf 100644 --- a/net/tipc/zone.c +++ b/net/tipc/zone.c | |||
| @@ -111,10 +111,10 @@ void tipc_zone_send_external_routes(struct _zone *z_ptr, u32 dest) | |||
| 111 | } | 111 | } |
| 112 | } | 112 | } |
| 113 | 113 | ||
| 114 | struct node *tipc_zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref) | 114 | struct tipc_node *tipc_zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref) |
| 115 | { | 115 | { |
| 116 | struct cluster *c_ptr; | 116 | struct cluster *c_ptr; |
| 117 | struct node *n_ptr; | 117 | struct tipc_node *n_ptr; |
| 118 | u32 c_num; | 118 | u32 c_num; |
| 119 | 119 | ||
| 120 | if (!z_ptr) | 120 | if (!z_ptr) |
diff --git a/net/tipc/zone.h b/net/tipc/zone.h index 6e7a08df8af5..7bdc3406ba9b 100644 --- a/net/tipc/zone.h +++ b/net/tipc/zone.h | |||
| @@ -54,7 +54,7 @@ struct _zone { | |||
| 54 | u32 links; | 54 | u32 links; |
| 55 | }; | 55 | }; |
| 56 | 56 | ||
| 57 | struct node *tipc_zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref); | 57 | struct tipc_node *tipc_zone_select_remote_node(struct _zone *z_ptr, u32 addr, u32 ref); |
| 58 | u32 tipc_zone_select_router(struct _zone *z_ptr, u32 addr, u32 ref); | 58 | u32 tipc_zone_select_router(struct _zone *z_ptr, u32 addr, u32 ref); |
| 59 | void tipc_zone_remove_as_router(struct _zone *z_ptr, u32 router); | 59 | void tipc_zone_remove_as_router(struct _zone *z_ptr, u32 router); |
| 60 | void tipc_zone_send_external_routes(struct _zone *z_ptr, u32 dest); | 60 | void tipc_zone_send_external_routes(struct _zone *z_ptr, u32 dest); |
