How to restart wifi after Suspend/Resume Ubuntu Linux

Ubuntu Linux installed on a Lenovo laptop randomly disables wireless networks altogether. Subsequently, it does not show any wireless networks too in Network Manager.

To resolve this issue, did the following:

$ sudo lshw -class network <enter>

Below is the result.

Notice the logical name wlp2s0b1 and the driver brcmsmac

*-network
description: Wireless interface
product: BCM4313 802.11bgn Wireless Network Adapter
vendor: Broadcom Inc. and subsidiaries
physical id: 0

bus info: pci@0000:04:00.0
logical name:
wlp2s0b1
version: 01
serial: 21:ef:c7:1f:db:a5
width: 64 bits
clock: 33MHz

capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless
configuration: broadcast=yes driver=
brcmsmac driverversion=4.18.0-14-generic firmware=610.812 ip=1.2.3.4 latency=0 link=yes multicast=yes wireless=IEEE 802.11
resources: irq:18 memory:f0500000-f0503fff

$ sudo vi /etc/pm/config.d/config <enter>

Add below line to the file and save.
SUSPEND_MODULES=”brcmsmac wlp2s0b1″
:wq

Restart network manager using

$ sudo service network-manager restart <enter>