Pedro,
I would like to help but your code has so many changes from the wifi-tcp.cc that it's hard to know which one caused the problem. I would suggest going back to wifi-tcp.cc and individually changing parameters and objects until you get to what you want without breaking the sim. One thing that stands out is that you don't explicitly set the WifiRemoteStationManager which is set in the example. One more suggestions is to use the BulkSendApplication rather than OnOff since BulkSend will send packets as fast as possible while maintaining some flow control.
Anyways, hope that helps,
Jared.