  The IEEE 802.11ah amendment is designed to support upto 8K M2M devices over
the Sub-GHz channel. To achieve this, it introduces new modifications to the
PHY and MAC layers. A dynamic Restricted Access Window~(RAW) mechanism is
introduced at the MAC layer. RAW splits the access for different devices into
small chunks of time. Using the RAW mechanism, we propose a novel Delay and
Energy Aware RAW Formation (DEARF) scheme to support delay sensitive devices
along with other delay tolerant devices. We exploit this to introduce four new
RAWs. These new RAWs help split the access into contention free for delay
sensitive devices and contention based for other devices. For scheduling
resources between these devices, we give the DEARF resource allocation and
evaluate the scheme with help of simulations. Devices suffer a higher delay
but, at high loads, devices using the proposed scheme are able to save 30%
energy per packet and upto 330% energy per device. Packet delivery ratio is
100% at low loads and 90% at high loads as compared to 95% and 27% given by the
traditional access. Other delay tolerant devices save upto 16% on energy per
packet transmitted and 23% on delay at high loads.
