Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#7 Patch for compiling as a module with PAN

open
nobody
None
5
2002-02-11
2002-02-11
Fabrizio Gennari
No

OpenBT stack's PAN profile only compiles when the
stack is built inside the kernel, but when the stack
is compiled as a module, the following errors occur:

bnep.o(.text+0x0): multiple definition of `init_module'
bluetooth.o(.text+0x25a0): first defined here

This patch makes it possible to compile the stack as a
module with PAN profile:
1) bnep_init_module is now called from bluetooth.c,
the macro module_init(bnep_init_module) has been
removed
2) when the module is removed, bluetooth.c calls a new
function named bnep_exit_module

Also two modifications in bnep.c are done:
1) swapped the >= and <= signs in the multicast filter
check (they caused multicast packets to be dropped)
2) if bnep_send_packet cannot subscribe a memory
buffer, the packet is not dropped with dev_kfree_skb,
instead -1 is returned so the queue discipline re-
enqueues the packet. Packet dropping is utterly
destructive for non-acknowledged traffic like UDP. For
TCP, a packet drop does not cause data loss because
TCP has retransmissions, however TCP retransmissions
are better avoided because they cause traffic slowdown

Discussion

  •  
    Attachments