title: Why are CFG80211 symbols missing when loading a kernel module?
body: <p>I have been given wireless driver which I have integrated in my Yocto project. The <code>.config</code> that the kernel is using has the following flag set:</p>
  <pre><code>CONFIG_CFG80211=m
  </code></pre>
  <p>This should compile the kernel with <code>CFG80211</code> as a module. However, when I try to load <code>MY_MODULE</code>  with this command:</p>
  <pre><code>insmod MY_MODULE.ko fw_name=mrvl/MY_MODULE.bin cfg80211_wext=0xf cal_data_cfg=none fw_serial=0
  </code></pre>
  <p>The module fails to load with:</p>
  <pre><code>insmod: ERROR: could not insert module MY_MODULE.ko: Unknown symbol in module
  </code></pre>
  <p>The reason of the failure is that CFG80211 symbols are not present when loading the module. This can be seen when running <code>dmesg</code>:</p>
  <pre><code>[ 1534.508504] sd8xxx: Unknown symbol mlan_main_process (err 0)
  [ 1534.508560] sd8xxx: Unknown symbol cfg80211_sched_scan_results (err 0)
  [ 1534.508704] sd8xxx: Unknown symbol cfg80211_rx_assoc_resp (err 0)
  [ 1534.508847] sd8xxx: Unknown symbol cfg80211_scan_done (err 0)
  [ 1534.508911] sd8xxx: Unknown symbol cfg80211_sched_scan_stopped (err 0)
  [ 1534.508948] sd8xxx: Unknown symbol mlan_shutdown_fw (err 0)
  [ 1534.509037] sd8xxx: Unknown symbol mlan_rx_process (err 0)
  [ 1534.509064] sd8xxx: Unknown symbol cfg80211_remain_on_channel_expired (err 0)
  [ 1534.509077] sd8xxx: Unknown symbol cfg80211_cac_event (err 0)
  ...
  </code></pre>
  <p>I tried to manually load the CFG80211 module but it is not present in the <code>lib/modules/3.14.55-yocto-standard/kernel/net</code> folder. Currently available modules in those folder are:</p>
  <pre><code>./kernel/net/wireless
  ./kernel/net/wireless/lib80211_crypt_tkip.ko
  ./kernel/net/wireless/lib80211_crypt_ccmp.ko
  ./kernel/net/wireless/lib80211.ko
  ./kernel/net/wireless/lib80211_crypt_wep.ko
  </code></pre>
  <p>Why are <code>CFG80211</code> symbols missing when loading a kernel module? Should I have a loadable 80211.ko  or I am missing something else?</p>