[WCNCR00147618] cfg80211: Fix CONFIG_NL80211_TESTMODE build error

[Description]
Fix CONFIG_NL80211_TESTMODE build errors on linux-3.13.y and others:
1. gen4m/os/linux/gl_init.c:357:18: error: initialization from
   incompatible pointer type [-Werror=incompatible-pointer-types]
  .testmode_cmd = mtk_cfg80211_testmode_cmd,
                  ^

2. gen4m/os/linux/gl_p2p.c:162:18: error: initialization from
   incompatible pointer type [-Werror=incompatible-pointer-types]
  .testmode_cmd = mtk_p2p_cfg80211_testmode_cmd,
                  ^

Move duplicate lines from all versions of mtk_cfg80211_testmode_cmd() to
a new function mtk_wlan_cfg_testmode_cmd(), and remove dummy checks.

Tested ok by
1. build 12 variants ok:
    Enable CONFIG_NL80211_TESTMODE and make -f Makefile.x86 \
       LINUX_SRC={3.10.23/arm, 3.18.42/i386, 4.4.23/amd64, 3.13.11/amd64} \
       hif={sdio, pcie, usb}
2. insmod on 4.4.39 ok

Feature: cfg80211
Change-Id: I64b80ea6937b29f464a18b5a839e717da5300416
Signed-off-by: George Kuo <george.kuo@mediatek.com>
CR-Id: WCNCR00147618
4 files changed