Following your tip I have printed the connection state and effectively I saw that it was connected in 'N' mode:
command:
WiFi.printDiag(Serial);
result:
Mode: STA
PHY mode: N
Channel: 3
AP id: 0
Status: 5
Auto connect: 1
SSID (8): xpto-net
Passphrase (0):
BSSID set: 0
About forcing the mode in user_init, where did you do it? In the WiFi library? The wifi_set_phy_mode(PHY_MODE_11B) is not directly available in the Arduino library, so I'm supposing you have done it directly in the library, can you give some additional details about it?
Best regards
Fernando